Abstract
To manage attendance of each student is much more complex when it’s done manually, and it has to be done for each class. To overcome this, we can use face recognition application where it takes less time comparatively, and it is stored in the database; this avoids confusions, proxies, and error of storing data when done manually. The students need to fill their data along with parent’s details, so when the students are absent, the message will be passed to them. After taking attendance through the application, mails and message of the data entry of attendance will be sent to the respective teachers. In advance, the details need to be entered beforehand, so when the students come in front of the camera, their face is recognized by comparing them from database containing faces. When it is unable to recognize, the faces will be stored in unknown, so when there is a mishap of being absent, it can be checked later on. This method of attendance is much more successful. Compare to other algorithms, haar cascade and local binary pattern histogram is best due to their robustness and less false rate.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
Traditionally, the attendance of students is taken by calling out each student names and marking it out on the student’s attendance registers which is provided for the faculty members. This method may sound easy and less complicated, but the problem arises when the number of students are more it may result with errors in the registers; it is common for humans to make mistakes, while being in a rush to avoid this, we can use face recognition application where the data of each students are done when they come in front of the camera and click recognize, and it will be stored in the data automatically by recognizing them from the faces which is been already stored in the data with faces.
This method has many advantages like its time efficient and storing of data doesn’t cause any mishaps. One more advantage is there won’t be any proxies. When the process is completed, the teacher must click on mail where the database of attendance will be sent to the faculty, and the students who are absent the respective parent will receive the message.
2 Problem Definition
Though many systems are developed for face recognition, but still, it has many challenges like in computer vision and recognition of pattern researches like features are computed slowly, it needs auxiliary information and for broad practical applications. The problem of face recognition can be stated as follows: face recognition human facial features like the mouth, nose, and eyes in a full-frontal face image.
3 Proposed System
The process is done by two algorithms which is haar cascade, used for face detection and lPBH, used for face recognition. The application is created using Python module in graphical user interface. Tkinter is the package used which makes it easier in labeling and other things.
The process follows totally 3 steps first by taking image of the students along with their details and storing them in the database and training those images in the database finally testing them, so when the student comes in front of the camera, it tries to recognize them by comparing them from the database which as the faces already trained and tested and enter them into the attendance sheet. If the person doesn’t belong to the database, it will be stored in the unknown image file. The stages are clearly explained in the further sections.
4 Dataset and Methodology
Face recognition-based attendance system: The graphical user interphase of the system has been shown in Fig. 1. The system has been divided into 3 sections: creation of database, dataset training and dataset testing, sending alert messages in an extension.
-
(1)
Creation of Database
-
•
Initialize the camera and to get the attention of student’s alert message is set
-
•
Input of user id
-
•
Conversion of the image from RGB to gray scale, face detection and
-
•
It will be stored in the database by labeling them up to 100
-
(2)
Dataset Training
-
•
Recognizer of LBPH face will be initialized
-
•
Next, faces and ID from the folder are taken to train the LBPH recognizer
-
•
The trained data will be saved as xml or yml file
-
(3)
Dataset Testing
Loading from xml and yml of haar classifier, LBPH face recognizer and data that has been trained is done.
-
the image will be captured from the camera,
-
next convert them into gray scale,
-
the face will be detected from it,
-
Finally, prediction of the face is done by using above recognizer.
The system in this uses haar cascade algorithm in detection of face which in turn uses modified haar cascades in detection. We can use any camera like USB Webcam to capture photos. The system will access console of SSH in laptop. Most important of all, it will require a lot of positive and negative images in training the haar cascades. In which, the positive images are pseudocode for the attendance system.
Input: Real-time video of the student’s face will be taken output: Excel sheet of the student’s attendance.
-
(1)
Each frame of the image will be transferred from RGB to gray scale
-
(2)
Next, apply haar cascade classifier for face detection and get the region of interest
-
(3)
Now, we need to apply the LBPH algorithm on the region of interest to get the features
-
(4)
If it is for enrollment, then features will be stored in the database else if it is for verification then do the post-processing
Haar Cascade Algorithm
Haar cascade is a machine learning algorithm used for detection of objects in an image or video. It is a process where a cascade function is used to train a lot of positive and negative images.
It is used for detection of objects in images. It will also be able to identify any kind of object.
As per Fig. 2, the first step is to collect all the haar features. It selects those features which are adjacent to the rectangular regions at a specific location in the detection window. Then, it sums up all the pixel intensities in each of the region and calculates the difference between these sums.
Loading the dataset
We will plot the first image in our dataset and check its size. By default, the shape of every image in the dataset is 141 × 141, so we will not need to check the shape of all the images. Sometimes, it depends on the size of the face and distance from the camera.
Data preprocessing
We need to have a target variable. That means the column will get created for each output, and variable will be assigned to each of them; the first layer will be also be taken in an input shape. This is the shape of each input image, 141, 141, 1 as seen earlier on, with the 1 signifying that the images are gray scale.
Training the model
Now, it will train the model. For training, we will use the ‘fit()’ function in the model with the following parameters: Data training will be taken as x; target of data will be taken as y and validation data, and all the number of epochs. For the data validation, we going to use the test set provided in the dataset, which we have split into x and y. Now, this will be using the model to make predictions.
Local binary patterns histogram
The goal of face detection is to detect and locate faces from the image, to extract and to use the in other areas. Also, nowadays, there are many different algorithms to accomplish this face detection and recognition, such as Eigen faces, fisher faces, scale-invariant feature transform and speed up robust features. In this section, we going to use LBPH-based face detection algorithm as depicted in Fig. 3. LBP is an easy but powerful way to extract all features and label those pixels from the image.
The algorithm used to follow this step
-
(1)
Initializing them temp = 0 is the first step
-
(2)
where I those are the training images
-
(3)
where H = 0, then initialize them to the pattern histogram
-
(4)
The model of the label of LPBH is calculated
-
(5)
Keep adding the corresponding bin by one
-
(6)
Next step is to get the greatest LBP feature during each of the face image and later merging them into the unique vector
-
(7)
Then, it is time to compare all those features.
-
(8)
Last step, finally, when it resembles with the image that is stored in the database, the image will be recognized
5 Results and Outcome
In the experiment, first, we need to create a dataset of each student which will have a distinct ID number with an image of a face in the database, and then, those features of the face from all the image will be extracted At the end, it gets segregated, and recognition of those face of each student along with information will be done (Figs. 4 and 5).
Now, it is required to compare the input image of the face which has been detected and extract all the facial features and compare them with the face images in the database; if failed to recognize, they will be stored in the unknown images as shown in Fig. 6.
Using the algorithms, the details of all the faces of each student known and unknown will be compared that have been trained in the system. In this research, three major tasks have been performed those are face detection, train, and finally recognize the face of each student from the real-time video camera.
-
A.
Face detecting and preprocessing
In this step, the system will detect the face as image as the input with real-time camera with less resolution or high resolution depending taken individually or in group.
Firstly, we need to convert all those frames from RGB to gray scale to do the detection of the faces. We will apply haar cascade function that has been trained and detect those features in other images. In the system, we will use haar features like edges, lines, and four rectangles that are nose, mouth, and eyes. For those large or huge image of a variable size of an image, it will take or need a lot of computations, and all those features most of the time will be irrelevant. But, by using AdaBoost, we will select the best among those. Then, region of interest like which will contain faces is extracted and will be sent to the next stage as shown in Fig. 7.
-
B.
Images of face is trained
First, the image is captured, and we will be preprocessing them (Fig. 8); later, we need to train those images in the dataset. In the training phase, those images of recognition will be applied that will get stored of the values of histogram of images of the face (Fig. 9).
-
C.
Post-processing and recognizing image of the face
The last and final task is to recognize the image of the face. The cascaded haar classifier and training them to recognize and training recognition will be used for the recognition of the face. Then, at the end, classifier will be comparing those stored images of face with the input images of face, and if all the features of input images of face get matched with in the images stored in the database, the recognition of face result gets displayed with real-time video camera of the screen with name and university seat number (Figs. 10 and 11).
We can also get an absent list on teacher’s mobile number as well as on parent’s mail ID by choosing following options (Figs. 12 and 13).
Teacher can also get an absent students list on their mobile number for that same day as well as previous day.
6 Conclusion
Compared to all other algorithms, this one is much faster and has less false rate. This application is very much useful in schools and colleges since it saves time of teacher which will be wasted in talking attendance manually; thus, even preventing from proxies and even parents can have a track of their child attending each classes or not. Since messages will be automatically generated and passed to parents if the child doesn’t come under the database of that class and teachers or faculty will have the complete details of students who are absent with a Excel sheet to their mails which has been stored in the database already. The great advantage of this application is, it will be able to recognize the face of the students even when there is a slight changes like sometimes students wear glasses or arrive without them and if they have beard or not also it can recognize them easily.
When the students come in front of the camera, they will be recognized with the images that have been trained; even when it fails to recognize them, it will be stored in unknown images which later can be used to check for errors and managed attendance according to it.
References
Joseph J, Zacharia KP (2013) Automatic attendance management system using face recognition. Int J Sci Res (IJSR)
Chiagozie OG, Nwaji OG (2012) Radio- frequency identification (RFID) based attendance system with automatic door unit. Acad Res Int
Shoewu O, Idowu O.A (2012) Development of attendance management system using biometrics. Pac J Sci Technol
Khatun A, Haque AKMF, Ahmed S, Rahman MM (2015) Design and implementation of iris recognition based attendance management system. In: 2015 International conference on electrical engineering and information communication technology (ICEEICT), Dhaka, 2015, pp 1–6
Ahonen T, Hadid A, Pietik¨ainen M (2004) Face recognition with local binary patterns. In: Proceedings of the advances in visual computing; springer science and business media LLC, vol 3021. Berlin, Germany, pp 469–481
O¨ zdil, O¨ zbilen MM (2014) A survey on comparison of face recognition algorithms. In: 2014 IEEE 8th international conference on application of information and communication technologies (AICT), Astana, 2014, pp 1–3
Ahonen T, Hadid A, Pietikainen M (2006) Face description with local binary patterns: application to face recognition. IEEE Trans Pattern Anal Mach Intell 28(12):2037–2041
Viola P, Jones M (2001) Rapid object detection using a boosted cascade of simple features. In: Proceedings of the 2001 IEEE computer society conference on computer vision and pattern recognition. CVPR 2001, Kauai, HI, USA, 2001, pp I–I
Will Berger, Deep Learning Haar Cascade Explained, WILL BERGER. http://www.willberger.org/cascade-haar-explained
Kelvin Salton do Prado, Face Recognition: Understanding LBPH Algorithm, towards data science. https://towardsdatascience.com/facerecognition-how-lbph-works-90ec258c3d6b
Samet R, Tanriverdi M (2017) Face recognition- based mobile automatic classroom attendance management system. In: 2017 international conference on cyberworlds (CW), Chester, 2017, pp 253–256
Seifedine K, Mohamad S (2010) Wireless attendance management system based on iris recognition. Sci Res Essays 5:1428–1435
Ahmed A, Guo J, Ali F, Deeba F, Ahmed A (2018) LBPH based improved face recognition at low resolution. In: 2018 International conference on artificial intelligence and big data (ICAIBD), 2018: IEEE, pp 144–147
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Rai, A.K., Akash, A., Kavyashree, G., Taj, T. (2023). Attendance System Based on Face Recognition Using Haar Cascade and LBPH Algorithm. In: Kumar, A., Senatore, S., Gunjan, V.K. (eds) ICDSMLA 2021. Lecture Notes in Electrical Engineering, vol 947. Springer, Singapore. https://doi.org/10.1007/978-981-19-5936-3_2
Download citation
DOI: https://doi.org/10.1007/978-981-19-5936-3_2
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-19-5935-6
Online ISBN: 978-981-19-5936-3
eBook Packages: Computer ScienceComputer Science (R0)