Skip to content

A beginner-friendly computer vision project that captures face data, trains a Local Binary Pattern Histogram (LBPH) recognizer, and performs real-time face recognition using a webcam. Built using Python and OpenCV.

Notifications You must be signed in to change notification settings

DAKSH-coder26/Face-Recognition-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎯 Face Recognition with OpenCV

This is a simple and modular face recognition project using OpenCV and Local Binary Patterns Histogram (LBPH). It allows you to:

  • πŸ“Έ Collect face data using your webcam
  • 🧠 Train an LBPH face recognizer on the collected dataset
  • πŸ‘οΈβ€πŸ—¨οΈ Run real-time face recognition on webcam feed

πŸ“ Project Structure

Face Recognition/
β”œβ”€β”€ Dataset_creation.py    # Capture and save face images
β”œβ”€β”€ Training.py            # Train LBPH face recognizer
β”œβ”€β”€ Recognition.py         # Perform real-time face recognition
β”œβ”€β”€ main.py                # Orchestrates the full 

---

## πŸ”§ Requirements

Install Python packages via pip:

```bash
pip install -r requirements.txt

You mainly need:

  • opencv-python

πŸš€ How to Use

1. Run the main controller

python main.py

Follow the CLI prompts to:

  • Add the number of users
  • Enter name & ID
  • Capture 40 face images per person
  • Train the model
  • Start live recognition

πŸ“ Notes

  • Captured images are saved in face_dataset/<name>/
  • Trained model is stored in trainer.yml
  • You can adjust face recognition sensitivity by tweaking the confidence threshold in Recognition.py

πŸ“¦ To-Do / Improvements

  • Add GUI for easy usability
  • Replace Haar cascades with DNN or Mediapipe
  • Auto-save ID-name mapping for future reuse
  • Add tests and evaluation metrics
  • Deploy as a desktop or web app

Feel free to fork and contribute!

About

A beginner-friendly computer vision project that captures face data, trains a Local Binary Pattern Histogram (LBPH) recognizer, and performs real-time face recognition using a webcam. Built using Python and OpenCV.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages