Face Id: Deep learning for face recognition

Youssef Fenjiro
4 min readJul 16, 2019

--

With Deep learning, the development of facial recognition capabilities has made a big step forward with the Face ID technology breakthrough from Apple. This technology is a biometric facial recognition algorithm that performs user’s authentication and can be adapted to many use cases like:

  • Unlocking devices like phones or computers
  • Unlocking Doors and Systems
  • Validating online transactions (especially the financial ones)
  • Authorizing online purchases payments
  • Mass Surveillance in airports, Railway, stadium, government offices, and business establishments, or for the whole population like in China (citizen score).

Face ID turned out to be much more reliable and secure than traditional facial recognition done by a simple 2D front-facing camera and much more effective tracking tool than fingerprints since it doesn’t require physical contact for identification.

The technology behind is Deep learning that shows excellent ability in learning image features, which simplify the data classification and face recognition based on 2 neural networks types:

  • Convolutional Neural Networks (CNN, or ConvNet) is a class of deep feed-forward artificial neural network that has successfully been applied to analyzing visual imagery. CNN is used in supervised learning for classification and object recognition/detection purposes, in unsupervised learning for image segmentation and image compression.
  • Deep autoencoder networks are used in unsupervised learning mode for dimensionality reduction. It tries to learn transformations that compress the input using the encoder f() to shrink it via a bottleneck (2 or 3 neurons) and recompose it using the decoder g(), to approximate the identity function, so as to output that is similar to f() and g() are both non-linear neural networks (see the figure below). The Autoencoder shrinks image representation into a simple vector, which minimizes the time of searching by optimizing the matching operation.

How Face recognition Work?

Face recognition is often described as a process that first involves four steps; they are: Face detection, face alignment, feature extraction, and finally face recognition.

  1. Face Detection. Is an object recognition problem, which purpose is to locate the user’s face in the image and delimit it with a bounding box. it’s based on convolutional network and uses algorithms like Faster R-CNN, YOLO YOLO( You Only Look Once) or SSD (Single Shot Detector).

2. Face Alignment. Normalize the face to be consistent with the database, such as geometry and photometric.

3. Feature Extraction. Extract features from the face that can be used for the recognition task. it’s based on the convolutional network and autoencoders to shrink the feature vector.

How Face ID Work?

FaceID uses five different photonics components to project a grid onto the user’s face, facial features distort the grid, allowing a topographical map to be made

  • Regular camera
  • Flood illuminator: it’s an infrared light that shines at your face, and allows to detect the face in front of the camera, even in low-light situations or if the person is wearing glasses or a hat.
  • Dot projector: shines more than 30,000 invisible infrared dots light onto your face, building a depth map that can be read by the infrared camera
  • Infrared camera: infrared light can see in low lighting conditions, in the dark and also through sunglasses to detect your gaze, and the system will still recognize you if enough data points match. The dot map is then read by an infrared camera and the structure of your face is relayed to the neural network.
  • True Depth camera: reads over 30,000 infrared dots to form a depth map of the geometry of your 3D face, along with a 2D infrared image, which is used to create a sequence of 2D images and depth maps that are pushed through the already trained neural networks to create a mathematical model of your face.

--

--

Youssef Fenjiro

Data scientist, Machine learning & Artificial intelligence.