Face Recognition Based Attendance System

In colleges, universities, organizations, schools, and offices, taking attendance is one of the most important tasks that must be done on a daily basis. The majority of the time, it is done manually, such as by calling by name or by roll number. The main goal of this project is to create a Face Recognition-based attendance system that will turn this manual process into an automated one. This project meets the requirements for bringing modernization to the way attendance is handled, as well as the criteria for time management. This device is installed in the classroom, where and student's information, such as name, roll number, class, sec, and photographs, is trained. The images are extracted using Open CV. Before the start of the corresponding class, the student can approach the machine, which will begin taking pictures and comparing them to the qualified dataset. Logitech C270 web camera and NVIDIA Jetson Nano Developer kit were used in this project as the camera and processing board. . An Excel sheet is developed, and it is updated every hour with the information from the respective class instructor.


INTRODUCTION
Traditional method of attendance marking is a tedious task in many schools and colleges. It is also an extra burden to the faculties who should mark attendance by manually calling the names of students which might take about 5 minutes of entire session. This is time consuming. There are some chances of proxy attendance. Therefore, many institutes started deploying many other techniques for recording attendance like use of Radio Frequency Identification (RFID) [3], iris recognition [4], fingerprint recognition, and so on. However, these systems are queue based which might consume more time and are intrusive in nature.
Face recognition has set an important biometric feature, which can be easily acquirable and is nonintrusive. Face recognition based systems are relatively oblivious to various facial expression. Face recognition system consists of two categories: verification and face identification. Face verification is an 1:1 matching process, it compares face image against the template face images and whereas is an 1:N problems that compares a query face images [1].
The purpose of this system is to build a attendance system which is based on face recognition techniques. Here face of an individual will be considered for marking attendance. Nowadays, face recognition is gaining more popularity and has been widely used. In this paper, we proposed a system which detects the faces of students from live streaming video of classroom and attendance will be marked if the detected face is found in the database. This new system will consume less time than compared to traditional methods.  [3] proposed a model of an automated attendance system. The model focuses on how face recognition incorporated with Radio Frequency Identification (RFID) detect the authorized students and counts as they get in and get out form the classroom. The system keeps the authentic record of every registered student. The system also keeps the data of every student registered for a particular course in the attendance log and provides necessary information according to the need.
In this paper [4], authors have designed and implemented an attendance system which uses iris biometrics. Initially, the attendees were asked to register their details along with their unique iris template. At the time of attendance, the system automatically took class attendance by capturing the eye image of each attendee, recognizing their iris, and searching for a match in the created database. The prototype was web based.
In [5], authors proposed an attendance system based on facial recognition. The algorithms like Viola-Jones and Histogram of Oriented Gradients (HOG) features along with Support Vector Machine (SVM) classifier were used to implement the system. Various real time scenarios such as scaling, illumination, occlusions and pose was considered by the authors. Quantitative analysis was done on the basis of Peak Signal to Noise Ratio (PSNR) values and was implemented in MATLAB GUI.
Authors in [6] researches to get best facial recognition algorithm (Eigenface and Fisherface) provided by the Open CV 2.4.8 by comparing the Receiver Operating Characteristics (ROC) curve and then implemented it in the attendance system. Based on the experiments carried out in this paper, the ROC curve proved that, Eigenface achieves better result than Fisherface. System implemented using Eigenface algorithm achieved an accuracy rate of 70% to 90%.
In [7], authors proposed a method for student attendance system in classroom using face recognition technique by combining Discrete Wavelet Transforms (DWT) and Discrete Cosine Transform (DCT). These algorithms were used to extract the features of student's face followed by applying Radial Basis Function (RBF) for classifying the facial objects. This system achieved an accuracy rate of 82%.

III. PROPOSED SYSTEM
All the students of the class must register themselves by entering the required details and then their images will be captured and stored in the dataset. During each session, faces will be detected from live streaming video of classroom. The faces detected will be compared with images present in the dataset. If match found, attendance will be marked for the respective student. At the end of each session, list of absentees will be mailed to the respective faculty handling the session. The system architecture of the proposed system is given below, Typically this process can be divided into four stages,

Dataset Creation
Images of students are captured using a web cam. Multiple images of single student will be acquired with varied gestures and angles. These images undergo pre-processing. The images are cropped to obtain the Region of Interest (ROI) which will be further used in recognition process. Next step is to resize the cropped images to particular pixel position. Then these images will be converted from RGB to gray scale images. And then these images will be saved as the names of respective student in a folder.

Face Detection
Face detection here is performed using Haar-Cascade Classifier with OpenCV. Haar Cascade algorithm needs to be trained to detect human faces before it can be used for face detection. This is called feature extraction. The haar cascade training data used is an xml file-haarcascade_frontalface_default. The haar features shown in Fig.2. will be used for feature extraction.

Fig.2. Haar Features
Here we are using detectMultiScale module from OpenCV. This is required to create a rectangle around the faces in an image. It has got three parameters to consider-scaleFactor, minNeighbors, minSize. scaleFactor is used to indicate how much an image must be reduced in each image scale. minNeighbors specifies how many neighbors each candidate rectangle must have. Higher values usually detects less faces but detects high quality in image. minSize specifies the minimum object size. By default it is (30,30) [8]. The parameters used in this system is scaleFactor and minNeighbors with the values 1.3 and 5 respectively.

Face Recognition
Face recognition process can be divided into three steps-prepare training data, train face recognizer, prediction. Here training data will be the images present in the dataset. They will be assigned with a integer label of the student it belongs to. These images are then used for face recognition. Face recognizer used in this system is Local Binary Pattern Histogram. Initially, the list of local binary patterns (LBP) of entire face is obtained. These LBPs are converted into decimal number and then histograms of all those decimal values are made. At the end, one histogram will be formed for each images in the training data. Later, during recognition process histogram of the face to be recognized is calculated and then compared with the already computed histograms and returns the best matched label associated with the student it belongs to [9].

Attendance Updation
After face recognition process, the recognized faces will be marked as present in the excel sheet and the rest will be marked as absent and the list of absentees will be mailed to the respective faculties. Faculties will be updated with monthly attendance sheet at the end of every month.

IV. RESULTS AND DISCUSSIONS
The users can interact with the system using a GUI. Here users will be mainly provided with three different options such as, student registration, faculty registration, and mark attendance. The students are supposed to enter all the required details in the student registration form. After clicking on register button, the web cam starts automatically and window as shown in Fig.3. pops up and starts detecting the faces in the frame. Then it automatically starts clicking photos until 60 samples are collected or CRTL+Q is pressed. These images then will be pre-processed and stored in training images folder.
The faculties are supposed to register with the respective course codes along with their email-id in the faculty registration form provided. This is important because the list of absentees will be ultimately mailed to the respective faculties.
In every session, respective faculty must enter their course code. Then after submitting the course code, the camera will start automatically. The Fig.4. shows the face recognition window where two registered students are recognized and if in case they were not registered it would have shown 'unknown'. By pressing CTRL+Q, the window will be closed and attendance will be updated in the excel sheet and names of absentees will be mailed to the respective faculty.  Fig.5. shows the attendance sheet updated after recognition process. Recognized students are marked as '1' and absent students are marked as '0'. The list of absentees will be mailed to the respective faculty email-id.