Facial Recognition on a Raspberry Pi?

Researchers at Kocaeli University recently surprised many by training and running a facial recognition model on a Raspberry Pi, a single-board computer typically used for hobbyist projects. The team leveraged two key factors to make it work: choosing an appropriately-sized model for the available hardware resources and using transfer learning.

They selected MobileNetV2 and InceptionV3, relatively small yet highly accurate models with 2.2 million and 23.8 million parameters, respectively. These models fit within the Raspberry Pi’s memory constraints and reduced computation requirements, allowing inferences to run at an acceptable speed.

Transfer learning was crucial for training these models. A pretrained model is used as a starting point, already knowing how to recognize faces from millions of images. The researchers then further trained the model using a smaller dataset of 1,000 images, adapting it to specific use cases and recognizing relevant faces.

The results were impressive: MobileNetV2 achieved an average accuracy rate of 98 percent, while InceptionV3 reached 91 percent. Training time was around 102 minutes for MobileNetV2 and 186 minutes for InceptionV3, which is manageable considering it’s a one-time activity.

While the Raspberry Pi may not become the go-to platform for machine learning engineers, this experiment demonstrates the possibility of incorporating impressive features into projects. What ideas do you have for machine learning-powered applications on your Raspberry Pi?
Source: https://www.hackster.io/news/a-slice-of-ai-05e00e91388f