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-5342][External] Allow import of complex polygons in COCO #989

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

JBWilkie
Copy link
Collaborator

@JBWilkie JBWilkie commented Jan 2, 2025

Problem

COCO segmentations can have >1 polygon (an array of arrays containing x, y). Currently we only select the first element

Solution

Allow import of multiple segmentation array elements as a single polygon. This effectively adds support for importing complex polygons

Changelog

Allowed import of multi-array COCO segmentations

Copy link

linear bot commented Jan 2, 2025

Copy link
Contributor

@dorfmanrobert dorfmanrobert left a comment

Choose a reason for hiding this comment

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

I would think the opposite assumption would make most sense here: that users expect an instance mask to be treated as a single complex polygon rather than separate polygon annotations. Since we only hit this with is_crowd=0, my understanding is that this would mean the masks are components of the same instance. If is_crowd=1, it would make sense to import as separate polygons

Is there a reason we are assuming users want multiple polygon annotations for an instance segmentation that has disconnected components?

@JBWilkie JBWilkie closed this Jan 6, 2025
@JBWilkie JBWilkie reopened this Jan 6, 2025
@JBWilkie JBWilkie changed the title [DAR-5342][External] Allow import of multi-array COCO segmentations [DAR-5342][External] Allow import of complex polygons in COCO Jan 6, 2025
@JBWilkie JBWilkie merged commit 90c3fc4 into master Jan 6, 2025
20 checks passed
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