mmcv的安装
在如下网址下载cuda11.7的whl来安装,torch等cuda版本保证对齐
https://download.openmmlab.com/mmcv/dist/cu117/torch1.13.0/index.html?
其他包安装命令(需要按顺序)
python -m pip install -U openmim
pip install mmdet==2.28.2
python -m pip install mmcv-full==1.7.0 -f https://download.openmmlab.com/mmcv/dist/cu117/torch1.13.0/index.html
python -m pip install mmrotate==0.3.3
若测试代码时报错
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
在bbox_nms_rotated.py第58行前增加
device = bboxes.device
if scores.device != device:scores = scores.to(device)
if labels.device != device:labels = labels.to(device)
if inds.device != device:inds = inds.to(device)
if bboxes.device != device:bboxes = bboxes.to(device) 