赞
踩
1、创建环境 conda create -n yolo python=3.7 conda activate yolo 2、安装pytorch conda install pytorch torchvision torchaudio pytorch-cuda=11.3 -c pytorch -c nvidia 11.3为cuda版本号 3、克隆yolov5 git clone https://github.com/WongKinYiu/yolov7 # clone cd yolov7 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt //为了避免安装失误采用镜像安装https://pypi.tuna.tsinghua.edu.cn/simple 4、安装功能包 sudo apt update sudo apt install -y zip htop screen libgl1-mesa-glx pip install seaborn thop pip install --upgrade protobuf pip install wandb 5、权重文件 在官网下载yolov7.pt权重文件,放在文件夹weights下
python detect.py --weights weights/yolov7.pt --conf 0.25 --img-size 640 --source inference/images/horses.jpg
成功!
训练和yolov5步骤一样见其他笔记:YOLOV5学习笔记(七)——训练自己数据集
原文链接:https://blog.csdn.net/HUASHUDEYANJING/article/details/126045094
这里主要介绍一下训练参数
python train.py --workers 2 --device 0 --batch-size 16 --data data/uav.yaml --img 640 640 --cfg cfg/training/yolov7.yaml --weights weights/yolov7.pt --epochs 100
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。