Smart Attendance Management System Using Face Recognition

To maintain the attendance record with day to day activities is a challenging task. The conventional method of calling name of each student is time consuming and there is always a chance of proxy attendance. The following system is based on face recognition to maintain the attendance record of students. The daily attendance of students is recorded subject wise which is stored already by the administrator. As the time for corresponding subject arrives the system automatically starts taking snaps and then apply face detection and recognition technique to the given image and the recognize students are marked as present and their attendance update with corresponding time and subject id. We have used deep learning techniques to develop this system, histogram of oriented gradient method is used to detect faces in images and deep learning method is used to compute and compare feature facial of students to recognize them. Our system is capable to identify multiple faces in real time.


Introduction
Every organization requires a robust and stable system to record the attendance of their students.and every organization have their own method to do so, some are taking attendance manually with a sheet of paper by calling their names during lecture hours and some have adopted biometrics system such as fingerprint, RFID card reader, Iris system to mark the attendance.The conventional method of calling the names of students manually is time consuming event.The RFID card system, each student assigns a card with their corresponding identity but there is chance of card loss or unauthorized person may misuse the card for fake attendance.While in other biometrics such as finger print, iris or voice recognition, they all have their own flaws and also they are not 100% accurate [1] [19].
Use of face recognition for the purpose of attendance marking is the smart way of attendance management system.Face recognition is more accurate and faster technique among other techniques and reduces chance of proxy attendance.Face recognition provide passive identification that is a person which is to be identified does not to need to take any action for its identity [2].
Face recognition involves two steps, first step involves the detection of faces and second step consist of identification of those detected face images with the existing database.There are number of face detection and recognition methods introduced.Face recognition works either in form of appearance based which covers the features of whole face or feature based which covers the geometric feature like eyes, nose, eye brows, and cheeks to recognize the face [3].
Our system uses face recognition approach to reduce the flaws of existing system with the help of machine learning, it requires a good quality camera to capture the images of students, the detection process is done by histogram of oriented gradient.And recognizing perform through deep learning.The frontend side (client side) which consist of GUI which is based on electron JS and backend side consist of logic and python (server side), an IPC (Inter Personal Communication) bridge is developed to communicate these two stacks.The images capture by the camera is sent to system for further analysis, the input image is then compared with a set of reference images of each of the student and mark their attendance.

Related Work
In recent years, a number of face recognition based attendance management system have introduced in order to improve the performance of students in different organization.In [4] Jomon Joseph, K. P. Zacharia proposed a system using image processing, PCA, Eigen faces, Microcontroller, based on Matlab.Their system works only with front face images and there is need of a suitable method which works with the orientation of the system.Ajinkya Patil with their fellows in [5] proposed a face recognition approach for attendance marking using Viola jones algorithm, Haar cascades are used to detect faces in images and recognition performs through Eigen face method.Another approach of making attendance system easy and secure, in [6] the author proposed a system with the help of artificial neural networks, they used PCA to extract face images and testing and training were achieved by neural networks, their system performs in various orientation.A 3D face recognition approach for attendance management system was proposed by MuthuKalyani.K, VeeraMuthu.A [7] has proposed, they marked attendance with monthly progress of each student.
There is need for an alternative algorithm which can enhance the recognition on oriented faces.Efficient Attendance Management system is designed with the help of PCA algorithm [8], the have achieved accuracy up to 83% but their system performance decreases due to slightly changes in light condition.An eigen face approach along with PCA algorithm for marking face recognition attendance system have introduced by author in [9], they mention comparison of different face recognition algorithm in their paper.Overall it was good approach to maintain record of attendance.

Methodology
The proposed system is designed for automating the attendance of the different organization and reduces the flaws of existing manual system.The system calculate the attendance subject wise, that is the data of students and subjects are added manually by administrator, and whenever time for corresponding subject arrives the system automatically starts taking snaps and find whether human faces are appear in the given image or not.We have used Histogram of Oriented Gradient for face detection and deep learning techniques to calculate and compare 128-d face features for face recognition.Once faces are detected and recognize with the existing database, system calculate attendance for the recognize students with the respective subject id in real time.And an excel sheet generated and saved by the system automatically.
Our system splits into two parts, First the front end side which consist of GUI which is based on Electron JS that is JavaScript stack which is serving as a client and the second is the backend side which consist of logic and based on Python which is serving as a server.And we know that both the languages cannot communicate with each other directly so we have used IPC (Inter Personal Communication) techniques with zero library as a bridge to communicate these two languages.The Electron JS call the python functions and interchange data via TCP with help of Zero PC Library.

Image acquisition:
Image is acquire using a high definition camera which is placed in the classroom.This image is given as an input to the system.

Dataset Creation:
Dataset of students is created before the recognition process.Dataset was created only to train this system.We have created a dataset of 5 students which involves their name, roll number, department and images of student in different poses and variations.For better accuracy minimum 15 images of each students should be captured.Whenever we register student's data and images in our system to create dataset, deep learning applies to each face to compute 128-d facial features and store in student face data file to recall that face in recognition process.This process is applies to each image taken during registration.

Storing:
We have used JSON to store the student's data.

Face Detection and Extraction:
Face detection is important as the image taken through the camera given to the system, face detection algorithm applies to identify the human faces in that image, the number of image processing algorithms are introduce to detect faces in an images and also the location of that detected faces.We have used HOG method to detect human faces in given image.

Face Positioning:
There are 68 specific points in a human face.In other words we can say 68 face landmarks.The main function of this step is to detect landmarks of faces and to position the image.A python script is used to automatically detect the face landmarks and to position the face as much as possible without distorting the image.

Face Encoding:
Once the faces are detected in the given image, the next step is to extract the unique identifying facial feature for each image.Basically whenever we get localization of face, the 128 key facial point are extracted for each image given input which are highly accurate and these 128-d facial points are stored in data file for face recognition.

Face matching:
This is last step of face recognition process.We have used the one of the best learning technique that is deep metric learning which is highly accurate and capable of outputting real value feature vector.Our system ratifies the faces, constructing the 128d embedding (ratification) for each.
Internally compare_faces function is used to compute the Euclidean distance between face in image and all faces in the dataset.If the current image is matched with the 60% threshold with the existing dataset, it will move to attendance marking.

Attendance Marking
Once the face is identify with the image stored in JSON file, python generate roll numbers of present students and return that, when data is returned, the system generates attendance table which includes the name, roll number, date, day and time with corresponding subject id.And then passes the data to python to store the table into an excel sheet automatically.Each sheet is saved according to the subjects which already entered by the administrator, for example when system generates excel sheet by sending the compiled sheet in an array to python, the python first checks whether there exit any excel sheet of that date, if yes then it create separate worksheet by subject id, so that attendance is differentiated for different subjects.

Results and Experiments
Smart Attendance Management System is simple and works efficiency.The system works automatically once the registration of individual student created by the administration.To initialize this system, the administrator first register their student data along with their name roll number and department.We have created a training dataset of 6 students (total of 120 images for each) for testing purpose.This is the subject folder, subjects are to be filled according to time table once the time arrives for the corresponding subject, the system starts capturing images, detects the faces, compares the faces with existing database, mark attendance and generate excel sheet for the recognize students.

Conclusion
Smart attendance management system is designed to solve the issues of existing manual systems.We have used face recognition concept to mark the attendance of student and make the system better.The system performs satisfactory in different poses and variations.In future this system need be improved because these system sometimes fails to recognize students from some distance, also we have some processing limitation, working with a system of high processing may result even better performance of this system.

Figure 1 .
Figure 1.Communication between frontend and backend To represent a structured data based on JavaScript object syntax, a standard text based format is introduced.JSON is used for transmitting data in web application.It is a perfect solution for storing temporary data that's consumed by the entity that's creates the data.JSON can store data in String, Number, Object, Array, Boolean, Null form which means it has limitation of storing data in functions, dates 2 EAI Endorsed Transactions on Creative Technologies 10 2018 | Volume 5 | Issue 17 | e4 Kaneez Laila Bhatti et al. and undefined data form.If you are trying to store or exchange data in functions or dates than JSON is not right choice for you.

Figure 3 .
Figure 3. Front page of system Volume 5 | Issue 17 | e4Smart Attendance Management System Using Face Recognition

Figure 4 .
Figure 4. Addition of Subjects

Figure 5 .
Figure 5. Test Image of students during ccn lab at TL-MUET

Figure 7 .
Figure 7. Accuracy graph in terms of angles

Figure 8 .
Figure 8. Accuracy graph in terms of distance