1.GPU主要参考某站【手把手带你实战YOLOv5-入门篇】YOLOv5 环境安装(重置版)_哔哩哔哩_bilibili
2.配环境时一路顺风,但是最后运行detect.py只有CPU可以跑,选取device='0'的时候GPU总是报错,显示CUDA无效,原来是Pytorch版本的问题,Previous PyTorch Versions | PyTorch 中由v1.8.2换为v1.9.0就可以了
主要参考AssertionError: CUDA unavailable, invalid device 0 requested-CSDN博客
3.视频中用到的网址
(1)miniconda下载
https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/
Index of /anaconda/miniconda/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
(3)pytorch 对应cuda10.2
Previous PyTorch Versions | PyTorch
pip install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
(4) 国内清华源镜像(配置国内源,加速下载)
pypi | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
(5)yolov5官方下载地址(release--->source版本)
Release v7.0 - YOLOv5 SOTA Realtime Instance Segmentation · ultralytics/yolov5 · GitHub