Offline, portable face-recognition-based attendance system.
Students press a button, blink, and get marked present.
No internet connection required.
Most attendance systems require:
- Active student participation (QR scanning, manual marking)
- Internet connectivity
- Expensive hardware
- IT support for deployment
This system:
- Passively verifies presence through face recognition + liveness detection
- Works completely offline (local database, no cloud)
- Costs less (Raspberry Pi 4 + webcam + components)
- Student-operated (press button → blink → done)
- Teacher controls remotely via web dashboard
- Press button on device
- Look at camera
- Blink when prompted (liveness check)
- LCD shows: "John Doe - Marked Present!"
- Pass device to next student
- Start session from web dashboard (laptop/phone)
- Students mark themselves using the device
- View live attendance count
- End session and download CSV report
Camera → Face Detection → Embedding Extraction → Cosine Matching
↓
Blink Liveness Check
↓
Attendance Engine
↓
PostgreSQL
↓
FastAPI Backend
Core Recognition:
- InsightFace (
buffalo_scmodel) – CPU-optimized face recognition - ONNX Runtime (CPU execution)
- dlib – Blink detection via Eye Aspect Ratio (EAR)
- OpenCV – Frame processing
Backend:
- FastAPI – REST API + teacher dashboard
- PostgreSQL – Student data, attendance records, sessions
- SQLAlchemy ORM
Hardware (Raspberry Pi):
- GPIO – Button input, LED status indicators
- I2C LCD (16×2) – Student feedback messages
- USB Webcam (720p minimum)
Development:
- Python 3.10
- Tested on Windows (development), deployed on Raspberry Pi OS
- 5-7 seconds per student
- 80 students processed in under 15 minutes
- Fully offline operation
- Designed for Raspberry Pi 4 (CPU-only execution)
- Anti-spoofing enhancement (currently: blink + face verification)
- Email/SMS notifications
- Hardware integration (GPIO, LCD, LEDs)
Current Implementation:
- Blink detection – Defeats printed photos
- Face verification during blink – Prevents swap attacks (showing photo → person blinks)
Known Limitations:
- Pre-recorded videos with blinks may pass (low probability in practice)
- Live video calls on screens are not fully prevented
Exploring:
- Challenge-response system (random actions: smile, turn head)
- Deep learning models (deferred due to Raspberry Pi constraints)
Currently under active development. Suggestions and feedback are welcome, especially on:
- Anti-spoofing techniques suitable for Raspberry Pi
- UI/UX improvements for teacher dashboard