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

fix condition when segm is empty (#1865)

Co-authored-by: NGuanghua Yu <742925032@qq.com>
上级 a6d71532
......@@ -346,7 +346,8 @@ class Reader(object):
# 'drop this sample'.format(
# sample['im_file'], sample['gt_bbox']))
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)):
#logger.warn('gt_mask is empty or not valid in {}'.format(
# sample['im_file']))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册