This project demonstrates a complete computer vision pipeline — from capturing face images using a webcam to training a machine learning model and recognizing people in real time with confidence scores.
Harish Kumar
- Python
- OpenCV
- LBPH Face Recognizer
- Haar Cascade Classifier
- Tkinter (GUI)
- NumPy
- Pillow
The system works in three major stages:
-
Dataset Generation
The user enters their name and the webcam captures multiple face images.
These images are stored locally to create a training dataset. -
Model Training
The captured images are processed and used to train an LBPH classifier. -
Face Recognition
The trained model is used to detect and recognize faces from the webcam in real time, displaying the predicted name and confidence score.
- Haar Cascade detects faces from the camera feed
- LBPH extracts features and compares them with trained faces
- Tkinter provides a simple graphical interface
- OpenCV handles image processing and camera access
Follow these steps carefully to run the Face Recognition System on your machine.
Make sure Python 3.8 or higher is installed.
Check version:
python --versiongit clone https://github.com/Harishyadav44/Face_Recognition_GUI.git cd Face_Recognition_GUI
pip install -r requirements.txt
python main.py
Enter your name and look at the camera. The system will capture around 50 face images.
This will train the LBPH face recognition model.
The webcam will open and display the recognized name with confidence.
Press Enter on the keyboard to close the webcam window.
Generate Dataset → Captures face images for a new user
Train Model → Trains the LBPH face recognizer
Detect Face → Starts real-time recognition using the webcam
Dataset images and trained model files are not included in this repository for privacy reasons. You can generate your own dataset using the “Generate Dataset” button.
Attendance system integration
Face mask detection
Database connectivity
Web-based interface