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

Better Polygons from Masks #630

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

thomasf1
Copy link

@thomasf1 thomasf1 commented Nov 29, 2023

Description

Improved the mask_to_polygons function to handle masks that have exclusions and Masks that do not align

Example:
Detections of Doughnut: Even if the Model correctly detects the Doughnut, the Polygon always was only the outer shape. With this change the hole in the middle is excluded from the Polygon
Person behind a table: When the Model identifies the Person correctly, the Part above and below the Table would have been two separate Polygons. With this change, it would be one Polygon connected.

List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • Somewhere in between between Bug fix and New feature (non-breaking change which adds functionality)
    -> Arguably brings the Polygon functions closer to expected behavior

How has this change been tested, please provide a testcase or example of how you tested the change?

Example:

Mask Annotator: (unchanged)
person_mask

Polygon Conversion before PR:
person_polygon

Polygon Conversion after PR:
person_polygon2

Any specific deployment considerations

Also changed the Polygon Annotator to display a filled Polygon

Docs

The original issue is not Documented. If the change to draw_polygon is accepted as well, the documentation for the function needs to be updated.

Thomas F added 2 commits November 29, 2023 05:43
…usions and Masks that do not align

Example:
Detections of Doughnut: Even if the Model correctly detects the Doughnut, the Polygon always was only the outer shape. With this change the hole in the middle is excluded from the Polygon
Person behind a table: When the Model identifies the Person correctly, the Part above and below the Table would have been two seaperate Polygons. With this change, it would be one Polygon connected.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Thomas F seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@SkalskiP
Copy link
Collaborator

SkalskiP commented Dec 4, 2023

Hi, @thomasf1! 👋🏻 Could you accept CLA?

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.

None yet

3 participants