PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.88k stars 2.9k forks source link

solov2中添加mixup #1884

Closed Shanyaodedanshen closed 3 years ago

Shanyaodedanshen commented 3 years ago

请问solov2.yml中可以配置mixup的数据增强方法吗,我仿照yolo.yml等,添加了如下内容: with_mixup: True

然而训练会报错: Traceback (most recent call last): File "C:\SOLO-P\ppdet\data\reader.py", line 46, in call data = f(data, ctx) File "C:\SOLO-P\ppdet\data\transform\batch_operators.py", line 98, in call padding_segm[:, :im_h, :im_w] = gt_segm ValueError: could not broadcast input array from shape (0) into shape (0,596,480)

C:\SOLO-P\ppdet\data\parallel_map.py:243: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead .format(sample.errmsg)) 2020-12-12 10:07:27,093-WARNING: recv endsignal from outq with errmsg[consumer[consumer-19a-1] failed to map with error:[could not broadcast input array from shape (0) in to shape (0,596,480)]] 2020-12-12 10:07:28,294-WARNING: fail to map op [RandomCrop_b25567] with error: index 6 is out of bounds for axis 0 with size 6 and stack: Traceback (most recent call last): File "C:\SOLO-P\ppdet\data\reader.py", line 46, in call data = f(data, ctx) File "C:\SOLO-P\ppdet\data\transform\operators.py", line 1987, in call sample['gt_segm'], valid_ids, axis=0) File "<__array_function__ internals>", line 6, in take File "C:\Users\OceanOptic\Anaconda3\envs\solo-p\lib\site-packages\numpy\core\fromnumeric.py", line 191, in take return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode) File "C:\Users\OceanOptic\Anaconda3\envs\solo-p\lib\site-packages\numpy\core\fromnumeric.py", line 58, in _wrapfunc return bound(*args, **kwds) IndexError: index 6 is out of bounds for axis 0 with size 6 希望得到帮助,谢谢。

Shanyaodedanshen commented 3 years ago

另外,如果想在mask label中间挖洞怎么做呢,谢谢。

yghstill commented 3 years ago

@Shanyaodedanshen Mixup只支持gt_box的操作,由于solov2中有gt_mask的信息,Mixup尚未支持。现在有GridMask的数据增强方法,是对图像进行'挖洞',如果想对mask也这样做,可参考这个方法。

Shanyaodedanshen commented 3 years ago

@Shanyaodedanshen Mixup只支持gt_box的操作,由于solov2中有gt_mask的信息,Mixup尚未支持。现在有GridMask的数据增强方法,是对图像进行'挖洞',如果想对mask也这样做,可参考这个方法。

好的谢谢