This weekend I spent some time making a simple mobile app for emotion recognition, using Microsoft Cognitive Services. There are several cool APIs there, for instance the Computer Vision API which can recognize content in an image, recognize celebrities, and extract text from images. I guess I just ended up with the Emotion API because it also might be useful for work.
The APIs are well documented, and there are client libraries and sample applications on GitHub, and the client libraries are available at Maven central repository for Java and NuGet for C#. And they are free of use for registered developers, within some limits (30000 transactions pr month for the Emotion API).
I first decided to try to make the app in Xamarin, since it’s now free with Visual Studio, but I didn’t get the the client library to work there, it seemed to be something wrong with serialization in mono, so the library might not be entirely cross-platform (or I messed up somewhere). So I switched to Android studio, and made the very simple demo app there instead.
The app allows you to take a photo, and the photo is then posted to Microsofts service for emotion recognition The service returns a bounding box for each recognized face, together with confidence across the eight feelings; happiness, sadness, surprise, anger, fear, contempt, disgust and neutral.
The initial testing showed that the old doll is neutral, but it also scores some at surprise. The clown was happy with very high confidence, 0.99997, but the clown scored similar on happiness without the nose. Further, the faces of teddy bears and guinea pigs are not recognized, and the same was occasionally true for my husband, too much beard perhaps?