Can some one explain how Facenet model works in detail and simple words .

  • $\begingroup$ Facenet isn't a neural network developed by Google, but it's a collection of academic articles about Facenet which were published since 2015 in different magazines like Biometric Technology Today and International Journal for Research in Applied Science and Engineering Technology. $\endgroup$ – Manuel Rodriguez Nov 8 at 18:48

Facenet is a Siamese network. It's basic architecture is this: enter image description here The input(a face) is fed through a deep convolutional neural network and also a fully connected layer at the end. The fully connected layer at the end output an embedding of the input image which is a predefined size. The embedding can contain feature that human understand or maybe not. The embedding represent the input image, just in a "compressed" form.

To further explain that, let me give an example. Let's say that you have to describe a face. What's will you say? You will probably say something like the face is round, the eyes are blue, it is a female face and more. The neural network is doing what you are doing, describing the face, but using numbers instead of words.

To do a face recognition task, the network take an pre taken image of the list of people to recognize and the unknown new data from the people to be recognised. It then feed both images into the network and get the embeddings. The network then calculate the distance of the two embeddings, using some metric such as squared error or absolute error. In the image it uses the squared error. If the error is below a certain threshold, the face is recognised. If not, it then loops through the other pre taken images in the set of faces of the system and do the task again. The system stores embedding of the pre taken images before hand.

For training the FaceNet, triplet loss is used. Triplet loss has been explained in another of your post, by me. What is the formula used to calculate the accuracy in the FaceNet model?

Basically, the model is trained using the triplet loss as it can train the network to output a similar embedding for the same person and a very different embedded for a different person.

Sometimes, a binary classification end is also used. It removed the need of the triplet loss and outputs a number from 0 to 1 for similarity instead. This removes the triplet loss part.

Hope my answer can help you and have a nice day!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.