| With the continuous development of artificial intelligence technology,the application of artificial intelligence in head posture detection has become a hot topic in computer vision.At present,it is also widely used in fatigue driving detection,virtual reality,attention monitoring and other fields.The traditional head attitude detection algorithm has many problems,such as large model,large computation,high cost of resources and low accuracy.Based on the analysis of the existing head posture detection algorithms,a Convolutional Neural network(CNN)head posture detection algorithm is embedded in the attention model,and the improved head posture detection algorithm is applied to the students’ learning posture detection,so as to realize the acquisition and processing of the upper computer and the real-time sound-light alarm of the lower computer.The main contents of this paper are as follows:1.Aiming at the problem of large model and large average error in head attitude detection,this paper presents a lightweight detection algorithm based on CNN that can estimate head attitude from a single picture.Based on the soft classification regression network,the algorithm adopts a multi-level classification method for the three-dimensional detection of "pitch Angle,yaw Angle and roll Angle" of head posture,and each level of classification will be classified on the basis of the previous level of classification.Each level of classification only needs to deal with a small number of classification tasks and fewer neurons.2.The paper adopts five streams,each of which has a different activation function,so as to collect multi-scale heterogeneous information at the same time.Each flow extracts the intermediate feature graph at each stage,and the extracted intermediate feature graph is fed into the feature fusion module for information aggregation to obtain the multi-feature intermediate feature graph,so as to improve the extraction ability of the feature graph.3.The paper presents a method to seamlessly embed the attention model into the CNN network.The attention model includes the channel attention structure and the spatial attention structure,which improve the feature representation of the feature map in the two dimensions of the channel and space respectively.4.Finally,the improved algorithm was applied to the students’ learning attitude tests,by adopting the combination of upper machine and lower machine,PC collection head posture and do the related processing,when upper machine to detect abnormal head posture signal,will signal to STM32 abnormal attitude as main control chip under a machine,the machine after receive the abnormal signals,sound and light alarm to remind timely.The paper adopts the soft classification regression method to improve the size of the algorithm model,and the improved model is only 4.36M.Then the accuracy of the head attitude detection algorithm is improved by 4%~5%through the proposed five-stream heterogeneous structure and the embedded attention model.Finally,the improved head attitude detection algorithm is applied to the students’ learning attitude detection,and the acquisition and processing of the upper computer and the real-time sound-light alarm of the lower computer are realized,which verifies the feasibility and practicability of the algorithm. |