未验证 提交 4497f183 编写于 作者: W wangguanzhong 提交者: GitHub

support numpy 1.24 (#7539)

上级 eeeb92a8
...@@ -188,8 +188,9 @@ class COCODataSet(DetDataset): ...@@ -188,8 +188,9 @@ class COCODataSet(DetDataset):
if 'segmentation' in box and box['iscrowd'] == 1: if 'segmentation' in box and box['iscrowd'] == 1:
gt_poly[i] = [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]] gt_poly[i] = [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]
elif 'segmentation' in box and box['segmentation']: elif 'segmentation' in box and box['segmentation']:
if not np.array(box['segmentation'] if not np.array(
).size > 0 and not self.allow_empty: box['segmentation'],
dtype=object).size > 0 and not self.allow_empty:
bboxes.pop(i) bboxes.pop(i)
gt_poly.pop(i) gt_poly.pop(i)
np.delete(is_crowd, i) np.delete(is_crowd, i)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册