An unsupervised classroom head pose concentration analysis method, device and equipment
By employing an unsupervised classroom head posture analysis method, utilizing temporal head posture data and multidimensional feature analysis, the problem of attention analysis in low-resolution and frequently occluded environments was solved, achieving stable and efficient analysis in real teaching scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEST CHINA HOSPITAL SICHUAN UNIV
- Filing Date
- 2026-02-13
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies struggle to reliably acquire high-quality facial features in classroom monitoring environments with low resolution and frequent occlusion. Methods based on fixed rules or thresholds lack adaptability to individual differences and dynamic classroom behaviors. Methods relying on supervised learning models are highly dependent on labeled data and are difficult to operate stably in real teaching scenarios over the long term.
An unsupervised classroom head posture attention analysis method is adopted. By extracting time-series head posture data from surveillance videos, multi-dimensional feature data is constructed, and unsupervised anomaly detection is performed to analyze the degree to which students' head posture behavior deviates from the normal pattern and generate attention analysis results.
Stable attention analysis in a real classroom environment was achieved without the need for high-resolution facial information and manual annotation, improving the applicability and stability of the method and reducing the false alarm rate.
Smart Images

Figure CN121725407B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision, and in particular to an unsupervised method, apparatus, and device for analyzing head posture and attention in the classroom. Background Technology
[0002] In classroom monitoring applications, existing student attention analysis technologies primarily rely on supervised learning models based on facial expression recognition or rule-based judgment methods. Facial expression recognition-based solutions typically use models such as convolutional neural networks to identify emotions or states in student facial images, and their effectiveness depends on clear and stable facial image input. However, in real-world classroom monitoring environments, the video captured by cameras often has low resolution, and students frequently exhibit behaviors such as looking down while writing, having their work obscured by books, or changes in lighting, making it difficult to consistently acquire facial features. This results in insufficient reliability of facial expression-based attention analysis methods in practical applications. Furthermore, these methods usually require a large amount of manually labeled data for model training, leading to high labeling costs, and the models have limited generalization ability across different classroom environments and student groups.
[0003] Another type of existing technology typically judges students' attention status based on preset rules or thresholds, such as determining distraction based on whether the head tilt angle exceeds a set threshold. While these methods are simple to implement, they do not fully consider individual student differences and the dynamic nature of the classroom environment. For example, different students may have different natural head postures during normal listening, and reasonable learning behaviors such as note-taking and group discussions will also cause changes in head posture. Rule-based judgment methods based on fixed thresholds struggle to distinguish between these normal behaviors and genuine distractions, easily leading to a high false alarm rate and failing to meet the application needs of real-world teaching management scenarios.
[0004] Furthermore, existing classroom attention monitoring solutions mostly employ supervised learning models to classify behaviors or postures, and their performance largely depends on the quality of training data and the consistency of annotations. In large-scale, long-term classroom monitoring scenarios, obtaining stable and reliable labeled data is inherently challenging, and factors such as behavioral differences among students and long-term behavioral changes further reduce the stability of supervised models in practical applications.
[0005] Therefore, existing technologies generally suffer from the following shortcomings: They struggle to reliably acquire high-quality facial features in low-resolution and frequently occluded classroom monitoring environments; methods based on fixed rules or thresholds lack adaptability to individual differences and dynamic classroom behavior, resulting in high false alarm rates; and methods relying on supervised learning models are highly dependent on labeled data, lack generalization ability, and are difficult to operate stably in real teaching scenarios over the long term. These issues limit the effectiveness and practicality of existing attention analysis technologies in actual classroom monitoring scenarios. Summary of the Invention
[0006] This invention aims to address at least the problems of existing technologies that rely on high-resolution facial information and manually labeled data when analyzing student attention in classroom monitoring scenarios, and are difficult to adapt to occlusion and individual differences. This invention provides an unsupervised method, apparatus, and device for analyzing student head posture attention in classroom monitoring videos to obtain corresponding student attention analysis results. In a classroom monitoring environment, feature analysis can be performed on the temporal data of head posture extracted from the monitoring video. By performing unsupervised anomaly detection on the constructed multi-dimensional feature data, the degree to which a student's current head posture deviates from their normal behavioral pattern can be determined. This allows for classroom attention analysis without manual labeling or reliance on high-resolution facial expression information, achieving a technical effect applicable to real classroom scenarios.
[0007] In a first aspect, embodiments of the present invention provide an unsupervised method for analyzing classroom head posture and attention, the method comprising:
[0008] S1. Collect monitoring video data in the classroom setting, and obtain corresponding student video clips from the monitoring video data;
[0009] S2. Process the student video clips, extract the posture parameters that reflect the changes in the student's head posture, and construct the corresponding head posture time series data based on continuous time segments;
[0010] S3. Using the head posture time series data as input, perform feature analysis processing on the head posture time series data to construct multidimensional feature data for characterizing the student's head posture behavior pattern, wherein the multidimensional feature data is used to reflect at least the overall change characteristics and dynamic change characteristics of the head posture.
[0011] S4. Perform unsupervised anomaly detection processing on the multidimensional feature data to determine the anomaly analysis results used to characterize the degree to which the student's current head posture behavior deviates from its normal behavior pattern;
[0012] Based on the anomaly analysis results, corresponding student focus analysis results are generated and output.
[0013] Optionally, the attitude parameters include at least yaw angle, pitch angle, and roll angle; the head attitude timing data is formed by arranging the yaw angle, pitch angle, and roll angle in chronological order within a continuous time segment.
[0014] Optionally, S2 includes time-aligning the posture parameters according to a predetermined time window, and combining multiple posture parameters obtained by the same student within the time window to form corresponding head posture timing data.
[0015] Optionally, S3 includes preprocessing the head pose time series data, the preprocessing including: interpolating and completing the missing pose data caused by occlusion or detection failure, and filtering the completed head pose time series data.
[0016] Optionally, the multidimensional feature data includes: basic statistical features constructed based on the head posture time series data, and dynamic behavioral features constructed based on the head posture time series data.
[0017] Optionally, the dynamic behavior features include: a posture change feature constructed based on the difference in head posture parameters between adjacent time steps, a motion intensity feature constructed based on the posture change feature, and a main frequency feature extracted from the frequency domain transformation result after performing window function processing on the head posture time series data or posture change data.
[0018] Optionally, S3 further includes constructing a memory decay baseline feature, the process of which includes:
[0019] Retrieve and store the anomaly analysis results for the same student within a historical time period;
[0020] Assign corresponding weights based on the time interval between the historical anomaly analysis results and the current moment;
[0021] The historical anomaly analysis results are weighted and fused according to the weights to generate corresponding baseline features.
[0022] Optionally, the unsupervised anomaly detection processing described in S4 analyzes the multidimensional feature data based on a tree-structured anomaly detection model to obtain continuous anomaly analysis results; and after outputting the student focus analysis results, the current anomaly analysis results are updated to the historical anomaly analysis results.
[0023] Secondly, embodiments of the present invention provide an unsupervised classroom head posture attention analysis device, the device comprising:
[0024] The data acquisition module is used to collect monitoring video data in the classroom setting and obtain corresponding student video clips from the monitoring video data.
[0025] The posture data acquisition module, connected to the data acquisition module, is used to process the student video clips, extract posture parameters reflecting changes in the student's head posture, and construct corresponding head posture time series data based on continuous time segments.
[0026] The first calculation module is connected to the posture data acquisition module and is used to perform feature analysis processing on the head posture time series data as input, and construct multi-dimensional feature data to characterize the student's head posture behavior pattern. The multi-dimensional feature data is used to reflect at least the overall change characteristics and dynamic change characteristics of the head posture.
[0027] The second calculation module, connected to the first calculation module, is used to perform unsupervised anomaly detection processing on the multidimensional feature data and determine the anomaly analysis results used to characterize the degree to which the student's current head posture behavior deviates from its normal behavior pattern.
[0028] The result output module is connected to the second calculation module and is used to generate corresponding student focus analysis results based on the anomaly analysis results, and output the student focus analysis results.
[0029] Thirdly, embodiments of the present invention provide a computer device, the computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the methods described above.
[0030] The unsupervised classroom head posture attention analysis method, apparatus, and device according to the present invention have at least the following beneficial effects:
[0031] The unsupervised classroom head posture attention analysis method of the present invention first collects monitoring video data in a classroom setting and obtains corresponding student video segments from the monitoring video data; then, the student video segments are processed to extract posture parameters reflecting changes in student head posture, and head posture temporal data is constructed based on continuous time segments; then, using the head posture temporal data as input, feature analysis processing is performed on the head posture temporal data to construct multidimensional feature data for characterizing student head posture behavior patterns; subsequently, unsupervised anomaly detection processing is performed on the multidimensional feature data to determine anomaly analysis results that characterize the degree to which the student's current head posture behavior deviates from its normal behavior pattern; finally, based on the anomaly analysis results, the corresponding student attention analysis results are generated and output.
[0032] Through the above processing flow, this invention can complete attention analysis in a classroom monitoring environment with low resolution and frequent occlusion without relying on high-resolution facial expression information or manually labeled data. This avoids the problem of strong dependence on data quality and labels based on fixed rules or supervised models, thereby improving the applicability and stability of the method in real classroom scenarios.
[0033] The unsupervised classroom head posture and attention analysis device of the present invention, by setting up a data acquisition module, a posture data acquisition module, a calculation module and a result output module corresponding to the steps of the method, enables classroom monitoring video data to complete posture extraction, feature analysis, unsupervised anomaly analysis and attention result output according to a predetermined process, thereby realizing automated analysis of students' attention status and facilitating deployment and application in classroom monitoring systems.
[0034] The computer device of the present invention, by running a computer program on a processor and memory for implementing the unsupervised classroom head posture attention analysis method, enables the computer device to process classroom video data and output attention analysis results, thereby supporting the implementation and operation of the method on existing computing platforms and possessing a sound engineering foundation. Other features and advantages of the present invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. Attached Figure Description
[0035] Figure 1 This is a flowchart illustrating the steps of an unsupervised classroom head posture attention analysis method according to Embodiment 1 of the present invention.
[0036] Figure 2 This is the overall architecture diagram of the isolated forest head posture attention analysis method in Embodiment 2 of this application;
[0037] Figure 3 This is a schematic diagram of multidimensional psychological scale data clustering in Embodiment 3 of this application. Detailed Implementation
[0038] The present invention will be further described in detail below with reference to experimental examples and specific embodiments. However, this should not be construed as limiting the scope of the above-mentioned subject matter of the present invention to the following embodiments. All technologies implemented based on the content of the present invention fall within the scope of protection of the present invention.
[0039] Unless otherwise specified, the use of terms such as "upper," "lower," "left," "right," "center," "inner," "outer," and "side" to indicate orientation or positional relationships in the description of specific embodiments of the present invention is based on the orientation or positional relationships shown in the accompanying drawings, or the orientation or positional relationship in which the product / equipment / device is typically placed during use. These terms are merely for the purpose of facilitating the description of the present invention or simplifying the description in specific embodiments, enabling those skilled in the art to quickly understand the solution, and do not indicate or imply that a particular device / component / element must have a specific orientation, or be constructed and operated in a specific positional relationship. Therefore, they should not be construed as limitations on the present invention.
[0040] In the description of the embodiments of this invention, technical terms such as "first" and "second" only distinguish one entity or operation from another, and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary or secondary relationship of the indicated technical features. In the description of the embodiments of this invention, "multiple" means two or more, unless otherwise explicitly defined.
[0041] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0042] Example 1
[0043] During the research process, the applicant discovered that when using classroom attention analysis methods based on facial expression recognition or preset rule thresholds, achieving continuous and stable analysis of students' attention status in actual classroom monitoring environments requires acquiring high-resolution, unobstructed facial images and relying on a large amount of manually labeled data. The related data collection, labeling, and model training processes are cumbersome and often difficult to implement in low-resolution classroom scenarios with frequent occlusion, limiting their application to a limited extent under controlled or ideal conditions. In solving practical engineering problems, to achieve the technical goal of long-term, stable attention analysis of large groups of students in real classroom monitoring environments, existing technologies fall short in terms of occlusion resistance, adaptability to individual differences, and dependence on labeled data.
[0044] Therefore, after conducting in-depth research on the above issues, the applicant proposed an unsupervised classroom head posture attention analysis method. In classroom monitoring scenarios with low resolution, frequent occlusion, and lack of labeled data, the method combines feature construction based on temporal head posture features with unsupervised anomaly detection to analyze and output students' attention status. This achieves the technical effect of conducting attention analysis in a real classroom environment without manual labeling.
[0045] Please refer to Figure 1 , Figure 1 This is a schematic diagram illustrating the steps of an unsupervised classroom head posture attention analysis method provided in an embodiment of the present invention. The method may include:
[0046] Collect surveillance video data in a classroom setting, and extract corresponding student video clips from the surveillance video data;
[0047] The student video clips are processed to extract posture parameters that reflect changes in the student's head posture, and corresponding head posture time series data are constructed based on continuous time segments.
[0048] Using the head posture time series data as input, feature analysis processing is performed on the head posture time series data to construct multidimensional feature data for characterizing students' head posture behavior patterns. The multidimensional feature data is used to reflect at least the overall change features and dynamic change features of head posture.
[0049] Unsupervised anomaly detection processing is performed on the multidimensional feature data to determine the anomaly analysis results used to characterize the degree to which the student's current head posture behavior deviates from its normal behavior pattern;
[0050] Based on the anomaly analysis results, corresponding student focus analysis results are generated and output.
[0051] In some specific implementations, an unsupervised method for analyzing head posture and attention in the classroom is provided. This method is executed by a computer device and applied in classroom monitoring scenarios. Specifically, it includes:
[0052] First, surveillance video data from the classroom setting is collected, and corresponding student video clips are extracted from the surveillance video data. These student video clips are used to reflect the continuous behavioral state of students in the classroom setting.
[0053] Subsequently, the student video clips are processed to extract attitude parameters reflecting changes in the student's head posture. These attitude parameters include at least yaw, pitch, and roll angles. After extracting these attitude parameters, they are arranged chronologically based on continuous time segments to construct corresponding head posture time-series data. During the construction of this head posture time-series data, the attitude parameters can be time-aligned according to predetermined time windows, and multiple attitude parameters obtained from the same student within those time windows can be combined to form the head posture time-series data.
[0054] In one specific embodiment, the head pose time-series data can be preprocessed before subsequent processing. The preprocessing includes: interpolating and completing missing pose data caused by occlusion or detection failure, and filtering the completed head pose time-series data.
[0055] Next, using the head posture time-series data as input, feature analysis is performed on the head posture time-series data to construct multidimensional feature data characterizing students' head posture behavior patterns. The multidimensional feature data includes basic statistical features constructed based on the head posture time-series data, and dynamic behavioral features constructed based on the head posture time-series data. Specifically, the dynamic behavioral features include posture change features constructed based on the differences in head posture parameters between adjacent time steps, motion intensity features constructed based on the posture change features, and a dominant frequency feature extracted from the frequency domain transformation results after performing window function processing on the head posture time-series data or posture change data.
[0056] In one specific embodiment, during the feature analysis process, a memory decay baseline feature can also be constructed. The process of constructing the memory decay baseline feature includes: acquiring and storing the anomaly analysis results of the same student within a historical time period; assigning corresponding weights based on the time interval between the historical anomaly analysis results and the current time; and performing weighted fusion of the historical anomaly analysis results according to the weights to generate the corresponding baseline feature.
[0057] Subsequently, unsupervised anomaly detection processing is performed on the multidimensional feature data to determine the anomaly analysis results that characterize the degree to which the student's current head posture behavior deviates from their normal behavioral pattern. The unsupervised anomaly detection processing analyzes the multidimensional feature data based on a tree-structured anomaly detection model, and the anomaly analysis results are continuous data.
[0058] Finally, based on the anomaly analysis results, corresponding student attention analysis results are generated and output. After outputting the student attention analysis results, the current anomaly analysis results can be updated to the historical anomaly analysis results for subsequent use in constructing the memory decay baseline features, thus forming a closed-loop processing flow for attention analysis.
[0059] Based on the above embodiments, it can be understood that the unsupervised classroom head posture attention analysis method, device and equipment provided by the embodiments of the present invention can analyze head posture behavior in video data in a computer-implemented manner, and therefore can be applied to many technical fields, such as the field of behavior analysis based on video surveillance, the field of crowd state analysis and the field of intelligent education auxiliary systems, including but not limited to classroom monitoring systems, teaching behavior analysis systems and intelligent terminal devices related to classroom management.
[0060] In the above implementation, when processing the monitoring video data collected in the classroom setting, the corresponding head posture time series data can be further obtained from the student video segments extracted from the video, and feature analysis processing can be performed based on the head posture time series data. In this process, unsupervised anomaly detection can be performed on the multidimensional feature data to generate analysis results reflecting changes in student head posture behavior, thereby realizing the analysis and output of students' concentration status, and thus achieving the effect of completing classroom concentration analysis without manual annotation and without relying on high-resolution facial information.
[0061] Example 2
[0062] Based on Embodiment 1 above, to further illustrate the specific implementation method, parameter settings, and engineering feasibility of the technical solution of the present invention, this embodiment provides a more specific implementation method. Embodiment 2, without changing the overall technical concept of the unsupervised classroom head posture attention analysis method described in Embodiment 1, combines specific data processing procedures to explain in detail the construction method of head posture time-series data, the extraction process of multi-dimensional features, and the specific implementation architecture of anomaly analysis. Furthermore, by clarifying the data relationships between each processing step, the implementation process of the method of the present invention in actual classroom monitoring scenarios is further elaborated.
[0063] It should be noted that the specific implementation described in Embodiment 2 is only used to further illustrate the technical solution of the present invention and does not constitute a limitation on the scope of protection of the present invention. Equivalent substitutions or modifications made to the relevant implementation details without departing from the technical concept of the present invention shall fall within the scope of protection of the present invention.
[0064] Please refer to Figure 2 , Figure 2 The overall architecture of the classroom head posture attention analysis method based on isolated forest in Embodiment 2 is shown. This method first uses video data collected in a classroom setting as input, performing face cropping and identity recognition processing on the video data. If the corresponding student identity cannot be identified, the subsequent processing flow terminates; if the student identity is successfully identified, the video data corresponding to the student continues to be processed for head posture parameter extraction to obtain head angle posture information reflecting changes in the student's head posture.
[0065] After obtaining head angle and pose information, feature extraction processing is performed on the head angle and pose information to construct feature data representing the student's head posture behavior. This feature data is then input into an anomaly detection model to perform anomaly detection processing. In this embodiment, the anomaly detection processing is based on an isolated forest model to generate corresponding anomaly scores. Based on the anomaly scores, it is determined whether the student's current head posture behavior is abnormal. If it is determined to be abnormal, the corresponding abnormal student information is output and the processing flow ends; if it is determined to be non-abnormal, the anomaly output step is skipped and the processing flow ends.
[0066] In a specific implementation, the following steps are included:
[0067] S1 Head Pose Extraction Module
[0068] Due to the limited clarity of facial recognition in classroom surveillance cameras, only video clips featuring students whose identities could be detected were included. An OpenCV model was used to process the video window (window size...). Perform face matching and head pose feature extraction. Let the Euler angles of the head pose in frame t be ,
[0069]
[0070] in, This refers to the yaw angle. The pitch angle. Let be the roll angle (raw). A sequence of head poses can be represented as,
[0071]
[0072] Where H represents the set of all detected valid head pose sequences, The number of valid head pose sequences detected. For sequence index, , is used to represent any one of the N valid head pose sequences.
[0073] S2 Feature Engineering
[0074] S2.1 Preprocessing Module
[0075] To address potential frame loss issues in head pose detection, quadratic spline interpolation is used to fill in the missing intervals. Considering the natural movement characteristics of the human body and noise features, a Butterworth bandpass filter (0.1–2 Hz) is used to filter noise.
[0076] Next, head pose samples from the same video were analyzed:
[0077] S2.2 Feature Extraction
[0078] S2.2.1 Basic Statistical Characteristics
[0079] For head pose sequences Extract the mean and variance of the head pose sequence.
[0080]
[0081]
[0082] in, The mean, Let Variance be the variance.
[0083] S2.2.2 Dynamic Behavioral Characteristics
[0084] Define head pose sequence The first-order difference is the difference between two consecutive frames, representing the velocity of the head movement. The mean and variance of the first-order difference of the head pose sequence are extracted:
[0085]
[0086]
[0087]
[0088] in, This represents the mean characteristic obtained by statistically analyzing changes in head posture. This represents the discreteness characteristic obtained by statistically analyzing changes in head posture.
[0089] Motion energy is defined as the L2 norm of head motion velocity, divided by the total video length for normalization:
[0090]
[0091] in, This represents the motion intensity characteristic calculated based on changes in head posture, used to reflect the overall change in head posture within a predetermined time window. T represents the number of time steps or the length of the time window contained in the head posture time series data.
[0092] Define the dominant frequency and the first-order difference dominant frequency as the peak values of the spectrum of the original sequence and the first-order difference sequence, respectively:
[0093]
[0094] in, This indicates that a Discrete Fast Fourier Transform is performed on the time-series data; This represents the frequency component with the largest amplitude in the spectrum after performing a discrete fast Fourier transform on the original time sequence of head posture, and is used to characterize the periodic characteristics of head posture changes over time. This represents the frequency component with the largest amplitude in the spectrum after performing a Discrete Fast Fourier Transform (DFT) on the first-order difference sequence of head posture, used to characterize the periodicity of the head posture change rate. Since the head posture time series data is a discrete sequence acquired within a finite time window, abrupt changes in the start and end positions of the sequence can easily introduce spectral leakage when directly performing frequency domain transformation. Therefore, before performing the FFT, the head posture time series data is weighted with a Hamming window function to ensure a smooth transition at the time window boundaries, thereby reducing the impact of spectral leakage on the frequency domain analysis results.
[0095] S2.2.3 Baseline characteristics of memory decay
[0096] Given a sequence of past anomaly scores Let the mean of outlier scores over the past month be... ,in Initialize to 0. Define the memory decay coefficient.
[0097]
[0098] Where k represents a historical moment, with the most recent moment t having the largest weight; This represents the time weight corresponding to the k-th historical anomaly analysis result; This represents the memory decay coefficient, used to control the degree of weight decay of historical anomaly analysis results in baseline calculation. Baseline characteristics are defined as follows:
[0099]
[0100] in, This represents the anomaly analysis result obtained at the k-th historical moment. This represents the baseline features obtained by weighted fusion of historical anomaly analysis results. Head pose motion features are extracted using the aforementioned feature engineering methods, and various features are concatenated into a feature vector to construct a feature matrix. .
[0101] S3 Anomaly Score Calculation
[0102] This module calculates anomaly scores based on the Isolation Forest algorithm. 1 indicates the highest level of abnormality, proving the lowest level of focus.
[0103] This method uses the Isolation Forest algorithm for unsupervised anomaly detection. Samples are separated by randomly selecting a feature and its segmentation value. The recursive partitioning can be represented by a tree structure; therefore, the number of partitions required to separate samples equals the path length from the root node to the terminal node. The path length, averaged over the random trees, becomes a metric for normality and the decision function. Random partitioning significantly shortens the path length of anomalous samples. Therefore, when the path lengths of some samples in the forest of random trees are generally short, these samples are highly likely to be anomalous.
[0104] X represents a feature matrix composed of multidimensional features corresponding to multiple head pose temporal data, and d represents the number of feature dimensions of the multidimensional feature data. For the feature matrix... The output result is
[0105]
[0106] in, for The anomaly score vector of each sample, where iForest() represents the anomaly detection function based on the Isolation Forest algorithm. The number of students detected in the video is set to 100, and the maximum number of features is [value missing]. The maximum depth of an isolated tree is The abnormal score ranges from -0.5 to +0.5. The closer the score is to -0.5, the higher the degree of abnormality; the closer it is to +0.5, the more it leans towards normality.
[0107] S4 Method Evaluation
[0108] Typically, student behavior analysis methods based on facial expression features or torso key point recognition can identify abnormal behavior in the classroom under ideal conditions. However, in real classroom monitoring scenarios, video acquisition environments often suffer from low resolution and frequent occlusion between students, significantly limiting the applicability of these methods.
[0109] Existing facial expression recognition methods typically rely on high-resolution face images as input, with common input sizes of 112×112 or 224×224 pixels, such as expression recognition models based on MobileNetV2, VisionTransformer, or SwinTransformer. However, in real-world classroom monitoring environments, factors such as camera installation height, shooting distance, and image coverage often prevent the facial area of a single student from meeting these resolution requirements, making it difficult for expression-based recognition methods to operate stably.
[0110] In contrast, under low-resolution conditions, head pose angle information can still be estimated using a relatively small face or head region, and its dependence on image resolution is relatively low. Furthermore, when students are writing with their heads down or partially occluded, the overall head contour and orientation information are more easily preserved, significantly reducing the impact of occlusion on head pose recognition. Therefore, compared to behavior recognition methods based on facial expressions or torso key points, head pose angle-based analysis is more suitable for application in real-world classroom monitoring scenarios.
[0111] In the implementation of this invention, only the head posture parameters and their temporal features extracted from classroom monitoring videos are analyzed. Facial details, identity information, or other features that could be used to identify individuals are not processed. This invention does not require or rely on student names, student IDs, or other identifying identifiers. The data used in the analysis process can be managed with anonymized identifiers in the technical implementation, and the output results are only statistical or status information related to attention levels, not pointing to a specific natural person's identity. In other words, this invention focuses on head posture behavior patterns in videos, rather than individual identity attributes, thus avoiding the processing and utilization of personal privacy information in videos from a technical perspective.
[0112] It should be noted that the analysis process and output results involved in this invention are all based on computer processing and statistical analysis of classroom monitoring video data and head posture behavior features extracted from the video data. Essentially, it belongs to the analysis and information organization of objective behavioral data. This invention focuses on the changes in students' head posture and their temporal characteristics in classroom scenarios. By modeling and analyzing the above behavioral features, corresponding analysis results are obtained to reflect the changes in behavioral states in classroom scenarios.
[0113] In its specific implementation, the method of this invention only processes video data and its derived posture feature data, without directly judging an individual's internal state, nor drawing conclusions based on any physiological indicators, subjective feelings, or professional evaluation standards. Even if scale data is introduced in some embodiments as a means of comparison or verification, such data is only used for auxiliary analysis of the method's effectiveness and result comparison, and does not constitute the processing object of the technical solution of this invention, nor does it participate in the generation process of attention analysis results.
[0114] Therefore, the technical solution provided by this invention focuses on computer-implemented behavioral feature analysis and data processing, aiming to improve the engineering feasibility and applicability of analyzing behavioral states in a real classroom monitoring environment. Its output results are only used as objective data analysis information and do not involve making conclusions of an evaluative or interventional nature regarding individual states.
[0115] Example 3
[0116] Based on Embodiment 2 above, to further verify the feasibility and engineering applicability of the unsupervised classroom head posture attention analysis method of the present invention in real teaching scenarios, this embodiment applies the unsupervised classroom head posture attention analysis method of the present invention to the actual teaching environment of a school, and provides a specific application description of the method. Psychological scale data is used as a comparison and verification means of the method's effectiveness in this embodiment, and is not used as an input condition or judgment basis for the method. Embodiment 3, without changing the overall technical solution and processing flow of the method described in Embodiment 2, applies the method to a classroom monitoring scenario with a large number of students, and compares its analysis results in actual operation with existing screening methods to further illustrate the implementation effect and application value of the method of the present invention in practical applications.
[0117] In this embodiment, the unsupervised classroom head posture attention analysis method of the present invention is applied to the actual teaching environment of a junior high school, with approximately 1,000 students participating. The application scenario is a classroom monitoring system deployed during daily classroom teaching, which analyzes students' head posture behavior in the classroom by collecting monitoring video data in the classroom setting.
[0118] In the specific implementation process, firstly, according to the method described in Example 2, the corresponding student video segments are obtained from the classroom monitoring video, and the student video segments are processed to extract the student head posture parameters and construct head posture time series data; then, multi-dimensional feature data is constructed based on the head posture time series data, and the corresponding anomaly analysis results are generated by using an unsupervised anomaly detection method, thereby obtaining the student's attention analysis results.
[0119] In addition to classroom monitoring video data, this embodiment also routinely collects students' psychological scale data, which covers multiple dimensions such as anxiety, depression, stress, self-harm, life satisfaction, social support, family functioning, and sleep. Please refer to... Figure 3 , Figure 3 This diagram illustrates the clustering of psychological scale data obtained from a cluster analysis of psychological scale data in a junior high school, reflecting the correspondence between students' emotions and behaviors. Figure 3 The colors red, yellow, and green used in the chart correspond to high-risk, medium-risk, and low-risk groups, respectively.
[0120] In the performance evaluation process, the clustering results based on psychological scale data are used as a reference to compare and analyze the unsupervised analysis results based on head posture described in this invention. In actual student scenarios, it is difficult to directly obtain labeling results that can serve as "truth labels" for whether each individual student has an abnormal state, thus making it difficult to adopt traditional supervised evaluation methods. Therefore, this embodiment selects the clustering results based on psychological scale data as a reference benchmark, and regards the red, yellow, and green three-level risk distribution obtained from scale clustering as an approximate characterization of the risk structure of the student group. On this basis, the distribution of abnormal student groups detected by the unsupervised method based on head posture described in this invention within the group corresponding to the red, yellow, and green levels of the scale is compared and analyzed to evaluate the correlation between the output results of this method and the scale risk distribution. As shown in Table 1:
[0121] Table 1. Comparison of Clustering Results of Student Psychological Scales and Unsupervised Analysis Based on Head Posture
[0122]
[0123] Among them, in the clustering results based on psychological scale data, the proportion of students with red grades is about 3.1%, the proportion of students with yellow grades is about 21.1%, and the proportion of students with green grades is about 75.6%; while in the anomaly analysis results obtained based on the unsupervised head posture analysis method described in this invention, when the anomaly analysis results meet the predetermined judgment conditions, the proportion of students with red grades is about 4.8%, the proportion of students with yellow grades is about 23.1%, and the proportion of students with green grades is about 72.0%.
[0124] It should be noted that the clustering results based on psychological scale data in this embodiment are used as a reference benchmark to reflect the overall distribution of the student group at different risk levels, rather than as an absolute judgment of the status of each individual student. By comparison, it can be found that within the subset of anomalous students selected using the unsupervised head posture method described in this invention, the proportion of students at the red and yellow levels on the scale is higher than their proportion in the overall student group, indicating a certain degree of enrichment of high-risk levels on the scale within the anomalous student subset. This shows that there is a correlation between the anomaly analysis results output by the method of this invention and the risk level reflected by the scale, rather than a random division of students.
[0125] Example 4
[0126] In Embodiments 1 to 3 above, the unsupervised classroom head posture attention analysis scheme of the present invention has been described from the perspectives of overall method scheme, specific algorithm implementation, and practical application effects. To further illustrate the implementation form of this technical solution in an engineering system and its deployment method in a computer system environment, this embodiment describes the system structure for implementing the above method from the perspective of devices and computer equipment, so as to facilitate understanding and implementation by those skilled in the art.
[0127] This embodiment provides an unsupervised classroom head posture and attention analysis device. This device is applied in classroom monitoring scenarios to process collected classroom video data to analyze student attention levels.
[0128] The device includes a data acquisition module, a posture data acquisition module, a first calculation module, a second calculation module, and a result output module. The data acquisition module collects monitoring video data from a classroom setting and extracts corresponding student video clips from the monitoring video data. The posture data acquisition module, connected to the data acquisition module, processes the student video clips, extracts posture parameters reflecting changes in student head posture, and constructs corresponding head posture time-series data based on continuous time segments.
[0129] The first calculation module is connected to the posture data acquisition module and is used to perform feature analysis processing on the head posture time series data as input to construct multi-dimensional feature data for characterizing the student's head posture behavior pattern; the second calculation module is connected to the first calculation module and is used to perform unsupervised anomaly detection processing on the multi-dimensional feature data to generate anomaly analysis results for characterizing the degree to which the student's current head posture behavior deviates from its normal behavior pattern.
[0130] The result output module is connected to the second calculation module and is used to generate corresponding student focus analysis results based on the anomaly analysis results, and output the student focus analysis results.
[0131] In one specific implementation, the above-mentioned device can be deployed in a computer device. The computer device includes a processor and a memory, the memory storing a computer program. When the computer program is executed by the processor, it causes the computer device to process classroom monitoring video data according to the processing flow of each module in the above-mentioned device, thereby completing the analysis of student head posture and outputting the results of attention analysis.
[0132] With the above-described structure, this embodiment can implement the unsupervised classroom head posture attention analysis method described in the foregoing embodiments in the form of a device and computer equipment, which facilitates the integration of this technical solution into existing classroom monitoring systems or related information processing systems.
[0133] It should be understood that the various modules of the unsupervised classroom head posture attention analysis device provided in the above embodiments are only illustrated by the division of each functional module in the above description when performing head posture attention analysis. In practical applications, the above functions can be assigned to different functional modules as needed. That is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0134] The functional modules in the above embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of the embodiments of the present invention.
[0135] Based on the same application concept, embodiments of the present invention also provide a computer device, which may include a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the unsupervised classroom head posture attention analysis method as described above.
[0136] Based on the same application concept, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the unsupervised classroom head posture attention analysis method as described above.
[0137] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.
[0138] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0139] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. An unsupervised method for analyzing head posture and attention in the classroom, characterized in that, include: S1. Collect monitoring video data in the classroom setting, and obtain corresponding student video clips from the monitoring video data; S2. Process the student video clips, extract the posture parameters that reflect the changes in the student's head posture, and construct the corresponding head posture time series data based on continuous time segments; S3. Using the head posture time series data as input, perform feature analysis processing on the head posture time series data to construct multidimensional feature data for characterizing the student's head posture behavior pattern, wherein the multidimensional feature data is used to reflect at least the overall change characteristics and dynamic change characteristics of the head posture. The multidimensional feature data includes: basic statistical features constructed based on the head posture time series data, and dynamic behavioral features constructed based on the head posture time series data; The dynamic behavior features include: a posture change feature constructed based on the difference of head posture parameters between adjacent time steps, a motion intensity feature constructed based on the posture change feature, and a main frequency feature extracted from the frequency domain transformation result after performing window function processing on the head posture time series data or posture change data. S4. Perform unsupervised anomaly detection processing on the multidimensional feature data to determine the anomaly analysis results used to characterize the degree to which the student's current head posture behavior deviates from its normal behavior pattern; The unsupervised anomaly detection process analyzes the multidimensional feature data based on a tree-structured anomaly detection model to obtain continuous anomaly analysis results; and after outputting the student focus analysis results, the current anomaly analysis results are updated to the historical anomaly analysis results. S5. Based on the anomaly analysis results, generate corresponding student focus analysis results and output the student focus analysis results.
2. The unsupervised classroom head posture attention analysis method according to claim 1, characterized in that, The attitude parameters include at least yaw angle, pitch angle and roll angle; The head attitude timing data is formed by arranging the yaw angle, pitch angle, and roll angle in chronological order within a continuous time segment.
3. The unsupervised classroom head posture attention analysis method according to claim 1, characterized in that, S2 includes aligning the posture parameters according to a predetermined time window, and combining multiple posture parameters obtained by the same student within the time window to form corresponding head posture timing data.
4. The unsupervised classroom head posture attention analysis method according to claim 1, characterized in that, S3 includes preprocessing the head pose time series data, the preprocessing including: interpolating and completing the missing pose data caused by occlusion or detection failure, and filtering the completed head pose time series data.
5. The unsupervised classroom head posture attention analysis method according to claim 1, characterized in that, S3 also includes constructing a memory decay baseline feature, the process of which includes: Retrieve and store the anomaly analysis results for the same student within a historical time period; Assign corresponding weights based on the time interval between the historical anomaly analysis results and the current moment; The historical anomaly analysis results are weighted and fused according to the weights to generate corresponding baseline features.
6. An unsupervised classroom head posture attention analysis device, characterized in that, include: The data acquisition module is used to collect monitoring video data in the classroom setting and obtain corresponding student video clips from the monitoring video data. The posture data acquisition module, connected to the data acquisition module, is used to process the student video clips, extract posture parameters reflecting changes in the student's head posture, and construct corresponding head posture time series data based on continuous time segments. The first calculation module is connected to the posture data acquisition module and is used to perform feature analysis processing on the head posture time series data as input, and construct multi-dimensional feature data to characterize the student's head posture behavior pattern. The multi-dimensional feature data is used to reflect at least the overall change characteristics and dynamic change characteristics of the head posture. The multidimensional feature data includes: basic statistical features constructed based on the head posture time series data, and dynamic behavioral features constructed based on the head posture time series data; The dynamic behavior features include: a posture change feature constructed based on the difference of head posture parameters between adjacent time steps, a motion intensity feature constructed based on the posture change feature, and a main frequency feature extracted from the frequency domain transformation result after performing window function processing on the head posture time series data or posture change data. The second calculation module, connected to the first calculation module, is used to perform unsupervised anomaly detection processing on the multidimensional feature data and determine the anomaly analysis results used to characterize the degree to which the student's current head posture behavior deviates from its normal behavior pattern. The unsupervised anomaly detection process analyzes the multidimensional feature data based on a tree-structured anomaly detection model to obtain continuous anomaly analysis results; and after outputting the student focus analysis results, the current anomaly analysis results are updated to the historical anomaly analysis results. The result output module is connected to the second calculation module and is used to generate corresponding student focus analysis results based on the anomaly analysis results, and output the student focus analysis results.
7. A computer device, characterized in that, The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1 to 5.