yolov5安装

一、准备

YOLOv5环境要求Python版本大于等于3.7以及PyTorch大于等于1.7

PyTorch安装请移步

二、安装

# Clone the repository
git clone https://github.com/ultralytics/yolov5
# Enter the repository root directory
cd yolov5
# Install the required packages from your cloned repository root directory
pip install -r requirements.txt  # install

三、Docker环境

也可以直接使用Docker环境

1、拉取镜像

sudo docker pull ultralytics/yolov5:latest

2、运行容器

# 运行容器
sudo docker run --ipc=host -it ultralytics/yolov5:latest
# 启动容器GPU版
sudo docker run --ipc=host --gpus all -it ultralytics/yolov5:latest

四、验证

python train.py  # train a model
python test.py --weights yolov5s.pt  # test a model for Precision, Recall and mAP
python detect.py --weights yolov5s.pt --source path/to/images  # run inference on images and videos

版权声明:本文为CSDN博主「icodekang」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u011922698/article/details/123017457

icodekang

我还没有学会写个人说明!

暂无评论

发表评论

相关推荐