Attendance Management system using Face Recognition

Download Full-Text PDF Cite this Publication

Text Only Version

Attendance Management system using Face Recognition

[1] Sandhya Potadar, [2] Riya Fale, [3] Prajakta Kothawade, [4] Arati Padale Department of Electronics & Telecommunication Engineering, MKSSSs Cummins College of Engineering for Women, Pune,

Maharashtra, India 411052

Abstract Managing attendance can be a tedious job when implemented by traditional methods like calling out roll calls or taking a student's signature. To solve this issue, a smart and authenticated attendance system needs to be implemented. Generally, biometrics such as face recognition, fingerprint, DNA, retina, iris recognition, hand geometry etc. are used to execute smart attendance systems. Face is a unique identification of humans due to their distinct facial features. Face recognition systems are useful in many real-life applications. In the proposed system, initially all the students will be enrolled by storing their facial images with a unique ID. At the time of attendance, real time images will be captured and the faces in those images will be matched with the faces in the pre-trained dataset. The Haar cascade algorithm is used for face detection. Local Binary Patterns Histogram (LBPH) algorithm is used for face recognition and training the stored dataset, that generates the histogram for stored images and the real time image. To recognize the face, the difference between histograms of real time image & dataset images is calculated. Lower difference gives the best match resulting in displaying the name & roll number of that student. Attendance of the student is automatically updated in the excel sheet.

Keywords Face detection & recognition, Haar Cascade Classifier, Local binary pattern histogram (LBPH).

  1. INTRODUCTION

    The person in photos and in real time videos can be identified using facial recognition systems. It is a tier of biometric security. Other types of biometric security are voice, fingerprint and eye recognition. In real time we can use it to unlock phones, find missing persons, aid forensic investigations, help the blind, etc. The main aim of this project is to build an attendance system based on face recognition. Different systems can be used for face recognition like attendance systems with fingerprint scanners, RFID tags and readers, facial recognition and location-based attendance systems. The attendance system with a fingerprint scanner minimizes the issue of proxy attendance. The system by using an RFID reader is much faster but high chances to get proxy attendance. Attendance systems using face recognition provide authenticated data also proxy data entering chances are much less as compared to other systems. In the proposed system, at the time of enrolment, video is captured and images of students are stored through facial detection, recognition and recorded in a database. In real time, video of a student entering a classroom will be captured, face will be detected and matched with the dataset images, name & roll number of the present student will be displayed along with updating the attendance.

  2. RELATED WORK

    Face is a unique identity of any person. It is used in many domains and is the fastest growing research area. Many systems are being proposed for attendance management. One of the systems [1], generates a smart attendance system which uses Quick Response (QR) code to track & record the attendance. Students and professors are given a unique QR code, at the beginning of the course, they are required to scan their QR code using a QR reading device. Attendance of students whose QR code is scanned will be recorded. This system is responsive to mobile phones and different computer systems.

    A reliable attendance monitoring system based on biometric is developed [2], which is used to monitor the presence of students in a more effective way. It reduces the chances of marking proxy attendance and also reduces the problems like missing papers of attendance, which occur during marking attendance manually. Teachers have a small fingerprint scanner with them and students will press their finger on it to mark their attendance. Attendance management systems using Iris recognition [3], are more reliable and accurate because of the inner characteristics of iris like uniqueness, time invariance, immovability etc. The Iris pattern of each student is used for attendance. By using the camera live images of student iris are captured and stored in a database. Gray coding algorithm is used for measuring radius of iris and then that radius is matched with the radius of each student in the database and attendance of that student will be marked.

    In one of the proposed models [4], two databases (face database & attendance database) are used. During enrolment, facial images of students are stored into the face database. The camera captures the images of the classroom, the images get enhanced and the attendance is marked in the attendance database after face detection & recognition. AdaBoost algorithm and Principal Component Analysis (PCA) are used for face detection and face recognition respectively. The LBPH algorithm [5], can recognize the front face as well as side face with approximate accuracy of 90%. The flow of this algorithm starts with dividing the image into blocks and calculating the histogram of each block, then combining the histogram of all the blocks into a single histogram. This histogram has some value which is used for comparing later with the real time image histogram for identification. Multiple faces can be detected in a single detection hybrid process of Haar cascade and Eigenfaces method are used [6]. This process is able to detect multiple faces with an accuracy

    of 91.67%. By using this method, we can recognize faces during day and night time and are also able to detect 15 degrees side facing faces. By using a webcam this process can successfully perform at more than 200 cm.

    One of the methodologies [7], considers accuracy rate, stability of system in actual time video processing, truancy of system and interface setting of the face recognition system. Face detection and recognition are two main parts of face recognition. Feature extraction is done by the LDA (Linear Discriminant Analysis) method. This model takes help of methods such as geometric Feature method, Subspace analysis method, Neural Network methods, Support Vector Machine (SVM) method to develop their face recognition algorithm. Experimentally this model of video face recognition system gives an accuracy rate up to 82%.

  3. METHODOLOGY

    The proposed methodology starts with the registration of students into the system. Following methodology has few main stages such as capturing images, pre-processing of the images, Haar Cascade classifier is used for face detection, developing a dataset of images, the further process of face recognition is done with the help of LBPH algorithm as shown in fig 1.

    Fig 1: Proposed Methodology for Attendance monitoring.

    1. Image Capture: The high-resolution camera which is used for capturing video is used to take frontal images of the students.

    2. Pre-processing: The images are converted from RGB to Grayscale and are scaled down by a factor of 1.2.

    3. Face Detection Face Detection is composed of four stages as shown in fig 2.

      Fig 2: Face Detection

      1. Haar Features

        Haar features are the same as convolutional kernels and are used to detect the features in a given image. There are different kinds of Haar features such as line feature, edge feature, four – rectangle feature etc. A single value is used to represent each feature which i calculated by subtracting the sum of pixels under the white rectangle from the sum of pixels under the black rectangle as shown in fig 3. Haar cascade algorithm makes use of 24*24 windows which ends up calculating 160000+ features in a window. To simplify the work of calculating the feature values, an Integral image algorithm is introduced.

        Fig 3: Haar Feature Selection.

      2. Integral Image

        To reduce the computation of the pixels to find the feature values, Viola Jones introduced a technique called Integral Image. As shown in fig 4, the value of the pixel at (x, y) in an Integral image is calculated by adding the values of pixels above and to the left of (x, y) pixel.

        Sum above and

        Sum above and

        Fig 4: Integral Image.

        Calculation of the sum of all pixels inside any given rectangle can be done by using only four values at the corner of that rectangle with the help of Integral image as shown in fig 5.

        Fig 5: Calculation of sum of pixels using Integral Image.

      3. AdaBoost Algorithm

        As Haar cascade uses 24*24 windows there can be 160000+ features within a detector which needs to be calculated. AdaBoost is an algorithm based on machine learning. This algorithm finds the best features among all the possible features and eliminates the irrelevant features. To evaluate and decide whether a given window has a face or not, a weighted combination of all the found features are used. Features are included only if they can at least work better than random estimation. These features are known as weak features. AdaBoost

        linearly combines these weak classifiers to design a strong classifier. The weak classifier gives 0 or 1 as an output depending on its performance in image. Output is 1 when it performs well and able to identify features applied on image and Output is 0 when no pattern of the feature is present in image.

        The steps involved in the AdaBoost algorithm are as follows.

        1. It distributes the uniform weights over training examples, positive weights for faces and negative weights for non-faces.

          Fig 6.1: Uniform distribution of weights

        2. Selects the weakest classifier i.e., with lowest weighted error. For e.g., x=0.5 if x>0.5 then they are faces otherwise non-faces, but due to this some of the non-faces comes under faces category.

          Fig 6.2: Selection of weakest classifier

        3. To overcome this drawback the algorithm increases the weights on the misclassified training examples because we need a new classifier which concentrates more on misclassified features.

          Fig 6.3: Increase weights on misclassified examples

        4. These steps are repeated and at the end, all the weak classifiers obtained at all iterations are combined linearly and help to define a perfect boundary region.

          Fig 6.4: Linear combination of weak classifiers

          A single rectangular feature is used to classify a single rectangular feature and with respect to the weighted neighbor, the positive and negative images are separated. Gaussian weak classifiers are also used for this purpose.

      4. Cascading

        In Paul Viola and Michael Jones detection algorithm, one single image is scanned many times by the detector with a new size every time. When multiple faces appear in an image the algorithm concentrates on removal of non-faces and brings out the most feasible face area. Since the computation cost is very high for each window when a particular strong classifier is a linear combination of all the best features and is not so appropriate for evaluation. Hence a cascade classifier is used.

        Fig 7: Cascading Classifiers

        Cascade classifiers comprise various stages. All the features are grouped into different stages and each stage contains a strong classifier and a feature. To design these stages, AdaBoost is used. As shown in fig 7, each stage decides whether a sub- window is a face or not. The window is discarded if it does not contain a face. While training a classifier the number of features, stages and thresholds are taken into account.

    4. Developing a dataset

      The faces detected in images are stored in the database after pre-processing and detection. A minimum of 20 images are captured per individual student along with a unique ID. The dimensions of these stored images are 212×212 pixels. These images are later used to train the recognizer.

    5. Face Recognition

    Local Binary Pattern (LBP) is a smooth & adequate operator, which operates by setting the pixels of an image by thresholding the neighborhood of each pixel and examines the outcome as a binary number. Histogram of Oriented Gradients (HOG) descriptor increases the detection performance when combined with LBP. Therefore, a combination of LBP & HOG which gives LBPH algorithm is used for face recognition.

    Steps involved in LBPH are as follows.

    1. LBPH considers four parameters for face recognition which are as follows Radius: To set up a circular local binary pattern radius is used. Generally, it is set to 1. Neighbors: To set the circular local binary pattern neighbors are used. Normally, set to 8. Grid X: Gives cells count which are in horizontal direction. Normally, it is set to 8. Grid Y: Gives cells count which are in vertical direction. Normally, it is set to 8.

    2. Training the Algorithm: A database of the face images of students which are to be recognized is used to train the

      algorithm. The unique ID which is set while developing a dataset is useful for recognizing the student.

    3. Applying the LBP operation: By intensifying facial characteristics, create an intermediate image that describes the original image. Based on the parameters like radius and neighbors, the algorithm uses a sliding window concept. Fig 8 describes this operation.

      Fig 8: LBP Operation

      • Assume that we have a grayscale facial image, take a part of images as a 3 x 3 matrix containing pixel intensities in the range (0 255), as shown in step1 and 2 in fig 8.

      • In step 3, consider central pixel intensity as threshold and change the values of 8 neighbors with respect to the threshold value. (Set it to 1 if neighboring pixel intensity is greater than or equal to the threshold value, otherwise set to 0.)

      • In step 4, convert the binary value into decimal value. The central pixel value of the image matrix is replaced by a decimal value. This central pixel is actually a pixel of a primary image.

      • Applying these steps to all the parts of the image, we get a new image (result of LBP operation) that describes the features of the primary image.

    4. Extracting the Histograms: Grid X and Grid Y parameters are used to divide images into multiple grids.

      Each histogram holds only 256 positions (0-255) that shows the existence of each pixel intensity as the image is in grayscale. Histogram of each cell is to be concatenated to generate a bigger and new histogram. The final histogram shows the characteristics of the primary image as shown in fig 9.

      Fig 9: Extracting Histogram of image

      Performing the face recognition: The algorithm for creating histogram is initially trained. Each image from the training dataset is represented by each histogram. To generate a histogram for the input image the above steps are performed again on that image. The histogram of input image is compared with the histograms of dataset images, selecting the closest histogram gives the matching image from the dataset. Various methods like Absolute value, Euclidean distance, etc can be used to compare the histograms. The Euclidean

      distance can be calculated using equation 1 to compare the histograms.

      Where HistD – Histograms of dataset images HistR – Histogram of real time image

      The algorithm returns a unique Id of the student with the minimum difference in the histograms of the student's image and dataset images. It also returns the calculated distnce, which can be used as a confidence measurement. Lower the confidence measurement, more is the precision of the recognizer.

  4. RESULTS

    The result of the proposed system is shown in fig 10. The unique Id and name of the students are displayed with the confidence number.

    Fig 10: Results

  5. CONCLUSION

    The proposed method uses face detection and face recognition that helps to maintain the automated attendance system. For detection, PaulViola Jones algorithm is used

    and for face recognition Linear Binary Pattern Histogram (LPBH) algorithm is applied.

    In the result, the unique ID and name of the student is displayed along with the confidence percentage. Confidence percentage represents the distance between the histogram of the stored image and histogram of the real time image and is calculated by using Euclidean distance. Lower is the distance, higher is the recognition rate.

  6. FUTURE SCOPE

    The future scope of the project can be integrated with the hardware components for example GSM through which a monthly list of the defaulter students can be sent to the mentor.

    Additionally, an application can be developed to help students to maintain a track of their attendance. It can also be used in offices where a large group of employees sit in a hall and their attendance will be marked automatically by capturing a video but for this the accuracy of the recognition needs to be improved.

  7. REFERENCES

    1. Asri Nuhi, Agon Memeti, Florinda Imeri, Betim Cico, Smart Attendance System using QR code, 9th Mediterranean conference Embedded Computing, Budva, Montenegro, 2020

    2. M.A. Meor, M.H. Misran, M.A. Othman, M.M. Ismail, H.A. Sulaiman, A. Salleh, N. Yusop Centre for Telecommunication Research and Innovation FakultiKej. ElektronikdanKej. Komputer Universiti Teknikal Malaysia Melaka Hang Tuah Jaya, Durian Tunggal 76100, Melaka, Malaysia ,2014

    3. Amena Khatun, A.K.M Fazlul Haque, Sabbir Ahemad, Mohammad Rahman, Design and Implementation of Iris Recognition Based Attendance Management System. ICEEICT Jahangirnagar University, Bangladesh, 2015.

    4. Shreyak Sawhney, Karan Kacker, Samyak Jain, Shailendra Narayan Singh, Rakesh Garg, Real-Time Smart Attendance System using Face Recognition Techniques in Amity University Uttar Pradesh, Noida, 2019.

    5. Awais Ahmed, LBPH based Improved face recognition at low Resolution UNIVERSITY OF ELECTRONIC SCIENCE AND TECHNOLOGY OF CHINA 2018 IEEE

    6. Multi-Faces Recognition Process Using Haar Cascades and Eigenface Methods Teddy Mantoro, Media A. Ayu, Suhendi Sampoerna University, Jakarta, Indonesia, 2018

    7. HAO YANG AND XIAOFENG HAN Face Recognition Attendance System Based on Real-Time Video Processing is supported in part by the Basic Public Welfare Research Project of Zhejiang Province under Grant LGF20H180001, 2020

Leave a Reply

Your email address will not be published. Required fields are marked *