未验证 提交 7c507854 编写于 作者: S Sharpiless 提交者: GitHub

Fix bug in nonempty_bbox for height (#3787)

* Update bbox_utils.py
上级 4b1e4030
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册