-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Conversation
@zhiltsov-max, could you please review this PR? |
@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? |
Extra information was written in the annotation, it did not break anything. So I don't think a test is needed here. |
@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? |
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> |
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? |
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 |
Hi @yasakova-anastasia, I checked again also, and there is no issue. Thank you for the fixing!! |
237d29d
to
7b3ff12
Compare
Motivation and context
Fixed #5279
How has this been tested?
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.