Appearance Invariant Face Verification using Deep Learning!

Siddharth Dayalwal
4 min readJun 16, 2020

--

Face verification is a one-to-one mapping of a given face against a known identity. People often go through several changes in their appearance. For this purpose, a system has to be designed that can verify a given identity even if there is a variation in their appearance.
In this article we will train a deep learning model to match face images of a person in varied facial appearance. It explores and compares some few modern face recognition models and also tries to fine tune and replicate those models.

Team:

Harshavardhan Abichandani
Juby Susan George
Siddharth Dayalwal

Mentor:

Surbhi Gupta

Introduction:

Face Recognition technology is rapidly maturing and its application potential is ever expanding. Today, there are face recognition systems that perform relatively reliably under controlled illumination conditions and under certain other restrictions (e.g. orientation of the face comparatively to the camera).

It is still very challenging to perform face recognition in disguised faces, something of particular interest in high-end security applications (e.g. embassy perimeter surveillance, airport security, etc).

Several pre-trained models available for face verification nowadays. Siamese Networks using triplet loss functions have been extensively explored for the same purpose. Siamese Network is a model architecture used alongside a distance-based loss.

Siamese Network architecture

Proposed Method:

Triplet Loss: Triplet loss minimizes the distance between an anchor and a positive image, both of which have the same identity, and maximizes the distance between the anchor and a negative of a different identity.

The Triplet Loss minimizes the distance between an anchor and a positive, both of which have the same identity, and maximizes the distance between the anchor and a negative of a different identity.

Images are embedded into a d-dimensional Euclidean space. This loss is motivated in the context of nearest-neighbor classification. Here the loss function is ensuring that the embedding of image A (anchor) should be closer to all other images of the same person (positive) than it is to any image of any other person (negative).

Mathematical Equation — Triplet Loss Function.

Experimental Results and Discussion:

FaceNet: FaceNet learns mapping from face images to a compact Euclidean Space where distances directly correspond to a measure of face similarity. Once this is done, tasks such as face recognition, verification and clustering are easy to do using standard techniques (using the FaceNet embedding as features)

The model was experimented with multi-dimensions and 128D was chosen as the best performing one.

ZF net model used in FaceNet

Performance of FaceNet on LFW: The optimal threshold used for L2 distance calculation is 1.242. The accuracy achieved with Fixed Center crop of the lfw images is 98.87%. Using a proprietary detector such as mtcnn, the accuracy is 99.63%.

FaceNet Results

The best configuration was with 128D embedding layer size and with alpha 0.2. It was tested on 1282 pairs of images and an accuracy of 94% was obtained

Epochs: 50 Embedding Layer Size: 128 Alpha: 0.2

Conclusions:

Recent deep learning models have slightly better accuracy compared to the previous models. We have seen new approaches to the problem and new loss functions like center-loss, range loss, ring loss etc.

Even though these models perform exceptionally well on datasets like LFW, they are still far from being perfect in the real-world scenarios.

During the past few years, face recognition and face verification have played a huge role in security and privacy.

By using different approaches to face verification, facial bio-metrics can gradually be applied to more industries, manufacturing, construction, law enforcement and healthcare.

References:

[1] https://www.cs.cmu.edu/~rsalakhu/papers/oneshot1.pdf
[2] https://medium.com/@susmithreddyvedere/triplet-loss-b9da35be21b8
[3] https://www.geeksforgeeks.org/facenet-using-facial-recognition-system/
[4] FaceNet: A Unified Embedding for Face Recognition and Clustering https://arxiv.org/abs/1503.03832
[5] https://arxiv.org/pdf/1804.06655.pdf

YouTube Video:

Summer Internship ’20 | Bennett University | LeadingIndiaAI | Appearance Invariant Face Verification

--

--

Siddharth Dayalwal

Crowdsource Influencer | CodingBlocks ~ HackerEarth CA | Mentor | TechSpeaker | Community Lover | Blogger | Hackathon Enthusiast | He/His/Him