A fully automated, multi-factor attendance platform that combines:
π§ AI Face Recognition π RFID Identity Verification π Timetable-Based Automation
No manual attendance. No teacher interaction. Fully autonomous.
smart_attendance/
β
β setup_full_system.py # Run ONCE β Creates full database
β
β auto_scheduler.py # Brain: auto-starts classes by timetable
β live_recognition.py # AI face detection engine
β finalize_attendance.py # Merges RFID + Face logs
β rfid_service.py # Listens for RFID card taps
β
β database.db # SQLite database (auto-created)
β README.md
β
ββββbackend/
β app.py # Flask web server
β
ββββfrontend/
β ββββstatic/
β β style.css
β β schedule.js
β β
β ββββtemplates/
β login.html
β student_dashboard.html
β teacher_dashboard.html
β admin_dashboard.html
β admin_users.html
β admin_timetable.html
β admin_download.html
β add_user.html
β add_class.html
β add_subject.html
β edit_user.html
β live_monitor.html
β timetable.html
β
ββββid_database/
StudentName.png # Face images (Name must match user name)
pip install flask opencv-python deepface openpyxl keyboard numpypython setup_full_system.pyThis creates ALL required tables:
| Category | Tables |
|---|---|
| Academic | users, classes, subjects, timetable |
| Attendance | attendance, live_attendance |
| Automation | rfid_logs, face_logs, rfid_buffer |
It also creates the default admin account:
| Role | Password | |
|---|---|---|
| Admin | admin@gmail.com | admin |
Open 3 terminals every day:
cd backend
python app.pyOpen browser β http://127.0.0.1:5000
python auto_scheduler.pypython rfid_service.pySystem is now fully automatic.
Login as Admin (admin@gmail.com / admin)
Admin Dashboard β Add Class
Example:
- Class Name:
CSE Blockchain - Room:
8CBC-1
Admin Dashboard β Add Subject
- DBMS
- AIML
- OOPS
- Cloud Computing
Admin Dashboard β Add User
- Role: Teacher
- Fill name, email, password
Admin Dashboard β Add User
- Enter name, email, password
- Select Role = Student
- Select Class
- Tap RFID card on reader
- Click Add User + Assign RFID
Card UID is stored automatically.
Place photos inside id_database/:
id_database/
Adithya.png
Shreyas.png
Admin Dashboard β Manage Timetable
Set:
- Day + Start Time + End Time
- Subject + Teacher + Class
This timetable controls the entire automation.
Teacher logs in β
Can:
- β View weekly timetable
- β View live attendance monitor
- β Download today's attendance report
Cannot:
- β Start attendance manually
- β Edit timetable
Student logs in β
Can:
- β View weekly timetable
System automatically marks attendance based on:
- RFID tap + Face presence duration
Class time begins (from timetable)
β
auto_scheduler.py detects session
β
live_recognition.py camera starts
β
Students tap RFID β Entry logged
Camera detects face β Duration tracked
β
Class ends
β
finalize_attendance.py runs automatically
β
Attendance stored in database
| RFID | Face Duration | Result |
|---|---|---|
| β | β₯ 30 minutes | PRESENT |
| β | Any | ABSENT |
| β | < 30 minutes | ABSENT |
Multi-factor verification = Impossible to fake!
| Role | Access |
|---|---|
| Teacher | Download today's report for their subject |
| Admin | Download report by class + date |
Reports are Excel files (.xlsx)
| Device | Type |
|---|---|
| Camera | USB/Built-in webcam |
| RFID Reader | USB HID (keyboard mode) |
| RFID Cards | 125kHz / 13.56MHz |
| Feature | Traditional | This System |
|---|---|---|
| Attendance Start | Teacher clicks | Auto by timetable |
| Verification | Roll call | AI + RFID |
| Proxy | Possible | Impossible |
| Teacher Work | High | Zero |
| Reports | Manual | One-click |
| Table | Purpose |
|---|---|
| users | All users with RFID UIDs |
| classes | Class sections |
| subjects | Subject names |
| timetable | Weekly schedule |
| attendance | Final attendance records |
| live_attendance | Real-time tracking |
| face_logs | Face duration per session |
| rfid_logs | RFID tap timestamps |
| rfid_buffer | Latest tapped card (registration) |
| Role | Password | |
|---|---|---|
| Admin | admin@gmail.com | admin |
Adithya
Python β’ Flask β’ OpenCV β’ DeepFace β’ SQLite
pip install flask opencv-python deepface openpyxl keyboard numpy
python setup_full_system.py# Terminal 1
cd backend && python app.py
# Terminal 2
python auto_scheduler.py
# Terminal 3
python rfid_service.pyπ System is production-ready!