The invention discloses a student class attention detection method. The method comprises the following steps: a teaching image of a teaching teacher and a face image of a class student is collected; Aspectral
extinction method based on the set depth data extracts the state of the eyes of the student in the frame image; the
sight orientation of student eyes is calculated; the moment of distractionof the student is recorded in the classroom teaching process, cross comparison with the teaching image is performed, and the cause of
distraction of the student is analyzed. The attention condition of the student can be calculated by only extracting the
eye state of the student and utilizing the continuity of the position and the
eye state of the student in the classroom teaching process. According to the detection method, the
video recognition algorithm is optimized, the calculation amount is reduced, the classroom attention condition of each student can be obtained through data unification,the large-area
distraction time points of the students and the teaching content of the teacher are compared in a crossed mode, the teacher can find out the lack of teaching, the teaching level is improved, and the teaching quality is improved.