BLOG

SDK on the Spot: Joyzr Uses Emotion AI to Stop Negative Thought Cycles

08.01.17

When we’re having a rough day, there’s nothing like the power of a simple compliment or a kind gesture. Sometimes a light-hearted joke is all it takes to make us feel better. These small forms of positivity have the ability to significantly brighten our moods. Yet, all too often we find ourselves slumping into a spiral of sadness without our friends by our sides to give us these much needed spurts of joy. However, considering we spend so much time on our various forms of technology, why should we rely solely on other humans to offer positivity? As our day-to-day lives continue to be filled with technology, it makes perfect sense to have our phones or computers perform these same random acts of kindness when we’re starting to feel upset.

Joyzr, a software project that uses the Affectiva SDK, was built with this intention. Using a webcam and Affectiva’s emotion-recognition software, the program looks out for strong negative emotions. Once Joyzr detects a negative emotion, it responds with a positive message and a recommendation for a fun activity to cheer up the user. You can check out Joyzr on github.

Affectiva interviewed Dan Gorman, one of the makers of Joyzr, on how his project works, his process of building it, and the role of emotion AI.

joyzr user

What’s the pitch for Joyzr?

Sadness is a slippery slope — whether it’s a bad conversation, a fight with your boss or a terrible code review. It's easy to get stuck in a loop. With Joyzr, you can stop bad moods before they happen. Inspired by cognitive behavioral therapy, Joyzr helps you break out of negative thought cycles by stopping them before they start.

Whenever it “sees” a bad mood brewing, it jumps in with a cheerful message and a fun location suggestion to snap you out of it. Like a friend who always has your back, Joyzr keeps you happy.

Screen Shot 2017-07-31 at 11.15.40 AM.png

What does Joyzr do and how does it work?

Built on PubNub's real time serverless infrastructure, powered by Affectiva's emotion engine and tied together by XapiX's API consumption tool using Giphy, Foursquare and Mapquest APIs,  Joyzr tracks your emotional state in real time through facial analysis. To detect your bad mood, Joyzr uses Affectiva’s emotion recognition software to recognize human emotion based on facial cues. A frown, angry face, and many other physiological responses trigger Joyzr to send you a message to boost your mood.

Where did you get the idea to build it?

Everyone has bad days, and a majority of people work mostly in front of a computer. Our team just felt like it was silly not to involve this incredibly powerful piece of equipment in front of us in keeping our spirits up. Affectiva’s emotion recognition engine provided the perfect tool for us to realize our project.

What was your process in building it?

We explored the various API offerings and Affectiva’s offering stood out as we could build a bridge between human behavior and generating insights and actions based on that. So we started brainstorming on what to do with insights on emotion recognition and came across scenarios where positivity in the workplace can make a true difference for the performance of teams - suddenly we were onto a topic!

To build Joyzr, we used XapiX, a developer-first tool that helps make API discovery, integration, and distribution easy. XapiX saved us hours of development time and made it easy to add multiple APIs into our project. Within no time we were able to retrieve the necessary data which enabled key user experiences on top of the foundation that Affectiva provided for us. You can try XapiX here.

What role does emotion and emotion technology play in the concept of your project?

It’s the centerpiece; emotion recognition is a colossal opportunity for not only technologists but humanity at large. This project is essentially an outgrowth of the belief that our devices can actually help us feel better in an adaptive and unintrusive way.

How did you arrive at Affectiva's technology to help achieve your vision?

There were a lot of technologies available to use for computer recognition, but Affectiva’s specialization in emotion recognition was a clear selling point for our product. The SDK made bringing Affectiva into our project incredibly easy.

How do you use Affectiva?

Our use was actually guided in part by an Affectiva demo we saw on the web. We use the webcam to send a stream of images to Affectiva’s emotion recognition software, and use the feedback from Affectiva to guide our application’s decision-making.

What are your metrics for success, or app goals? How do you believe emotion tech contributes to those goals?

The biggest goal for us would be to have people use Joyzr as one of the tools in their self-care routine. In our minds, the goals and abilities of emotion tech dovetail perfectly with our own. For us, this was a hackathon project which we not only had a lot of fun with but also gained large interest. Happy for someone else to pick this up and run from there!

Do you have any other advice for those looking to build similar projects of their own?

Tools like XapiX and the Affectiva SDK make starting a project easy - don’t wait until next week!

DANGORMAN.pngAbout Dan Gorman

Dan is a NY-born programmer living in Berlin who works primarily in Ruby and Javascript. His interests include running, chess, and sci-fi novels. He is a Software Engineer at XapiX.io.

download emotion SDK to emotion enable your project