How madhurijambagi/facial-recognition-based-attendance-system works
This Flask application manages student enrollment, face-model training, live recognition, attendance records, and role-based dashboards. The main workflow is teacher login → capture student images → train the SVM model → scan a live face → record attendance in MySQL. The README also documents statistics, subject filtering, and CSV export. Source excerpts are partial, so uncertain dataset-storage and some route wiring are omitted; the tree does not include the documented dataset directory.
Main entry points: app.py Flask routes · model.py Face model · camera_add_student.js Image capture · login.html Login and signup
Components 17
Web experience
- Dashboard
templates/index.html - Dashboard actions
static/js/dashboard.js - Flask routes
app.py
Identity and enrollment
- Login and signup
templates/login.html - Account signup
templates/signup.html - Add student
templates/add_student.html - Image capture
static/js/camera_add_student.js - Manage students
templates/Manage_students.html
Recognition and training
- Face model
model.py - Trained model
model.pkl - Training status
train_status.json
Attendance records
- MySQL database
- Mark attendance
templates/mark_attendance.html - Live scanning
static/js/camera_mark.js - Attendance records
templates/attendance_record.html
Other components
- Teacher or admin
- Browser camera
Connections 23
- Teacher or admin → Login and signup: signs in
- Login and signup → Flask routes: submits credentials
- Account signup → Flask routes: submits account
- Flask routes → MySQL database: checks and stores accounts
- Flask routes → Dashboard: renders dashboard
- Dashboard actions → Flask routes: requests stats and training
- Flask routes → MySQL database: reads dashboard data
- Flask routes → Training status: updates progress
- Flask routes → Face model: starts training
- Face model → Trained model: saves trained model
- Add student → Image capture: captures enrollment
- Browser camera → Image capture: provides frames
- Image capture → Flask routes: submits student and images
- Flask routes → MySQL database: creates student
- Teacher or admin → Mark attendance: starts attendance
- Browser camera → Live scanning: provides frames
- Live scanning → Flask routes: submits face image
- Flask routes → Face model: checks liveness and predicts
- Face model → Trained model: loads classifier
- Flask routes → MySQL database: authorizes and records attendance
- Flask routes → Attendance records: renders attendance records
- Manage students → Flask routes: requests student management
- Flask routes → MySQL database: reads student and attendance data