Skip to main content
QUICK REVIEW

[论文解读] Model Compression Methods for YOLOv5: A Review

Mohammad Jani, Jamil Fayyad|arXiv (Cornell University)|Jul 21, 2023
Advanced Neural Network ApplicationsComputer Science被引用 11
一句话总结

本论文综述应用于 YOLOv5 的裁剪和量化方法,分析实际实现结果并识别边缘部署的差距与未来方向。

ABSTRACT

Over the past few years, extensive research has been devoted to enhancing YOLO object detectors. Since its introduction, eight major versions of YOLO have been introduced with the purpose of improving its accuracy and efficiency. While the evident merits of YOLO have yielded to its extensive use in many areas, deploying it on resource-limited devices poses challenges. To address this issue, various neural network compression methods have been developed, which fall under three main categories, namely network pruning, quantization, and knowledge distillation. The fruitful outcomes of utilizing model compression methods, such as lowering memory usage and inference time, make them favorable, if not necessary, for deploying large neural networks on hardware-constrained edge devices. In this review paper, our focus is on pruning and quantization due to their comparative modularity. We categorize them and analyze the practical results of applying those methods to YOLOv5. By doing so, we identify gaps in adapting pruning and quantization for compressing YOLOv5, and provide future directions in this area for further exploration. Among several versions of YOLO, we specifically choose YOLOv5 for its excellent trade-off between recency and popularity in literature. This is the first specific review paper that surveys pruning and quantization methods from an implementation point of view on YOLOv5. Our study is also extendable to newer versions of YOLO as implementing them on resource-limited devices poses the same challenges that persist even today. This paper targets those interested in the practical deployment of model compression methods on YOLOv5, and in exploring different compression techniques that can be used for subsequent versions of YOLO.

研究动机与目标

  • 通过降低模型大小和推理时间来激励在资源受限的边缘设备上部署 YOLOv5。
  • 对在真实世界设置中对 YOLOv5 使用的裁剪和量化技术进行分类与分析。
  • 比较在内存、FLOPs、速度(FPS)和准确性指标方面的实际结果,以识别差距。
  • 突出仍存挑战并提出将裁剪和量化应用于更新的 YOLO 版本的方向。

提出的方法

  • 对裁剪和量化方法进行回顾,重点关注在 YOLOv5 的实际实现。
  • 讨论用于裁剪的显著性标准,包括 l1/l2 范数、特征图激活、BN 缩放因子、一阶导数和互信息。
  • 将裁剪粒度区分为无结构、通道级、过滤器级和内核级,并解释它们对结构和硬件的影响。
  • 解释量化概念,包括均匀 vs 非均匀、静态 vs 动态范围、QAT vs PTQ,以及部署方案(假量化 vs 仅整数量化)。
  • 总结最近将这些技术应用于 YOLOv5 的实验结果,并按裁剪粒度和量化方案进行分类。
Figure 1 : YOLO release timeline. YOLOv5 and YOLOv6 have ten and six released variants, respectively.
Figure 1 : YOLO release timeline. YOLOv5 and YOLOv6 have ten and six released variants, respectively.

实验结果

研究问题

  • RQ1哪些裁剪策略在不牺牲准确度的前提下,最有效地降低 YOLOv5 的体积和延迟?
  • RQ2在实践中,基于 BN 缩放因子的裁剪与其他显著性标准在 YOLOv5 上有何比较?
  • RQ3哪些量化方案(QAT vs PTQ、静态 vs 动态范围)在尽量保留 YOLOv5 的准确度的同时,能够实现边缘硬件部署?
  • RQ4在将裁剪和量化应用于 YOLOv5 及更新的 YOLO 版本时,已识别出的差距与未来方向是什么?

主要发现

  • 基于通道的裁剪并采用 BN 缩放因子(BNSF)是 YOLOv5 裁剪研究中的主导显著性标准(约 60%)。
  • 许多裁剪研究采用迭代裁剪并进行微调以恢复准确度,通常报告参数、大小、FLOPs 的减少,有时也报告 FPS 的降低。
  • 量化研究表明在 YOLOv5 中,使用 QAT 可实现低至 3 位精度且对准确度的影响很小,而 PTQ 在不产生较大准确度损失的前提下通常难以低于 8 位。
  • 在初步综合中排除了大量部署策略(TensorRT、PyTorch 量化、ONNX),聚焦于新颖的量化方法。
  • 若干论文将结构性改变(如 MobileNetV3 骨干、注意力模块)与裁剪结合,以实现对像 NVIDIA Jetson Xavier NX 与 Raspberry Pi 等设备的边缘部署。
Figure 2 : YOLOv5l architecture. SPPF represents a computation-efficient version of the Spatial Pyramid Pooling, which was originally implemented in YOLOv3; C3 uses the new CSP-combined module whose details are illustrated in Figure 3 .
Figure 2 : YOLOv5l architecture. SPPF represents a computation-efficient version of the Spatial Pyramid Pooling, which was originally implemented in YOLOv3; C3 uses the new CSP-combined module whose details are illustrated in Figure 3 .

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。