Classroom teaching is a key link in education teaching.Improving students’ classroom learning quality can not only improve students’ learning effect,but also promote the transformation of teachers’ classroom teaching methods.With the increase of the number of students in the national compulsory education stage and the implementation of the national "double reduction" policy,more students and parents put forward higher requirements for students’ learning in the compulsory education stage.In classroom learning,the most important thing is to ensure that students maintain a good listening state during class,so as to ensure the quality of students’ listening.Therefore,we can use intelligent means to detect and observe students’ classroom behavior,so as to further feed back students’ learning state.It can be applied to traditional offline teaching or remote online teaching to detect and identify classroom behavior in real time,so that teachers can understand students’ classroom learning status in time.The traditional detection mode such as sensor and admission video has a high cost,low efficiency,poor real-time performance.In order to reduce the cost of model deployment and achieve the purpose of real-time detection,this paper studies and improves a deep learning class behavior detection algorithm.The research work in this article is as follows:(1)In terms of data sets.Due to the particularity and sensitivity of classroom data sets,there are few open-source data sets.In order to meet the needs of practical engineering applications,video and image data are collected in a middle school in Fuyang City by using smart phones and camera equipment.Open CV is used to frame the video data,and finally integrated into the image data set.In order to enhance the generalization ability of the model,python tools are used to amplify the data by means of geometric transformation,adding noise and changing color brightness,and finally the class(Ketang,KT)data set is constructed.Finally,labelimg,a visual annotation tool,is used to label the data,and the data target categories are divided into four categories:listening carefully,sleeping,chatting,distraction,forming a labeled data sets.(2)In the selection and optimization of model algorithm.This paper selects the lightweight yolov5 s model for detection,improves the model,and adds Bi FPN structure to the neck module of the original model,so as to enhance the feature fusion ability of the network model.Because different data sets are sensitive to the role of anchors,we consider replacing the initially preset anchors of the model to adapt to our data set.After the counted aspect information of the statistical tag,the Kmean_Anchors function is called to calculate the anchors for the appropriate data set.Configure the generated Anchors to the model file of the preset anchor frame.In order to make the model lighter and reduce the cost of model deployment,Eagle Eye pruning algorithm is used to prune the model.Finally,the KT-YOLOv5 s model in this paper is constructed.Compared with the original model,the results show that the detection accuracy(m AP)of the improved model is increased by 1.0%,the reasoning time(ms)is reduced by 45.5%,and the parameter scale(M)is reduced by 41.7%..(3)In terms of comparative analysis of test results and model performance.By putting the test image and video into the model for detection,the behavior category of the target object can be detected and recognized accurately and quickly.The model reasoning speed is fast and meets the requirements of real-time detection.Finally,through the Faster-RCNN and Lightweight Model of the Two-Stage Detection Algorithm YOLOV3-tiny,SSD-Mobilenetv2,and the original YOLOv5 s model,performance Compared.The detection accuracy of the KT-YOLOv5 s model reaches97.0%,The reasoning time is 18 ms and the parameter scale is 8.1M,which has a large advantage and the actual application value compared to other models. |