simple facial recognition system

Last update: 30 May 2021

Basics of facial recognition systems

The way facial recognition systems works is as follows: First, you feed the image to a neural network that detects and localizes the face. Then you pass the cropped face to a second neural network that encodes it in a vector in a high dimensional space.

In order to recognize the same person from another image, you follow these steps to calculate the representation vector. Then you measure the similarity between these two vectors using this similarity equation: Finally, you define a threshold. If the similarity is bellow that threshold, then it's the same person otherwise it's a different person.

To see this in practice, I created a web app that lets you play with this.


  1. Clone the app from github
$ git clone
$ cd facial_recognition_app
  1. Install the dependencies
$ make setup
  1. Run the app
$ make run
  1. Open this link in your browser and upload your own set of photos.


These are some examples where you see that the system recognizes well Elon Musk.

Read more ...

Create your own image for jetson nano board

The ultimate python development environment

compile deeplearning libraries for jetson nano