YOLOv8-Based Student Behavior Detection in the Classroom: Introducing BAR Attention and Shape IoU Improvements to Enhance Detection Capabilities

YOLOv8-Based Student Behavior Detection in the Classroom: Introducing BAR Attention and Shape IoU Improvements to Enhance Detection Capabilities

Authors

  • Qiang Cao School of Information Technology, Mapua University, Makati, Metro Manila, Philippines; School of Electronic Information Engineering, Xi’an Siyuan University, Xi’an, Shaanxi, China https://orcid.org/0000-0003-1651-7074
  • Bonifacio T. Doma School of Information Technology, Mapua University, Makati, Metro Manila, Philippines

DOI:

https://doi.org/10.37965/jait.2025.0841

Keywords:

BAR attention, Behavior detection, classroom, Shape IoU, YOLOv8

Abstract

Aiming at the problem that it is difficult to monitor students’ behaviors in real time and comprehensively in traditional classroom management, the improved YOLOv8 (you only look once 8) model was studied and utilized to achieve efficient and precise monitoring of students’ classroom behaviors. This model improves the YOLOv8 model by introducing the double-layer routing attention mechanism and the Shape intersection over union (IoU) loss function (LF). The two-layer routing attention mechanism is structured with a coarse-grained, regional-level filtering layer followed by a fine-grained, token-to-token attention layer. The first layer effectively prunes uncorrelated key–value pairs at the region level by constructing sparse region-to-region association graphs. The second layer performs detailed attention calculations within these selectively collected areas. This allows the model to focus its computational resources on features that contain the most information. The results show that the improved YOLOv8 model performs well in all aspects. Compared with other improved algorithms in the field of pose recognition in the past three years, the improved YOLOv8 model exceeds these algorithms by 2.1%, 4%, and 2.3%, respectively, in the mAP@0.5 index and has obvious advantages in the number of parameters at the same time. The ablation experiment shows that the introduction of the efficient multi-scale convolution (EMC) module can increase the average detection accuracy (DA) by 1.08%, the Shape IoU LF can increase the average DA to 95.30%, and the bidirectional attention refinement module can increase the average DA by 0.52%. The improved YOLOv8 model proposed in this study enhances DA and efficiency in student classroom behavior detection tasks. It also provides an effective solution for real-time detection of student behavior in complex classroom environments.

Downloads

Published

2025-11-28

How to Cite

Cao, Q., & Doma, B. T. (2025). YOLOv8-Based Student Behavior Detection in the Classroom: Introducing BAR Attention and Shape IoU Improvements to Enhance Detection Capabilities. Journal of Artificial Intelligence and Technology. https://doi.org/10.37965/jait.2025.0841

Issue

Section

Research Articles
Loading...