Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

30 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


๐ŸŽฏ InstantAttend โ€” Real-Time Face Recognition Attendance System

Python Flask OpenCV scikit-learn License

InstantAttend eliminates manual roll calls by automatically marking attendance using real-time face recognition โ€” straight from your webcam, with a clean web dashboard.


๐Ÿ“ธ Demo

InstantAttend Dashboard


โœจ Features

  • ๐Ÿ“ท 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.csv for easy export

๐Ÿ—๏ธ System Architecture

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

๐Ÿ—‚๏ธ Project Structure

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

โš™๏ธ How It Works

1. Register a New User

  • 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

2. Take Attendance

  • Click Take Attendance โ†’ webcam opens
  • System detects face โ†’ matches against trained KNN model
  • Attendance marked with name, roll number, and timestamp
  • Press ESC to close the webcam and view the updated table

3. View Records

  • Dashboard shows today's attendance in real-time
  • Raw CSV saved in /Attendance/ folder for easy export

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.8+
  • A working webcam

Installation

git clone https://github.com/BiplabaKrSamal/InstantAttend.git
cd InstantAttend
pip install -r requirements.txt
python app.py

Open in Browser

http://127.0.0.1:5000

๐Ÿ“Š Technology Stack

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

๐Ÿ”ฎ Future Improvements

  • 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

๐Ÿค Contributing

Pull requests are welcome! For major changes, please open an issue first.

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Made with โค๏ธ by BiplabaKrSamal | InstantAttend

About

๐ŸŽฏ Real-time face recognition attendance system built with Python, SQL & OpenCV. Marks attendance automatically via webcam with a live web dashboard and SQLite database backend.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages