Skip to content

Python face recognition with LBPH | Haar Cascade detection | Multi-user enrollment | Tkinter interface

Notifications You must be signed in to change notification settings

anasYaha/face-detection-opencv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎯 Face Detection & Recognition System

Python OpenCV Tkinter

A complete face recognition system with enrollment, detection, and real-time recognition capabilities.

📦 Installation

pip install opencv-python opencv-contrib-python numpy pillow

🧠 Core Features

📸 Face enrollment with metadata

🎥 Real-time webcam recognition

📁 Automatic data storage (images + pickle)

👤 User management interface

🖥️ How It Works

Run main.py to launch the application

Choose between:

Enroll New User: Capture face samples

Start Recognition: Real-time detection

View Users: Browse enrolled persons

🏗️ System Architecture

Key Bindings

Key ----> Action SPACE ----> Capture face sample ESC ----> Cancel enrollment Q ----> Exit recognition

⚙️ Technical Specifications

Face Detection: Haar Cascades

Recognition: LBPH (Local Binary Patterns Histograms)

Resolution: 640x480 (default)

FPS: ~30 (depending on hardware)

💡 Best Practices

Ensure good lighting conditions

Face the camera directly during enrollment

Capture multiple angles (5 samples recommended)

Keep background uncluttered

🚨 Troubleshooting

Camera not working?

Try different camera indexes (0, 1, 2)

Check webcam permissions

Poor recognition?

Re-enroll with better samples

Adjust recognition threshold

📜 License

MIT License - Free for personal and commercial use

About

Python face recognition with LBPH | Haar Cascade detection | Multi-user enrollment | Tkinter interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages