The Face Recognition Attendance System is a Python-based application that uses face recognition technology to manage attendance. It leverages machine learning models for face detection and recognition, and includes features for spoof detection to ensure the authenticity of the detected faces.
This is specifically opotimized for mac OS
Use the other version other platforms. -> [Other OS] https://github.com/BHASKAR1823/Face_recog/
- Face Registration: Capture and register new faces into the system.
- Face Recognition: Recognize faces from live video feed or uploaded images.
- Spoof Detection: Detect and prevent spoofing attempts using advanced algorithms.
- Device Configuration: Support for both CPU and GPU processing.
- Theme Toggle: Switch between light and dark themes.
- Fullscreen Mode: Toggle fullscreen mode for the application.
- Student Management: Update and manage the list of registered students.
This will create an exact copy of the development environment.
-
Create and activate a Conda environment:
conda create -n face_recognition python=3.9 conda activate face_recognition
-
Clone the repository:
git clone https://github.com/yourusername/face_recognition_attendance_system.git cd face_recognition_attendance_system
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
**Place student images in folders under [student_images]
- Each student should have their own folder named with their ID.
- Example structure:
assets/ ├── student_images/ │ ├── 001/ │ │ ├── front.jpg │ │ ├── left.jpg │ │ └── right.jpg │ └── 002/ │ └── ... └── face_encodings/
-
Run the program:
python FaceRec.py
-
Use the GUI to register new faces, recognize faces, and manage the system.
-
Common Issues:
- If you get "DLL load failed" errors on Windows, install Visual C++ Redistributable:
- Download from: Visual C++ Redistributable
- If you get "DLL load failed" errors on Windows, install Visual C++ Redistributable:
-
Performance Tips:
- MPS mode is faster for training and recognition.
- CPU mode works but will be slower, especially during training.
- Use well-lit, clear photos for best recognition results.
- Python 3.9 or later
- 8GB RAM minimum
- Mac OS X or Linux (Windows is supported but not recommended)
- Webcam
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
- InsightFace for face detection and recognition.
- Silent-Face-Anti-Spoofing for spoof detection.