arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.23012cs.LGcs.CV
收藏

在微型控制器上进行视觉训练、部署和推理

On-Device Vision Training, Deployment, and Inference on a Thumb-Sized Microcontroller

High School Robotics Educator, British Columbia, Canada(不列颠哥伦比亚省加拿大高中机器人教育者)

Jeremy Ellis

AI总结:

本文提出了一种完整的端到端设备内视觉机器学习流程,包括数据采集、两层CNN训练与Adam优化及实时推理,全部在成本15-40美元的微控制器上运行。系统实现了核心ML生命周期的约1750行可读C++代码,编译时间短于一分钟。

摘要:

本文介绍了一种完整的端到端设备内视觉机器学习流水线,包括数据采集、两层CNN训练与Adam优化以及实时推理,全部在微控制器类设备上运行。与需要外部基础设施的云工作流程不同,该系统在约1750行可读C++代码中实现了核心ML生命周期的每一步,使用Arduino IDE编译时间不足一分钟,无外部ML依赖。在Seeed Studio ESP32-S3 XIAO ML Kit(8 MB PSRAM)上运行,固件可在约9分钟内完成三类64x64图像分类,实时推理速度为6.3 FPS。主要贡献包括:正确的批次级梯度累积;预计算的缩放查找表用于推理;双格式权重导出用于无SD卡的 baked-in 部署;三级权重优先级系统(SD二进制> baked-in 头文件> He初始化)在启动时自动解决;单常量网络重配置接口;以及适合微控制器约束的PSRAM-aware内存管理。所有源代码和参考数据集均以MIT许可证发布在https://github.com/webmcu-ai/on-device-vision-ai

英文摘要:

This paper presents a complete, end-to-end on-device vision machine learning pipeline, comprising data acquisition, two-layer CNN training with Adam optimization, and real-time inference, executing entirely on a microcontroller-class device costing $15-40 USD. Unlike cloud-based workflows that require external infrastructure and conceal the computational pipeline from the practitioner, this system implements every step of the core ML lifecycle in approximately 1,750 lines of readable C++ that compiles in under one minute using the Arduino IDE, with no external ML dependencies. Running on the Seeed Studio ESP32-S3 XIAO ML Kit (8 MB PSRAM), the firmware achieves three-class 64x64 image classification in approximately 9 minutes per training run, with real-time inference at 6.3 FPS. Key contributions include: correct batch-level gradient accumulation; pre-computed resize lookup tables for inference; dual-format weight export for SD-free baked-in deployment; a three-tier weight priority system (SD binary > baked-in header > He-initialization) resolved automatically at boot; a single-constant network reconfiguration interface; and PSRAM-aware memory management suited to microcontroller constraints. All source code and reference datasets are released under the MIT License at https://github.com/webmcu-ai/on-device-vision-ai

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑