The Internet of Things (IoT) is gradually changing the way teaching and learning take place in on-campus programs. In particular, face capture services improve student concentration to create an efficient classroom atmosphere by using face recognition algorithms that support end devices. However, reducing response latency and executing face analysis services effectively in real-time is still challenging. For this reason, this paper proposed a pedagogical model of face recognition for IoT devices based on edge computing (TFREC). Specifically, this research first proposed an IoT service-based face capture algorithm to optimize the accuracy of face recognition. In addition, the service deployment method based on edge computing is proposed in this paper to obtain the best deployment strategy and reduce the latency of the algorithm. Finally, the comparative experimental results demonstrate that TFREC has 98.3% accuracy in face recognition and 72 milliseconds in terms of service response time. This research is significant for advancing the optimization of teaching methods in school-based courses, meanwhile, providing beneficial insights for the application of face recognition and edge computing in the field of education.