BED: A Real-Time Object Detection System for Edge Devices

Guanchu Wang, Zaid Pervaiz Bhat, Zhimeng Jiang, Yi-Wei Chen, Daochen Zha, Alfredo Costilla Reyes, Afshin Niktash, Mehmet Görkem Ulkar, Osman Erman Okman, Xuanting Cai, Xia Hu · DOI · OpenReview

TL;DR

This paper presents BED, a real-time object detection system designed for resource-constrained edge devices. By leveraging the MAX78000 DNN accelerator and a highly optimized, tiny DNN model, BED achieves accurate object detection with remarkably low power consumption and inference time, making advanced AI capabilities accessible on embedded systems.

What Problem Does This Paper Address?

The proliferation of IoT devices has led to an explosion of data generated at the "edge" – the physical location where data is created. While Deep Neural Networks (DNNs) are powerful tools for processing this data, deploying them on edge devices presents significant challenges. These devices typically have limited computational power, memory, and energy budgets, making it difficult to run complex DNN models efficiently. Traditional cloud-based solutions, while powerful, suffer from high transmission delays and privacy concerns. This paper tackles the problem of bringing real-time object detection capabilities directly to these constrained edge devices.

Methods

The authors introduce BED (Big-End Detection), a system built around the MAX78000 DNN accelerator. The BED pipeline involves four key stages:

  1. Model Training: They employ Quantization Aware Training (QAT) to train a compact DNN model. This approach simulates the effects of quantization during training, helping to mitigate performance degradation later.
  2. Quantization: The trained model is quantized to 8-bit precision for most layers, with the final layer using 32-bit precision. This significantly reduces the model's memory footprint and computational requirements.
  3. Synthesis: The quantized model is converted into C code, generating header files for weights, biases, and hyperparameters, along with configuration files for deployment.
  4. Deployment: The generated C code is compiled and loaded onto the MAX78000, integrating it with a camera for image input and an LCD for displaying detection results.

A key aspect of their method is the design of a highly efficient DNN architecture. To fit within the MAX78000's constraints (limited operators like 3x3 convolutions, ReLU, and pooling, and only 432 KB of flash memory), they developed a fully convolutional network using only these supported operations. This resulted in a tiny DNN model of just 300 KB.

Datasets

The model was trained on a subset of the VOC2007 dataset, which contains images with annotations for five object classes.

Key Insights and Ideas

  • Extreme Model Compression is Key: The paper demonstrates that it's possible to achieve accurate object detection with a DNN model as small as 300 KB by carefully selecting operations and using quantization-aware training.
  • Hardware-Aware Design: The DNN architecture was specifically designed to leverage the limited operator set and memory constraints of the MAX78000 accelerator, highlighting the importance of co-designing models with target hardware.
  • End-to-End Edge Solution: BED provides a complete system, from image capture to on-device inference and result display, showcasing a practical implementation for real-world edge applications.
  • Open-Source for Accessibility: The authors open-sourced their entire repository, including a GUI for debugging, which significantly lowers the barrier to entry for researchers and developers interested in edge AI.

Key Results

BED achieves accurate object detection using a 300 KB tiny DNN model. The system demonstrates impressive performance metrics:

  • Inference Time: Only 91.9 ms per image.
  • Energy Consumption: A mere 1.845 mJ per inference.
  • Memory Footprint: The network weights require only 299.52 KB of memory.

The paper also shows that the MAX78000 accelerator significantly outperforms other microcontrollers (MAX32650, STM32F7) in terms of inference time and power consumption for AI tasks.

Limitations and Future Work

The authors acknowledge that the MAX78000 has a very limited set of supported operators, which poses a challenge for designing complex DNNs. While BED achieves good performance with its current architecture, they suggest future work could involve exploring neural architecture search (NAS) to further optimize network architectures under the strict constraints of memory, latency, and power.

Summary updated

BibTeX
@inproceedings{wang2022bed,
  author = {Guanchu Wang and Zaid Pervaiz Bhat and Zhimeng Jiang and Yi-Wei Chen and Daochen Zha and Alfredo Costilla Reyes and Afshin Niktash and Mehmet Görkem Ulkar and Osman Erman Okman and Xuanting Cai and Xia Hu},
  title = {{BED: A Real-Time Object Detection System for Edge Devices}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2022},
  doi = {10.1145/3511808.3557168},
}
Figure