Optimizing Binary AutoEncoders on STM32 Microcontrollers
摘要
Deploying deep learning models on resource-constrained microcontrollers is challenging due to their computational and memory limitations. This work presents an optimized inference engine for Binary AutoEncoders (BAEs) targeting STM32 microcontrollers. Focusing on a 1D LiDAR-based anomaly detection task, we introduce three custom C-based operators, that accelerate binary and mixed-precision (Binary and Full-Precision) inference. The operators support efficient matrix operations, batch normalization fusion, and bit-level parallelism. Evaluation across STM32 F401, L4R9, and H7B3 boards demonstrates significant improvements in latency and power consumption, achieving up to 2 × better energy efficiency compared to the STM32 code generator. The optimized BAE maintains robust anomaly detection performance across various perturbation severity levels, making it well-suited for real-time perception and decision-making applications on the edge.