【环境配置】安装指定版本的mmcv,mmdet,mmseg
-
新建虚拟环境
网络环境只能采用清华镜像源安装,在https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ 中找到满足“需要的torch版本+本地 cuda 版本”的文件,安装该文件对应的Python版本conda create -n mmdet python=3.6 (安装对应的Python版本) source activate mmdet
-
安装cuda(torch 1.9.0-cu-11.3)
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
-
安装 mmcv-full(安装指定版本)
# pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html pip install mmcv-full==1.3.17 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.0/index.html
-
安装mmdet(安装指定版本)
git clone -b v2.17.0 https://github.com/open-mmlab/mmdetection.git cd mmdetection pip install -r requirements/build.txt pip install -v -e . # or "python setup.py develop"
-
安装mmseg(安装指定版本)
pip install mmsegmentation==0.19.0
另一篇可以参考的文章:
添加链接描述