Better Polygons from Masks
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)
Polygon Conversion before PR:
Polygon Conversion after PR:
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.
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.
Hi, @thomasf1! 👋🏻 Could you accept CLA?