supervision icon indicating copy to clipboard operation
supervision copied to clipboard

Better Polygons from Masks

Open thomasf1 opened this issue 2 years ago • 2 comments

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.

  • [X] 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.

thomasf1 avatar Nov 29 '23 05:11 thomasf1

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.

CLAassistant avatar Nov 29 '23 05:11 CLAassistant

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

SkalskiP avatar Dec 04 '23 12:12 SkalskiP