-
Notifications
You must be signed in to change notification settings - Fork 41
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
[Ai-1263] darwin py converts polygon annotations incorrectly #686
[Ai-1263] darwin py converts polygon annotations incorrectly #686
Conversation
AI-1263 Darwin-py converts polygon annotations incorrectly
Darwin-py's converter to V1 format from V2 converts polygons incorrectly, since all annotations used by gust utilizes V1 format (at least for now, we should migrate) the annotations become faulty for our models. Affected annotation types are What is wrong? Tags such as How it should look like:
How it currently is exported as:
Why does this matter? The dataloaders now have to infer the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual testing has been done. Downloaded v2 datasets, converted to V1 and tested to use our torch dataloaders for the following classes.
- tag
- bounding_box
- polygon
…onverts-polygon-annotations-incorrectly
…onverts-polygon-annotations-incorrectly
else: | ||
return {annotation_class.annotation_type: data} | ||
v1_data = {} | ||
polygon_annotation_mappings = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the use of a mapping, stylistically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a bunch of tests for the converter.
The log for the main darwin-py can be seen here (they did not pass the new tests)
Problem
Darwin-py's converter to V1 format from V2 converts polygons incorrectly, since all annotations used by gust utilizes V1 format (at least for now, we should migrate) the annotations become faulty for our models.
Affected annotation types are polygon and complex_polygon.
What is wrong?
Tags such as bounding_box gets places inside of the polygon tag in the dictionary.
How it should look like:
How it currently is exported as:
Why does this matter? The dataloaders now have to infer the bounding_box from polygons, but the data is already there.
Solution
Update the
darwin_v_1_0.py
to better handle the conversionChangelog
darwin convert darwin_1_0 v7_dataset_folder target_folder