UVTR icon indicating copy to clipboard operation
UVTR copied to clipboard

No module named 'mmdet3d.ops.iou3d'

Open javi-99 opened this issue 1 year ago • 1 comments

Hi When I run the extra_tools/create_data.py file, I face this module issue, it's not available in mmdet3d.ops. How can I fix this problem? Thanks

javi-99 avatar Aug 10 '22 18:08 javi-99

Hi, I guess you are using the mmdet3d with version >0.17.3 (required) here. A simple solution is to change the code from mmdet3d.ops.iou3d.iou3d_utils import nms_gpu, nms_normal_gpu to from mmdet3d.ops import nms and also modify the corresponding function nms_gpu to nms

yanwei-li avatar Aug 11 '22 14:08 yanwei-li

I think the replaced code could be

    if test_cfg.use_rotate_nms:
        nms_func = nms_bev
    else:
        nms_func = nms_normal_bev

and the import directives can use from mmdet3d.core.post_processing import nms_bev, nms_normal_bev or from mmcv.ops import nms_bev, nms_normal_bev

qzhang852 avatar Jul 10 '23 20:07 qzhang852