Skip to content

Repository files navigation

real-time-face-recognition-python

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.

🚀 Features

  • 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

🆕 Custom Dataset Creation Feature

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.

🔹 How Dataset Creation Works

  1. The webcam is activated.
  2. Faces are detected in real time using OpenCV.
  3. Multiple face samples are captured automatically.
  4. Images are saved with a unique ID or name.
  5. The dataset can be used to retrain the model for recognition.

📷 Capture Your Own Face Data

Run the dataset capture script

python capture_face.py

🛠️ Technologies Used

  • Python
  • OpenCV (cv2)
  • NumPy

▶️ How It Works

  1. Faces are detected using OpenCV’s Haar Cascade classifier.
  2. The system is trained with sample face images.
  3. Live camera input is processed frame by frame.
  4. Detected faces are compared with trained data and recognized in real time.

⚙️ Installation & Setup

1️⃣ Get the repository

cd face-recognition-opencv-python

2️⃣ Install dependencies

pip install opencv-python numpy

3️⃣ Run the project

python face_recognition.py

📸 Output

Detects faces in real time Displays name/ID on recognized faces Unknown faces are marked accordingly

📌 Use Cases

Attendance systems Security and surveillance Learning computer vision basics AI & ML mini projects

About

Real-time face recognition system built using Python and OpenCV. Detects and recognizes faces from live camera input using computer vision techniques.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages