Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎓 AI Face Recognition Movement & Attendance System

Python Flask DeepFace TensorFlow SQLite License

An intelligent college entry-exit monitoring system powered by Face Recognition, built using Flask, DeepFace, and SQLite.

This system enables automated attendance tracking, movement logging across multiple campus locations, real-time analytics, and Excel export functionality.


🚀 Features

  • 🧠 Support for Multiple Face Embeddings (Higher accuracy)
  • 📷 Live camera-based registration & Recognition
  • 📤 Upload Photo(s) support for registration
  • 🗂 High-performance face embedding caching (Pickle-based)
  • 🧪 Multi-face recognition support in single frame
  • 🔁 Smart entry/exit toggle logic per location
  • 🏫 Multi-location support (Gym, Library, Hostel, etc.)
  • 📊 Live occupancy dashboard
  • 📈 Daily analytics view
  • 📥 Excel log export (.xlsx)
  • 🔐 Admin & Guest access control
  • 💾 Lightweight SQLite database

🏗 System Architecture

Camera / Upload
    ↓
Face Encoding (DeepFace)
    ↓
Multi-Embedding Comparison (Max Similarity)
    ↓
Entry / Exit Logging
    ↓
Live Dashboard & Analytics

Core Components

Component Responsibility
Database Layer Handles student & movement storage
Face Encoder Generates embeddings using DeepFace
Recognition Service Matches faces via max similarity comparison
Movement Manager Controls entry/exit toggling
Caching System Fast startup & load using face_cache.pkl
Flask App Web interface & API layer

🛠 Tech Stack

  • Flask – Backend framework
  • DeepFace – Face recognition engine (Facenet model)
  • TensorFlow – Deep learning backend
  • OpenCV – Camera integration
  • NumPy – Numerical computations
  • SQLite3 – Embedded database
  • Pandas + OpenPyXL – Excel export
  • Pickle – Embedding serialization/caching
  • Pillow – Image processing

📂 Project Structure

AI-Face-Recognition-System/
│
├── app.py                  # Main Flask application
├── faces.db                # SQLite database (auto-generated)
├── face_cache.pkl          # Performance cache (auto-generated)
├── templates/              # HTML templates
├── static/                 # CSS / JS files
├── requirements.txt
├── README.md
└── .gitignore

⚙️ Installation

1️⃣ Clone Repository

git clone https://github.com/Parth844/AI-Face-Recognition-System.git
cd AI-Face-Recognition-System

2️⃣ Create Virtual Environment (Python 3.10 Recommended)

python3.10 -m venv venv
source venv/bin/activate

⚠️ Recommended Python Version: 3.10 or 3.11
TensorFlow / DeepFace may not support latest Python versions.

3️⃣ Install Dependencies

pip install -r requirements.txt

▶️ Run Application

python app.py

Open in browser:

http://127.0.0.1:5000

👨‍💼 Admin Login (Demo)

Username: admin
Password: password123

⚠️ Change credentials before production use.


📊 Capabilities

  • Higher Accuracy: Stores multiple embeddings per student.
  • Improved Performance: Uses local caching for instant comparisons.
  • Smart Logic: Prevents duplicate rapid scans.
  • Multi-Location: Tracks movements across different campus gates.
  • Excel Reports: Export logs for attendance verification.

🔐 Security Notes

  • Session-based authentication
  • SQLite local storage
  • Change SECRET_KEY before deployment
  • Avoid committing database in production

🔮 Future Improvements

  • Face anti-spoofing (liveness detection)
  • Role-Based Access Control (RBAC)
  • REST API expansion
  • WebSocket real-time dashboard
  • Docker deployment

👨‍💻 Author

Parth Tyagi
AI & Machine Learning Enthusiast
Building intelligent campus automation systems.


📜 License

MIT License

About

AI-driven campus movement monitoring system using DeepFace and cosine similarity for real-time recognition, smart entry-exit logic, and analytics reporting.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages