深度学习论文: YOLOv6: A Single-Stage Object Detection Framework for Industrial Applications及其PyTorch实现
深度学习论文
1 概述
YOLOv6 涵盖了从模型训练到性能评估以及推理过程的全生命周期管理,并支持在 GPU(TensorRT)、CPU(OPENVINO)、ARM(MNN、TNN、NCNN)等多种硬件平台上实现部署。该系统大幅降低了工程部署中的适配复杂性。

2 YOLOv6
2-1 Network Design

Main backbone: The RepVGG architecture demonstrates significant feature extraction capabilities in compact networks, yet its exponential growth in parameters and computational costs poses limitations for its application in large-scale models. To address these challenges, a tailored solution is proposed: employing RepBlock structures for small-scale networks (n/t/s), while extending the network capacity through CSPStack configurations for medium and large-scale models (m/l).

Neck: YOLOv6 的主干模块基于YOLOv4和YOLOv5修改后的PAN架构实现,并通过引入 RepBlocks (n/t/s) 或 CSPStackRep Blocks(m/l) 来提升性能至 Rep-PAN 等级。
Head: 基于混合信道策略优化Decoupled Head组件,并命名为Efficient Decoupled Head
2-2 Label Assignment
Task alignment learning: This study delves into the intricate aspects of task alignment learning mechanisms. TAL-t employs a novel anchor alignment metric to evaluate the degree of task-alignment from the anchor level.

2-3 Loss Function
Classification Loss: VariFocal Loss (VFL) 采用了一种非对称加权策略以解决两类样本数量失衡及正样本内部类别权重失衡问题。通过该方法能够在一定程度上提高模型在小类高风险领域的检测能力。基于上述分析与优化需求考虑选择 VariFocal Loss 作为分类损失函数。

Box Regression Loss: 单边IoU损失在小尺寸模型中表现突出,在大尺寸模型中也表现出色。因此我们选择了单边IoU损失(适用于小、中、大尺寸目标)和广义IoU损失(适用于大尺寸目标)作为回归损失函数。分布焦点损失(DFL)和增强版分布焦点损失(DFL v2)均能带来一定程度的性能提升然而,在提高计算效率方面存在一定的局限性因此被放弃使用。

Object Loss: 在FCOS中,Object Loss被用于筛选低置信度的目标;而YOLOX采用了该损失函数以加速收敛并提升性能。然而,在引入YOLOv6后,该方法的表现显著下降。因此,在这种情况下,YOLOv6并未采用Object Loss作为其损失函数的选择。

2-4 Industry-handy improvements
More training epochs 训练epoch次数从300到400

Self-distillation Self-distillation的效果还是很明显的

通过强化数据增强和图像缩放优化策略,在训练过程中结合早停技术来实现模型的灰边效果优化,在解决输入尺寸归一化至640×640后导致的精度下降问题的同时实现了现有模型在实际部署中的精度提升
