OpenPCDet icon indicating copy to clipboard operation
OpenPCDet copied to clipboard

[BUG] boxes_iou_bev returns a large number when boxes has negative edges.

Open Qiza-lyhm opened this issue 3 years ago • 2 comments

https://github.com/open-mmlab/OpenPCDet/blob/dd2edf9da0944238d3711f8145cc5b86c65f5a79/pcdet/ops/iou3d_nms/src/iou3d_nms_kernel.cu#L233

当A、B两个Box中存在负数边长时,其面积Sa和Sb可能被计算为负值。 因此此处的Sa+Sb-S_overlap结果可能为负值,并导致s_overlap / fmaxf(sa + sb - s_overlap, EPS) 为一个无意义的大数。

是否应该要确保sa、sb为正数,对其做abs处理?或与MMCV中的类似计算一样直接返回IoU=0? 参考MMCV的实现:https://github.com/open-mmlab/mmcv/blob/b9bdfeb6f6aa67372d18b2ed5a10de28fc179d11/mmcv/ops/csrc/common/box_iou_rotated_utils.hpp#L334

Qiza-lyhm avatar Aug 18 '22 03:08 Qiza-lyhm

Thank you very much, that's a good point, maybe we can add an assert function in the python iou3d calculation codes. So the users do not need to re-compile the CUDA codes.

sshaoshuai avatar Aug 20 '22 17:08 sshaoshuai

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Sep 20 '22 02:09 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Oct 05 '22 02:10 github-actions[bot]