Skip to content

Conversation

@JBWilkie
Copy link
Contributor

@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

@linear
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.

3 participants