# Project Friday 1.4: A.I. & Coffee – It’s Alive!

It’s raining cats and dogs, the fridge is stuffed with cold beers and the Spotfiy playlist Coffee House is blasting through the office. In other words, a perfect time to work on our coffee machine with face recognition capabilities. And today we had our own dr. Frankenstein moment. It’s alive and it works!

Last Christmas, everyone at Cmotions was photographed professionally. These photos are the input for the face recognition algorithm. We started out by using the face recognition package in python, which detects key facial points (edges of eyes, nose, mouth, etc.) and estimates the distances between those points. The algorithm was way too slow, so we used face detection first. Using pretrained Haar Cascades, we first extract a face from a picture and that pass to the recognition algorithm. Next step will be to train our own recognition algorithm and to implement some easter eggs, like when you flip the finger, it give you a double shot of espresso. Or trying to identify your facial expressions and when you’re angry it brews your coffee extra strong. If you got any ideas, let us know!

As stated in earlier articles, we do this for the fun of it and to learn new stuff.

Pandas, does that make the picture black and white? – Joost

One of the things we had to learn about is electrical engineering. At Cmotions, we know data and how to use it in order to retrieve information out of it (like extracting faces from a bunch of pixels in a photo). The soldering part and especially figuring out on to which point we needed to solder took some trial and error. See part one here, where a colleague short circuited the Arduino within ten minutes. The first Frankenstein moment was when we we’re able to say, with Python, that we wanted a coffee and it actually makes a cup of coffee.

The second Eureka moment was when we integrated this with the Face Recognition scripts on the Raspberry PI. It’s Alive! And how do we know it’s working? Well, after testing it on our faces, we came up we the (quite brilliant) idea of showing Facebook photos of colleagues.

2 replies

1. […] immediately for a follow-up action, I favour Python. For example, we are currently working on a coffee machine with facial recognition, and we are building that in Python. Because once the algorithm has […]

2. […] worden voor een vervolgactie valt mijn keuze vaak op Python. Zo zijn we bijvoorbeeld bezig met een koffiezetapparaat met gezichtsherkenning en dit bouwen we in Python. Nadat het algoritme de persoon heeft herkend, […]