硬件:显卡gtx1060 cuda10.1 cudnn7.6
python 3.8
yolo5安装教程
---------------------------------------------------------------------------------------------------------------------------------
conda create -n yolo5 python=3.8
pip uninstall torch==1.8.1+cu101 torchvision==0.9.1+cu101 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
---------------------------------------------------------------------------------------------------------------------------------
cd yolo5目录下
pip install -r requirements.txt -i https://pypi.douban.com/simple/
---------------------------------------------------------------------------------------------------------------------------------
yolo5测试代码
检测图片
python detect.py --source ./data/images/ --weights weights/yolov5s.pt --conf-thres 0.4
检测视频
python detect.py --source data/video/1.mp4 --weights weights/yolov5s.pt --conf-thres 0.4
参考链接:https://blog.csdn.net/ECHOSON/article/details/121939535