Face Recognition in Security Systems

Darshan Rathod
8 min readMay 31, 2021

From the origination of mobiles to Artificial Intelligence, technology has come a long way. And all of us need to accept the fact that we have adapted technology with open arms for easing our tasks at hand.

Movies like Science Fiction had already been used, and then came the actual wave of machine learning that has spread across countries, with each passing day.

During technological development, a new system has arrived under the hedge of AI: Facial Recognition. This has brought identification to a whole new level, and the solution is being used by all major entities as a measure of security.

What is Facial Recognition?

It is a biometric identification process to identify, verify, and authenticate the person using facial features from any photo or video. This system works on comparing facial biometric patterns of the face of interest with the database of known faces to find the match.

Surveillance & Security advancements have changed the way data is captured and how to drive actions and make the best use of data in the future. These systems can be as fundamental as the video camera to as complex as the biometric system to monitor, detect and record the intrusion.

Today’s market has moved beyond these traditional cameras, and technologies like biometric facial recognition are taking centre stage. ML & AI technologies empower facial recognition to be the most effective contactless biometric system.

Existing Access Control methods and issues

Nowadays, fingerprint recognition, RFID ID cards, password-based security systems are the majorly used techniques for access control.

The legacy systems have a fundamental requirement of being hardware-driven and hardware dependent. Another issue that these conventional systems face is in cases where integrated access control has to be enabled at multiple interfaces. For example, an Access control system requires a two-step authentication, the first at the entrance door and the second at a computer system.

Why use facial recognition over legacy systems?

  • Presently, there are many technologies like Fingerprint recognition sensors, RFID ID cards, and password-based security systems that are being used in the market. These technologies have served us well from time to time but with the modern challenges and scope of new technologies requiring more non-contact tools Face Recognition technique is proving of great worth in the market.
  • The legacy system has a dependency on hardware and on the contrary facial recognition system needs no interaction with hardware. Any damage to the fingerprint sensors for example can lead to a duly maintenance charge whereas a camera in this system can reduce this extra cost and hence it is economical to maintain.
  • The security in the facial recognition system is also very reliable compared to the other systems as it is very difficult to breach a system with minimal hardware, in this case a simple camera. The easy integration and implementation of this technique over the different hardware-based systems in multiple locations using a cloud-based approach are helping the user to use it for multiple purposes like it can be used for surveillance and granting access at physical barriers.

Working Methodology of Face Recognition

Every human being has a different face structure that means every individual has unique facial features which distinguish them from each other. Thus detecting facial landmarks will help to label and extract face regions.

These facial features are called nodal points. Each human face has approximately 80 nodal points.

Some critical data points are :

  • Distance between the eyes
  • The width-to-Height ratio of the nose
  • Depth of the eye sockets
  • The structure and shape of the cheekbones
  • The length of the jawline

These nodal points are measured by creating a numerical code and sub-millimeter scale, called a faceprint, representing the face in the database.

The facial recognition system goes through various steps.

Step 1: Detection of faces

The initial process starts with identifying the facial features of humans, finding common features that we find on most common human faces. The set of parameters will include eyes, nose, cheeks, and mouth and the common features will include dark eye region compared to upper-cheeks and face, a bright nose region compared to the eyes and other parts of the face, and some of the specific features such as difference in intensity between different regions of the human face. This entire process is done using deep learning, image processing, machine learning algorithms on a large dataset of images.

Histogram of oriented gradients is used for extraction of the parameters and features in the human face detection process and the linear support vector machines are used to produce a similarity metric between different images thus helping in classifying the human faces. Different sets of tests are carried out to find out the classifier which will optimize the detection of human faces in the picture and multiple video frames.

Both HOG and SVM algorithms do the task of extracting feature vectors called embedding, feeding images to the feature descriptor extraction algorithm; and then quantifying individual faces in an ima

Step 2: Feature Extraction

Once the face is detected with the help of algorithms, the software is trained with the help of computer vision algorithms to detect the facial landmarks. In the human face, each landmark is the nodal point and each face has nearly 80 nodal points. Thus these landmarks act as a key difference between distinguishing individual face landmarks present in the database of the system.

After this process, the image is operated using computer vision in adjusting its position, size, and scaling the human face which will help the software to recognize the user face whenever the user’s face moves or does any kind of expressions.

A convolutional neural network (CNN) has become the main method adopted in the field of face recognition. The different layers of the CNN model are modeled into one single layer based on the trained dataset thus improving the face recognition rate by the software. CNN is used to extract the features from the input images and then computes the 128-d embedding vector for every face in the dataset, and then using the triplet loss function CNN improves the weights of the network. Thus insisting on the high accuracy of CNN compared to the HOG face detector as the pre-trained model is trained with aligned face image from the dataset in the software.

The Triplet loss function takes different face encodings and features of three images from the dataset that is anchor, positive and negative. Anchor and positive are the images of a similar person and negative is an image of a different person.

Triplet loss reduces the distance from the dataset which are positive examples and increases the distance from negative examples from the dataset. Euclidean distance of individual images shows a similar triplet loss function from the embedded images. Thus the model will learn to quantify faces from images and video frames. Thus passing the detected faces to a trained model provides face encoding and returns highly discriminating embedding suitable for face recognition.

Step 3: Train Facial Recognition model

When the facial feature from each image is extracted, then all the key elements and features of the faces are fed into the software, the software generates a unique parameter-based embedded vector for every individual face in the numeric form and sets of extracted data. After generating these features into the system, the attempt to confirm the identity of a person in an image. The numeric codes are also called Faceprint, similar to Fingerprint in contact biometric systems. Each code from the model uniquely tracks the person among all the others in the training dataset using multiple embedded vectors. The feature vector and then embedded vector are then used to search through the entire database in the dataset of enrolled users during the face detection process.
The process works on the verification of individual persons from the dataset, such as a security feature in different identification applications.

The Machine Learning algorithms are fed into the software for training the dataset using different algorithms such as Support Vector Machine, KNN Classifier, Random Forest, and providing the training data so that the testing dataset can be trained from the training dataset. These ML algorithms help the system in identifying the faces of people

Step 4: Face Matching and Recognition

The face matching and recognition process start with an algorithm that learns what a human face is. Recognition of face is done by extracting the face from the image and generating a 128-D vector of the face. Then, we use that embedded vector to decide if the features extracted from the new sample are matching or not with the current image.

3D image feature patterns are applied into 2D images which ideal is training and testing the dataset.

Alignment:

The final alignment process is done after the face matching and recognition are carried out. Thus storing the final image in the database.

Hence recognition accuracy increases by aligning the human faces based on different features of human face such as translation, rotation, and scale.

Facial Recognition System used For Security:

Defence Services: The most important application of Facial recognition system is for both public safety and personal also, accessing personal data or information includes personal devices like cell phones and cell phone is part of personal security.

A facial recognition system can be used in government offices or building sensitive areas of government offices and also can be used in public functions or events.

Healthcare Services: Hospitals and healthcare experts can use facial recognition systems to access patients’ health information as well as monitor and diagnose certain diseases.

Marketing Services: Companies may use facial recognition to gather data of customers such as age, gender, and region to better successfully target their advertisements.

Border Or Immigration Services: A facial recognition system can be used to enhance border security, particularly when criminals and people of interest attempt to come into the country.

Travelling Services: A facial recognition system can be used for travelling services in ola and Uber Cabs that, the same system may ensure that the passenger reaches the correct driver or alternatively.

Conclusion

In the Covid-19 outbreak, contactless identification has become the need of the hour, and hence face recognition tool has become a widely accepted tool to reduce the virus spread. From maintaining temperatures to identifying people without a mask, various countries are including facial recognition in their systems and replacing the current contact biometric systems.

Authors :

Darshan Rathod
Vivek wani
Shivani Jadhav
Tarun Rai

--

--