MoCvT-SAR: A Lightweight MobileNetV4-CvT Hybrid Network for Student Activity Recognition in Smart Classrooms
Siham Essahraui, Jouhayna Driouach, Rania El-Otmani, Ibrahim Ouahbi, Khalid El MakkaouiStudent activity recognition (SAR) is becoming increasingly important in smart classroom environments, where automatic visual analysis can be used to analyze the activities of students. However, most of the current state-of-the-art deep learning (DL) models for recognizing student activities suffer from limitations like high computational complexity, limited interpretability, and lack of concern about efficient deployment. In this work, we develop an explainable and efficient SAR system using the MobileNetV4-CvT model. A systematic evaluation was first conducted using five representative lightweight models, namely MobileNetV4-Conv-S, RepViT-M0.9, SHViT, iFormer-S, and Lightweight CvT, under a unified experimental protocol. Experiments were performed on six student-centered activity classes derived from the EduNet dataset, resulting in 26,841 images divided at the video level into training, validation, and test sets to prevent frame-level information leakage. Guided by the baseline analysis and an extensive ablation study, the final hybrid model combines the efficient local feature extraction capability of MobileNetV4 with a single CvT attention block for contextual feature refinement. The proposed model achieved a test accuracy of 95.20%, Macro Precision of 97.12%, Macro Recall of 91.37%, Macro F1-score of 92.62%, and Weighted F1-score of 94.57%, while containing only 2.66 million parameters and requiring 30.92 MB of storage. Its prediction reliability was further supported by an Expected Calibration Error (ECE) of 3.19%. Moreover, Gradient-weighted Class Activation Mapping (Grad-CAM), SHapley Additive exPlanations (SHAP), Local Interpretable Model-Agnostic Explanations (LIME), and Integrated Gradients (IG) were used to provide qualitative illustrations of the visual cues associated with correct and incorrect predictions. The findings show that the proposed model offers a good trade-off between accuracy, efficiency, calibration, and explainability and is thus a promising approach to developing intelligent classroom monitoring systems.