Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face Recognition Attendance System

A modern, web-based attendance management system that uses facial recognition technology to automatically mark attendance. Built with Flask, OpenCV, and face_recognition library.


🚀 Features

🔍 Core Functionality

  • Real-time Face Recognition: Instant face detection and recognition using webcam
  • Automatic Attendance Marking: Automatically records attendance when recognized faces are detected
  • Web-based Interface: Modern, responsive web interface for easy management
  • Database Storage: SQLite database for reliable attendance data storage
  • Training Image Management: Upload and manage training images for face recognition

📊 Dashboard & Analytics

  • Real-time Dashboard: View current attendance statistics and recent records
  • Attendance Reports: Generate detailed reports with date range filtering
  • Statistics Overview: Total records, today's attendance, and unique people count
  • Historical Data: Access complete attendance history

👥 User Management

  • Training Image Upload: Add new people to the system with photo uploads
  • Name Management: Associate names with training images
  • Training Image Deletion: Remove people from the recognition system

🧰 Technology Stack

  • Backend: Flask (Python web framework)
  • Face Recognition: face_recognition library (dlib-based)
  • Computer Vision: OpenCV
  • Database: SQLite
  • Frontend: HTML5, CSS3, JavaScript
  • Image Processing: PIL (Python Imaging Library)
  • Data Analysis: Pandas

🛠 Prerequisites

  • Python 3.7 or higher
  • Webcam for face capture
  • Windows 10/11 (tested on Windows 10.0.26100)

⚙️ Installation

  1. Clone the repository
git clone <https://github.com/rbpata/Face-Recognition-Attendance-System.git>
cd Attendance-System
  1. Install Python dependencies
pip install -r requirements.txt
  1. Install dlib (if needed)
pip install dlib-19.24.1-cp311-cp311-win_amd64.whl
  1. Initialize the database
  • The database will be automatically created when you run the application

🖥 Usage

🌐 Web Application Mode (Recommended)

  1. Start the Flask application
python app.py
  1. Access the web interface
  • Go to http://localhost:5000
  1. Navigate through the interface:
  • Home: Overview and quick access
  • Dashboard: Attendance statistics
  • Capture: Real-time recognition
  • Upload: Add people with images
  • Reports: View/export attendance logs

🧪 Command Line Mode

python main.py

🗂 Project Structure

Attendance-System/
├── app.py                 # Flask web app
├── main.py               # CLI attendance mode
├── requirements.txt      # Python packages
├── templates/            # HTML templates
├── static/               # CSS/JS assets
├── Training_images/      # Known faces
├── Unknown/              # Unknown captures
├── attendance.db         # SQLite DB
└── Attendance.csv        # Legacy CSV log

🔬 How It Works

🧠 Face Recognition Flow

  1. Upload face images to Training_images
  2. Encodes facial features
  3. Captures live webcam feed
  4. Matches detected faces with training data
  5. Logs attendance automatically

🌐 Web Flow

  • Upload → Capture → Dashboard → Reports

🧾 Database Schema

CREATE TABLE attendance (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    name TEXT NOT NULL,
    timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
    date DATE DEFAULT CURRENT_DATE
);

🎨 User Interface & Screenshots

💻 UI Overview

  • Responsive design with intuitive flow
  • Real-time attendance overlay
  • Bootstrap styling for consistency

📷 Screenshots

🔹 Input Form

Input Form Screenshot

🔹 Attendance Output

Output Result Screenshot


🛠 Troubleshooting

Common Issues & Fixes

  1. Camera not working

    • Check if another app is using it
    • Verify browser permissions
  2. No face detected

    • Ensure clear, front-facing images
    • Check lighting conditions
  3. Installation errors

    • Use Python 3.7+
    • Use provided dlib wheel for Windows

📃 License

MIT License. Feel free to use and modify.

About

Facial Recognition Attendance System With OpenCV and face-recognition

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages