Real-time face recognition system built using Python and OpenCV. Detects and recognizes faces from live camera input using computer vision techniques.
This project is a real-time face recognition system developed using Python and OpenCV.
It detects human faces from live webcam input and recognizes them using trained face data.
The project demonstrates core computer vision concepts such as face detection, feature extraction, and face recognition.
- Real-time face detection using webcam
- Face recognition using trained data
- Fast and lightweight
- Works on live video stream
- Simple and easy-to-understand code structure
This project includes a dataset creation module that allows users to create their own face dataset using a webcam.
By running the capture_faces.py file, the system captures multiple face images of a person and automatically stores them in the dataset directory. These images are later used to train the face recognition model.
- The webcam is activated.
- Faces are detected in real time using OpenCV.
- Multiple face samples are captured automatically.
- Images are saved with a unique ID or name.
- The dataset can be used to retrain the model for recognition.
python capture_face.py
- Python
- OpenCV (cv2)
- NumPy
- Faces are detected using OpenCV’s Haar Cascade classifier.
- The system is trained with sample face images.
- Live camera input is processed frame by frame.
- Detected faces are compared with trained data and recognized in real time.
cd face-recognition-opencv-python
pip install opencv-python numpy
python face_recognition.py
Detects faces in real time Displays name/ID on recognized faces Unknown faces are marked accordingly
Attendance systems Security and surveillance Learning computer vision basics AI & ML mini projects