[Paper Review] Student Classroom Behavior Detection based on Improved YOLOv7
This paper proposes an improved YOLOv7 model for student classroom behavior detection, integrating Bi-Level Routing Attention (BRA) and Wise-IoU loss to enhance accuracy in crowded, occluded scenes. The method achieves an mAP@0.5 of 79%, a 1.8% improvement over baseline YOLOv7, using a newly constructed SCB-Dataset with 4,200 images and 18,400 annotations for hand-raising, reading, and writing behaviors.
Accurately detecting student behavior in classroom videos can aid in analyzing their classroom performance and improving teaching effectiveness. However, the current accuracy rate in behavior detection is low. To address this challenge, we propose the Student Classroom Behavior Detection method, based on improved YOLOv7. First, we created the Student Classroom Behavior dataset (SCB-Dataset), which includes 18.4k labels and 4.2k images, covering three behaviors: hand raising, reading, and writing. To improve detection accuracy in crowded scenes, we integrated the biformer attention module and Wise-IoU into the YOLOv7 network. Finally, experiments were conducted on the SCB-Dataset, and the model achieved an mAP@0.5 of 79%, resulting in a 1.8% improvement over previous results. The SCB-Dataset and code are available for download at: https://github.com/Whiffe/SCB-dataset.
Motivation & Objective
- To address low detection accuracy in student classroom behavior recognition, especially in crowded or occluded scenes.
- To develop a specialized dataset for classroom behavior detection, focusing on hand-raising, reading, and writing actions.
- To enhance YOLOv7’s performance through attention mechanisms and a novel loss function for better generalization and reduced false positives.
- To provide a practical, accurate solution for real-time classroom monitoring to support teaching improvement and student performance analysis.
Proposed method
- Constructed the SCB-Dataset, comprising 4,200 images and 18,400 annotations for three behaviors: hand-raising, reading, and writing.
- Integrated the Bi-Level Routing Attention (BRA) module into YOLOv7 to enable dynamic, query-aware sparsity and improve feature representation in complex scenes.
- Proposed YOLOv7+Wise-IoU by replacing the standard IoU loss with Wise-IoU, which dynamically adjusts gradient gain based on anchor box quality to improve convergence and accuracy.
- Trained and evaluated models on the SCB-Dataset using mAP@0.5 and mAP@0.5:0.95 as primary metrics, with ablation studies to isolate component contributions.
- Used Grad-CAM visualization to interpret attention mechanisms and validate model focus on relevant body parts (e.g., hands, books) during inference.
- Combined BRA and Wise-IoU in a hybrid model (YOLOv7+BRA+Wise-IoU) to balance precision and detection overlap reduction.
Experimental results
Research questions
- RQ1Can a custom dataset for classroom behavior detection improve model performance compared to generic object detection benchmarks?
- RQ2Does integrating Bi-Level Routing Attention into YOLOv7 enhance detection accuracy in crowded classroom scenes with occlusions?
- RQ3Can Wise-IoU loss outperform standard IoU-based losses in terms of mAP and training convergence on a low-quality, unevenly distributed dataset?
- RQ4How do the individual and combined components (BRA and Wise-IoU) affect precision, recall, and mAP in detecting student behaviors?
Key findings
- The proposed YOLOv7+Wise-IoU v3 achieved the highest mAP@0.5 at 79.0%, representing a 1.8% improvement over the original YOLOv7.
- YOLOv7+BRA improved precision by 3.5% for hand-raising, 7.0% for reading, and 6.9% for writing compared to baseline YOLOv7.
- Wise-IoU v3 outperformed both v1 and v2 versions, achieving the best overall mAP@0.5:0.95 of 60.3%.
- The YOLOv7+Wise-IoU model showed faster convergence with lower bounding box loss, indicating improved training efficiency.
- Grad-CAM visualization confirmed that YOLOv7+Wise-IoU and YOLOv7+BRA better focus on relevant regions (e.g., hands, books), improving detection reliability.
- The hybrid model YOLOv7+BRA+Wise-IoU reduced overlapping detections while maintaining high precision, outperforming YOLOv7+Wise-IoU in localization consistency.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.