Skip to main content
QUICK REVIEW

[Paper Review] Model Compression Methods for YOLOv5: A Review

Mohammad Jani, Jamil Fayyad|arXiv (Cornell University)|Jul 21, 2023
Advanced Neural Network ApplicationsComputer Science11 citations
TL;DR

This paper surveys pruning and quantization methods applied to YOLOv5, analyzing practical implementation results and identifying gaps and future directions for edge deployment.

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.

Motivation & Objective

  • Motivate deploying YOLOv5 on resource-limited edge devices by reducing model size and inference time.
  • Categorize and analyze pruning and quantization techniques used on YOLOv5 in real-world settings.
  • Compare practical results across memory, FLOPs, speed (FPS), and accuracy metrics to identify gaps.
  • Highlight remaining challenges and propose directions for adapting pruning and quantization to newer YOLO versions.

Proposed method

  • Review pruning and quantization methods with emphasis on practical implementations on YOLOv5.
  • Discuss saliency criteria used for pruning, including l1/l2 norms, feature map activations, BN scaling factors, first-order derivatives, and mutual information.
  • Differentiate pruning granularity into unstructured, channel-based, filter-based, and kernel-based approaches, and explain their implications for structure and hardware.
  • Explain quantization concepts including uniform vs non-uniform, static vs dynamic ranges, QAT vs PTQ, and deployment schemes (fake vs integer-only quantization).
  • Summarize experimental results from recent studies applying these techniques to YOLOv5 and categorize by pruning granularity and quantization scheme.
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.

Experimental results

Research questions

  • RQ1What pruning strategies have been most effective for reducing YOLOv5 size and latency without sacrificing accuracy?
  • RQ2How do BN scaling factor-based pruning and other saliency criteria compare in practice on YOLOv5?
  • RQ3What quantization schemes (QAT vs PTQ, static vs dynamic ranges) best preserve YOLOv5 accuracy while enabling deployment on edge hardware?
  • RQ4What are the identified gaps and future directions for applying pruning and quantization to YOLOv5 and newer YOLO versions?

Key findings

  • Channel-based pruning with BN scaling factor (BNSF) is the dominant saliency criterion in YOLOv5 pruning studies (~60%).
  • Many pruning studies use iterative pruning with fine-tuning to recover accuracy, often reporting reductions in parameters, size, FLOPs, and sometimes FPS.
  • Quantization studies show QAT achieving down to 3-bit precision with minimal accuracy loss in YOLOv5, while PTQ generally does not reach below 8-bit without larger accuracy drops.
  • A wide range of deployment strategies (TensorRT, PyTorch quantization, ONNX) are excluded from the primary synthesis, focusing on novel quantization methods.
  • Several papers integrate architectural changes (e.g., MobileNetV3 backbones, attention modules) with pruning to enable edge deployment on devices like NVIDIA Jetson Xavier NX and 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 .

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.