Segmentation mask from coco style dataset is not entirely accurate #9101
Unanswered
PhilippMarquardt
asked this question in
General
Replies: 1 comment
-
Hi @PhilippMarquardt , |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, while trying to train a model on a dataset (cell segmentation) that requires quite accurate segmentations from the instance segmentation model I've noticed that the predictions always introduce quite a "big" gap between cells which is not present in the original dataset which was converted to coco. While trying to find the error I found out that decoding the segmentations with pycocotools doesn't give back the original segmentation. It is missing a few pixels which might not be important for many instance segmentation tasks but for many medical instance segmentation tasks, accurate masks are very important.

I've created a small toy image that shows the problem on an image with a single white circle on back blackground
.
To reproduce the problem run the following code with the white circle on the back blackground:
The drawn_contours.png are the contours of the original image drawn which is the correct and expected mask. The coco_out.png is the output when decoding the segmentation from the coco dataset. When looking at the images the coco_out.png is missing just a few pixels which is not usable for many datasets that require accurate segmentation.
Of course you are not the authors of the pycocotools but since this is a data format very often used in this repo I've asked myself if this is a known problem (I've opened a smiliar issue in the cocoapi repo). If a made an error please let me know :)
Thanks
Appendix if you don't want to create the output images. To see the difference quickly switch between them:


The coco_out.png
The drawn_contours.png
The output more visible on my dataset with cells:


The output when decoding mask with pycocotools:
The original output like it should be:
Beta Was this translation helpful? Give feedback.
All reactions