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

fix condition when segm is empty (#1864)

上级 f5d94f43
...@@ -346,7 +346,8 @@ class Reader(object): ...@@ -346,7 +346,8 @@ class Reader(object):
# 'drop this sample'.format( # 'drop this sample'.format(
# sample['im_file'], sample['gt_bbox'])) # sample['im_file'], sample['gt_bbox']))
continue continue
if self._drop_empty and self._fields and 'gt_poly' in sample: has_mask = 'gt_mask' in self._fields or 'gt_segm' in self._fields
if self._drop_empty and self._fields and has_mask:
if _has_empty(_segm(sample)): if _has_empty(_segm(sample)):
#logger.warn('gt_mask is empty or not valid in {}'.format( #logger.warn('gt_mask is empty or not valid in {}'.format(
# sample['im_file'])) # sample['im_file']))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册