Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix redundant writing of skeleton annotations (CVAT for images) #5387

Merged
merged 20 commits into from
Feb 15, 2023

Conversation

yasakova-anastasia
Copy link
Contributor

@yasakova-anastasia yasakova-anastasia commented Nov 30, 2022

Motivation and context

Fixed #5279

How has this been tested?

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

cvat-core/src/annotations-objects.ts Outdated Show resolved Hide resolved
cvat-core/src/annotations-objects.ts Outdated Show resolved Hide resolved
@yasakova-anastasia
Copy link
Contributor Author

@zhiltsov-max, could you please review this PR?

@zhiltsov-max
Copy link
Contributor

@yasakova-anastasia, do you think it needs testing?

@yasakova-anastasia
Copy link
Contributor Author

@yasakova-anastasia, do you think it needs testing?

I think no. There are already tests for import/export of annotations with skeletons.

@nmanovic
Copy link
Contributor

nmanovic commented Dec 1, 2022

@yasakova-anastasia, do you think it needs testing?

I think no. There are already tests for import/export of annotations with skeletons.

Could an existing test find the problem?

@yasakova-anastasia
Copy link
Contributor Author

Could an existing test find the problem?

Extra information was written in the annotation, it did not break anything. So I don't think a test is needed here.

@nmanovic
Copy link
Contributor

nmanovic commented Dec 1, 2022

@yasakova-anastasia , I created a task and uploaded 8 images. The task has one skeleton with 3 points. On the first frame I created a track. On the second frame I marked it as outside. As output I got the following:

  <track id="0" label="triangle" source="manual">
    <skeleton frame="0" outside="0" occluded="0" keyframe="1" points="" z_order="0">
    </skeleton>
    <skeleton frame="1" outside="0" occluded="0" keyframe="0" points="" z_order="0">
    </skeleton>
    <skeleton frame="2" outside="0" occluded="0" keyframe="0" points="" z_order="0">
    </skeleton>
    <skeleton frame="3" outside="0" occluded="0" keyframe="0" points="" z_order="0">
    </skeleton>
    <skeleton frame="4" outside="0" occluded="0" keyframe="0" points="" z_order="0">
    </skeleton>
    <skeleton frame="5" outside="0" occluded="0" keyframe="0" points="" z_order="0">
    </skeleton>
    <skeleton frame="6" outside="0" occluded="0" keyframe="0" points="" z_order="0">
    </skeleton>
    <skeleton frame="7" outside="0" occluded="0" keyframe="0" points="" z_order="0">
    </skeleton>
    <track id="0" label="1" source="manual">
      <points frame="0" outside="0" occluded="0" keyframe="1" points="91.30,52.60" z_order="0">
      </points>
      <points frame="1" outside="1" occluded="0" keyframe="1" points="91.30,52.60" z_order="0">
      </points>
    </track>
    <track id="1" label="2" source="manual">
      <points frame="0" outside="0" occluded="0" keyframe="1" points="211.09,47.14" z_order="0">
      </points>
      <points frame="1" outside="1" occluded="0" keyframe="1" points="211.09,47.14" z_order="0">
      </points>
    </track>
    <track id="2" label="3" source="manual">
      <points frame="0" outside="0" occluded="0" keyframe="1" points="190.75,158.98" z_order="0">
      </points>
      <points frame="1" outside="1" occluded="0" keyframe="1" points="190.75,158.98" z_order="0">
      </points>
    </track>
  </track>

At the same time I expected to get something like:

  <track id="0" label="triangle" source="manual">
    <skeleton frame="0" outside="0" occluded="0" keyframe="1" points="" z_order="0">
      <points label="1" outside="0" occluded="0" keyframe="1" points="91.30,52.60" z_order="0"/>
      <points label="2" outside="0" occluded="0" keyframe="1" points="211.09,47.14" z_order="0"/>
      <points label="3" outside="0" occluded="0" keyframe="1" points="190.75,158.98" z_order="0"/>
   </skeleton>
    <skeleton frame="1" outside="1" occluded="0" keyframe="1" points="" z_order="0">
      <points label="1" outside="1" occluded="0" keyframe="1" points="211.09,47.14" z_order="0"/>
      <points label="2" outside="1" occluded="0" keyframe="1" points="91.30,52.60" z_order="0">
      <points label="3" outside="1" occluded="0" keyframe="1" points="190.75,158.98" z_order="0">
    </skeleton>
  </track>

Do you agree?

@nmanovic
Copy link
Contributor

nmanovic commented Dec 1, 2022

Another possible variable which probably also fine (but it has two tracks with the same id):

 <track id="0" label="triangle" type="skeleton">
    <track id="0" label="1" source="manual">
      <points frame="0" outside="0" occluded="0" keyframe="1" points="91.30,52.60" z_order="0"/>
      <points frame="1" outside="1" occluded="0" keyframe="1" points="91.30,52.60" z_order="0"/>
    </track>
    <track id="1" label="2" source="manual">
      <points frame="0" outside="0" occluded="0" keyframe="1" points="211.09,47.14" z_order="0"/>
      <points frame="1" outside="1" occluded="0" keyframe="1" points="211.09,47.14" z_order="0"/>
    </track>
    <track id="2" label="3" source="manual">
      <points frame="0" outside="0" occluded="0" keyframe="1" points="190.75,158.98" z_order="0"/>
      <points frame="1" outside="1" occluded="0" keyframe="1" points="190.75,158.98" z_order="0"/>
    </track>
</track>

@nmanovic
Copy link
Contributor

nmanovic commented Dec 1, 2022

For images I expect something like:

    <skeleton label="triangle" z_order="0">
      <points label="1" occluded="0" source="manual" outside="0" points="91.30,52.60">
      </points>
      <points label="2" occluded="0" source="manual" outside="0" points="211.09,47.14">
      </points>
      <points label="3" occluded="0" source="manual" outside="0" points="190.75,158.98">
      </points>
    </skeleton>

Don't need to have computed attributes for a skeleton itself. What is z_order for a point? points="" looks strange.

@nmanovic nmanovic changed the title Fix redundant writing of skeleton annotations (CVAT for images) [WIP] Fix redundant writing of skeleton annotations (CVAT for images) Dec 1, 2022
@yasakova-anastasia yasakova-anastasia changed the title [WIP] Fix redundant writing of skeleton annotations (CVAT for images) Fix redundant writing of skeleton annotations (CVAT for images) Dec 8, 2022
@erichhhhho
Copy link

For images I expect something like:

    <skeleton label="triangle" z_order="0">
      <points label="1" occluded="0" source="manual" outside="0" points="91.30,52.60">
      </points>
      <points label="2" occluded="0" source="manual" outside="0" points="211.09,47.14">
      </points>
      <points label="3" occluded="0" source="manual" outside="0" points="190.75,158.98">
      </points>
    </skeleton>

Don't need to have computed attributes for a skeleton itself. What is z_order for a point? points="" looks strange.

Hi, I just tried the branch ay/extra-anno-in-cvat, it seems the videos xml got fixed alr, but the images xml still got the redundant skeleton track.

@yasakova-anastasia
Copy link
Contributor Author

yasakova-anastasia commented Dec 19, 2022

Hi, I just tried the branch ay/extra-anno-in-cvat, it seems the videos xml got fixed alr, but the images xml still got the redundant skeleton track.

Hi, @erichhhhho
I checked it again and found no problem with CVAT for images. Could you please give an example of this problem?

@erichhhhho
Copy link

Hi, I just tried the branch ay/extra-anno-in-cvat, it seems the videos xml got fixed alr, but the images xml still got the redundant skeleton track.

Hi, @erichhhhho I checked it again and found no problem with CVAT for images. Could you please give an example of this problem?

Hi @yasakova-anastasia, I checked again also, and there is no issue. Thank you for the fixing!!

@nmanovic nmanovic merged commit f52902b into develop Feb 15, 2023
@nmanovic nmanovic deleted the ay/extra-anno-in-cvat branch February 15, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skeleton Track: CVAT for images 1.1 annotation xml has skeleton track which has been switched off
7 participants