-
Notifications
You must be signed in to change notification settings - Fork 138
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
Reading MOT dataset with seqinfo produces 0-based indexing in frames #560
Comments
Hi, thank you for reporting the problem! Probably, we need to review the indexing logic. As I see, we already subtract 1 in the CVAT format handler. Do you use a seqinfo file? |
Yes I use a seqinfo file. I also reported a bug on the CVAT repo that is related this this one cvat-ai/cvat#3940 (I included a description of the .zip file I used over there). Since datumaro returned zero indexed item ids, regardless of my suggested fix, the -1 in CVAT format handler is wrong and also contributed to this problem. But indeed its a good thing to review the indexing logic. However, it would be nice if this issue got fixed as soon as possible. |
Then, probably, the fix should be done here: https://github.com/openvinotoolkit/datumaro/blob/develop/datumaro/plugins/mot_format.py#L125-L126 We should just start from 1 instead of 0. |
That also works and does not require modifications to the CVAT tool.
And it works! Shall I make a PR for this? |
Glad to hear this.
Yes, it would be great! |
According to the MOT data format spec, "All frame numbers, target IDs and bounding boxes are 1-based" (quote from https://github.com/dendorferpatrick/MOTChallengeEvalKit/tree/master/MOT#data-format). If this claim is correct, there is a bug in mot_format.py.
When testing the CVAT tool, which uses datumaro, I failed to import a MOT dataset with an error "ValueError: Unknown internal frame id -1\n". To debug, I installed CVAT in developer mode (with VS code) and found two issues that lead to the cause of this error, where one affects this repository. In mot_format.py on line 147 (latest develop branch) there are the following lines:
Since
items
contains frame ids that start with zero, the item with id zero never gets accessed in this loop because frame_id starts with 1 when mot annotation files is loaded. Also, a possible overrun can occur when frame_id equals the length of the sequence (which is possible since its base-1).My suggested fix:
The text was updated successfully, but these errors were encountered: