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
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
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
Mysql Workbench
Train Data and LBPH Algorithm
Reason to Choose LBPH Algorithm
LBPH is one of the easiest face recognition algorithms.
It can represent local features in the images.
It is possible to get great results (mainly in a controlled environment).
It is robust against monotonic gray scale transformations.
It is provided by the OpenCV library (Open Source Computer Vision Library).
Working of the Algorithm
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.
Then, we need to concatenate each histogram to create a new and bigger histogram.
Supposing we have 8x8 grids, we will have 8x8x256=16.384 positions in the final histogram.
The final histogram represents the characteristics of the image original image.
Each histogram created is used to represent each image from the training dataset.
For a given input image, we perform the steps again for this new image and creates a histogram which represents the image.
So to find the image that matches the input image we just compare two histograms and return the image with the closest histogram.
This is how the window looks while training the images.
Face Detection
The Flow Chart of How the Face Detection Works using HaarCascade Classifier
This page detect faces and recognize them with the help from the stored database.
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.