Skip to content

MalharBhatt-dev/Facial-Recognition-Attendance-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Έ Facial Recognition Attendance System

AI-powered attendance platform leveraging real-time facial recognition and deep learning inference.


πŸš€ Overview

The Facial Recognition Attendance System is a full-stack web application designed to automate attendance tracking using computer vision and deep learning.

The system integrates InsightFace's Buffalo model with ONNX Runtime to perform high-performance facial recognition inference. A Flask-based backend manages user enrollment, recognition workflows, and structured attendance logging.

This system provides a contactless, secure, and scalable solution for automating attendance management in educational institutions, organizations, and secure facilities.



πŸ— System Architecture

The system follows a modular pipeline combining computer vision, deep learning inference, and backend processing.

            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚      Web Camera      β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
                       β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚  Face Detection      β”‚
            β”‚      (OpenCV)        β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
                       β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚ Feature Extraction   β”‚
            β”‚   (InsightFace)      β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
                       β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚ Embedding Comparison β”‚
            β”‚   (Face Matching)    β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
                       β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚ Attendance Logging   β”‚
            β”‚   (Flask Backend)    β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
                       β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚ Attendance Records   β”‚
            β”‚ (CSV / Structured)   β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Performance Metrics

The system is designed for fast and accurate facial recognition using optimized deep learning inference.

Metric Description
Model InsightFace (Buffalo Model)
Inference Engine ONNX Runtime
Face Detection OpenCV
Recognition Type Embedding similarity comparison
Processing Real-time webcam frame processing

Performance Characteristics

  • ⚑ Fast inference using ONNX Runtime optimization
  • 🎯 High recognition accuracy using deep facial embeddings
  • 🧠 Efficient embedding comparison for identity verification
  • πŸ”„ Real-time frame processing for continuous attendance tracking

πŸ” Security Considerations

  • Face embeddings are stored instead of raw facial images
  • Recognition based on vector similarity matching
  • Supports integration with secure authentication systems
  • Can be extended with access control and role-based authentication

🧠 Core Features

  • πŸŽ₯ Real-time facial detection using webcam video streams
  • 🧠 Deep learning-based face recognition using InsightFace
  • ⚑ High-performance inference powered by ONNX Runtime
  • πŸ‘€ Dynamic user enrollment system for new users
  • πŸ•’ Automated timestamped attendance logging
  • πŸ“Š Structured attendance records for export and analysis
  • πŸ”— ERP and backend system integration ready

πŸ›  Technology Stack

Layer Technologies
Backend Python, Flask
Computer Vision OpenCV
Face Recognition Model InsightFace (Buffalo Model)
Inference Engine ONNX Runtime
Frontend HTML, CSS, JavaScript
Data Storage CSV / Structured Logs

βš™οΈ System Architecture & Workflow

1️⃣ User Enrollment

Users register through the web interface where their facial images are captured and stored as embeddings.

2️⃣ Face Detection

OpenCV captures frames from the webcam and detects faces in real time.

3️⃣ Feature Extraction

The InsightFace model generates facial embeddings representing unique facial features.

4️⃣ Identity Matching

Generated embeddings are compared against stored embeddings to identify the user.

5️⃣ Attendance Logging

Recognized users are automatically logged with a timestamped attendance entry.


πŸ“‚ Project Structure

Facial-Recognition-Attendance-System/
β”‚
β”œβ”€β”€ app.py                # Main Flask application
β”œβ”€β”€ requirements.txt     # Project dependencies
β”‚
β”œβ”€β”€ static/              # CSS, JS, and frontend assets
β”œβ”€β”€ templates/           # HTML templates
β”‚
β”œβ”€β”€ model/               # Face recognition models
β”œβ”€β”€ utils/               # Helper functions and utilities
β”‚
└── README.md

βš™οΈ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/MalharBhatt-dev/Facial-Recognition-Attendance-System
cd Facial-Recognition-Attendance-System

2️⃣ Create a Virtual Environment

python -m venv venv

Activate the Virtual Environment

Windows

venv\Scripts\activate

Mac / Linux

source venv/bin/activate

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Run the Application

python app.py

5️⃣ Access the Application

Open your browser and visit:

http://localhost:5000

πŸ“Œ Use Cases

  • Educational institutions for automated attendance
  • Corporate employee tracking systems
  • Secure check-in and identity verification systems
  • Smart campus or smart office solutions

🚧 Future Enhancements

  • Role-based authentication system (Admin / User)
  • Database integration (MySQL / PostgreSQL / MongoDB)
  • Attendance analytics dashboard
  • Cloud deployment support
  • Face mask detection integration

πŸ“ˆ Potential Improvements

  • Performance optimization for large user datasets
  • Improved recognition accuracy in low-light environments
  • Multi-camera support for larger deployment areas

πŸ“œ License

This project is open-source and distributed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors