未验证 提交 f634caca 编写于 作者: K Kaipeng Deng 提交者: GitHub

fix ImageMixup with no gt_bbox. (#1405)

上级 ae38108a
......@@ -1266,8 +1266,8 @@ class MixupImage(BaseOperator):
if factor <= 0.0:
return sample['mixup']
im = self._mixup_img(sample['image'], sample['mixup']['image'], factor)
gt_bbox1 = sample['gt_bbox']
gt_bbox2 = sample['mixup']['gt_bbox']
gt_bbox1 = sample['gt_bbox'].reshape((-1, 4))
gt_bbox2 = sample['mixup']['gt_bbox'].reshape((-1, 4))
gt_bbox = np.concatenate((gt_bbox1, gt_bbox2), axis=0)
gt_class1 = sample['gt_class']
gt_class2 = sample['mixup']['gt_class']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册