jsbroks / coco-annotator

:pencil2: Web-based image segmentation tool for object detection, localization, and keypoints
MIT License
2.05k stars 449 forks source link

support for subtracted polygons (donut holes/cut-outs) #187

Open matt-deboer opened 5 years ago

matt-deboer commented 5 years ago

Feature Request Currently, the only way (AFAIK) to cut a hole out of a polygon is to use the eraser tool -- but this can be a bit tedious/clumsy; it would be nice if there was a way to use the existing polygon tool to subtract an inner polygon from an outer polygon--i.e., when you complete a polygon for the same annotation that is already completely surrounded by another polygon for that annotation, it should be treated as a "cut-out". The current behavior it seems is just to ignore the additional polygon (since it is already covered).

jsbroks commented 5 years ago

Won't be hard to extend the polygon too, but I won't recommend doing cutouts at all since the COCO polygon format does not support it.

matt-deboer commented 5 years ago

When you say "does not support it", you mean that they don't have a special interpretation for a list of polygons where one polygon happens to enclose another? Or they explicitly ignore them in the RLE code?

jsbroks commented 5 years ago

It doesn't have any determining factor when to subtract or add a polygon in a list of polygons. The way to have cutouts would be to use the RLE format but the annotator currently only exports in polygon format (which is why I explicitly said polygon format).

Adding RLE export support won't be hard, but known when a paperjs/shape has a cutout might be cumbersome. Also what other parameters would the annotator us to determine which format to export an annotation in?

EMCP commented 5 years ago

where can I get more information on the RLE format? I will need cutouts as well and it sounds like it will need to be added

jkourou commented 2 years ago

@matt-deboer @EMCP Hey!

Did you have any luck with RLE format in COCO annotator?

The latest version does not import or export in RLE format, so maybe by chance you created a fork that does? If coco-annotator didn't work for you, did you find any other tool you could import in RLE format, edit and export?

Thank you anyway!

EMCP commented 2 years ago

I've not made any work in this project recently.. been mostly focusing on juju charms to instantiate other tools .. and in meanwhile been using Labelme

jkourou commented 2 years ago

@EMCP Thank you!

Yeap I have tried labelme, but it doesn't import existing COCO datasets and doesn't seem to support RLE annotations as well.