From 7c50785425ec715bf17f49647b99d074ec71e19d Mon Sep 17 00:00:00 2001 From: Sharpiless <50802787+Sharpiless@users.noreply.github.com> Date: Tue, 27 Jul 2021 12:44:28 +0800 Subject: [PATCH] Fix bug in nonempty_bbox for height (#3787) * Update bbox_utils.py --- ppdet/modeling/bbox_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppdet/modeling/bbox_utils.py b/ppdet/modeling/bbox_utils.py index aa55538f3..4c4acd9dd 100644 --- a/ppdet/modeling/bbox_utils.py +++ b/ppdet/modeling/bbox_utils.py @@ -100,7 +100,7 @@ def clip_bbox(boxes, im_shape): def nonempty_bbox(boxes, min_size=0, return_mask=False): w = boxes[:, 2] - boxes[:, 0] h = boxes[:, 3] - boxes[:, 1] - mask = paddle.logical_and(w > min_size, w > min_size) + mask = paddle.logical_and(h > min_size, w > min_size) if return_mask: return mask keep = paddle.nonzero(mask).flatten() -- GitLab