A lightweight classroom behavior recognition algorithm based on advanced weighted filtering and multi-level feature fusion
摘要
Addressing the current focus in classroom behavior recognition solely on student behaviors, while overlooking the influence of teachers, and the issues of high computational cost and deployment difficulties in existing algorithmic models, this paper constructs a classroom dataset encompassing both teacher and student behaviors and proposes a lightweight recognition algorithm called DHYOLO. The algorithm comprises two models: the ultra-lightweight DHYOLO-n and the DHYOLO-d, which strikes a balance between efficiency and performance. In the DHYOLO-n model, the DWG-HGNet network is introduced for the backbone section, utilizing depthwise separable convolution (DWConv) for downsampling and integrating Ghost convolution (GhostConv) to obtain the Ghost_HGBlock module for feature extraction, thereby enhancing detection speed and performance. For the neck network, an High-Level Selective Path Aggregation Network (HSD-PANet) is proposed, which integrates features from different levels and utilizes high-level features as weights to filter out informative information, strengthening the representation capability for features of different scales, thus improving detection accuracy and efficiency. The DHYOLO-d model adds a dynamic head framework (dynamic head) to the detection head of the DHYOLO-n model, and integrates an attention mechanism to pay more attention to high-level feature information, further improving detection accuracy. Experimental results demonstrate that compared to YOLOv8n, the DHYOLO-n model achieves reductions of 54% in parameters, 34.5% in computations, and 51.6% in weight file size, with a mere 5.2% decrease in mAP. Meanwhile, the DHYOLO-d model achieves reductions of 30.8% in parameters, 11.1% in computations, and 32.3% in weight file size, while improving accuracy by 0.5%. Both models meet the requirements for deployment on different performance terminal devices.