1. Introduction
The introduction of facial recognition technology in recent years has resulted in a paradigm shift in attendance management systems. Traditional manual tracking methods have been transformed by this technology, paving the way for efficient and automated attendance management. The exploration of computer vision techniques and machine learning algorithms has increased as a result of the growing demand for accurate and streamlined attendance processes.
The primary goal of this research paper is to present a comprehensive facial recognition attendance system based on OpenCV, which incorporates the Local Binary Patterns Histograms (LBPH) face recognizer and a MySQL database. We intend to address the limitations of manual attendance marking, simplify administrative processes, and significantly improve attendance tracking accuracy by focusing on the development and implementation of this system.
We hope to redefine attendance management by ensuring precise and efficient identification of individuals using facial recognition technology as the core of our proposed system. The foundational framework for implementing the facial recognition algorithm is OpenCV, which is well-known for its versatility and effectiveness in image processing, feature extraction, and pattern recognition [
9]. We lay the groundwork for real-time face detection and recognition, which is essential for accurate attendance tracking, by leveraging the power of OpenCV.
For our system to accurately identify each individual, the LBPH face recognizer is essential. This well-known algorithm, which has several benefits including simplicity, robustness to varying lighting conditions, and computational efficiency, extracts local facial features and maps them into histograms. Because of these features, LBPH is a great option for practical applications and perfectly supports our goal of improving the precision and effectiveness of attendance systems [
10].
We incorporate a MySQL database to expand the capabilities of our proposed system. This integration provides a secure and scalable solution for storing attendance records, ensuring efficient data retrieval, storage, and management. We facilitate seamless report generation, data analysis, and data integrity throughout the system by using a structured approach to storing attendance records.
Throughout this research paper, we will delve into the methodology employed for facial recognition, encompassing essential pre-processing steps such as face detection, image normalization, and feature extraction. Detailed implementation aspects of the LBPH face recognizer will be explored, shedding light on its role in accurate identification. Furthermore, we will examine the integration of a MySQL database, highlighting its significance in securely storing and managing attendance records.
Our research paper aims to advance attendance management systems by addressing the drawbacks of manual attendance tracking through the application of facial recognition technology. We aim to redefine attendance tracking and establish a new benchmark for effective and automated systems with a clear focus on improving accuracy, streamlining processes, and utilizing the potential of computer vision and machine learning.
2. Literature Survey
In the paper by J. W. S. D'Souza, S. Jothi, and A. Chandrasekar [
1], an innovative system is introduced that employs facial recognition to automatically mark and manage student attendance. By utilizing a camera to capture students' images in the classroom, this system overcomes the issue of time-consuming attendance tracking. The core of the system lies in the application of the Histogram algorithm, which converts facial images into matrix form and utilizes histograms for precise face identification.
In their study, A. R. S. Siswanto, A. S. Nugroho, and M. Galinium [
2] conducted a comparative analysis between two facial recognition algorithms, Eigenface and Fisherface, provided by OpenCV 2.4.8. The comparison is based on the Receiver Operating Characteristics (ROC) curve. The results of the experiments demonstrate that Eigenface outperforms Fisherface, making it the preferred choice for implementing the attendance system. The accuracy rate achieved with the Eigenface algorithm ranges from 70% to 90%.
K. O. Okokpujie, E. Noma-Osaghae, O. J. Okesola, S. N. John, and O. Robert [
3] present an iris biometric attendance system. Attendees must provide their unique iris templates during registration. Following that, the system automatically captures and recognizes each attendee's iris, searching for a match in the database during class attendance. This system's prototype is web-based, which makes it easier to use.
E. Varadharajan, R. Dharani, S. Jeevitha, B. Kavinmathi, and S. Hemalatha propose a four-component system in their proposed face recognition-based method for automated attendance management [
4]. Background Subtraction, the first component, removes the image background, leaving only the face. The second component entails face detection and cropping, as well as isolating and storing the facial images. For attendance registration, the third step employs the Eigenvalue method for image recognition, determining Eigenvectors and calculating the Euclidean distance between stored and testing images. This method simplifies face recognition while requiring little hardware installation. To achieve better results, the paper suggests using Haar features instead of the Eigenvector approach for face detection.
A face recognition-based attendance monitoring system is explored by Shireesha Chintalapati, M.V. Raghunadh, and their colleagues [
5] using a variety of implementation methods. Face detection and face recognition are the two main components of the procedure. The Viola-Jones face detection algorithm uses the Adaboost algorithm, integral graphics, Haar features, and cascade functions to find faces. Local Binary Patterns (LBP) are used for face recognition, converting images into binary formats for computer processing. Facial recognition and identification are facilitated by the grayscale conversion of detected images. For face recognition, the system stores images (student dataset) and identifies faces by comparing images taken in the classroom with previously recognized faces.
H. Rathod, Y. Ware, S. Sane, S. Raulo, V. Pakhare, and I. A. Rizvi [
6] propose a facial recognition-based attendance system. The authors implement a robust system by combining Viola-Jones and Histogram of Oriented Gradients (HOG) features with a Support Vector Machine (SVM) classifier. They also take into account real-time scenarios such as scaling, illumination, occlusions, and pose. The system's performance is evaluated quantitatively using Peak Signal to Noise Ratio (PSNR) values, and the implementation is carried out using a MATLAB GUI.
A comparative study on facial recognition models for real-time attendance monitoring systems was conducted by P. Patil and S. Shinde [
7]. The goal of their research was to evaluate the performance, accuracy, and efficiency of various face recognition algorithms in real-world settings. The researchers hoped to contribute to the development of attendance management technologies by evaluating various models and taking into account factors such as recognition accuracy, computational efficiency, and system reliability. Their findings offer useful insights and recommendations for selecting appropriate facial recognition algorithms in real-world applications.
In their study, Kakarla et al. [
8] introduced a novel architecture based on Convolutional Neural Networks (CNNs) for face recognition. The authors focused on the process of gathering face data of students and presented the role of CNNs in face recognition, specifically in the context of attendance tracking. They conducted experiments to demonstrate the effectiveness of their proposed CNN architecture, achieving a remarkable precision rate of 99%. Furthermore, the authors utilized their CNN framework to develop a system called "Smart Attendance Management System (SAMS)." This system is an online application that leverages face recognition technology to provide real-time attendance tracking for students. The primary objective of their research is to enhance the robustness of the application and extend its capabilities to accommodate a larger number of students, ensuring accurate attendance management progressively.
N. Tamboli et al. [
9] implemented a face recognition-based student attendance marking framework for high-proficiency signal transfer system applications. Their study focused on detecting overlapped faces using the DRLBP (Dynamic Regional Local Binary Pattern) algorithm. The research aimed to accurately identify cases where one face covers or overlaps another face in an image. By employing DRLBP feature extraction, the authors achieved a high accuracy rate of 95% in detecting overlapped faces. To improve the attendance marking process, the researchers integrated the class picture into their automated attendance marking code. This enabled the code to automatically calculate the total number of students with covered faces. The implementation of the code was done in MATLAB, facilitating effective coordination and design. Future work involves expanding the application's capabilities to handle a larger number of students in real time. The researchers plan to explore advanced techniques and further enhance the attendance management system, ensuring accurate and reliable results.
3. Proposed Methodology
All students in the class are obligated to undergo the registration process, providing the required information. Their images will then be captured and stored in a dataset. In each session, the system will utilize live-streaming video from the classroom to detect faces. These detected faces will be compared with the images in the dataset. If a match is found, the system will record attendance for the respective student. The attendance records will be securely stored in a dedicated database for convenient access and reference. The system architecture of our proposed solution is as follows:
Figure 1.
Proposed System Design and Architecture.
Figure 1.
Proposed System Design and Architecture.
a) Initially, the individual positions themselves in front of the camera, enabling the Haar cascade classifier to detect their face. This classifier employs predefined features and their spatial arrangement to identify facial patterns. By analyzing the captured image and applying various filters, the classifier effectively identifies key facial attributes like the eyes, nose, and mouth, facilitating accurate face recognition.
b) Next, the LBPH algorithm works in tandem with the Haar-cascade classifier to identify the person by comparing
The extracted facial features with the existing dataset. The Hear-cascade classifier aids in precise face isolation from the
Captured image, providing focused input for the LBPH Algorithm’s recognition process.
c) The system utilizes a dataset that contains photographs of all the students or employees. During face recognition, the live feed captured by the camera undergoes processing through the Haar-cascade classifier to detect and extract facial features. he resulting facial region is then compared against the dataset using the LBPH algorithm for recognition. The integration of the air-cascade classifier ensures robust and effective face detection, leading to accurate matching with the dataset.
d) Following the face recognition process with the Haar cascade classifier and LBPH algorithm, the attendance system automatically updates the attendance records in the database. This integration enhances the efficiency and accuracy of attendance management, as the system leverages the reliable face detection capabilities of the Haar cascade classifier.
e) Through the utilization of the Haar-cascade classifier, individuals, whether students or employees, can access their attendance records at any time. This classifier plays a pivotal role in precisely identifying and tracking individual faces, enabling the attendance system to associate the recognized face with the corresponding attendance record in the database. the entire process can be categorized into four distinct stages:
4. Dataset Creation
Images of the students are recorded using a webcam to create the dataset. Each student has multiple photos taken, capturing different gestures and perspectives. Pre-processing of these images entails cropping to extract the Region of Interest (ROI). The images that have been cropped are also resized to a certain pixel size and made grayscale. The final step is to save the edited images in a designated folder along with the names of the corresponding students.
Figure 2.
Example of Dataset.
Figure 2.
Example of Dataset.
Face Detection
In our system, we prioritize accurate face detection, and for this purpose, we utilize the Haar-Cascade Classifier from OpenCV. This classifier plays a crucial role in identifying patterns of visual features characteristic of human faces. By training the classifier on a dataset containing positive and negative samples, it learns to distinguish between faces and non-facial regions. To enable this training, we leverage the "haarcascade_frontalface_default" XML file. During the face detection process, the system employs the “detectMultiScale” module, a key component of the Haar-Cascade Classifier. This module analyzes an image, identifying potential face regions by detecting visual features such as edges, lines, and textures commonly found in faces. The system then creates rectangular bounding boxes around these detected regions, effectively outlining the faces present in the image. To optimize the face detection process, several parameters are considered. The scale factor parameter determines the reduction in image size at each scale, balancing between speed and accuracy. In our system, we use a scale Factor of 1.3 to strike an optimal balance. Another critical parameter is minNeighbors, which specifies the minimum number of neighboring rectangles required for a region to be considered a valid face detection. A higher minNeighbors value helps filter out false positives while potentially eliminating some true faces. To ensure reliable face detection, we set the minNeighbors value to 5. Additionally, we employ the minSize parameter to discard very small regions unlikely to be faces, ensuring that only meaningful face detections are considered. By utilizing the Haar-Cascade Classifier and optimizing these parameters, we can effectively identify patterns of visual features and achieve accurate face detection with proper presentation.
Figure 3.
Types of Haar Features.
Figure 3.
Types of Haar Features.
Figure 4.
Haar Features applied on an Image.
Figure 4.
Haar Features applied on an Image.
5. Face Recognition
The LBPH (Local Binary Patterns Histograms) face recognition algorithm follows a series of procedural steps to achieve accurate identification of faces. Let's delve into each step in more detail:
1. Preprocessing Stage:
The initial step involves creating an intermediate image that emphasizes the facial features present in the original image, hereby enhancing the representation of the face. This is accomplished using a sliding window technique, which relies on two important parameters: the radius and the number of neighbors.
2. Local Binary Patterns Calculation:
We can extract a 3x3 pixel window from various areas of an image, presuming we have a grayscale image of a face. This window can be thought of as a 3x3 matrix, where the intensity of each pixel ranges from 0 to 255. This matrix's central value serves as a threshold, setting the new values derived from the eight adjacent pixels. Based on whether each neighboring pixel is reater than or equal to the threshold, a binary value is assigned to each one. This procedure yields a matrix with binary values ther than the central pixel. These binary values are combined line by line to produce a new binary value that is then expressed in cimal form. The central pixel of the original image is then given the decimal value.
3. Histogram Extraction:
The intermediate image created in the previous step is divided into various grids using the parameters Grid X and Grid Y. A diagram of this division is provided as a guide for the subsequent histogram extraction.
A histogram is extracted for each grid. Each histogram represents the occurrences of pixel intensities ranging from 0 to 255 because we are working with grayscale images. A larger histogram results from joining all the histograms together. The final histogram, for 8x8 grids, for instance, would have 8x8x256 = 16,384 positions, accurately capturing the characteristics of the original image.
Figure 5.
Procedure of LBPH.
Figure 5.
Procedure of LBPH.
Figure 6.
Procedure of Histogram Extraction.
Figure 6.
Procedure of Histogram Extraction.
4. Face Recognition:
At this point, a dataset of face image has been used to train the LBPH algorithm. A unique histogram is used to represent each image in the training dataset. The same procedures outlined above are repeated to perform face recognition on a new input image. A histogram that represents the input image is produced as a result. The algorithm then compares the input image's and the training dataset's image histograms. The best match is the image with the closest histogram. Different distance metrics, such as Euclidean distance, chisquare, absolute value, etc., can be used to compare histograms. In this situation, a formula is typically used to calculate the Euclidean distance.
Figure 7.
Euclidean distance formula for comparing the Histogram.
Figure 7.
Euclidean distance formula for comparing the Histogram.
When a face is recognized, the algorithm returns the ID of the image with the closest histogram. It also offers the calculated distance, which can be used to gauge confidence. It is crucial to keep in mind that lower confidences show a smaller gap between the histograms, indicating a stronger match. We can ascertain whether the algorithm has correctly identified the input image by applying a threshold and assessing the trust level. The recognition is accurate if the trust value is lower than the predetermined threshold.
Attendance Marking
Upon successful face recognition, the system seamlessly proceeds to automatically record the attendance of each identified student in a dedicated database table. This meticulous recording takes place on a daily basis, capturing real-time and accurate attendance data. By securely storing the attendance records in a robust database, the system ensures the integrity and reliability of the data, minimizing the risk of unauthorized modifications or tampering. The utilization of a structured database table serves as a well-organized repository, facilitating easy retrieval and efficient management of attendance records. Each attendance entry typically includes essential information such as the student's unique identifier, date, and potentially additional details like class or session. This meticulous record-keeping mechanism ensures a comprehensive and precise historical log of students' attendance over time. The secure nature of the database adds an extra layer of protection, safeguarding the attendance records against unauthorized access or alterations. Stringent security measures, including robust authentication protocols, encryption techniques, and fine-grained access controls, are implemented to ensure the confidentiality and integrity of the attendance data. Moreover, the automated nature of the system eliminates the potential for errors or discrepancies often associated with manual attendance methods.
By leveraging advanced face recognition technology, the system streamlines the entire process, eliminating the need for manual data entry and reducing the likelihood of human errors. Overall, the integration of face recognition technology with a secure and efficient database for attendance recording guarantees the accuracy, reliability, and tamper-proof nature of attendance records. This systematic approach promotes operational efficiency, transparency, and accountability in attendance management systems, benefiting educational institutions, organizations, and various industries where precise attendance tracking is of paramount importance.
Results and Discussion
An authentication system is specifically designed for faculty members in this proposed system. Faculty members are required to register students after successful authentication by providing their unique ID and detailed information. The faculty collects a total of 100 image samples for each student during the registration process. The captured colored images are converted to grayscale to simplify the process and ensure accurate results. These image samples were captured using a webcam, with the frame carefully resized to focus on the facial region. When the collection of 100 image samples for an individual is complete, the samples are saved in a designated folder, allowing for further training of the underlying model.
When a face is compared against the existing faces in the dataset during the recognition phase, the system successfully recognizes the person and displays their corresponding ID and Name. Furthermore, when face recognition is successful, attendance is automatically recorded in a database. The attendance records include important information such as the student's name, class, roll number, college email address, and present or absent status.
Figure 8.
Face Detection of the student using Haar Cascade.
Figure 8.
Face Detection of the student using Haar Cascade.
Figure 9.
Face recognition of student which display’s then information on screen then automatically store the attendance in Database.
Figure 9.
Face recognition of student which display’s then information on screen then automatically store the attendance in Database.
Figure 10.
Attendance records stored in MYSQL Database.
Figure 10.
Attendance records stored in MYSQL Database.
6. Conclusion and Future Scope
By reducing the reliance on manual labor, the main goal of implementing this system is to increase efficiency and cost-effectiveness. This method shows a thorough understanding of the algorithm as well as a methodical procedure to precisely identify users. The system has effectively shown that it can adapt to changes in face positioning, lighting, and other environmental factors. The system successfully handles the issue of changes in the environment by using facial recognition through machine learning to convert the original image into a representation that captures crucial features independently of brightness. Local facial landmarks are essential for further face recognition processing. Personal identifying information is removed to ensure privacy, and the captured face is encoded to produce exact measurements. The system currently achieves an impressive accuracy rate of up to 91%.
It might be necessary to take a lot of detailed pictures of students and store them safely in the cloud to guarantee the dependability of our suggested solution. This will make it possible for the device to identify fraud and can also be used in ATMs to increase security.
Our system also has the potential to be used in elections, where it could help identify voters by recognizing their faces, preserving the legitimacy of the electoral process.
Using high-resolution cameras can significantly improve the system's performance and accuracy, resulting in better results and outcomes.
Throughout the course of this project, it was discovered that distinct facial features must be visible to successfully identify faces. However, difficulties arise when the subject is not directly facing the camera. To accurately detect faces in all orientations, further research into deep learning algorithms is necessary.
In the future, we want to create an application that lets users update student image samples in the training dataset. With this flexibility, users can go beyond the server's pre-defined collections and create their user groups. To increase the number of identified and recognized students, we also plan to investigate advanced face detection and recognition algorithms.
References
- J. W. S. D'Souza, S. Jothi and A. Chandrasekar, "Automated Attendance Marking and Management System by Facial Recognition Using Histogram," 2019 5th International Conference on Advanced Computing & Communication Systems (ICACCS), Coimbatore, India, 2019, pp. 66-69. [CrossRef]
- R. S. Siswanto, A. S. Nugroho and M. Galinium, "Implementation of face recognition algorithm for biometrics based time attendance system," 2014 International Conference on ICT For Smart Society (ICISS), Bandung, Indonesia, 2014, pp. 149-154. [CrossRef]
- K. O. Okokpujie, E. Noma-Osaghae, O. J. Okesola, S. N. John and O. Robert, "Design and Implementation of a Student Attendance System Using Iris Biometric Recognition," 2017 International Conference on Computational Science and Computational Intelligence (CSCI), Las Vegas, NV, USA, 2017, pp. 563-567. [CrossRef]
- E. Varadharajan, R. Dharani, S. Jeevitha, B. Kavinmathi and S. Hemalatha, "Automatic attendance management system using face detection," 2016 Online International Conference on Green Engineering and Technologies (IC-GET), Coimbatore, India, 2016, pp. 1-3. [CrossRef]
- S. Chintalapati and M. V. Raghunadh, "Automated attendance management system based on face recognition algorithms," 2013 IEEE International Conference on Computational Intelligence and Computing Research, Enathi, India, 2013, pp. 1-5. [CrossRef]
- H. Rathod, Y. Ware, S. Sane, S. Raulo, V. Pakhare and I. A. Rizvi, "Automated attendance system using machine learning approach," 2017 International Conference on Nascent Technologies in Engineering (ICNTE), Vashi, India, 2017, pp. 1-5. [CrossRef]
- P. Patil and S. Shinde, "Comparative analysis of facial recognition models using video for real time attendance monitoring system," 2020 4th International Conference on Electronics, Communication and Aerospace Technology (ICECA), Coimbatore, India, 2020, pp. 850-855. [CrossRef]
- S. Kakarla, P. Gangula, M. S. Rahul, C. S. C. Singh and T. H. Sarma, "Smart Attendance Management System Based on Face Recognition Using CNN," 2020 IEEE-HYDCON, Hyderabad, India, 2020, pp. 1-5. [CrossRef]
- N. Tamboli and M. M. Sardeshmukh, "Facial Based Attendance Monitoring System Using Discriminative Robust Local Binary Pattern," 2017 International Conference on Computing, Communication, Control and Automation (ICCUBEA), Pune, India, 2017, pp. 1-5. [CrossRef]
- Available online: https://becominghuman.ai/face-detection-using-opencv-with-haar-cascade-classifiers-941dbb25177.
- Available online: https://opencv.org/about/.
- Available online: https://pyimagesearch.com/2021/05/03/face-recognition-with-local-binary-patterns-lbps-and-opencv/.
- Available online: https://www.researchgate.net/publication/326261079_Face_detection_system_for_attendance_of_class'_students.
- Available online: https://www.javatpoint.com/face-recognition-and-face-detection-using-opencv.
- Available online: https://towardsdatascience.com/face-recognition-how-lbph-works-90ec258c3d6b.
|
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).