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

[DAR-214][external Fixed unhandled annotation types in 1.0 conversion #773

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

JBWilkie
Copy link
Collaborator

Problem

A previous PR introduced in 0.8.45 broke the following annotation types when converting from 2.0 to 1.0 JSON:

  • Cuboid
  • Ellipse
  • Keypoint
  • Skeleton

Solution

  • Introduced logic to handle these types during conversion
  • Added a test for this logic

Changelog

Fixed a bug that prevented certain annotation types from being converted from 2.0 to 1.0 JSON

Copy link

linear bot commented Jan 23, 2024

@@ -205,6 +205,9 @@ def _build_legacy_annotation_data(
# Poygons and complex polygons usually have attached bounding_box annotations
v1_data["bounding_box"] = data["bounding_box"]

if not v1_data:
v1_data[annotation_class.annotation_type] = data

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how the entire function used to work. Basically if it's not a tag, bbox, or polygon, simply return the structure that we used to

Copy link
Member

@saurbhc saurbhc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JBWilkie JBWilkie merged commit df1219e into master Jan 30, 2024
16 checks passed
@saurbhc saurbhc deleted the DAR-214 branch January 30, 2024 10:20
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

Successfully merging this pull request may close these issues.

2 participants