步骤:
1.下载yolov5-6.0版本
请参考:下载yolov5需要的版本
2.配置环境
首先要安装好Anaconda3、cuda、cudnn
w10系统:
安装cuda、cudnn
参考:Cuda和cuDNN安装教程(超级详细)
确认以上安装好之后
在yolov5目录中找到 requirements.txt
pip install -r requirements.txt
安装pytorch版本
注意:要根据自己的显卡安装cuda、cudann、然后再根据cuda安装对应的pytorch版本
例如:我的版本,我的经验是尽量使用pip安装,不要使用conda安装。
例子:完整命令
pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html