yolo数据集&打标签格式
└─ CASIA-FaceV5
├─ images
│ ├─ train
***.png
│ ├─ val
│ └─ test
└─ labels
├─ train
***.txt
├─ val
标签格式
训练
python train.py –data data/CASIA-FaceV5.yaml –cfg models/CASIA-FaceV5.yaml –weights pretrained/yolov5s.pt –epoch 5 –batch-size 16 –device cuda:0
模型验证
python val.py –data data/CASIA-FaceV5.yaml –weights ./runs/train/exp4/weights/best.pt –batch-size 8 –device cuda:0
模型检测
# 摄像头实时检测
python detect.py –weights runs/train/exp4/weights/best.pt –source 0
# 图片、视频(source 后面路径+文件名)
python detect.py –weights runs/train/exp4/weights/best.pt –source path/name
# 网络视频(字符串式的URL)
python detect.py –weights runs/train/exp4/weights/best.pt –source “***”