A robust, Python-based Face Authentication System for tracking attendance. It features real-time face recognition, liveness detection to prevent photo spoofing, and a modern GUI.
- Two Interface Modes:
- Desktop App: Modern Dark Mode GUI (via
CustomTkinter) for high-performance, real-time logging. - Web Dashboard: Lightweight Web App (via
Streamlit) for easy access and mobile testing.
- Desktop App: Modern Dark Mode GUI (via
- Face Recognition: Uses VGG-Face (Deep Learning) for high-accuracy identification.
- Liveness Detection: Blink detection to ensure the user is present (prevents holding up a photo).
- Attendance Logging: Automatically logs "Punch In" and "Punch Out" events with timestamps to CSV.
- One-Shot Registration: Instantly register new users without re-training the model.
- Language: Python 3.12+
- Computer Vision: OpenCV (Haar Cascades)
- AI Model: VGG-Face (via
deepface) - GUI: CustomTkinter
- Web Framework: Streamlit
- Clone the Repository and enter the directory.
- Create a Virtual Environment (Recommended):
python -m venv venv # Windows: .\venv\Scripts\activate # Mac/Linux: source venv/bin/activate
- Install Dependencies:
pip install -r requirements.txt
This is the main application with real-time video feedback and blink counting.
python main.pyControls:
- Register Face: Enter a name in the text box and click "Register Face".
- Punch In: Click the Green button. (Requires looking at the camera and blinking).
- Punch Out: Click the Red button.
- Logs: View recent logs instantly in the text panel.
A browser-based version suitable for quick checks or remote access.
python -m streamlit run app.pyFor a detailed technical explanation of the models, algorithms, and failure cases, please refer to the Technical Report (PDF) included in this repository.
main.py: Entry point for the Desktop GUI App.app.py: Entry point for the Streamlit Web App.face_auth.py: Core logic for Face Recognition (DeepFace).liveness.py: Logic for Blink Detection.data/: Stores registered face embeddings.logs/: Stores daily CSV attendance logs.