A high-performance facial recognition attendance system built with Python and OpenCV. This project uses computer vision and machine learning to provide secure, automated attendance tracking with liveness detection to prevent spoofing.
This project provides an end-to-end solution for automated attendance management using facial recognition technology. The system combines a user-friendly graphical interface with advanced computer vision algorithms to deliver accurate and secure attendance tracking. With features like blink detection for liveness verification and real-time facial landmark guidance, the system achieves high accuracy in user identification while preventing fraudulent attendance attempts.
- Python 3.8+
- TKinter
- Core Libraries:
- OpenCV: For computer vision operations and video processing.
- Face Recognition: For facial feature detection and encoding.
- SQLite3: For database management and user storage.
- Pillow (PIL): For image processing and display.
- NumPy: For numerical operations and array processing.
High-Accuracy Recognition: Utilizes advanced facial encoding algorithms for reliable user identification.
Liveness Detection: Implements blink detection using eye aspect ratio (EAR) to prevent spoofing with photographs.
Real-time Feedback: Provides visual guidance through facial landmark detection during enrollment and verification.
Automated Attendance Logging: Records attendance with timestamps and exports to CSV for easy reporting.
User-Friendly Interface: Clean, professional GUI with intuitive navigation and consistent styling.
Database Management: Efficient storage and retrieval of user data and facial encodings using SQLite.
Cross-Platform Compatibility: Works on Windows, macOS, and Linux systems.
The project follows a structured workflow for both enrollment and attendance marking:
System Initialization: Loading required libraries and initializing the database connection.
User Enrollment:
- Capture facial image through webcam
- Detect facial landmarks and generate encodings
- Store user data with unique UUID in database
Attendance Verification:
- Continuous video capture for face detection
- Facial encoding generation and database matching
- Liveness verification through blink detection
- Attendance logging with timestamp
Data Export: Automatic CSV generation of attendance records for reporting.
The system demonstrates high reliability in both enrollment and verification processes:
| Metric | Performance |
|---|---|
| Face Detection Accuracy | High (with proper lighting conditions) |
| Liveness Detection Reliability | Effective against photo spoofing |
| Verification Speed | Near real-time (depends on hardware) |
| Database Efficiency | Fast retrieval even with large user bases |
(The home screen shows two options to users for enrolling in the system and marking attendance.)
(The enrollment screen shows real-time facial landmark detection and guides users for optimal positioning.)
(The attendance interface provides visual feedback during the verification process with progress indicators.)
(Sample CSV output showing attendance records with timestamps and user details.)
Sr No User ID Username Status Timestamp
1 dbb19b77-28c3-444f-be50-f7876c8a6334 ashish Present 30-08-2025 16:58
2 3ed0970d-9f73-40cd-a04e-2183a2078083 Chaitanya Khot Present 30-08-2025 17:43
3 2d6e5913-2a35-4f0f-8f90-026991d50d5a Chaitanya Khot Present 02-09-2025 00:25This project successfully demonstrates a practical application of facial recognition technology for attendance management. By combining accurate facial encoding with liveness detection, the system provides a secure and efficient alternative to traditional attendance methods. The intuitive interface makes it accessible for various environments including educational institutions, corporate offices, and events.
Follow these instructions to get a copy of the project up and running on your local machine.
-
Clone the repository:
git clone https://github.com/KhotChaitanya/AI-Powered-Eye-Sensor-Attendance-System.git cd AI-Powered-Eye-Sensor-Attendance-System -
Create a virtual environment (recommended):
# For Windows python -m venv venv .\venv\Scripts\activate # For macOS/Linux python3 -m venv venv source venv/bin/activate
-
Run the application:
python main_gui.py
This project is licensed under the MIT License - see the LICENSE file for details.