## 4 Experiments  
### Experimental Details  
#### 4.1.1 Datasets  
Object Detection Dataset  
To tackle the challenges posed by classroom environments characterized by high densities of teachers and students, as well as varying camera angles, this study utilized the CrowdHuman dataset for model training [33]. This dataset is recognized for its extensive scale, diversity, and intricate scene annotations, making it particularly suitable for assessing the human detection performance in crowded settings. CrowdHuman comprises approximately 25,000 images that encompass over 40 cities and a variety of activity scenes. Each image contains an average of 22.6 annotated instances--specifically Head BBox, Visible BBox, and Full BBox--thereby providing rich training data for the model (Figure 10). Multi-Channel Classroom Emotion Dataset  
In order to investigate the issue of emotion recognition within classroom environments, this study collects video data from elementary and middle-school classrooms across various regions and subjects. A total of 200 video files are included, encompassing disciplines such as mathematics, language arts, and others. Each video is recorded at a resolution of 1280 \(\times\) 720 pixels with a frame rate of 25 frames per second. The duration of each lesson ranges from approximately 40 to 45 min. Informed consent was obtained from all participants and their legal guardians for the classroom experimental data in this study to ensure compliance with ethical standards and the protection of the children's privacy. An example of the collected video data is illustrated in Figure 11.  
Figure 11: Example of video data collection. (**a**) Front-facing camera video; (**b**) Rear-facing camera video. Figure 10: Annotation examples from the CrowdHuman dataset [33]. In order to accurately label mood changes, this study extracts one frame every 15 s and generates the Student-Full dataset by detecting the students' actual body regions (Visible BBox) using the YOLOv8x-Improved model. A total of 33,481 images were labeled and classified according to the six emotions identified in the previous section (Table 3). In this paper, the YOLOv8-Pose model is used for skeletal feature extraction to generate the Student-Sk dataset. The model uses CSP-darknet as the backbone network and fuses different scale features through PANet, which is able to efficiently detect the skeletal key points. The 17 key points contained in the COCO dataset are used to estimate the human posture (Figure 12). The key point information is normalized and centered to finally generate a skeletal map (Figure 13) for subsequent emotion recognition. In a natural classroom environment, traditional facial detection algorithms often struggle to handle complex scenarios such as occlusion and head-turning. Therefore, in this  
Figure 12: Example of human key points annotation. \begin{table}
\begin{tabular}{c c} \hline \hline
**Emotion Category** & **Count** \\ \hline Doubt & 3857 \\ Engagement & 5987 \\ Fatigue & 4083 \\ Disconnection & 7696 \\ Pleasure & 3779 \\ Peace & 8078 \\ Total & 33,481 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Number of annotations in the image emotion dataset. Figure 13: Example of generated skeleton diagram. paper, we opted for the YOLOv8x-Improved head detection model, which is trained on the CrowdHuman dataset, rather than relying on facial detection methods. The CrowdHuman dataset categorizes human body detection into three distinct categories: head Box, Full BBox, and Visible BBox. The specific detection effect applied to the classroom scene is shown in Figure 14.  
In order to enhance the detection accuracy, this study employs a stacking preprocessing method. This involves superimposing the original image twice along both the horizontal and vertical coordinate axes to increase the resolution prior to inputting it into the model. The preprocessed human head image is then fed into the detector for analysis. Subsequently, the coordinates of the detection frame are extracted, yielding the corresponding head image.