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

fix ImageMixup with no gt_bbox. (#1404)

上级 d7d3fbea
...@@ -1266,8 +1266,8 @@ class MixupImage(BaseOperator): ...@@ -1266,8 +1266,8 @@ class MixupImage(BaseOperator):
if factor <= 0.0: if factor <= 0.0:
return sample['mixup'] return sample['mixup']
im = self._mixup_img(sample['image'], sample['mixup']['image'], factor) im = self._mixup_img(sample['image'], sample['mixup']['image'], factor)
gt_bbox1 = sample['gt_bbox'] gt_bbox1 = sample['gt_bbox'].reshape((-1, 4))
gt_bbox2 = sample['mixup']['gt_bbox'] gt_bbox2 = sample['mixup']['gt_bbox'].reshape((-1, 4))
gt_bbox = np.concatenate((gt_bbox1, gt_bbox2), axis=0) gt_bbox = np.concatenate((gt_bbox1, gt_bbox2), axis=0)
gt_class1 = sample['gt_class'] gt_class1 = sample['gt_class']
gt_class2 = sample['mixup']['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.
先完成此消息的编辑!
想要评论请 注册