Inconsistent export format when exporting videos compared to images #8839
Description
Actions before raising this issue
- I searched the existing issues and did not find anything similar.
- I read/searched the docs
Steps to Reproduce
When I export a task like:
task = client.tasks.retrieve(task_id)
task.export_dataset("CVAT for images 1.1", "task_export.zip", include_images=True)
The exported directory/zip will contain an images
folder and an annotations.xml
.
Now in the annotations file, for each image there is an element like:
<image id="9" name="frame_1629.jpg" width="1920" height="1080">
<box label="Car" source="manual" occluded="0" xtl="1665.12" ytl="0.00" xbr="1920.00" ybr="520.90" z_order="0">
</box>
</image>
The latter is true for tasks that work with single images.
However, when exporting a task for a video file, the image tags and especially the name attribute look a bit different:
<image id="4351" name="frame_004351" width="1920" height="1080">
<box label="Car" source="manual" occluded="0" xtl="1645.77" ytl="0.00" xbr="1920.00" ybr="635.80" z_order="0">
</box>
</image>
To be precise, the name
attribute for each image does not contain the file ending (.png) in my case.
This seems like a bug to me, and especially makes handling projects with different kinds of tasks a bit more complicated.
Expected Behavior
The export format for videos and image sequences should be consistent.
Possible Solution
Add the file ending of the exported video frames to the exported annotations.xml.
Context
My specific scenario is, that importing CVAT projects into FiftyOne does not work for video tasks without specifically handling video exports, while image task exports work just fine.
Environment
cvat_sdk 2.23.1