leon-liangwu / MaskYolo_Caffe

YOLO V2 & V3 , YOLO Combined with RCNN and MaskRCNN
114 stars 50 forks source link

实例分割训练一些问题。 #31

Closed BaofengZan closed 4 years ago

BaofengZan commented 4 years ago

作者你好,我在训练过程中有一些问题,想请教一下: 1 在训练coco数据集mask_only时,decoderoi层和regionloss层中的num_class只有设置为0,才能正常训练,这样有没有问题? 2 在训练coco数据集mask_kps时,step1和step2训练完成后,只有检测框没有mask,可能是什么原因? 3 在移植到windows后,同样的参数,在windows下不收敛。 另外,batch_size一定要为1么?

期待作者的解答,谢谢。

leon-liangwu commented 4 years ago

@BaofengZan Hi, 感谢使用。 1.num_class 不一定为0。检测器是yolo,0代表1各类,用obj就可以区分fg和bg,当大于一个类的时候,num_class=类的个数。 2&3.没有mask应该是batch_size=1我这里只是写了个示范,batch_size当然大一些好,一般我是64,decode_roi里的prop_num我设为为64或128,这是只有人这个类的时候,具体根据你数据集里需要检测目标的数目而定,为这个batch中检测目标的平均值。

BaofengZan commented 4 years ago

@leon-liangwu 感谢您的回复。 对于prop_num的数值,如果在一个开放场景中,person的数量不固定, 每个batch中目标的平均值也不固定,那么这个个值可以设置大一些么? 这个值的背后意义是什么呢? 谢谢。

leon-liangwu commented 4 years ago

@BaofengZan 训练集里总归有个均值。 测试的时候不需要这个值的。测试的时候检测到几个物体,就会有几个mask。

BaofengZan commented 4 years ago

了解了,谢谢您。

leon-liangwu commented 4 years ago

@BaofengZan I have updated the repo and the training for segmentation is easier and clear now. Thanks.

BaofengZan commented 4 years ago

https://github.com/leon-liangwu/MaskYolo_Caffe/blob/eeeffe72f9c99368b9eea54d39c2ad1c94f72f86/scripts/createdata_mask.py#L133 @leon-liangwu 非常感谢。我简单看了下数据制作的脚本, 我想问一下,fillpoly函数第三个参数是画图的颜色, 为什么会对mask检测有影响呢?

leon-liangwu commented 4 years ago

对 之前是20,是用来debug的时候显示出来能看得清。我的instance mask 在一张图上,用不同的值表示不同box的mask。 现在M为1,每个box里面的mask就是对应的box的id,每个box的label是x, y, w, h, id, cls. 用id与mask对应。

leon-liangwu commented 4 years ago

@BaofengZan Hi, if you have any other problems with this repo, please feel free to let me know. If you can train the model successfully, please close the issue to make me informed that the issue has been settled.