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.
- 🧠 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
Camera / Upload
↓
Face Encoding (DeepFace)
↓
Multi-Embedding Comparison (Max Similarity)
↓
Entry / Exit Logging
↓
Live Dashboard & Analytics
| 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 |
- 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
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
git clone https://github.com/Parth844/AI-Face-Recognition-System.git
cd AI-Face-Recognition-System
python3.10 -m venv venv
source venv/bin/activate
TensorFlow / DeepFace may not support latest Python versions.
pip install -r requirements.txt
python app.py
Open in browser:
http://127.0.0.1:5000
Username: admin
Password: password123
- 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.
- Session-based authentication
- SQLite local storage
- Change
SECRET_KEYbefore deployment - Avoid committing database in production
- Face anti-spoofing (liveness detection)
- Role-Based Access Control (RBAC)
- REST API expansion
- WebSocket real-time dashboard
- Docker deployment
Parth Tyagi
AI & Machine Learning Enthusiast
Building intelligent campus automation systems.
MIT License