Face Detection and Recognition Technology

In a class room of 54 students, a lecturer calling the roll number of students from first to last number for marking attendance takes an average time of 4 minutes 20 seconds, says a case study. This made us think about the time spent in 1 hour session in every class all over India and if we could save those minutes, then it is a matter of many decades for us. This may not excite you now; even some 10 years back if someone would have told you hereafter lecturers would be paid on hourly basis, you would’ve not believed that. But just think about now, some lectures cost in dollars for minute basis as well. So, whether we are going to utilize them properly or let them spare our time taking attendance over sessions? No.


We live in an era where scientists try to time travel backwards and shift their past and fix it for a better future. At least we can save some time and forecast it for better utility. Today the facial recognition technology has become an increasingly ubiquitous part of our lives. This thrive us to take up a project implementing the facial recognition technology in conventional attendance marking system to come up with some ideas for marking attendance using facial recognition technology.


The project aims at grooming a software that automatically marks the presence of students in a class in a fraction of seconds and that too in a various intervals of time we want. We have set our target audience as students when we started with our project. But when we were in progress with our project we’ve found many ideas and extending our scope by modifying our algorithms to reach some other set of audience as well.


The technologies we have implemented in our project are facial detection and facial recognition. The main package used here for face detection and recognition technology is OpenCV (Python). OpenCV is an important package widely used in computer vision problems. Some other packages include Matplotlib, Numpy and Pandas as well.


For face detection, we have implemented Haar cascade classifier algorithm to distinguish between the face and other objects to detect the face in the given input image. Through our UI built using Python tinker, we try to train our model by capturing 20 photographs of the person in a specified time stamp. Once the face is detected, it will be stored in the database with a name and unique ID for every single person with a minimum of 20 photographs for better recognition.


Haar Classifier:

The Haar classifier is machine learning based approach, where a cascade function is trained from many positive images (with faces) and negative images (without faces). It is then used to detect object in other images.


For facial recognition part, we have cascaded three powerful facial recognition algorithms to yield better result. They are:

  • Eigen faces
  • Fisher face recognizer
  • Local Binary Pattern Histogram (LBPH)


Eigen faces:

T he Eigen faces method took a holistic approach to face recognition: A facial image is a point from a high-dimensional image space and a lower-dimensional representation is found, where classification becomes easy.


Fisher face recognizer:

Linear discriminant analysis (LDA) is a generalization of Fisher’s linear discriminant, a method used in statistics, pattern recognition and machine learning to find a linear combination of features that characterizes or separates two or more classes of objects or events.


Local Binary Pattern Histogram (LBPH):

Local Binary Pattern is a type of visual descriptor used in computer vision for texture classification. It has further been determined that when LBP is combined with the Histogram of oriented gradients (HOG) descriptor, it improves the detection performance considerably


Each algorithm recognizes the face of the person and we have cascaded these algorithms in a way that the result showing the name and ID will be displayed only if all three algorithms come up with a same recognition result of the person from the database and it will display UNKNOWN for a non-registered person in the image or video in different time stamps throughout. The below flow diagram depicts the flow of process in a nutshell.

Therefore, this project would definitely find its implementation on educational institutions with some more improvisation in algorithms with additional features as per the client’s requirement.


The scope and idea can also be extended and applied in various other sectors that include health, defence, crime control and corporate with modified algorithms in face detection and recognition for better enhancement in future. 


Leave a Reply

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