InstantAttend eliminates manual roll calls by automatically marking attendance using real-time face recognition โ straight from your webcam, with a clean web dashboard.
- ๐ท Live Webcam Face Detection โ Detects and identifies faces in real-time using OpenCV's Haar Cascade
- ๐ง KNN-based Face Recognition โ Trains a K-Nearest Neighbours model on registered user faces
- ๐ Auto Attendance Logging โ Marks attendance with name, ID, and timestamp into a daily CSV
- ๐ Flask Web Dashboard โ Clean browser UI to view today's attendance and manage users
- โ Easy User Registration โ Capture 50 face samples per user and auto-retrain the model
- ๐ Daily CSV Reports โ Attendance saved as
Attendance-MM_DD_YY.csvfor easy export
Webcam Input
โ
โผ
Face Detection (Haar Cascade)
โ
โโโโบ Preprocessing (Grayscale + Resize to 50ร50)
โ
โโโโบ Feature Extraction โ KNN Model Training (on registration)
โ
โโโโบ Face Identification โ Attendance Recording โ CSV + Web UI
| Data Architecture | Use Case Diagram |
|---|---|
![]() |
![]() |
InstantAttend/
โ
โโโ app.py
โโโ requirements.txt
โโโ README.md
โโโ .gitignore
โโโ screenshot.png
โ
โโโ templates/
โ โโโ home.html
โ
โโโ static/
โ โโโ faces/
โ โ โโโ Name_ID/
โ โโโ face_recognition_model.pkl
โ
โโโ Attendance/
โ โโโ Attendance-MM_DD_YY.csv
โ
โโโ docs/
โโโ data_architecture.png
โโโ use_case_diagram.png
- Enter name + ID in the web form โ click Add New User
- Webcam opens and captures 50 face images automatically
- Model retrains immediately with the new user included
- Click Take Attendance โ webcam opens
- System detects face โ matches against trained KNN model
- Attendance marked with name, roll number, and timestamp
- Press
ESCto close the webcam and view the updated table
- Dashboard shows today's attendance in real-time
- Raw CSV saved in
/Attendance/folder for easy export
- Python 3.8+
- A working webcam
git clone https://github.com/BiplabaKrSamal/InstantAttend.git
cd InstantAttend
pip install -r requirements.txt
python app.py
http://127.0.0.1:5000
| Layer | Technology |
|---|---|
| Backend | Python, Flask |
| Face Detection | OpenCV (Haar Cascade Classifier) |
| Face Recognition | scikit-learn (KNN Classifier) |
| Frontend | HTML5, Bootstrap 5, Jinja2 |
| Data Storage | CSV (Pandas), SQL |
- Anti-spoofing / liveness detection
- Email daily report to admin
- Multi-camera support
- Cloud database integration (Firebase / PostgreSQL)
- Deep learning upgrade (FaceNet / DeepFace) for higher accuracy
Pull requests are welcome! For major changes, please open an issue first.
- Fork the repo
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Made with โค๏ธ by BiplabaKrSamal | InstantAttend


