arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.00839cs.LG
收藏

基于量化和自适应深度神经网络的微控制器人体活动识别

Human Activity Recognition on Microcontrollers with Quantized and Adaptive Deep Neural Networks

Politecnico di Torino(都灵理工大学);University of Bologna(博洛尼亚大学);STMicroelectronics(意法半导体)

Francesco Daghero, Alessio Burrello, Chen Xie, Marco Castellano, Luca Gandolfi, Andrea Calimera, Enrico Macii, Massimo Poncino, Daniele Jahier Pagliari

摘要:

基于惯性数据的人类活动识别(HAR)是从智能手机到超低功耗传感器的嵌入式设备上越来越广泛的任务。由于深度学习模型的高计算复杂性,大多数嵌入式HAR系统基于简单且不那么准确的经典机器学习算法。这项工作弥合了设备上HAR和深度学习之间的差距,提出了一组可部署在通用微控制器(MCU)上的高效一维卷积神经网络(CNN)。我们的CNN是将超参数优化与子字节和混合精度量化相结合获得的,以在分类结果和内存占用之间找到良好的权衡。此外,我们还利用自适应推理作为一个正交优化,在运行时调整推理复杂度的基础上处理的输入,从而产生一个更灵活的HAR系统。通过对四个数据集的实验,并针对超低功耗RISC-V MCU,我们表明:(i)我们能够获得丰富的HAR帕累托最优CNN集,在内存、延迟方面跨越超过1个数量级和能源消耗;(ii)由于自适应推理,我们可以从单个CNN开始导出>20个运行时操作模式,分类分数相差高达10%,推理复杂度相差超过3倍,内存开销有限;(iii)在四个基准测试中的三个上,我们优于所有以前的深度学习方法,将内存占用减少了100倍以上。获得更好性能的少数方法(浅和深)与MCU部署不兼容。(iv)我们所有的CNN都与实时设备上的HAR兼容,推理延迟<16 ms。它们的内存占用在0.05-23.17 kB之间变化,其能耗在0.005和61.59 uJ之间,允许在小电池供电下连续运行数年。

英文摘要:

Human Activity Recognition (HAR) based on inertial data is an increasingly diffused task on embedded devices, from smartphones to ultra low-power sensors. Due to the high computational complexity of deep learning models, most embedded HAR systems are based on simple and not-so-accurate classic machine learning algorithms. This work bridges the gap between on-device HAR and deep learning, proposing a set of efficient one-dimensional Convolutional Neural Networks (CNNs) deployable on general purpose microcontrollers (MCUs). Our CNNs are obtained combining hyper-parameters optimization with sub-byte and mixed-precision quantization, to find good trade-offs between classification results and memory occupation. Moreover, we also leverage adaptive inference as an orthogonal optimization to tune the inference complexity at runtime based on the processed input, hence producing a more flexible HAR system. With experiments on four datasets, and targeting an ultra-low-power RISC-V MCU, we show that (i) We are able to obtain a rich set of Pareto-optimal CNNs for HAR, spanning more than 1 order of magnitude in terms of memory, latency and energy consumption; (ii) Thanks to adaptive inference, we can derive >20 runtime operating modes starting from a single CNN, differing by up to 10% in classification scores and by more than 3x in inference complexity, with a limited memory overhead; (iii) on three of the four benchmarks, we outperform all previous deep learning methods, reducing the memory occupation by more than 100x. The few methods that obtain better performance (both shallow and deep) are not compatible with MCU deployment. (iv) All our CNNs are compatible with real-time on-device HAR with an inference latency <16ms. Their memory occupation varies in 0.05-23.17 kB, and their energy consumption in 0.005 and 61.59 uJ, allowing years of continuous operation on a small battery supply.

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

↑