yolov5 demo
demo
‘’‘如有错误请指正~ ‘’’
doc & env
git clone https://github.com/ultralytics/yolov5
conda create -n yolov5 python=3.6
conda activate yolv5
pip install -r requirements.txt
download 参数
https://github.com/ultralytics/yolov5/releases中的.pt文件(s,l,m,x)(s6,l6,m6,x6)
detect
测试demo(data/image)
python detect.py --weight yolov5s6.pt
测试其他来源
$ python detect.py --source 0 # webcam
file.jpg # image
file.mp4 # video
path/ # directory
path/*.jpg # glob
'https://youtu.be/NUsoVlDFqZg' # YouTube video
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
note
python detect --source inference/images/ --weights ./yolov5s.pt
flv转mp4
sudo apt-get install libav-tools
avconv -i test.flv -codec copy test.mp4
train(COCO128)
下载coco128
https://github.com/ultralytics/yolov5/releases/v1.0/coco128.zip
-datasets/coco128
-yolov5
v1目录下很多文件
train
python train.py --img 640 --batch 16 --epochs 100 --data ./data/coco128.yaml
--cfg ./models/yolov5s.yaml --weights ./yolov5s.pt