Skip to content

Unable to upload YOLO annotations from cvat YOLO export (after re-zip) #5654

Closed
@kasuen

Description

@kasuen

My actions before raising this issue

Trying to upload annotations to a job but failing due to "not finding image". Please see Error Popup below.
For the purposes of this test, I only have annotations on frame 400.

When using the original (untouched) zip file that is provided by the CVAT export, I am able to upload it directly and create annotations from that zip file. No issues.
However, if I unzip the file. then use terminal (macos) to zip, via "zip -r" the opened folder and then attempt to upload this zip file, I am provided with an error.

Steps to Reproduce (for bugs)

  1. Upload a video to a task and label soemthing on frame 100.
  2. Export the dataset using YOLO v1.1
  3. Download the provided zip file -- do not include images.
  4. Unzip the downloaded zip file.
  5. Zip the newly unzipped file via zip -r
  6. Create a new task with the same video
  7. Attempt to upload annotations for the task. using the newly re-zipped file.

Expected Behaviour

We expect the behavior to be identical to using the original zip file. As the only action that was done was open the folder, and re-zip.

Current Behaviour

Currently we are receiving the pop up error:

Could not upload annotation for the task 5

Error: Request failed with status code 500. "datumaro.components.errors.ItemImportError: Failed to import item ('frame_000400', 'train'): Can't find image info for '/home/django/data/tasks/5/tmp/tmpe1xra07m/test_me/obj_train_data/frame_000400.PNG'\n"..

Possible Solution

Context

Trying to upload annotations

Your Environment

  • Git hash commit (git log -1): commit 3775bc2 (HEAD -> develop, origin/develop, origin/HEAD)
    Author: Kirill Lakhov kirill.lakhov@cvat.ai
    Date: Mon Jan 30 22:44:51 2023 +0300

    New models UI (New models UI #5635)

  • Docker version docker version (e.g. Docker 17.0.05): Docker version 20.10.22, build 3a2c30b

  • Are you using Docker Swarm or Kubernetes? no

  • Operating System and version (e.g. Linux, Windows, MacOS): MacOS

  • Code example or link to GitHub repo or gist to reproduce problem:

  • Other diagnostic information / logs:

    Logs from `cvat` container

Activity

whittenator

whittenator commented on Feb 28, 2023

@whittenator

Yeah, I had this same exact problem and could not figure it out until I realized what I was doing!

So, where you are probably messing up is that you are rezipping the entire folder again. You need to rezip ONLY the contents INSIDE the folder.

For example if you export annotations you get the following zip output:
image

If you rezip the entire folder again its messing up the structure and making it look like so:
image

You should only rezip the contents inside the folder and then upload that!

zhiltsov-max

zhiltsov-max commented on Mar 22, 2023

@zhiltsov-max
Contributor

Hi, please follow the answer above and check the files inside the archive. The expected file structure is described here. Please note that there is often a problem with an extra leading directory in the archive (so the files are 1 level deeper than expected). I will close the issue, don't hesitate to reopen if the problem is not resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Unable to upload YOLO annotations from cvat YOLO export (after re-zip) Β· Issue #5654 Β· cvat-ai/cvat