open-mmlab / mmcv

OpenMMLab Computer Vision Foundation
https://mmcv.readthedocs.io/en/latest/
Apache License 2.0
5.91k stars 1.65k forks source link

[Bug] ImportError: cannot import name 'convex_iou' from 'mmcv.ops' #3077

Closed wanglaotou closed 7 months ago

wanglaotou commented 7 months ago

Prerequisite

Environment

pip install mmcv-full==1.4.2 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html

Reproduces the problem - code sample

https://github.com/zcablii/LSKNet python ./tools/test.py \ configs/lsknet/lsk_s_fpn_1x_dota_le90.py \ checkpoints/lsk_s_fpn_1x_dota_le90_20230116-99749191.pth --format-only \ --eval-options submission_dir=work_dirs/Task1_results

Reproduces the problem - command or script

python ./tools/test.py \ configs/lsknet/lsk_s_fpn_1x_dota_le90.py \ checkpoints/lsk_s_fpn_1x_dota_le90_20230116-99749191.pth --format-only \ --eval-options submission_dir=work_dirs/Task1_results

Reproduces the problem - error message

from mmcv.ops import convex_iou ImportError: cannot import name 'convex_iou' from 'mmcv.ops' (/data/public/engineers/maoruiwang/miniconda3/envs/mmdet_lab/lib/python3.8/site-packages/mmcv/ops/init.py)

Additional information

from mmcv.ops import convex_iou ImportError: cannot import name 'convex_iou' from 'mmcv.ops'