Although the face recognition method for in-depth learning has high accuracy, the model is complex and the recognition speed is slow. In order to realize real-time face recognition of students while learning video, a real-time face recognition method based on Dlib is proposed. In this essay, based on the real-time face recognition method, Dlib is used as a face recognition tool, and the Dlib environment is configured. A face detection method based on the Dlib toolkit is designed. That is, using the convolution neural network method (CNN) and the deep residual network (ResNet) for real-time face recognition, and finally using the GPU to accelerate the operation of the face feature extraction network, sharing the CPU load to improve the overall operating efficiency of the system. By numerous repeated experiments and tests, it shows that the accuracy of face recognition is high and has certain application value.