Skip to content

AR-47/SmartAttendance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ SMART ATTENDANCE SYSTEM

AI Face Recognition + RFID Dual Authentication with Timetable Automation

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.


πŸ“ PROJECT STRUCTURE

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)

πŸš€ FIRST TIME SETUP (FROM SCRATCH)

1️⃣ Install Requirements

pip install flask opencv-python deepface openpyxl keyboard numpy

2️⃣ Create Full Database

python setup_full_system.py

This 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 Email Password
Admin admin@gmail.com admin

πŸ–₯ DAILY SYSTEM STARTUP

Open 3 terminals every day:

Terminal 1 β€” Web Server

cd backend
python app.py

Open browser β†’ http://127.0.0.1:5000

Terminal 2 β€” Scheduler (Brain)

python auto_scheduler.py

Terminal 3 β€” RFID Service

python rfid_service.py

System is now fully automatic.


πŸ”§ ADMIN SETUP WORKFLOW

Login as Admin (admin@gmail.com / admin)


STEP A β€” Add Class

Admin Dashboard β†’ Add Class

Example:

  • Class Name: CSE Blockchain
  • Room: 8CBC-1

STEP B β€” Add Subjects

Admin Dashboard β†’ Add Subject

  • DBMS
  • AIML
  • OOPS
  • Cloud Computing

STEP C β€” Add Teachers

Admin Dashboard β†’ Add User

  • Role: Teacher
  • Fill name, email, password

STEP D β€” Add Students (Live RFID Capture)

Admin Dashboard β†’ Add User

  1. Enter name, email, password
  2. Select Role = Student
  3. Select Class
  4. Tap RFID card on reader
  5. Click Add User + Assign RFID

Card UID is stored automatically.


STEP E β€” Add Student Face Images

Place photos inside id_database/:

id_database/
    Adithya.png
    Shreyas.png

⚠️ Filename must exactly match student name


STEP F β€” Create Timetable

Admin Dashboard β†’ Manage Timetable

Set:

  • Day + Start Time + End Time
  • Subject + Teacher + Class

This timetable controls the entire automation.


πŸ‘©β€πŸ« TEACHER WORKFLOW

Teacher logs in β†’

Can:

  • βœ” View weekly timetable
  • βœ” View live attendance monitor
  • βœ” Download today's attendance report

Cannot:

  • ❌ Start attendance manually
  • ❌ Edit timetable

πŸ‘¨β€πŸŽ“ STUDENT WORKFLOW

Student logs in β†’

Can:

  • βœ” View weekly timetable

System automatically marks attendance based on:

  • RFID tap + Face presence duration

πŸŽ₯ AUTOMATIC ATTENDANCE PROCESS

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

🧠 ATTENDANCE RULE

RFID Face Duration Result
βœ… β‰₯ 30 minutes PRESENT
❌ Any ABSENT
βœ… < 30 minutes ABSENT

Multi-factor verification = Impossible to fake!


πŸ“₯ REPORT DOWNLOADS

Role Access
Teacher Download today's report for their subject
Admin Download report by class + date

Reports are Excel files (.xlsx)


πŸ”© HARDWARE REQUIRED

Device Type
Camera USB/Built-in webcam
RFID Reader USB HID (keyboard mode)
RFID Cards 125kHz / 13.56MHz

🎯 WHAT MAKES THIS SYSTEM SMART

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

πŸ“Š DATABASE TABLES

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)

πŸ”‘ DEFAULT LOGIN

Role Email Password
Admin admin@gmail.com admin

πŸ‘¨β€πŸ’» BUILT BY

Adithya

Python β€’ Flask β€’ OpenCV β€’ DeepFace β€’ SQLite


πŸ“‹ QUICK REFERENCE

First Time Setup

pip install flask opencv-python deepface openpyxl keyboard numpy
python setup_full_system.py

Daily Startup

# Terminal 1
cd backend && python app.py

# Terminal 2
python auto_scheduler.py

# Terminal 3
python rfid_service.py

Browser

http://127.0.0.1:5000


πŸš€ System is production-ready!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors