30系显卡安装mmdetection-torch1.12.1

电脑配置:

30系显卡安装pytorch时,如果安装cuda版本小于11时,会出现算力报错。

win11

3060显卡,

pytorch1.12.1

cuda11.3

mmcv-full 1.7.0

python =3.8

以上环境最好一致

1.在github上下载mmdetection

链接:https://github.com/open-mmlab/mmdetection

点击master 点击tags,选择v2.25.2,点击code下载到本地。速度慢的话,就网上找找方法,这里暂且不提。

一、自己创建虚拟环境

conda create -n torch1.12.1 python=3.8

二、

conda activate torch1.12.1

三、安装torch1.12.1和torchvision

在torch官网上查询对应版本:

conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3

Index of /anaconda/cloud/pytorch/win-64/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirroricon-default.png?t=M85Bhttps://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/在上方连接中下载pytorch1.12.1,torchvision==0.13.1 到本地

在下方连接中查询cudatoolkit

链接:https://download.pytorch.org/whl/torch_stable.html

下载到本地后:

打开虚拟环境,pip install 你的torch绝对路径

pip install 你的torchvision绝对路径

pip install 你的cuda绝对路径

这里不用conda,

安装完以后

pip install mmcv-full ==1.7.0

pip install numpy

pip install cython

pip install openmim

mim install mmdet

上面的顺序尽量不要错,剩下的包缺什么就安装什么。至此就安装完了。

这是第一篇,大家多多包涵!

猜你喜欢

转载自blog.csdn.net/hahahawoshishui/article/details/127865519