YOLOBench: Benchmarking Efficient Object Detectors on Embedded Systems

Ivan Lazarevich, Matteo Grimaldi, Ravish Kumar, Saptarshi Mitra, Shahrukh Khan, Sudhakar Sah · DOI

TL;DR

This paper introduces YOLOBench, a comprehensive benchmark for evaluating YOLO-based object detection models across various embedded systems and datasets. It reveals that modern YOLO architectures, even older ones, can achieve excellent accuracy-latency trade-offs on embedded hardware, and proposes a novel zero-cost predictor for efficient model selection.

What Problem Does This Paper Address?

Deploying deep learning models, especially for object detection, on resource-constrained embedded systems presents a significant challenge. The primary hurdles are the high computational demands, memory requirements, and power consumption associated with these models during inference. While the YOLO family of object detectors has made strides in balancing accuracy and speed, a systematic and fair comparison across diverse embedded hardware platforms and datasets has been lacking. Existing benchmarks often use proxy metrics for latency or report results on server-grade hardware, which don't directly translate to embedded performance. This paper aims to bridge this gap by providing a standardized benchmark and analysis to guide the selection of efficient YOLO models for embedded applications.

Methods

The authors introduce YOLOBench, a benchmark comprising over 550 YOLO-based object detection models. The core of their methodology involves:

  • Architecture Space Exploration: They systematically vary backbone/neck structures, depth factors, width factors, and input resolutions for several YOLO versions (YOLOv3 to YOLOv8). This creates a large search space of potential models.
  • Controlled Training Environment: To ensure fair comparisons, all models are trained using a fixed training loop, hyperparameters, and code, largely based on the Ultralytics YOLOv8 codebase. This isolates the impact of architecture variations.
  • Multi-Platform Evaluation: Latency is measured on four distinct embedded hardware platforms: NVIDIA Jetson Nano (GPU), Khadas VIM3 (NPU), Raspberry Pi 4 (ARM CPU), and Intel Core i7 (CPU).
  • Pareto-Optimal Analysis: For each dataset and hardware combination, Pareto frontiers are generated to identify models that offer the best trade-off between accuracy (mAP50-95) and latency.
  • Zero-Cost (ZC) Predictor Evaluation: The paper evaluates various training-free accuracy estimators (e.g., MAC count, NWOT) to assess their effectiveness in predicting Pareto-optimal models without requiring full training.

Datasets

The benchmark utilizes the following datasets:

  • COCO: Used for pre-training models.
  • PASCAL VOC: Used for initial candidate model pre-selection and as a representative dataset for evaluating ZC predictors.
  • SKU-110k: A smaller dataset with retail items, used for evaluation.
  • WIDER FACE: A dataset focused on face detection, used for evaluation.

The YOLOBench benchmark itself is a newly introduced resource, encompassing the collected data and models.

Key Insights and Ideas

  • Older YOLO Architectures Still Relevant: Surprisingly, even older YOLO versions like YOLOv3 and YOLOv4, when combined with modern detection heads and training techniques, can achieve competitive accuracy-latency trade-offs on embedded systems. This suggests that architectural evolution isn't always linear and that smart scaling can revive older designs.
  • Depth/Width Scaling Precedes Resolution Scaling: For optimal performance on embedded devices, the authors observe a trend where reducing model depth and width is prioritized over reducing input resolution. This is a crucial insight for efficient model design.
  • Hardware-Specific Pareto Frontiers: The Pareto frontiers (accuracy vs. latency) vary significantly across different hardware platforms. For instance, the NPU platform shows a distinct preference for certain YOLO versions compared to CPUs or GPUs.
  • NWOT as a Promising Zero-Cost Predictor: While many existing zero-cost accuracy estimators underperform simple baselines like MAC count, the "pre-activation NWOT" metric shows promise in identifying Pareto-optimal YOLO detectors in a training-free manner, especially when combined with latency measurements.

Key Results

  • YOLOBench provides accuracy and latency data for over 550 YOLO-based models across 4 datasets and 4 hardware platforms.
  • Pareto-optimal analysis reveals that various YOLO architectures can achieve excellent accuracy-latency trade-offs, challenging the notion that only the latest models are optimal.
  • The paper demonstrates that the pre-activation NWOT score, a zero-cost predictor, can effectively identify promising YOLO architectures.
  • Using NWOT, they identified a YOLO-like model with an FBNetV3 backbone that outperforms YOLOv8s on the Raspberry Pi 4 CPU in terms of both accuracy and latency.
  • Table 1 and Table S6 provide specific examples of Pareto-optimal models for different latency thresholds and datasets. For instance, on the Raspberry Pi 4 with a 0.5-second latency threshold, YOLOv7 models are often Pareto-optimal for VOC and SKU-110k.

Limitations and Future Work

  • INT8 Precision Not Explored: The benchmark currently does not include INT8 precision measurements, which can significantly impact latency and accuracy on some hardware. The authors suggest this as a future direction.
  • Limited ZC Predictor Set: While a representative subset of ZC predictors was evaluated, a more exhaustive analysis could be beneficial.
  • Hardware-Specific Optimizations: The current work focuses on a fixed set of hardware and runtimes. Future work could explore more hardware-specific optimizations and quantization schemes.
  • Broader Architecture Search: The paper primarily focuses on YOLO variants. Expanding the benchmark to include other object detection families could provide a more comprehensive view.
  • Reproducibility: While the code and data are available, the authors note slight discrepancies in YOLOv8s results compared to the official Ultralytics release, suggesting potential minor differences in experimental setups.

Summary updated

BibTeX
@misc{lazarevich2023yolobench,
  author = {Ivan Lazarevich and Matteo Grimaldi and Ravish Kumar and Saptarshi Mitra and Shahrukh Khan and Sudhakar Sah},
  title = {{YOLOBench: Benchmarking Efficient Object Detectors on Embedded Systems}},
  year = {2023},
  eprint = {2307.13901},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.13901},
}
Figure