pycococreator icon indicating copy to clipboard operation
pycococreator copied to clipboard

How to solve multiple polygons(holes) in one instance segmentation?

Open dzyjjpy opened this issue 4 years ago • 6 comments

As describe in question, I met one issue. For example, for a person's instance segmentation, there might be more than 1 polygon in the mask. some holes appeared in the person's polygon? How to solve this occasion? @waspinator

dzyjjpy avatar Apr 24 '20 03:04 dzyjjpy

微信图片_20200424114733

dzyjjpy avatar Apr 24 '20 03:04 dzyjjpy

微信图片_20200424114733

dzyjjpy avatar Apr 24 '20 03:04 dzyjjpy

@waspinator @hannarud do you have any suggestion for the bug?

dzyjjpy avatar May 19 '20 09:05 dzyjjpy

@dzyjjpy Hello, i have the same question as you. Did you solve this problem?

dy2728 avatar Jun 03 '20 03:06 dy2728

You may create a copy of original mask and perform morphological dilation, closing or floodfill and then use skimage.measure.find_contours() to get polygon. However, at training time you may use the original mask for the model because your requirement of getting a polygon depicting the outer boundry of the object is fullfilled by the annotations created earlier.

m-mohsin-zafar avatar Oct 01 '20 01:10 m-mohsin-zafar

Same question,one polygon seems unable to cover these situations: 00000 00020

daikankan avatar May 10 '21 03:05 daikankan