Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face Recognition-Based Attendance Management System

Python OpenCV Machine Learning NumPy


Overview

The Face Recognition-Based Attendance Management System is a real-time computer vision application that automates attendance using facial recognition. The system captures facial features through a webcam, identifies registered users using a K-Nearest Neighbors (KNN) classifier, and records attendance with timestamps in CSV format.

Developed using Python and OpenCV, the project eliminates manual attendance processes while providing a simple and efficient solution for classrooms and organizations.


Key Features

  • Real-time face detection using OpenCV
  • Face recognition using K-Nearest Neighbors (KNN)
  • Automatic attendance recording
  • Face dataset creation for new users
  • Timestamped attendance logs
  • Persistent face data storage using Pickle
  • User-friendly interface with webcam integration

Technologies Used

Category Technologies
Programming Python
Computer Vision OpenCV
Machine Learning K-Nearest Neighbors (KNN)
Data Processing NumPy
Data Storage Pickle
Output CSV

System Workflow

User Registration
        │
        ▼
Face Image Capture
        │
        ▼
Feature Extraction
        │
        ▼
Store Face Embeddings
        │
        ▼
Real-Time Webcam Feed
        │
        ▼
Face Detection
        │
        ▼
KNN Face Recognition
        │
        ▼
Attendance Verification
        │
        ▼
CSV Attendance Log

Project Features

User Registration

  • Capture multiple face samples
  • Store facial data securely
  • Associate captured faces with user names

Face Recognition

The application continuously captures frames from the webcam and:

  • Detects faces using OpenCV Haar Cascade
  • Extracts facial features
  • Predicts the user's identity using KNN

Attendance Management

Once a face is recognized, the system:

  • Records the user's name
  • Captures the current date and time
  • Saves attendance in CSV format
  • Prevents duplicate attendance entries

Project Structure

Face-Recognition-Attendance/

│── add_faces.py
│── test.py
│── requirements.txt
│── README.md
│
├── data/
│   ├── haarcascade_frontalface_default.xml
│   ├── names.pkl
│   └── faces_data.pkl


Installation

Clone the repository

git clone https://github.com/harshitha923/Attendance-Management.git

Install dependencies

pip install -r requirements.txt

Running the Project

Step 1 – Register a User

python add_faces.py

The application captures multiple face samples and stores them for future recognition.


Step 2 – Start Attendance System

python test.py

The webcam starts automatically.

When a registered face is detected:

  • Attendance is recorded
  • Timestamp is generated
  • CSV file is updated

Sample Output

Attendance log contains:

Name Date Time
John Doe 19-06-2025 09:15:32

Future Improvements

  • Deep Learning-based Face Recognition (FaceNet / ArcFace)
  • Anti-spoofing detection
  • Multi-face recognition
  • Cloud database integration
  • Web dashboard
  • Attendance analytics

Author

Harshitha

M.Tech Information Technology

Areas of Interest

  • Computer Vision
  • Machine Learning
  • Artificial Intelligence
  • Deep Learning
  • Data Science

⭐ If you found this project useful, consider giving the repository a star!

About

Real-time face recognition attendance system using OpenCV, KNN, and Python for automated attendance management.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages