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

Inconsistent export format when exporting videos compared to images #8839

Open
2 tasks done
gboeer opened this issue Dec 18, 2024 · 0 comments
Open
2 tasks done

Inconsistent export format when exporting videos compared to images #8839

gboeer opened this issue Dec 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@gboeer
Copy link
Contributor

gboeer commented Dec 18, 2024

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
@gboeer gboeer added the bug Something isn't working label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant