Link to this sectionMeituan YOLOv6#
Link to this section概述#
Meituan YOLOv6, released in 2022, offers a strong balance between speed and accuracy, making it a popular choice for real-time applications. This model introduces several notable enhancements on its architecture and training scheme, including the implementation of a Bi-directional Concatenation (BiC) module, an anchor-aided training (AAT) strategy, and an improved backbone and neck design for high accuracy on the COCO dataset.
YOLOv6 概览。 模型架构图展示了导致性能显著提升的重构网络组件和训练策略。(a) YOLOv6 的颈部(显示了 N 和 S 版本)。注意:对于 M/L 版本,RepBlocks 被 CSPStackRep 替换。(b) BiC 模块的结构。(c) SimCSPSPPF 块。(source)。
Link to this section主要特性#
- 双向拼接 (BiC) 模块: YOLOv6 在检测器的颈部引入了 BiC 模块,增强了定位信号,并在几乎不降低速度的情况下实现了性能提升。
- 锚点辅助训练 (AAT) 策略: 该模型提出了 AAT,旨在兼顾 anchor-based 和 anchor-free 范式的优势,且不影响推理效率。
- 增强的 Backbone 和颈部设计: 通过加深 YOLOv6 以便在 backbone 和颈部中包含更多阶段,该模型在发布时于高分辨率输入下在 COCO dataset 上展现了强大的性能。
- 自蒸馏策略: 引入了一种新的自蒸馏策略来提升 YOLOv6 较小模型的性能,在训练过程中增强辅助回归分支,并在推理时将其移除,从而避免显著的速度下降。
Link to this section性能指标#
YOLOv6 提供了各种不同规模的预训练模型:
- YOLOv6-N:在 NVIDIA T4 GPU 上,于 COCO val2017 数据集上达到 37.5% AP,速度为 1187 FPS。
- YOLOv6-S:45.0% AP,484 FPS。
- YOLOv6-M:50.0% AP,226 FPS。
- YOLOv6-L:52.8% AP,116 FPS。
- YOLOv6-L6:实时场景下的顶尖准确率。
YOLOv6 还提供了针对不同 precisions 的量化模型以及针对移动平台优化的模型。
Link to this section使用示例#
此示例提供了简单的 YOLOv6 训练和推理示例。有关这些模式及其他 modes 的完整文档,请参阅 Predict、Train、Val 和 Export 文档页面。
可以将 YOLOv6 *.yaml 文件传递给 YOLO() 类,以便在 Python 中构建相应的模型:
from ultralytics import YOLO
# Build a YOLOv6n model from scratch
model = YOLO("yolov6n.yaml")
# Display model information (optional)
model.info()
# Train the model on the COCO8 example dataset for 100 epochs
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)
# Run inference with the YOLOv6n model on the 'bus.jpg' image
results = model("path/to/bus.jpg")Link to this section支持的任务和模式#
YOLOv6 系列提供了一系列模型,每个模型都针对高性能 Object Detection 进行了优化。这些模型满足了不同的计算需求和 accuracy 要求,使其能够广泛应用于各种场景。
| 模型 | 文件名 | 任务 | 推理 | 验证 | 训练 | 导出 |
|---|---|---|---|---|---|---|
| YOLOv6-N | yolov6n.yaml | 目标检测 | ✅ | ✅ | ✅ | ✅ |
| YOLOv6-S | yolov6s.yaml | 目标检测 | ✅ | ✅ | ✅ | ✅ |
| YOLOv6-M | yolov6m.yaml | 目标检测 | ✅ | ✅ | ✅ | ✅ |
| YOLOv6-L | yolov6l.yaml | 目标检测 | ✅ | ✅ | ✅ | ✅ |
| YOLOv6-X | yolov6x.yaml | 目标检测 | ✅ | ✅ | ✅ | ✅ |
下表详细概述了 YOLOv6 模型变体,重点介绍了它们在 object detection 任务中的能力,以及与 Inference、Validation、Training 和 Export 等各种操作模式的兼容性。这种全面支持确保了用户可以在广泛的物体检测场景中充分利用 YOLOv6 模型的功能。
Link to this section引用与致谢#
我们希望感谢原作者在实时物体检测领域所做的重大贡献:
@misc{li2023yolov6,
title={YOLOv6 v3.0: A Full-Scale Reloading},
author={Chuyi Li and Lulu Li and Yifei Geng and Hongliang Jiang and Meng Cheng and Bo Zhang and Zaidan Ke and Xiaoming Xu and Xiangxiang Chu},
year={2023},
eprint={2301.05586},
archivePrefix={arXiv},
primaryClass={cs.CV}
}最初的 YOLOv6 论文可在 arXiv 上找到。作者已将他们的工作公开,代码库可在 GitHub 上访问。我们感谢他们在推动该领域发展以及使更广泛的社区能够接触到其研究成果方面所做的努力。
Link to this section常见问题解答#
Link to this section什么是 Meituan YOLOv6?它有什么独特之处?#
Meituan YOLOv6 于 2022 年发布,是一款平衡了速度和准确率的物体检测器,专为实时应用而设计。它具有显著的架构增强功能,如双向拼接 (BiC) 模块和锚点辅助训练 (AAT) 策略。这些创新在几乎不降低速度的情况下提供了实质性的性能提升,使 YOLOv6 成为物体检测任务中的有力竞争者。
Link to this sectionYOLOv6 中的双向拼接 (BiC) 模块如何提高性能?#
YOLOv6 中的双向拼接 (BiC) 模块增强了检测器颈部的定位信号,在几乎不影响速度的情况下改善了性能。该模块有效地结合了不同的 feature maps,提高了模型准确检测物体的能力。有关 YOLOv6 功能的更多详细信息,请参阅 Key Features 部分。
Link to this section如何使用 Ultralytics 训练 YOLOv6 模型?#
你可以使用简单的 Python 或 CLI 命令通过 Ultralytics 训练 YOLOv6 模型。例如:
from ultralytics import YOLO
# Build a YOLOv6n model from scratch
model = YOLO("yolov6n.yaml")
# Train the model on the COCO8 example dataset for 100 epochs
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)欲了解更多信息,请访问 Train 页面。
Link to this sectionYOLOv6 有哪些不同版本及其性能指标?#
YOLOv6 提供了多个版本,每个版本都针对不同的性能需求进行了优化:
- YOLOv6-N:37.5% AP,1187 FPS
- YOLOv6-S:45.0% AP,484 FPS
- YOLOv6-M:50.0% AP,226 FPS
- YOLOv6-L:52.8% AP,116 FPS
- YOLOv6-L6:实时场景下的顶尖准确率
这些模型是在 COCO dataset 上使用 NVIDIA T4 GPU 进行评估的。有关性能指标的更多信息,请参阅 Performance Metrics 部分。
Link to this section锚点辅助训练 (AAT) 策略如何使 YOLOv6 受益?#
YOLOv6 中的锚点辅助训练 (AAT) 结合了 anchor-based 和 anchor-free 方法的要素,在不影响推理效率的情况下增强了模型的检测能力。该策略在训练期间利用锚点来改进 bounding box 预测,使 YOLOv6 在各种物体检测任务中表现出色。
Link to this sectionUltralytics 中的 YOLOv6 模型支持哪些操作模式?#
YOLOv6 支持多种操作模式,包括推理、验证、训练和导出。这种灵活性使用户能够在不同场景中充分利用模型的功能。请查看 Supported Tasks and Modes 部分,获取每种模式的详细概述。