From e48f8978d7c6e42272bfb72d8872385207e098ea Mon Sep 17 00:00:00 2001 From: Xav <50361174+xavhl@users.noreply.github.com> Date: Fri, 19 May 2023 14:47:38 +0800 Subject: [PATCH] Update box_utils.py Fixed bug of undercounting bounding boxes from def mask_boxes_outside_range_numpy() --- opencood/utils/box_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencood/utils/box_utils.py b/opencood/utils/box_utils.py index c42e4de4..f780f509 100644 --- a/opencood/utils/box_utils.py +++ b/opencood/utils/box_utils.py @@ -394,7 +394,7 @@ def mask_boxes_outside_range_numpy(boxes, limit_range, order, new_boxes = boxes.copy() if boxes.shape[1] == 7: - new_boxes = boxes_to_corners_3d(new_boxes, order) + new_boxes = boxes_to_corners_3d(new_boxes, order).astype(int) mask = ((new_boxes >= limit_range[0:3]) & (new_boxes <= limit_range[3:6])).all(axis=2) @@ -953,4 +953,4 @@ def box_decode( ret.append(rg) - return torch.cat(ret, dim=-1) \ No newline at end of file + return torch.cat(ret, dim=-1)