The purpose of this study is to address the issue of low efficiency and time-consuming monitoring of student classroom behaviour in teaching classroom scenarios, as well as how to apply deep learning to student classroom behaviour detection. Classroom teaching is the main way for students to acquire and master knowledge, and teachers need to pay attention to students’ behaviour in the classroom and make timely corrections. In this study, the teaching classroom of undergraduate students was used as an example for application and analysis. Based on the You Only Look Once v5s network, a student behaviour detection algorithm was designed by combining the ghosting module and optimised feature fusion structure, and a student behaviour association technology suitable for continuous teaching classrooms was designed. Through the visualisation results, it can be seen that the research method can accurately detect the behaviour categories of students, and the effect is better in target dense scenes. Through quantitative analysis using correlation technology, it can be concluded that there are very few students with the lowest level of seriousness, while the majority of students have a level of seriousness above the qualified level. The overall situation of the teaching classroom is good. These student behaviour analyses can energy the level of seriousness of students, form effective and objective classroom feedback, provide teachers with objective and accurate reference value, and promote the construction of smart classrooms.