A real-time federated TinyML framework for student behavior detection in smart classrooms
Abstract
Smart classrooms increasingly require intelligent systems capable of detecting student behaviors in real time while preserving privacy and operating under limited computational resources. However, many existing approaches rely on centralized training and high-complexity deep learning models, limiting their suitability for privacy-sensitive and TinyML-based educational environments. This paper proposes a privacy-preserving TinyML framework for federated student behavior detection in smart classrooms. The framework combines a lightweight object detection architecture based on depthwise separable convolutions, proximal federated learning across five distributed clients, structured channel pruning, batch normalization folding, post-pruning fine-tuning, and full-integer INT8 quantization. The model was evaluated on SCB-Dataset5, which contains 7428 images and 106,830 annotated instances across 20 classroom-related categories, with additional validation on UK_Dataset and SiTBehavior datasets. Experimental results show that the centralized model achieved 98.12% F1-score, 98.42% mAP@0.5, and 86.35% mAP@0.5:0.95, while the proximal federated model preserved comparable performance with 98.12% F1-score and 98.39% mAP@0.5. After 40% structured pruning and INT8 quantization, the compressed federated model achieved 95.52% F1-score, 95.64% mAP@0.5, and 78.86% mAP@0.5:0.95, while reducing the final model size to 228.9 KB and enabling real-time inference at 15.43 FPS on a 32-bit ARM Cortex-M-class target. These results demonstrate that the proposed framework effectively balances detection accuracy, privacy preservation, memory efficiency, and TinyML deployment feasibility for intelligent classroom monitoring.
// Source
Authors: Chaymae Yahyati, Ismail Lamaakal, Khalid El Makkaoui, Ibrahim Ouahbi
Institutions: Mohamed I University