该库表明Ultralytics对将来对象检测方法的开源研究,并结合了之前的YOLO库https://github.com/ultralytic...。全部代码和模型都在积极的开发中,若有修改或删除,恕不另行通知。若是使用,风险自负。html
GPU速度测量:使用V100的GPU在超过5000张COCO val2017图像上测量批处理大小为8的平均每张图像的端到端时间,包括图像预处理,PyTorch FP16推断,后处理和NMS。python
Model | APval | APtest | AP50 | SpeedGPU | FPSGPU | params | FLOPS | |
---|---|---|---|---|---|---|---|---|
YOLOv5s | 36.6 | 36.6 | 55.8 | 2.1ms | 476 | 7.5M | 13.2B | |
YOLOv5m | 43.4 | 43.4 | 62.4 | 3.0ms | 333 | 21.8M | 39.4B | |
YOLOv5l | 46.6 | 46.7 | 65.4 | 3.9ms | 256 | 47.8M | 88.1B | |
YOLOv5x | 48.4 | 48.4 | 66.9 | 6.1ms | 164 | 89.0M | 166.4B | |
YOLOv3-SPP | 45.6 | 45.5 | 65.2 | 4.5ms | 222 | 63.0M | 118.0B |
** AP测试表示COCOtest-dev2017服务器结果,表中全部其余AP结果表示val2017准确性。
**全部AP编号均适用于单模型单尺度,而没有集成或测试时间增长。经过python test.py --img 736 --conf 0.001
进行使用。
**速度GPU测量:进行再现使用一个V100的GPU和一个GCPn1-standard-16实例在超过5000张COCO val2017图像上测量每张图像的端到端时间,包括图像预处理,PyTorch FP16图像推断(批量大小 32 --img-size 640),后处理和NMS。此图表中包括的平均NMS时间为1-2ms / img。经过python test.py --img 640 --conf 0.1
进行测试。
**全部检查点均使用默认的设置和超参数训练到300个epochs(无自动加强)。git
Python 3.7或更高版本,安装了requirements.txt
要求的全部的库和torch >= 1.5
,运行下面命令进行安装:github
$ pip install -U -r requirements.txt
能够在大多数常见的媒体格式上进行推断。模型检查点(在网上若是有对应的检查点的话)会自动下载。结果保存到./inference/output
。web
$ python detect.py --source file.jpg # image file.mp4 # video ./dir # directory 0 # webcam rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa # rtsp stream http://112.50.243.8/PLTV/88888888/224/3221225900/1.m3u8 # http stream
要对./inference/images
文件夹中的示例进行推断,请执行如下操做:docker
$ python detect.py --source ./inference/images/ --weights yolov5s.pt --conf 0.4 Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.4, device='', fourcc='mp4v', half=False, img_size=640, iou_thres=0.5, output='inference/output', save_txt=False, source='./inference/images/', view_img=False, weights='yolov5s.pt') Using CUDA device0 _CudaDeviceProperties(name='Tesla P100-PCIE-16GB', total_memory=16280MB) Downloading https://drive.google.com/uc?export=download&id=1R5T6rIyy3lLwgFXNms8whc-387H0tMQO as yolov5s.pt... Done (2.6s) image 1/2 inference/images/bus.jpg: 640x512 3 persons, 1 buss, Done. (0.009s) image 2/2 inference/images/zidane.jpg: 384x640 2 persons, 2 ties, Done. (0.009s) Results saved to /content/yolov5/inference/output
下载COCO,安装Apex并在运行下面命令。在一台有V100的GPU上,YOLOv5s / m / l / x的训练时间为2/4/6/8天(多个GPU的训练速度更快)。使用您的GPU容许的最大--batch-size
容量(下面的batchsize是为16 GB设备而设置的)。bash
$ python train.py --data coco.yaml --cfg yolov5s.yaml --weights '' --batch-size 64 yolov5m 48 yolov5l 32 yolov5x 16
要访问最新的工做环境(已预安装全部库,包括CUDA / CUDNN,Python和PyTorch),请考虑如下网站:服务器
原文连接:https://github.com/ultralytic...机器学习
欢迎关注磐创AI博客站:
http://panchuang.net/ide
sklearn机器学习中文官方文档:
http://sklearn123.com/
欢迎关注磐创博客资源汇总站:
http://docs.panchuang.net/