Deploying Machine Learning in Resource-Constrained Devices for Human Activity Recognition - Reusch, Rafael Schild; Juracy, Leonardo Rezende; Moraes, Fernando Gehm (Anais do Simpósio Brasileiro de Engenharia de Sistemas Computacionais (SBESC); 2023: Anais do XIII Simpósio Brasileiro de Engenharia de Sistemas Computacionais, 2023)
Machine Learning (ML) has proven to be highly effective in solving complex tasks such as human activity and speech recognition. However, the introduction of accuracy-driven ML models has brought new challenges in terms of their applicability in resource-constrained systems. In Human Activity Recognition (HAR), current state-of-the-art approaches often rely on complex multilayer LSTM (Long Short Term Memory) networks once they are well suited to handle temporal series data, a crucial aspect of HAR, but presenting a high computational cost associated with running the inference phase. In HAR, low-power IoT devices, such as wearable sensor arrays, are frequently used as data-gathering devices. However, we observed a limited effort to deploy ML technology directly on these devices, most commonly using edge or cloud computing services, which can be unavailable in some situations. This work aims to provide a Convolutional Neural Network (CNN) tuned for resource-constrained embedded systems. After tuning the CNN model in the Pytorch framework, we present an equivalent C model and employ optimization techniques. The results show that, compared to the reference CNN, the optimized model reduced the CNN model 2.34 times, does not require floating-point units (FPUs), and improved accuracy from 74.9% to 85.2%. These results show the feasibility of running the proposed CNN on resource-constrained devices.