What happens in an MCU face recognition model
In this section of the guide, we provide an explanation of what is happening in our facial recognition model. At the core of our model is a powerful convolutional neural network. After training, this model will calculate a facial fingerprint for every face that it is shown.
An Arm microcontroller-based device like a Cortex-M4 or a Cortex-M7, stores a database of known facial fingerprints belonging to people who we would like to recognize. When the model tries to identify a new face, the model calculates the facial fingerprint and compares it to the facial fingerprints in the database. If the facial fingerprint is similar enough to a facial fingerprint in the database, the model outputs who it thinks the face belongs too. it is. If the model does not recognize the facial fingerprint, then the model outputs that it does not recognize this new face.
To get our model to produce good facial fingerprints, we train it on a classification task. We train the network to correctly classify the images of different celebrities. If you are working on your own model you can use a public dataset that contains images of celebrities, for example the CelebA dataset.
Note: To make sure that we had an unbiased and robust facial recognition model, we used training data that contained images of celebrities from a variety of different ethnicities and races.
After training to a suitable accuracy, we removed the final classification layer of the model. What is left is a model that produces a feature vector as our facial fingerprint. By learning to classify many different people, we hope that the model has also learned to embed knowledge about different face characteristics within this feature vector. Some characteristics of the face that the model may use, include the distance between eyes or size of mouth which could be used to distinguish people’s faces.