Energy-Efficient Inference on the Edge Exploiting TinyML Capabilities for UAVs

Wamiq Raza, Anas Osman, Francesco Ferrini, Francesco G. B. De NatalearXiv 2021 · DOI

Abstract

In recent years, the proliferation of unmanned aerial vehicles (UAVs) has increased dramatically. UAVs can accomplish complex or dangerous tasks in a reliable and cost-effective way but are still limited by power consumption problems, which pose serious constraints on the flight duration and completion of energy-demanding tasks. The possibility of providing UAVs with advanced decision-making capabilities in an energy-effective way would be extremely beneficial. In this paper, we propose a practical solution to this problem that exploits deep learning on the edge. The developed system integrates an OpenMV microcontroller into a DJI Tello Micro Aerial Vehicle (MAV). The microcontroller hosts a set of machine learning-enabled inference tools that cooperate to control the navigation of the drone and complete a given mission objective. The goal of this approach is to leverage the new opportunistic features of TinyML through OpenMV including offline inference, low latency, energy efficiency, and data security. The approach is successfully validated on a practical application consisting of the onboard detection of people wearing protection masks in a crowded environment.

Introduction

Unmanned Aerial Vehicles (UAVs), particularly Micro Aerial Vehicles (MAVs), face a significant "energy budget" challenge. To perform sophisticated tasks like real-time object recognition, operators typically choose between two suboptimal paths: offloading data to a ground station, which introduces high latency and high transmission power costs, or utilizing heavy, power-hungry onboard computers like the Jetson Nano. This paper explores a third path: TinyML. By utilizing low-power microcontrollers at the intersection of machine learning and embedded systems, it is possible for a drone to perform complex inference tasks using milliwatts rather than watts.

Methodology and System Architecture

The researchers developed a hardware-software stack designed to transform a standard DJI Tello into an autonomous edge-processing unit. The core of this architecture is the OpenMV Cam H7, based on an STM32H7 microcontroller, which serves as the primary processing unit for both computer vision and navigation logic.

TinyML Pipeline and Hardware Integration Workflow

The software pipeline utilizes TensorFlow Lite for Microcontrollers (TFLM). The process begins with a Keras-trained model that undergoes post-training quantization, converting 32-bit floats to 8-bit integers. This optimization is critical for fitting the model into the microcontroller's limited memory. For the neural architecture, the team employed MobileNetV2 with a 0.35 width multiplier to balance computational speed and RAM usage. Navigation is managed via a local WiFi UDP link, allowing the OpenMV to send commands directly to the Tello's flight controller based on inference results.

Experimental Setup

The system was validated using the Face Mask Lite dataset, comprising 1,000 images (500 with masks, 500 without). To accommodate the microcontroller's constraints, images were preprocessed to 96x96 pixels in grayscale. A PID (Proportional-Integral-Derivative) controller was implemented on the OpenMV to ensure the drone could autonomously adjust its position to maintain a stable frame for the AI during flight.

Key Results and Discussion

The implementation of TinyML yielded significant performance metrics:

  • Accuracy: The system achieved a 98.65% accuracy rate for face mask detection.
  • Latency: Post-training quantization reduced inference time from 1.7 seconds to 859 milliseconds, enabling near real-time environmental response.
  • Memory Efficiency: The optimized model required only 296 KB of RAM, fitting comfortably within the OpenMV's hardware limits.
  • Flight Impact: While the additional payload and computational overhead reduced hovering time from 9 minutes to approximately 6 minutes, the trade-off provides the drone with total independence from ground-based infrastructure.

Comparison with other hardware, such as the Arduino Nano 33 BLE, revealed that the OpenMV's sub-second inference is essential for flight; the Arduino's 7-second latency proved insufficient for active navigation control.

Conclusion

This research demonstrates that TinyML can effectively bridge the gap between intelligence and energy efficiency in micro-UAVs. While the payload impacts flight duration, the ability to perform offline, low-latency inference provides a robust solution for missions in connectivity-denied environments. Future work will focus on multi-class detection and testing the system's stability in diverse environmental conditions like wind and variable lighting.

Summary updated

BibTeX
@misc{raza2021energy,
  author = {Wamiq Raza and Anas Osman and Francesco Ferrini and Francesco G. B. De Natale},
  title = {{Energy-Efficient Inference on the Edge Exploiting TinyML Capabilities for UAVs}},
  year = {2021},
  eprint = {2111.15481},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.15481},
}
Figure