Face Recognition
How does it work?
Basically the computer analyzes an image to find if there is an object matching human facial features.
For example, normally a person has two eyes, a nose and a mouth and generally the brightness of these parts, compare to the face skin, is different. If there is a part in the image that matches features of a human face, the computer will conclude that there is a face in the image.
Therefore, classical face detection algorithm has nothing to do with machine learning.
Face detection with machine learning
The shortcoming of the face detection algorithm is that it only works well with images where front faces can be found. If there is a side face, the computer may not detect it since some facial features are missing.
Nowadays there are some practices to integrate face detection algorithm with machine learning. In this way, the computer can “amend” a side face to front face. This makes face detection more accurate.
Face recognition gate
Different people have different facial features. For example, distance between two eyes and shape of the face. These features can be transformed into data and stored in the database.
When we upload our photos, a piece of data representing our facial features will be stored into the database. When we stand in front of a face recognition gate, the computer will compare facial features in the photo it takes to the mass data in the database and pick the closest one.
Face ID
Apple’s Face ID is far more than the classical face recognition. To make sure there is a real person, more sensors than a camera should be utilized.
Infrared ray sensor, depth camera and pupil recognition algorithm are used to determine whether there is a living creature in front of the camera. Of course, these data would be collected and stored the first time one set up his/her Face ID.