Skip to content

rjkalash/4BiometricAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 Real-Time Biometric Authentication System

🚀 Production-grade facial recognition system for real-time identity verification using computer vision and machine learning


🌟 Key Highlights

  • 🎯 High-Accuracy Face Recognition using HOG + SVM pipeline
  • Real-Time Inference optimized for low-latency video streams
  • 🐳 Dockerized Deployment for reproducible environments
  • 🧱 Modular Architecture (Detection → Feature Extraction → Classification → Serving)
  • 🎨 Interactive Dashboard with modern UI
  • 📈 Designed for scalability and extensibility

🧠 System Architecture

Video Stream (Webcam)
        ↓
Face Detection (Haar Cascade / DNN)
        ↓
Preprocessing (Grayscale + Resize 64x64)
        ↓
Feature Extraction (HOG)
        ↓
Classification (SVM - RBF Kernel)
        ↓
Identity + Confidence Score

⚙️ Tech Stack

Layer Technology
Backend Flask (Python 3.9+)
Computer Vision OpenCV, Scikit-Image
ML Model Scikit-Learn (SVM, HOG)
Model Persistence Joblib
Deployment Docker, Docker Compose

🚀 Quick Start

🔹 Local Setup

python -m venv venv

# Windows
venv\Scripts\activate

# macOS/Linux
source venv/bin/activate
pip install -r requirements.txt
python -m app.main

👉 Open: http://localhost:5000


🐳 Docker Setup

docker-compose up --build

⚠️ Webcam support in Docker:

  • Linux → supported via --device
  • Windows/Mac → recommended to run locally

🧪 Model Training

Dataset Structure

dataset/
├── Alice/
├── Bob/
  • Add 10–20 images per person
  • Use varied angles and lighting

Train Model

python model/train_model.py

➡️ Outputs: model/svm_model.pkl


👤 User Enrollment (Real-Time)

python scripts/enroll_user.py

Steps:

  1. Enter user name
  2. Capture 10–20 images
  3. Auto-trains model
  4. Restart app

📊 Performance

Metric Value
Latency Real-time (~30 FPS depending on hardware)
Accuracy High (depends on dataset quality)
Model Type HOG + SVM (RBF Kernel)
Scalability Medium (can upgrade to deep learning)

🧠 Design Decisions

  • HOG + SVM chosen for:

    • Fast inference
    • Low compute requirement
    • Works well on small datasets
  • Flask Backend:

    • Lightweight API serving
    • Easy integration with UI
  • Docker:

    • Consistent deployment
    • Environment isolation

🔮 Future Improvements

  • Replace SVM with FaceNet / DeepFace embeddings
  • Add FAISS / Vector DB for scalable identity matching
  • Implement liveness detection
  • Add JWT-based auth system
  • GPU acceleration for inference

📂 Project Structure

biometric-auth-system/
├── app/
├── model/
├── scripts/
├── dataset/
├── requirements.txt
└── docker-compose.yml

👤 Author

Raj Kalash Tiwari GitHub: https://github.com/rjkalash


📈 Status

✅ Functional real-time biometric authentication system ⚡ Ready for extension into production-grade identity systems


⭐ Star this repo if you found it useful!

About

This is a project where we can register a person for a biometic autherization, once register, we can check which person is it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors