How to Make a Theme Music Machine using Face Recognition
Have you ever wanted to walk into a room and have it play your entry music? You don’t just want anyone to have the song though, you want your song. Introducing, a ridiculous amount of overkill to produce the world’s first theme music machine. Full screen to see laggy effects.
Requirements:
Raspi, raspi camera, python, and some speakers
Inspired by this medium post, I could hardly break down the technology any better.
One thing to note that some people misunderstand is that we essentially take the neural network, and train it to distinguish faces. It would actually be too computationally expensive to use it as the classifier, so instead we use the neural network to reduce a full size image to say 16 numbers (explanations on why memory usage is a bottleneck in edge computing for neural networks on my blog here) and then run a faster SVM model on these embeddings to identify who’s face it is. Google researches really pushed it forward in 2015 such that now it’s accessible to many through a python package called facerecognition.
The algorithm flow goes : haarcascade (cropping to location of face) -> neural network (for creating the embedding) -> SVM (classification of person’s face)
It got pretty good once we fed it 15-20 photos of us at different angles, even picking us up underneath face masks (everyone should have a good skincare routine)