Abstract
EfficientRep presents a hardware-aware neural network design strategy, primarily utilized in the YOLOv6 object detection framework. By advancing structural re-parameterization and introducing the Bep (Beer-mug) unit, the architecture achieves a superior balance between accuracy and inference speed on modern GPUs. This paper details the evolution from single-path RepVGG-style structures to hybrid CSP-style blocks, optimizing for real-world hardware performance metrics like memory bandwidth and I/O throughput rather than just FLOPs.
Introduction: The FLOPs Paradox
In deep learning, efficiency is traditionally measured by FLOPs (floating-point operations) or parameter counts. However, these are often "blind" metrics that do not account for actual hardware constraints. A network with low FLOPs may run slower on a GPU than a high-FLOP network if it suffers from high memory access costs or poor I/O throughput. The core challenge addressed by EfficientRep is achieving an optimal accuracy-speed balance on actual hardware by respecting limits like memory bandwidth.
Methodology
Structural Re-parameterization
Borrowing from the RepVGG philosophy, EfficientRep utilizes a multi-branch topology during the training phase. This includes a 3x3 convolution, a 1x1 convolution, and an identity branch to capture complex features. At inference time, these branches are mathematically fused into a single 3x3 convolution, resulting in a lightning-fast single-path architecture that is highly hardware-friendly.
Bep (Beer-mug) Units and Hybrid Scaling
While pure RepVGG structures are highly efficient for small models, they can degrade in efficiency at larger scales. To mitigate this, the authors introduced the Bep (Beer-mug) unit, which adds a linear shortcut. For larger models (Medium/Large), these units are integrated into a CSP (Cross Stage Partial) style block, renamed CSPStackRep. This hybrid strategy allows YOLOv6 to use simple single-branch models for Nano/Small variants and more complex multi-branch CSP-style models for larger sizes, maintaining high gradient flow without a massive latency penalty.
Key Results
The models were evaluated on the MS COCO 2017 dataset using an NVIDIA Tesla T4 GPU with TensorRT. YOLOv6 demonstrated significant improvements over predecessors like YOLOv5, YOLOX, and PP-YOLOE.
- YOLOv6-N (Nano): Achieved 35.9% AP at 1234 FPS (bs=32), outperforming YOLOv5-N (28.0% AP at 735 FPS).
- YOLOv6-S (Small): Reached 43.5% AP at 495 FPS, surpassing YOLOv5-S and YOLOX-S in both accuracy and speed.
- YOLOv6-L (Large): Hit 51.7% AP, maintaining competitive inference speeds while exceeding the accuracy of YOLOX-L.
Conclusion
EfficientRep demonstrates that hardware-aware design is critical for real-world deployment. By optimizing for the Winograd algorithm and balancing structural simplicity with gradient richness, YOLOv6 sets a new benchmark for the YOLO family. Future work may involve exploring these hardware-aware choices through automated neural architecture search (NAS) and adapting the design for low-power edge devices.
Summary updated