Face-Recognition-Attendance-System-Software

https://github.com/user-attachments/assets/23ffbe8f-64e8-414c-8590-a02c0689bf49

πŸ‘€ Face Recognition System

A comprehensive face recognition system built with Python, OpenCV, and Tkinter that allows for face detection, training, and recognition.

🌟 Features

πŸ› οΈ Prerequisites

Before running this project, make sure you have the following installed:

πŸ“₯ Installation

  1. Clone the repository:
    git clone https://github.com/rohitbansal2005/Face-Recognition-Attendance-System-Software
    
  2. Install the required packages:
    pip install opencv-python
    pip install pillow
    pip install mysql-connector-python
    pip install numpy
    
  3. Set up your MySQL database and update the connection details in the code.

πŸ“ Project Structure

Face Recognition System/
β”œβ”€β”€ Data/                  # Directory for storing face images
β”œβ”€β”€ college_images/        # Directory for UI images
β”œβ”€β”€ train.py              # Training module
β”œβ”€β”€ face_recognition.py   # Main recognition module
β”œβ”€β”€ face_detector.py      # Face detection module
└── README.md

πŸ”„ System Flow Diagram

graph TD
    A[Start] --> B[Initialize System]
    B --> C{User Selection}
    C -->|Training| D[Load Training Data]
    C -->|Recognition| E[Start Camera]
    D --> F[Process Images]
    F --> G[Train Classifier]
    G --> H[Save Model]
    E --> I[Face Detection]
    I --> J[Face Recognition]
    J --> K[Database Update]
    K --> L[Display Results]
    H --> M[End]
    L --> M

πŸš€ Usage Guide Step 1: Start the Application 1.Run the main application:

python login.py

2.The system will open the Login Interface.

Step 2: Register Users After logging in, navigate to the Registration Interface: -The registration module allows you to add new users to the system.

Step 3: Capture Photos for Face Recognition 1.Open the Student Management System Interface. 2.Use the Photo Sample option to capture images of the user’s face: -These photos will be stored in the Data directory for training.

Step 4: Train the System 1.Run the training module:

python train.py

2.Click on the β€œTRAIN DATA” button to process all the captured images and train the classifier.

Step 5: Perform Face Recognition 1.Once training is complete, proceed to the Face Recognition Interface: -This interface allows real-time face recognition using the trained classifier.

  1. Use the interface to:
    • πŸ“Έ Capture new face images
    • πŸŽ“ Train the system
    • πŸ” Perform face recognition
    • πŸ“Š View attendance records

πŸ’Ύ Database Setup

  1. Create a MySQL database
  2. Update the database connection details in the code
  3. The system will automatically create necessary tables

Database Schema

CREATE TABLE student (
    student_id INT PRIMARY KEY,
    name VARCHAR(100),
    roll_no VARCHAR(20),
    department VARCHAR(50),
    face_id INT
);

CREATE TABLE attendance (
    attendance_id INT PRIMARY KEY AUTO_INCREMENT,
    student_id INT,
    date DATE,
    time TIME,
    status VARCHAR(20),
    FOREIGN KEY (student_id) REFERENCES student(student_id)
);

πŸ”§ Technical Details

Face Detection Process

  1. Image Capture
  2. Grayscale Conversion
  3. Face Detection using Haar Cascade
  4. Face Region Extraction

Recognition Algorithm

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ™ Acknowledgments

❓ Support

For support, please open an issue in the repository or contact the maintainers.

πŸ“ž Contact

πŸ“ Version History

πŸ”’ Security Considerations

🌐 System Requirements

Screenshot 2025-03-13 125436 Screenshot 2025-03-13 125505 Screenshot 2025-03-13 125619 Screenshot 2025-03-13 125534