YOLOv5来了!Pytorch实现,支持ONNX和CoreML

DeliaKelly 发布于1月前

来源|AIWalker

今天在刷github时,突然看到了YOLOv5,笔者当时还在怀疑是不是眼花了?确实时YOLOv5,但不是官方的也不是AB大神版,而是U版YOLO改进版。哎,想想真可怜,笔者还在熟悉YOLOv4的时候,YOLOv5竟然出现了,太快了,跟不上节奏啊。不过不妨碍我们去研究了解它。

笔者之前介绍过YOLOv4,见此处,感兴趣的小伙伴可以去看看。

严格来讲,这里提到的YOLOv4可以视为YOLOv4.5,它仍然是各种tricks的组合,但更关键的是它的实现方式由darknet转为了pytorch,同时还支持ONNX以及CoreML。真乃天大的福音啊,还在等什么么?还不快点去围观关注一波!

YOLOv5代码链接:github.com/ultralytics/ 实现者是谁呢?Ultralytics:ultralytics.com,大家也许听过U版yolo,即:U版YOLOv3 github.com/ultralytics/,见下图拥有4.7k-star的U版YOLOv3,所以你就知道了吧,吼吼

YOLOv5来了!Pytorch实现,支持ONNX和CoreML

YOLOv5-Ultralytics

YOLOv5来了!Pytorch实现,支持ONNX和CoreML

言归正传,我们先来看看YOLOv5的一些“官方”说明吧。首先给出了已开源的YOLOv5在COCO2017数据集上的指标,见下图。可以看到,它基本上超过了大部分的目标检测器,同时具有超快的速度。

YOLOv5来了!Pytorch实现,支持ONNX和CoreML

注1: 指的是COCO-test-dev2017上的结果,其他AP表示val2017的精度。所有指标均为单模型、单尺度、为进行任何集成与TTA。可以通过如下命令进行重现上述指标,非常赞啊!

python test.py --img-size 736 --conf_thres 0.001

注2:上述延迟是在V100 GPU上对5000张COCO-val2017数据进行测试的结果,包含数据预处理、模型推理、后处理以及NMS。平均NMS的时间为1.6ms/image。上述指标可以通过如下命令复现:

python test.py --img-size 640 --conf_thres 0.1 --batch-size 16

注3:上述所有模型均采用默认配置与超参数训练了300epoch,且未添加自动增广技术。

下面附上训练曲线与测试效果。

YOLOv5来了!Pytorch实现,支持ONNX和CoreML

YOLOv5来了!Pytorch实现,支持ONNX和CoreML

Ultralytics Professional Support

附上一些Ultralytics的信息,摘自:github.com/ultralytics/,为避免凸显笔者粗陋的英语水平,就直接上英文原文了。

Ultralytics is a U.S.-based particle physics and AI startup with over 6 years of expertise supporting government, academic and business clients. We offer a wide range of vision AI services, spanning from simple expert advice up to delivery of fully customized, end-to-end production solutions, including:

  • 「 Cloud-based AI 」 surveillance systems operating on 「 hundreds of HD video streams in realtime. 」

  • 「 Edge AI 」 integrated into custom iOS and Android apps for realtime 「 30 FPS video inference .」

  • 「 Custom data training 」, hyperparameter evolution, and model exportation to any destination.

YOLOv5-updates

最后附上YOLOv5项目的一些更新说明,同上,附上英文原本。

This repository represents Ultralytics open-source research into future object detection methods, and incorporates our lessons learned and best practices evolved over training thousands of models on custom client datasets with our previous YOLO repository github.com/ultralytics/. 「 All code and models are under active development, and are subject to modification or deletion without notice. 」 Use at your own risk.

Updates:

  • 「May 27, 2020」: Public release of repo. yolov3-spp (this repo) is SOTA among all known yolo implementations, yolov5 family will be undergoing architecture research and development over Q2/Q3 2020 to increase performance. Updates may include CSP bottlenecks from yolov4, as well as PANet or BiFPN head features.

  • 「May 24, 2020」: Training yolov5s/x and yolov3-spp. yolov5m/l suffered early overfitting and also code 137 early docker terminations, cause unknown. yolov5l underperforms yolov3-spp due to earlier overfitting, cause unknown.

  • 「April 1, 2020」: Begin development of a 100% pytorch scaleable yolov3/4-based group of future models, in small, medium, large and extra large sizes, collectively known as yolov5. Models will be defined by new user-friendly yaml-based configuration files for ease of construction and modification. Datasets will likewise use yaml configuration files. New training platform will be simpler use, harder to break, and more robust to training a wider variety of custom dataset.

查看原文: YOLOv5来了!Pytorch实现,支持ONNX和CoreML

  • silverswan
  • bluegorilla
  • Daoji