-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问实例分割中MASK的标签是每个像素实例ID该怎么处理? #1699
Comments
@dimtxw 可以使用COCO API,将mask的标注转换为poly坐标的形式,可以参考 cocodataset/cocoapi#131 |
@qingqing01 谢谢,我前面用opencv提供的函数也实现了将mask的标注转换为poly坐标的形式,但是我看到要通过这些点100%复原mask,poly坐标形式的点很多,每个实例几百上千个点,不知道是否会影响效率?也有提取出来点比较少的设置,但是通过这些点产生的mask与原始的mask只有0.9的IoU。 |
利用Poly坐标计算的地位不是特别多,效率感觉可能还好,可以看下速度。
大部分实例都这样呢?还是一少部分呢? |
我是用的opencv的findContours函数,method参数使用CHAIN_APPROX_SIMPLE时,复原回来的mask是完全匹配的,但这种获取到的点很多,几乎就是轮廓线上的所有点。 |
@dimtxw generate_mask_labels内部的计算需要Poly坐标,目前静态图的版本还不支持mask的作为输入。 如果需要改变的话,是可以用Python重新实现generate_mask_labels,在静态图中使用py_func。 另外,也可以用转换的Poly先看下效果。内部也有业务使用过poly训练的,结果没问题。另外,不知道COCO API和cv2的结果是否有差异。 |
我使用MASKRCNN做实例分割,用的自己的数据集,这个数据集里面MASK标注是个单通道图像,每个点对应原图的实例ID,而非每个实例的轮廓多边形。我看到fluid.layers.generate_mask_labels的gt_segms参数需要是轮廓多边形,请问是否有别的方法替代generate_mask_labels?还是把轮廓线提出来,轮廓线的所有点作为gt_segms?
The text was updated successfully, but these errors were encountered: