Artificial Intelligence and IoT have always attracted a lot of attention from scholars and researchers, not only because of their high applicability but also typical technologies of the Fourth Industrial Revolution. The hallmark of AI is its self-learning ability, which enables computers to predict and analyze complex data such as fingerprints, irises, and faces. The study proposes a solution for a mechatronic system that integrates AI's face recognition capabilities to create an attendance system and assess student attendance. The model's accuracy ranges from 90% to 95%. The study's results are compared with recent research demonstrating the system's usability. Therefore, the authors apply the training process's outcomes to construct an attendance and diligence assessment system that recognizes students' faces.