Smart Face Recognition Attendance System 🚀
Automated real-time classroom attendance using MediaPipe (Detection), Scikit-Learn (Recognition), SQLite (Database)
Built for SRM IST Trichy & similar colleges | 85-95% accuracy | 25-30 FPS
🎯 Problem Solved
Traditional attendance systems suck:
- Manual roll call: 5-10 mins wasted per class × 50 classes/day = 8+ hours lost weekly
- Biometric cards: ₹5k-10k/student hardware, proxy marking common
- Paper registers: Lost data, manual errors, no analytics
- No real-time monitoring: Can't tell if classes are empty or teacher absent
Our Solution: Single IP camera detects/tracks students, recognizes faces, logs attendance automatically. Faculty see live dashboard with reports.
💡 Why Better Than Traditional
| Feature | Manual/Card | Our System |
|---|---|---|
| Time | 5-10 min/class | <1 sec/student |
| Cost | ₹5k+/student | ₹3k camera/room |
| Accuracy | 95% (proxies) | 85-95% (ArcFace) |
| Scalability | 1 room max | Multi-room dashboard |
| Analytics | None | Live counts, reports, alerts |
| Privacy | N/A | Embeddings only (no photos) |
Smart Face Recognition Attendance System
A lightweight, Flask-based attendance system that uses Computer Vision to mark attendance automatically using facial recognition.
🚀 How It Works (The Actual Flow)
- Capture: The system captures video frames using OpenCV.
- Detection: MediaPipe (Google's lightweight model) detects faces in real-time.
- Recognition: The face data is processed and compared against a trained Scikit-Learn (KNN/SVM) model stored in
model.pkl. - Logging: If a match is found, the student is marked "Present" in the SQLite database (
attendance.db). - Interface: A Flask web dashboard displays live stats, allows for CSV exports, and manages student registration.
📋 Tech Stack
- Backend: Python, Flask (Web Framework)
- Computer Vision: OpenCV (
cv2), MediaPipe - Machine Learning: Scikit-Learn (
sklearn), NumPy, Pandas - Database: SQLite (
attendance.db) - Frontend: HTML5, CSS3, Bootstrap 5, JavaScript
- Deployment: Can run locally on any CPU-based laptop.
📂 Project Structure
SMART_FACE_RECOGNITION_ATTENDANCE_SYSTEM/
├── dataset/ # Folder containing raw images of students for training
├── static/ # CSS, JavaScript, and Images for the web UI
│ ├── css/
│ ├── js/
│ └── images/
├── templates/ # HTML Templates for Flask
│ ├── base_clean.html # Master layout file
│ ├── index.html # Main dashboard
│ ├── attendance_record.html # Attendance list view
│ ├── add_student.html # Student registration form
│ └── ...
├── app.py # Main Flask application entry point
├── attendance_utils.py # Helper functions (Email sending, DB management)
├── model.py # Script to train the Face Recognition model
├── video_streaming.py # Logic for camera feed and face detection
├── model.pkl # The saved/trained Machine Learning model file
├── attendance.db # SQLite database storing student and attendance data
└── requirements.txt # List of Python dependencies
🎯 Features
✅ Real-time attendance (25-30 FPS)
✅ Multi-classroom support
✅ Live dashboard (student count, confidence)
✅ CSV/Excel reports
✅ Email alerts (empty class, low attendance)
✅ Privacy-first (embeddings only, no photos stored)
✅ Mobile-friendly UI
Performance Metrics
Test Results: 100 students, 5 classrooms
- Precision: 92%
- Recall: 88%
- F1-Score: 90%
- Processing Speed: 28 FPS (RTX 3050)
🤝 For SRM Trichy Students
- Use college lab GPUs (free)
- Test on actual classrooms (get faculty approval)
- Pitch as semester project/hackathon
- Scale to entire department
🚧 Roadmap
✅ Week 1: MVP - Single classroom
✅ Week 2: Multi-room + dashboard
🔄 Week 3: Teacher detection
🔄 Week 4: Engagement analytics
🔄 Week 5: Mobile app
🙏 Acknowledgments
- MediaPipe - Object detection
- Scikit-Learn - Face recognition
- SQLite - Database
Log in or sign up for Devpost to join the conversation.