Virtual Leo Has the Best Users

Last year, my wife took part in Researchers’ Night in Cagliari. She ran an activity where visitors, mostly kids, could stand in front of a camera and let an app guess their facial expression. This year, the app was gone. At last, a small emergency that called for my particular skills: more than 25 years of hacking away on computers, an MSc, and more than 10 years working with AI. The prompt to GPT-5.6-sol boiled down to:

build a Python app that uses my camera to tell me which mood I’m showing

happy, sad, neutral, and so on

make it flashy

The first Flask version did about 95% of what I wanted and worked out of the box. Mood Mirror was born. MediaPipe finds and crops the face, then HSEmotion’s enet_b2_7 model (an EfficientNet-B2 classifier) scores seven facial expressions. This takes me back to the days when I had to develop the face-cropping algorithm myself, battle with the index system of numpy and opencv, then semi-automatically expand the dataset to fine-tune the model.

A professor in my wife’s department has a very photogenic poodle called Leo. Leo had other business to attend to this year though, so he couldn’t come to the event. I decided the app should solve that problem too. Mood Mirror puts a poodle on screen that copies the expression of whoever is in front of the camera, using one of several pregenerated images (Images 2.0).

Virtual Leo looking sad Virtual Leo looking angry Virtual Leo looking happy

The kids loved it. Many tried to look sad or angry, saw the dog, and immediately smiled. Sadness turned out to be a difficult expression to hold in front of a poodle. The activity was interesting to watch for another reason: some kids had trouble bringing out a sad or angry virtual Leo because their own expressions barely changed. Perhaps that was the point of the exercise. We might think our emotions are visible to others while our faces remain neutral or hold a slight smile. Yours truly is probably doing that.

I wasn’t sure what device they would use, so I also made an Android version. About half of the “development” time went into figuring out the exact tablet model and how to deploy to it. The Android app needed a few rounds of small fixes. The Flask and Android apps took roughly two hours altogether.

SaaS might not be dead yet. But if you need a small app for a laptop or an Android tablet, an hour or two can get you quite far.

Final conclusion: Maybe I should make more apps for kids. I’ve never had users with such big smiles on their faces before.