-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Convert binary mask to polygon #381
Comments
Hi, I don't think it would be that easy to get a reasonable to convert binary masks to polygon. They seem to have managed to make it work with a few changes to #150 I'm closing this issue as I think it's in this case better to have straight support for binary masks, but let me know if you think otherwise. |
Thanks for the reply. |
Lines 132-151 in https://github.com/facebookresearch/maskrcnn-benchmark/blob/master/maskrcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py show that the binary masks are converted to |
@IssamLaradji the problem is that performing any operations on RLE is very complicated, and the easiest approach is to simply convert to a binary mask, apply the transformation and convert back to RLE. Thus, speed-wise I don't think it would be relevant to support RLE except if we spend some significant efforts writing methods that operate directly on RLE. |
@fmassa makes sense! |
@IssamLaradji In my case, instance masks may have holes, so you can not use polygons and binary mask is the only way. And binary mask do use more GPU memory. |
❓ Questions and Help
Is there a function that allows me to convert binary masks to polygons? this would help in training the model on new datasets that come with polygons like COCO.
Thanks!
The text was updated successfully, but these errors were encountered: