-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
COCO export not working for polygons with 2 points only #955
Comments
@stanbiryukov , Can you reproduce the problem on develop branch as well? |
My mistake - just double checked and the above error was on the develop branch. Master is not letting me login
|
@stanbiryukov , master should work fine. But let's concentrate on the issue. Can it be reproduced on a task without annotations? Is it a task with video or images? |
Restarted docker, switched and logged in to master and getting the same error. |
Note that CVAT xml exports work just fine so this might be a pycoco related issue and not cvat. |
@stanbiryukov , if you can give us some steps to reproduce the problem it will be easy for us to investigate. In any case CVAT should handle the problem gratefully. |
A possible way to export the task as datumaro project and put it here. It will not have any images. Only annotations in an internal format. Probably it will give us some ideas how to reproduce. |
Thanks - here's the datumaro export. |
As far as I understand, initially you used |
Exporting as MS COCO dataset does not work either - same type error:
|
As far as I can see, the issue is here, the code fails because of there is a polygon with only 2 points, and it comes first in the array. Interesting. |
Perhaps the best approach is to add a warning and skip those types of segments upon export or original import? I do see the 2 point polygon in the CVAT xml file now. The CVAT api correctly doesn't allow for creation of polygons with less than 3 points. |
Looks like with the new commit and this use case, there is now an error Is it possible to skip over the problematic polygons instead of breaking the entire import? In this case I have thousands of annotations that can no longer be imported because of a few polygon errors. |
@stanbiryukov , let us understand better the problem. How did you get annotations with only 2 points for a polygon? |
@nmanovic I originally used a different annotation tool with this project: https://github.com/jsbroks/coco-annotator I suppose I can try and manually edit the JSON file, however, from a user perspective, it seems most intuitive that the import raises a warning and skips problematic polygons instead of breaking the import. |
@zhiltsov-max , what do you think? What is the best way to go here from your perspective? My thoughts: |
The idea to provide means in Datumaro to deal with the issue sounds well for me. What could be the good strategy of handling this, just ignoring the wrong annotations? |
Let's ignore and print a warning on the console. |
Hi there - any update on the raised warning strategy for converting annotations? |
It will be like stated above - in CVAT will be an error, in Datumaro will be an option to ignore corrupted annotations. |
Error display during import and export operations will be tracked in #1529 |
@zhiltsov-max Has this issue been resolved? |
Wrong annotations are not exported or imported, but there is no option to ignore them, or to print a list of errors. |
@zhiltsov-max , it looks like it is something on what you are working now. |
I'm unable to export annotations to COCO format on the latest master branch. Might be a pycocotools versioning issue.
And here's the relevant error in docker:
The text was updated successfully, but these errors were encountered: