未验证 提交 8dfbd86a 编写于 作者: G Guanghua Yu 提交者: GitHub

fix condition of coco segmention (#2046)

上级 a633cd0e
......@@ -128,7 +128,7 @@ class COCODataSet(DetDataset):
# check RLE format
if 'segmentation' in box and box['iscrowd'] == 1:
gt_poly[i] = [[0.0, 0.0], ]
elif 'segmentation' in box:
elif 'segmentation' in box and box['segmentation']:
gt_poly[i] = box['segmentation']
has_segmentation = True
......
......@@ -162,7 +162,7 @@ class COCODataSet(DataSet):
gt_class[i][0] = catid2clsid[catid]
gt_bbox[i, :] = box['clean_bbox']
is_crowd[i][0] = box['iscrowd']
if 'segmentation' in box:
if 'segmentation' in box and box['segmentation']:
gt_poly[i] = box['segmentation']
has_segmentation = True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册