Edgeefficient human activity recognition using a quantized patchbased transformer.

Journal: Scientific reports
Published Date:

Abstract

Human Activity Recognition (HAR) systems using deep learning have shown significant promise; however, deploying such models on edge computing systems remains challenging due to constraints in inference latency, memory footprints and computational capacity. This study proposes a lightweight, end-to-end patch-based Transformer architecture designed for efficient HAR for resource constrained edge environments, evaluated through an architectural ablation study and multiple quantization strategies using TensorFlow Lite. We conducted extensive experiments by varying patch lengths and Transformer encoder depths in order to evaluate the impact on classification accuracy, latency and model complexity. The results demonstrate that moderate temporal patching achieves an effective balance between temporal representation learning and computational efficiency. Experiments have been conducted on two widely open-source benchmark datasets, WISDM and PAMAP2, where raw sensor signals are pre-processed through segmentation, normalization, and overlapping windowing before being fed into a compact Transformer model with patch embedding and multi-head self-attention for feature extraction. The trained models are converted into FP32, FP16, INT8 dynamic range, and INT8 full formats to evaluate trade-offs between different metrics such as accuracy, model size, and inference latency. The baseline model achieves 96.77% accuracy on WISDM and 98.48% on PAMAP2, with consistently high macro F1-scores. Among all quantization variants, TFLite-INT8-Dynamic reduced model size by 95.55% and 89.80% for WISDM and PAMAP2, respectively and drastically improved inference latency by around 99% for both datasets with minimal accuracy degradation. These findings demonstrate that the proposed patch-based Transformer model for HAR has achieved an effective balance between recognition performance and computational efficiency, which indicates its strong deployment feasibility for resource constrained edge environments through TensorFlow Lite benchmarking and can provide a scalable solution for edge intelligence applications.

Authors

Keywords

No keywords available for this article.