diff --git a/ppdet/py_op/target.py b/ppdet/py_op/target.py index 0a36a3fdc567c1207de6f16ca94bcda75160d07a..27f280902dcdf28321b612ba523a417cd82726ef 100755 --- a/ppdet/py_op/target.py +++ b/ppdet/py_op/target.py @@ -340,7 +340,7 @@ def generate_mask_target(im_info, gt_classes, is_crowd, gt_segms, rois, x, y = polys[ii] if (x == -1 and y == -1): continue - elif (x >= 0 and y >= 0): + elif (x >= 0 or y >= 0): new_poly.append([x, y]) # array, one poly if len(new_poly) > 0: gt_segs.append(new_poly)