Ananyaa26 / MS_Engage22_FaceRecognition_AttendanceSystem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MS Enage 2022 Face Recognition Attendance System

This project is made under Microsoft Engage 2022 Program.

Attendance Tool via Face Recognition is a Python Tkinter GUI based Opencv Project which stores variety of details of students and records their attendance on real time basis in a CSV file directly.

Use of Haarcascade Classifier and LBPH Algorithm has been used to capture,train,detect and recognize the images.

Features Of the Project

→ Loging Security System (Username & Password)

→ Home Page

→ Student Database System (Save, Take Photo Samples, Reset, Clear)

→ Train Photo Samples

→ The Photos are saved in a Separate folder.

→ Take Attendance with Face Detection

→ Attendance Report (Excel file & MySql database)

→ Developer Page

==========Brief Description of all the Pages=============

Login Window

The login window comprises of two entries and three buttons.

On entering the mentioned username and password it will direct to the main page.

Leaving the fields empty or entering the wrong info will lead to error message.This ensures Authentication of the system

Screenshot 2022-05-28 181622

Main Page

6 buttons have been incorporated on the main page leading to different sections of the project.

These are as follows:

  1) Details
  2) Face Recognizer
  3) Attendance
  4) Train Data
  5) Photos
  6) Helpdesk

Screenshot 2022-05-23 165806

Details

This page is the form which stores the personal information and details of student.

The records that can be saved are :

  # Entry Fields
  
  Student ID
  Name
  Enrollment No.
  Gender
  Date of Birth 
  Phone No.
  Email ID
  
  # Combo Buttons
  
  Department Name
  Course Name
  Current Year
  Current Semester

The Take Photo button will capture 100 images and store them

Reset the data button clears all the entries.

This page is made by creating various frames for different sections and using the grid feature of tkinter to locate them on the page.

You can check the data being saved simultaneously on Mysql Workbench

Screenshot 2022-05-29 124243

Mysql Workbench

Screenshot 2022-05-29 124319

Train Data and LBPH Algorithm

Reason to Choose LBPH Algorithm

  1. LBPH is one of the easiest face recognition algorithms.
  2. It can represent local features in the images.
  3. It is possible to get great results (mainly in a controlled environment).
  4. It is robust against monotonic gray scale transformations.
  5. It is provided by the OpenCV library (Open Source Computer Vision Library).

Working of the Algorithm

image

  1. As we have an image in grayscale, each histogram (from each grid) will contain only 256 positions (0~255) representing the occurrences of each pixel intensity.
  2. Then, we need to concatenate each histogram to create a new and bigger histogram.
  3. Supposing we have 8x8 grids, we will have 8x8x256=16.384 positions in the final histogram.
  4. The final histogram represents the characteristics of the image original image.
  5. Each histogram created is used to represent each image from the training dataset.
  6. For a given input image, we perform the steps again for this new image and creates a histogram which represents the image.
  7. So to find the image that matches the input image we just compare two histograms and return the image with the closest histogram.

image align="middle"

This is how the window looks while training the images.

Screenshot 2022-05-29 001118

Face Detection

The Flow Chart of How the Face Detection Works using HaarCascade Classifier

1-Figure1-1

This page detect faces and recognize them with the help from the stored database.

Screenshot 2022-05-27 013236

Attendance Record Page

Importing the CSV file will display the attendance record in a tabular manner.

Date and Time is is also recorded on real time basis.

Reseting of data option available.

The file can be exported to another CSV file on the desktop.

Screenshot 2022-05-29 123435

Helpdesk

Details of developer.

Screenshot 2022-05-27 051749

Video Demo Of the project

The video demo of my project is here

Installation Commands Required

 pip install PIL
 pip install mysql-connector-python
 pip uninstall opencv-python
 pip3 install opencv-contrib-python
 pip install numpy

Instructions to run

  1. Clone the repository
  2. Install Python 3
  3. Run the installation commands
  4. Login details: Username="Ananyaa" ; Password ="Test@12"
  5. Create a mysql schema name = "face_recognizer" and table name="details"
  6. The various column names are-dep,Course,Year,Semester,ID,Enrollment,Name,Gender,Phone,Email,DOB,Photo

Resources

Scope of the Project

Add additional feature of chatbox on helpdesk button

Work on Update and Search button on Details Page

About


Languages

Language:Python 100.0%