A Python-based facial recognition system that automatically takes attendance and stores records in a CSV file. This application uses computer vision to identify registered individuals and mark their attendance with timestamps.
- Automated Attendance: Recognize faces and mark attendance automatically
- User-Friendly Interface: Simple menu-driven console interface
- Real-Time Face Detection: Visual feedback with bounding boxes and confidence scores
- CSV Storage: Attendance records stored in standard CSV format for easy export
- One-Time Daily Attendance: Each person is only marked once per day
- Visual Feedback: Shows recognition status and confidence percentages
- Face Registration: Simple process to add new faces to the system
(Will be added)
- Python 3.6 or higher
- Webcam or built-in camera
- The following Python packages:
- OpenCV
- face_recognition
- NumPy
-
Clone this repository:
git clone https://github.com/pial-paul/iDetectFace.git cd iDetectFace -
Install required dependencies:
pip install opencv-python face_recognition numpyNote: The
face_recognitionlibrary requiresdlib, which might need additional setup:pip install cmake pip install dlibOn Windows, you might need to install Visual C++ Build Tools.
-
Run the program:
python face_attendance.py -
Main Menu Options:
- Start Face Recognition Attendance: Begin the recognition process
- Add New Face: Register a new person to the system
- View Today's Attendance: Check who's been marked present today
- Exit: Close the application
- Select option 2 from the main menu
- Enter the person's name
- Position your face in front of the camera
- Wait for the green box and "Face Detected" message
- Press SPACE to capture the face
- Press ESC to cancel
- Select option 1 from the main menu
- The system will automatically detect and recognize faces
- When a registered person is detected, their name will be displayed with a confidence percentage
- Attendance is automatically marked (indicated by a ✓ symbol)
- Press 'q' to quit and return to the main menu
face_attendance.py: Main application fileknown_faces/: Directory containing saved face imagesattendance.csv: CSV file storing attendance records
- Face Detection: The system uses the
face_recognitionlibrary to detect faces in camera frames - Face Encoding: Each detected face is converted to a mathematical representation (encoding)
- Face Comparison: New face encodings are compared against known faces
- Attendance Marking: When a match is found, attendance is recorded with timestamp
- Data Storage: All records are saved to a CSV file for easy access and analysis
- Requires good lighting conditions for optimal recognition
- Performance depends on your computer's processing power
- May struggle with side profiles or partially occluded faces
- Recognition accuracy can be affected by facial hair, glasses, or other changes in appearance
- Camera not working: Ensure no other application is using your camera
- Slow performance: Lower the camera resolution in the code or increase the
process_every_n_framesvalue - Recognition issues: Try re-registering the face under better lighting conditions
- Installation problems: Check if all dependencies are correctly installed
- GUI interface
- Database integration
- Multiple camera support
- Attendance reports and analytics
- Face liveness detection
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions, issues, and feature requests are welcome! Feel free to check issues page.
- face_recognition library
- OpenCV library