Source-linked AI summary

YOLOv6: A Single-Stage Object Detection Framework for Industrial Applications

Chuyi Li, Lulu Li, Hongliang Jiang, Kaiheng Weng, Yifei Geng, Liang Li, Zaidan Ke, Qingyuan Li, Meng Cheng, Weiqiang Nie, Yiduo Li, Bo Zhang, Yufei Liang, Linyuan Zhou, Xiaoming Xu, Xiangxiang Chu, Xiaoming Wei, Xiaolin Wei

arXiv:2209.02976v1cs.CV

TL;DR

YOLOv6 addresses the need for industrial object detectors that balance speed and accuracy by combining recent detection advances into deployment-ready networks. Across model scales, it surpasses other real-time detectors in accuracy and speed, while its quantized version achieves 43.3% COCO AP at 869 FPS.

  • Problem

    Industrial deployment requires object detectors balancing speed and accuracy, but existing YOLO designs and quantization approaches have practical scaling and performance-degradation challenges.

  • Method

    YOLOv6 builds scale-specific networks using single-path small-model backbones and multi-branch large-model blocks, enhanced with selective detection techniques, self-distillation, and customized quantization.

  • Results

    43.3% COCO AP at 869 FPS demonstrates YOLOv6’s quantized detector achieves high accuracy and speed, while the overall framework surpasses other available real-time detectors on both dimensions.

  • Takeaways & Limitations

    YOLOv6 provides deployment-ready real-time detectors across scales, including an optimized quantized variant for industrial applications.

  • Takeaways & Limitations

    The Efficient decoupled head is retained because the ET-head deteriorated inference speed without improving accuracy in the authors’ models.

Abstract

from arXiv · show

For years, the YOLO series has been the de facto industry-level standard for efficient object detection. The YOLO community has prospered overwhelmingly to enrich its use in a multitude of hardware platforms and abundant scenarios. In this technical report, we strive to push its limits to the next level, stepping forward with an unwavering mindset for industry application. Considering the diverse requirements for speed and accuracy in the real environment, we extensively examine the up-to-date object detection advancements either from industry or academia. Specifically, we heavily assimilate ideas from recent network design, training strategies, testing techniques, quantization, and optimization methods. On top of this, we integrate our thoughts and practice to build a suite of deployment-ready networks at various scales to accommodate diversified use cases. With the generous permission of YOLO authors, we name it YOLOv6. We also express our warm welcome to users and contributors for further enhancement. For a glimpse of performance, our YOLOv6-N hits 35.9% AP on the COCO dataset at a throughput of 1234 FPS on an NVIDIA Tesla T4 GPU. YOLOv6-S strikes 43.5% AP at 495 FPS, outperforming other mainstream detectors at the same scale~(YOLOv5-S, YOLOX-S, and PPYOLOE-S). Our quantized version of YOLOv6-S even brings a new state-of-the-art 43.3% AP at 869 FPS. Furthermore, YOLOv6-M/L also achieves better accuracy performance (i.e., 49.5%/52.3%) than other detectors with a similar inference speed. We carefully conducted experiments to validate the effectiveness of each component. Our code is made available at https://github.com/meituan/YOLOv6.

1. Introduction

YOLOv6 refashions YOLO for industrial deployment by targeting improved speed–accuracy trade-offs across model scales and incorporating training, detection, and quantization advances. Its deployment-ready design includes scale-specific architectures, self-distillation, selective detection techniques, and a quantization scheme achieving 43.3% COCO AP at 869 FPS.

  • Motivation and overall design: YOLOv6 targets industrial applications by pursuing a stronger accuracy–speed trade-off and deployment-ready inference through PTQ and QAT.The framework examines cutting-edge quantization methods to increase inference speed without much performance degradation.
  • Architecture: Different-scale YOLOv6 networks use plain single-path backbones for small models and efficient multi-branch blocks for large models.The architectures vary by scale to achieve the best speed and accuracy trade-off across diverse industrial scenarios.
  • Training strategy: YOLOv6 applies self-distillation to classification and regression while dynamically adjusting teacher and label knowledge throughout training.This design is intended to help the student model learn knowledge more efficiently during all training phases.
  • Detection techniques: YOLOv6 selectively adopts advanced techniques for label assignment, loss functions, and data augmentation to further improve performance.The report broadly verifies these detection techniques before incorporating them into the framework.
  • Quantization: 43.3% COCO AP is achieved at 869 FPS with batch size 32 through a quantization scheme combining RepOptimizer and channel-wise distillation.The reformulated detection quantization scheme is designed to produce a faster and accurate detector.

2. Method

YOLOv6 combines hardware-friendly, re-parameterizable backbones and necks with an efficient decoupled head, alongside experimentally selected label assignment, losses, distillation, and quantization methods. Its deployment-oriented design scales across model sizes while targeting inference efficiency and quantized performance.

  • Label Assignment: TAL is selected as YOLOv6’s label-assignment strategy because experiments find it more effective and training-friendly than recent alternatives.SimOTA was used early but slowed training in practice.
  • Loss Function: YOLOv6 selects VariFocal Loss for classification and SIoU/GIoU Loss for bounding-box regression after systematic experiments with available techniques.Object loss was also tested but did not bring many positive effects.
  • Industry-handy improvements: Self-distillation supervises classification and box regression with a teacher, while cosine decay dynamically adjusts soft- and hard-label contributions during training.DFL enables distillation of box regression.
  • Quantization and deployment: 42.3% AP at 869 FPS is achieved by quantized YOLOv6-S with RepOptimizer-based PTQ-friendly weights, QAT, channel-wise distillation, and graph optimization.The throughput uses batch size=32, and QAT is built upon RepOptimizer to address fake-quantizer inconsistency.
  • Network Design: YOLOv6 proposes two scaled re-parameterizable backbones and necks plus an efficient decoupled head with a hybrid-channel strategy for different model sizes.The architecture is designed around hardware-friendly network design.
  • Network Design: EfficientRep uses RepBlocks for small models and converts them into RepConv stacks at inference, decreasing latency while enhancing representation ability.For medium and large networks, CSPStackRep is used to trade off computation burden and accuracy as model capacity expands.

3. Experiments

The experiments evaluate YOLOv6 under deployment-oriented speed and accuracy criteria, using COCO training and comparisons with leading YOLO-series detectors. Ablations identify size-dependent architectures, TAL assignment, training refinements, RepOptimizer, and partial QAT as effective design choices.

  • Experimental setup: Experiments train on COCO 2017 with SGD, cosine learning-rate decay, warm-up, grouped weight decay, EMA, Mosaic, and Mixup augmentation.The study emphasizes deployment throughput and GPU latency, comparing YOLOv6 with YOLOv5, YOLOX, PPYOLOE, and YOLOv7 using FP16 TensorRT measurements.
  • Backbone and neck: For YOLOv6-N, the single-path structure improves both accuracy and speed despite having more FLOPs and parameters, while larger models favor multi-branch structures.The selected multi-branch channel coefficients are 2/3 for YOLOv6-M and 1/2 for YOLOv6-L; YOLOv6-S shows similar performance between block styles.
  • Backbone and neck: 0.2% better performance is achieved by the slender YOLOv6-L neck than the wide-shallow neck at similar speed.This ablation evaluates neck width and depth while using SiLU activation.
  • Label assignment: TAL increases AP by 0.5% over SimOTA and is selected because of its stable training and better accuracy.SimOTA itself increases AP by 2.0% over ATSS, making SimOTA and TAL the strongest two strategies in the comparison.
  • Training strategies: 0.4%/0.5%/0.7% accuracy degradation without Mosaic fading is reduced to 0.2%/0.5%/0.5% for YOLOv6-N/S/M when Mosaic fading is adopted during gray-border removal.The experiments train YOLOv6-N and YOLOv6-S for 400 epochs and YOLOv6-M for 300 epochs; 400 epochs is reported as a better convergence scheme for YOLOv6.
  • Optimization and quantization: RepOptimizer substantially improves average performance while being generally faster and nearly identical, and partial QAT provides better accuracy with slightly reduced throughput.These experiments evaluate optimization and quantization strategies for deployment.

4. Conclusion

YOLOv6 addresses persistent industrial requirements by combining up-to-date detector advances with the authors’ practices, achieving superior speed and accuracy among available real-time detectors. It also provides a customized quantization method for convenient industrial deployment.

  • Conclusion: YOLOv6 surpasses other available real-time detectors in both accuracy and speed while incorporating recent detector advances and the authors’ practices.The framework examines up-to-date object-detector components and adds the authors’ own thoughts and practices.
  • Conclusion: A customized quantization method makes YOLOv6 faster out of the box for industrial deployment.The method is supplied specifically to facilitate industrial deployment.

A. Detailed Latency and Throughput Benchmark · A.1. Setup

The benchmark standardizes latency and throughput measurements across models using a common NVIDIA Tesla T4 and TensorRT configuration, with additional cross-version and V100 checks for comparison.

  • A.1. Setup: Latency is measured on an NVIDIA Tesla T4 GPU using TensorRT version 7.2.1.6.This is the default measurement configuration unless otherwise stated.
  • A.1. Setup: All models are re-measured under identical hardware and software settings to reduce variance in latency and throughput comparisons.The paper attributes this standardization to substantial hardware and software variance.
  • A. Detailed Latency and Throughput Benchmark: The benchmark reports both latency and throughput for every model under the shared configuration.These measurements are intended to support consistent model-to-model comparison.
  • A.1. Setup: TensorRT version changes are tested in Table 18 as a consistency check.The alternate-version measurements provide a reference for assessing software-version effects.
  • A. Detailed Latency and Throughput Benchmark: Latency on an NVIDIA V100 GPU is included in Table 19 for convenient comparison.The V100 results extend the hardware comparison beyond the primary Tesla T4 setup.
  • A.1. Setup: Together, the measurements provide a broad view across hardware and software configurations.The setup combines a common baseline with TensorRT-version and GPU comparisons.

A.2. T4 GPU Latency Table with TensorRT 8

Table 18 compares YOLO-series latency and throughput on a T4 GPU using TensorRT 8.2, showing that YOLOv6 throughput remains comparable to its peers.

  • YOLOv6 models maintain throughput comparable to their peers.
  • Table 18 compares YOLO-series latency and throughput on a T4 GPU with TensorRT 8.2.

A.3. V100 GPU Latency Table

On the V100 GPU, YOLOv6 largely maintains its speed advantage, as shown in Table 19.

  • V100 GPU Latency Table: YOLOv6 largely maintains its speed advantage on the V100 GPU.The comparison is reported in Table 19.

A.4. CPU Latency · B. Quantization Details · B.1. Feature Distribution Comparison

The paper evaluates model latency on Intel CPUs and compares YOLO-series latency and throughput under controlled V100 GPU settings. It also examines how RepOptimizer changes feature distributions across layers.

  • A.4. CPU Latency: CPU evaluation uses a 2.6 GHz Intel Core i7 processor with OpenCV.
  • A.4. CPU Latency: Table 19 compares YOLO-series latency and throughput on a V100 GPU.All models use FP16 precision and 640×640 inputs in the same environment.
  • A.4. CPU Latency: The GPU comparison standardizes measurements at FP16 precision with 640×640 inputs.
  • A.4. CPU Latency: CPU latency is compared across YOLO-series models in Table 20.Measurements use FP32 precision and 640×640 inputs in the same environment.
  • A.4. CPU Latency: The CPU latency comparison uses FP32 precision for all models.
  • B.1. Feature Distribution Comparison: The analysis illustrates feature distributions from additional layers after training with RepOptimizer.These distributions are described as much alleviated after RepOptimizer training.

B.2. Sensitivity Analysis Results

Sensitivity analysis finds that SNR and Cosine similarity are highly correlated, but direct AP evaluation gives different results. Among the tested metrics, MSE most closely matches final quantization performance.

  • B.2. Sensitivity Analysis Results: SNR and Cosine similarity produce highly correlated results, whereas direct AP evaluation presents a different result pattern.This comparison is shown in Fig. 7.
  • B.2. Sensitivity Analysis Results: MSE most closely matches direct AP evaluation in final quantization performance.The comparison is reported in Table 21 for partial post-training quantization performance.

C. Analysis of Gray Border

The analysis varies gray-border sizes under fixed 640×640 padding and applies a simple adjustment to address preprocessing–postprocessing misalignment. Results show that the border size yielding the best AP differs across models.

  • C. Analysis of Gray Border: Different border settings are evaluated after resizing loaded images and padding them to 640×640.The example considers an image size of 608 with a border size of 16.
  • C. Analysis of Gray Border: A simple adjustment is introduced to alleviate information misalignment between preprocessing and postprocessing.
  • C. Analysis of Gray Border: Each model achieves its best AP with a different gray-border size.The results are presented in Figure 8.
Loading 2209.02976v1…