A student attendance system using FaceNet512 face recognition with MediaPipe liveness checks against proxy attendance and wireless LED feedback via NodeMCU.

An academic project to develop a smart student attendance system using face recognition with spoofing detection (anti-spoofing), carried out by a team of students with technical assistance from Techno Enjaz. The system captures student images through classroom cameras, extracts a 512-dimensional digital signature for each face with the FaceNet512 deep learning model, and matches it against the signatures stored in an SQLite database to record attendance automatically during the lecture.
Before matching, each face passes through a liveness layer based on MediaPipe Face Mesh (468 facial landmarks) that detects blinking and analyzes depth and texture, aiming to stop proxy attendance with a printed photo or a phone screen. The result of each attempt is sent wirelessly to a NodeMCU ESP8266 module that lights a green indicator for a recognized student and a red one for a rejected attempt. The project documents the design and the implemented interfaces; it does not include numerical measurements of recognition or spoofing-detection accuracy.
| Item | Details |
|---|---|
| Project type | Automated face-recognition attendance system with liveness verification and IoT feedback |
| Field | Computer vision, deep learning, Internet of Things, smart educational systems |
| Project status | Working system with an implemented GUI, without published accuracy evaluation |
| Techno Enjaz role | Technical support and assistance to the students during project development |
| Core technologies | Python, OpenCV (Haar Cascade), DeepFace + FaceNet512, MediaPipe Face Mesh, SQLite, multithreading, CustomTkinter, Pandas, OpenPyXL, NodeMCU ESP8266 |
| Outputs | Automatic attendance recording, green/red LED indicators, management of sessions, rooms, and courses, present/late/absent reports, Excel export |
Manual roll calls consume the first minutes of every lecture, and paper records are easy to manipulate: proxy attendance is common and hard to control. Transcribing paper sheets and preparing reports is also an administrative burden prone to errors, damage, and data loss. Fingerprint systems, meanwhile, are slow with large numbers of students and require physical contact.
The project therefore set out to build a contactless solution based on computer vision that does not stop at matching a face, but first verifies that the face in front of the camera is live rather than a photo or a screen, handles several rooms at the same time, and provides instant feedback, central archiving, and exportable reports.
The project was carried out academically by the students, with technical assistance and support from Techno Enjaz during development. It is presented among the office's work as an example of its support for projects that combine face recognition and spoofing detection with IoT in educational applications.
The project's activity diagram describes the attendance path for a single student as follows:
| Protection layer | Mechanism | Targeted attack |
|---|---|---|
| Blink detection | Landmark tracking and EAR variation | Static photographs |
| Spatial depth analysis (3D depth) | Geometric variation between landmarks | Flat masks and display screens |
| Texture analysis | Spatial variance (Laplacian variance) | Distinguishing skin texture from screen pixels |
| Micro-movements | Differences between consecutive frames | Rigid faces and high-resolution photos |
The anti-spoofing feature can be switched on or off from the live recognition screen.
The system architecture is split into two nodes connected over Wi-Fi (IEEE 802.11 b/g/n):
| Component | Role in the system |
|---|---|
| NodeMCU ESP8266 | Wireless node with a 32-bit Tensilica L106 processor and 2.4 GHz radio; receives TCP commands through the LwIP stack and drives the indicators via GPIO pins |
| LED indicators | Green to confirm attendance, red for rejection |
| Jumper wires | Carry GPIO signals and power from the module to the indicators |
| USB 2.0 cable | Connects the PC to the board's serial converter chip (UART link, used for AT-command control) |
| Cameras | Capture the live stream, at 720p or higher |
Documented working environment: a multi-core processor, 8 GB of RAM or more, Windows 10/11 or Linux, and Python 3.8 or later.
The GUI is built with CustomTkinter and includes the following screens:
| Screen | Function |
|---|---|
| Login | Username and password, Arabic/English switching, and role-based access |
| Main screen | Quick access to student management, sessions, recognition, reports, analytics, and user management |
| University management | Tabs for faculties, specializations, courses, and rooms with add, edit, and delete |
| Academic years | Add, edit, and delete academic years |
| Attendance session setup | Choose the room and course, set the attendance window and lateness period, then start the session |
| Live recognition | Status of each room, start/stop, number of detected faces, session timer, camera selection, and anti-spoofing toggle |
| Session reports | Present, late, and absent counts per session and student attendance details, with viewing and export |
| Advanced analytics | Overall statistics and charts of attendance status distribution, per-student analytics, and Excel export |
Attendance records are processed with Pandas and exported to Excel files with OpenPyXL.
The project presents the implemented interfaces and the architecture, activity, and sequence diagrams, and concludes that the design meets the stated functional requirements. However, it provides no numerical measurements of recognition accuracy, false acceptance or rejection rates (FAR/FRR), spoofing-detection rate, response time, or actual performance across four rooms. The system's capabilities should therefore be read as designed and implemented capabilities, not measured evaluation results.
According to the directions set out in the project:
The system stores facial embeddings and personal data of students, which is sensitive biometric data. Any real-world use requires clear student consent and controls over access rights, retention period, and data protection.
If you are working on a face-recognition attendance system with anti-spoofing and need technical help developing the idea or building a prototype, you can contact the Techno Enjaz office to discuss your project's requirements and the appropriate scope of support.
An academic system built by a team of students with technical assistance from Techno Enjaz that records student attendance automatically by recognizing faces through classroom cameras. It uses FaceNet512 to extract a 512-dimensional face embedding and matches it against an SQLite database, after verifying the face is live rather than a photo or screen.
Each face passes through a liveness layer based on MediaPipe Face Mesh with 468 facial landmarks. It detects blinking via the Eye Aspect Ratio (EAR) and analyzes spatial depth, texture (Laplacian variance), and micro-movements between frames; if a printed photo or screen is detected, the attempt is rejected and the red indicator lights up.
After the matching decision, the PC sends a command in a TCP packet over Wi-Fi to the NodeMCU ESP8266's IP address. Command "1" lights the green LED to confirm attendance, and command "0" lights the red LED when the liveness check fails or no match is found.
A CustomTkinter GUI covering faculties, specializations, courses, rooms, and academic years, attendance session setup with an attendance window and lateness period, and a live recognition screen for multiple rooms. Session reports show present, late, and absent counts, with an analytics dashboard and Excel export through Pandas and OpenPyXL.
The project provides no numerical measurements of recognition accuracy, false acceptance or rejection rates, or spoofing-detection rate; it documents the design and implemented interfaces. Its limits include reliance on an ordinary camera without depth sensors, a local database, and the need to tune the matching threshold in crowded rooms.
Reach out to Techno Enjaz engineering team to discuss technical feasibility, prototype hardware, and development scope.