Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Rectangle is not converted to polygon #130

Closed
mzur opened this issue Sep 29, 2024 · 0 comments · Fixed by #132
Closed

Rectangle is not converted to polygon #130

mzur opened this issue Sep 29, 2024 · 0 comments · Fixed by #132
Assignees
Labels

Comments

@mzur
Copy link
Member

mzur commented Sep 29, 2024

While COCO only supports segmentations and bboxes, lines and rectangles are also exported. In the upcoming COCO import, these could be imported, too, but there is an abiguous case. In the import lines and rectangles can be identified by their first coordinate not matching the last coordinate. Rectangles have 4 coordinates and lines are all the rest. But this way a line with 4 coordinates would be incorrectly identified as a rectangle. So in the COCO export we should just convert rectangles to polygons to solve this issue for the import.

Basically we only have to add a special case for rectangles here and append the first coordinate to their points array.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants