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

Frames order is reversed once I dump annotations #3366

Closed
muratayoshio opened this issue Jun 25, 2021 · 12 comments
Closed

Frames order is reversed once I dump annotations #3366

muratayoshio opened this issue Jun 25, 2021 · 12 comments
Assignees

Comments

@muratayoshio
Copy link

My actions before raising this issue

Expected Behaviour

The frame sequence in annotations should respect the order of the uploaded sequence in the framework.

Current Behaviour

The frames sequence in annotations starts from the last frame and change the label id of the objects

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Git hash commit (git log -1):
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS):
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

Next steps

You may join our Gitter channel for community support.

@nmanovic
Copy link
Contributor

@kirill-sizov , could you please look?

@sizov-kirill
Copy link
Contributor

@kirill-sizov , could you please look?

@nmanovic, Yes, sure.

@sizov-kirill
Copy link
Contributor

Hi, @muratayoshio,
Could you please describe in more details your steps leading to the problem? What format are you working with?

@muratayoshio
Copy link
Author

Thank you...
I upload and annotated a video sequence and annotated the different objects which it appears in the Interface according to the normal video sequence, with lower Ids related to lower frames numbers.
Once I dump the annotation in MOT format or even in YOLO format, the gt txt file starts for the last frame, and assign object label sequence according to this reverse order. This off course will affect the tracking training and performance evaluation.
Thank you for your help.

@azhavoro
Copy link
Contributor

@kirill-sizov Hi, what is the status of this issue?

@sizov-kirill
Copy link
Contributor

@azhavoro Hi, not started yet, I will proceed with this task, after such as I finish my current task.

@sizov-kirill
Copy link
Contributor

Hi, @muratayoshio

I still have problem with reproducing your issue.
I tried to follow your steps, but in all cases the gt.txt file was sorted by frame number.
There is how I annotated my task:

  1. Create task with few labels and one video.
  2. Put some rectangle shapes and tracks in the interface according to the normal video sequence.
  3. Save
  4. Dump annotations in MOT 1.1 format.

Could you please tell me at what step my actions differ from yours, so that I can reproduce this problem?

Thanks for your reply in advance.

@sizov-kirill
Copy link
Contributor

I will close this issue as there is not enough information to reproduce it.

@ayhokuyan
Copy link

ayhokuyan commented Sep 21, 2021

Hey @muratayoshio,
I was having the same trouble with the frames I have uploaded using the API requests. I was using python to parse the annotations and can offer a workaround. If you are using xml.etree.ElementTree to parse, you can sort by image id as follows. It is safer to say that I am using CVAT for Images 1.1 format, this can help someone at some point🙂

root = ET.parse(filename).getroot()
root[:] = sorted(root, key=lambda child: (child.tag, child.get('name')))

@muratayoshio
Copy link
Author

muratayoshio commented Sep 21, 2021 via email

@Chicone
Copy link

Chicone commented Dec 11, 2021

In my case, the reverse problem occurs when I load a bunch of images by dragging them into the loading area. If I create a video with the images and drag the video instead, the order is correct. To solve the problem of miss-assigned labels, you can upload the dumped (wrong) annotations into the same task and export it again (reverse + reverse = right order)

@nmanovic
Copy link
Contributor

@Chicone , could you please describe how to reproduce the issue in a separate issue? Looks like it is a critical bug.

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

No branches or pull requests

7 participants