EyeAttend – Facial Recognition based Attendance System from scratch. – A complete approach. (Part-II)

Keshav Tangri
Analytics Vidhya
Published in
5 min readFeb 25, 2021

--

Introduction

Greetings readers, welcome to second part of the series EyeAttend. In this blog, we will go through the analysis of the problem statement at hand, traditional methodology, our proposed solution and the planning undertaken for the execution of the solution. We will cover the flow of events that are taking place in the whole project and represent it with the help of a flowchart. So let’s dive in.

Understanding Problem Statement

Before beginning with a solution to any problem, it is always advised to understand the problem first. Therefore, we begin by explaining the current/traditional methodology being undertaken for taking attendance.

Traditional Methodology

  1. Initially after a lectures ends, the class representative will have to stand by the podium and call out each roll number of the student and the concerned individual will revert back with present if he/she is in the class.
  2. Next the class representative(CR) will take a note of the present and absent and/or absent students.
  3. This list is then sent to concerned subject teacher. The authority to fill attendance is not given to the class representative.
  4. The teacher keeps note of this in his/her register.
  5. This cycle is repeated till the end of semester

Limitations

There are many limitations involved with this particular mechanism. Few of them are as follows:

  1. Proxy: Proxy means Fake attendance in lectures in colleges. The above methodology is prone to proxy at the CR’s level. He might mark present for his friends even though they are roaming out in the city.
  2. Sharing: It is difficult to share the attendance with the students. Some times it is due to no updation in the register, or the professor is unavailable etc. In countries like India, where 75% attendance is compulsary in colleges, this is a big issue for the students.
  3. No Softcopy: If the attendance sheet is to be forwarded after the end of the semester, it is difficult to do so as there is no softcopy maintained. This results into another time wastage for scanning the register.
  4. Extensive Manual Work: whether it is updating attendance on an excel or a register, the traditional methodology involves a lot of manual effort for accomplishing the task.
  5. Time: The whole process is somewhat time consuming.
  6. Editing: In case of an absentee due to illness, some competition or any reason which has a valid proof and has to be converted back to present, the professor has to use whitener to correct it which makes the register kinda messy.

Proposal for an Intelligent System

Our proposal is a hassle free deployment of a system which do not require the need of CR to call out names and teacher itself can take the attendance by just clicking a photo of the students.

Solution Overview:

As you may have already seen in the video demonstration in Part-I, we first upload our image to the database, next the machine learning model extracts faces from the image and then based on the teacher, subject code, and batch facial recognition is performed between the extracted face and the classroom faces. Once this is done, the presentees and absentees list is generated and gets dynamically updated onthe DataBase. This final list is sent back to the front end for the teacher. The solution also provides easy download facility and in future versions, we can add graphical analytics of the data collected to visually understand trends over the years.

Flow of the project (ML Model flow)

Below is the attached flowchart of our project ML models. We have segregated models with different functionality for easy future updation and scalability.

Flow of ML Models

The above flow shows how our image is processed by the various models. Initially we thought of making the project for both masked and unmasked scenarios, but due to hardware constrains we took the path of unmasked only. However the new models can be developed and the code can updated in order to incorporate Masked version too.

So, initially when the image is given to the script, it will extract the facial regions from it. It will detect the presence of faces and will extract it in 224x224x3 dimensions. Next we iterate over the number of faces and for each face, we do the following :

  1. Check if it is masked or unmasked
  2. Check if it is a real person or a picture of person’s face
  3. Check who is the person from the classroom (facial recognition).
  4. Mark his roll number and keep him in presentees record.

Models Overview

As mentioned in the above section, we have to develop different models for our model. Now this is because as the new students arrive at campus, we might need to train the model again to make it more robust. This is the reason why the models are broken down into different segments so that one segment can be upgraded and then reused without affecting the other models. Listed below are the models which we have used and which we are going to develop:

  1. keras-facenet (Transfer Learning): This is used for extracting faces and creation of embeddings of face images[1]. We have used a pretrained facenet model that converts a face image into 512 dimensional vector. It detect and extract faces via the MTCNN (Multi Task Cascaded Neural Networks).
  2. mask-detector: We will be developing this model to detect whether the person’s face has a mask or not. This is done to separate the different use case and with mask, the classroom database, real/fake detector etc will be developed differently.
  3. real/fake detector: The real/fake detector or liveliness detector model is used to check if the actual human is present. This is minimize the effort of proxy in our project as it might be possible the someone just opens up the laptop screen with their friend’s face image so that his/her roll number can be counted as presentess.

Conclusion

In this part of the series, you learned about the general overview of how the Deep Learning/Machine Learning things are going at the backend. We are sorry that like Part — I, this part doesn’t have code too, but we will be starting with the model development in Part — III of the series. Stay tuned for that and follow us on LinkedIn : Keshav Tangri, Abhijeet Baruah, & Aarushi Sood.Let’s catch up in the next blog. Till then, have a great week!

--

--

Keshav Tangri
Analytics Vidhya

Deep Learning Enthusiast, Full Stack Native Android App Dev + Web Developer, Software Developer - Python