配置MMDetion on Windows10

谨以此记录安装配置过程,以便查阅。

配置安装内容如下:
pytorch:1.8.0+cu111
torchvision:0.9.0
mmcv-full==1.5.2
mmdetection2.18

建虚拟环境

conda activate mmdet
安装mmcv-full ,注意找GPU和pytorch 对应的版本
pip install mmcv-full==1.5.2 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html

以上命令安装不上,可下载安装
mmcv_full-1.5.2-cp36-cp36m-win_amd64.whl

安装MMDetection2.18

去MMDetection官网(https://github.com/open-mmlab/mmdetection)下载需安装的版本,我这里下载的是2.18

打开终端

运行->cmd
conda activate mmdet
进入mmdetection2.18 的目录结构,安装相关依赖以及编译
cd G:\Collecting\mmdetection-2.18.0
pip install -r requirements.txt
python setup.py develop

检查正确性
Check Pytorch installation
import torch, torchvision
print(torch.version, torch.cuda.is_available())

Check MMDetection installation
import mmdet
print(mmdet.version)

Check mmcv installation
from mmcv.ops import get_compiling_cuda_version, get_compiler_version
print(get_compiling_cuda_version())
print(get_compiler_version())
在这里插入图片描述
如果报以上错误的解决方案
卸掉原来的mmcv,重新安装正确的版本
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
在这里插入图片描述
参考:https://blog.csdn.net/milk_and_bread/article/details/117464976

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值