Face Recognition

What is face recognition?

Face verification vs face Recognition

verification

Recognition

One Shot Learning

Similarity Function

During the verification,

if d(img1, img2) then “same”
if d(img1, img2) then “different”

Siamese Network

Siamese network is a good way to input two faces and tell how similar or how different they are.

Parameters of NN define an encoding which is 128 dimensions. Learn parameters so that: if and are the same person, is small

Triplet Loss

We want: for above example.

is added to make sure that the neural network doesn’t just output zero for all the encoding. is also called margin.

Loss Function

Given 3 images A, P, and N,

So if then

and cost will be

Traing Set

If 10K pictures of 1K person, then you classify 10K to A, P, or N for 1K person.

Choosing the triplets A, P, N

During training, if A,P, and N are chosen randomly, is easily satisfied.

So to train the neural networ, choose triplets that are hard to train on. Choose

Face Verification and Binary Classification

Where is 0 or 1

Instead of feeding in two separate encodings, alternatively,

where is the encoding of image the substitute means to just select out the components of this vector.

Another way to obtain 128 numbers is formula

Reference

Y. Taigman, M. Yang, M. Ranzato and L. Wolf, (2014). DeepFace: Closing the Gap to Human-Level Performance in Face Verification, 2014 IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, pp. 1701-1708. doi: 10.1109/CVPR.2014.220