From 08c993d756d30b6bd5a97a9e007363d721790aeb Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Mon, 7 Dec 2020 20:12:06 +0800 Subject: [PATCH] fix mask target (#1835) --- ppdet/py_op/target.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppdet/py_op/target.py b/ppdet/py_op/target.py index 0a36a3fdc..27f280902 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) -- GitLab