0%
Emotion Detection

The Night Shift and the Birth of an Idea

April 202315 min read
Last Updated: June 2023

Let's face it, 'Six Feet Under by The Weeknd' isn't the most practical team name, but building practical solutions is definitely my thing as an engineer. A recent hackathon threw a curveball – a chance to explore the fascinating world of human emotions.

This wasn't just about crafting lines of code; it was about harnessing the power of AI to understand, and maybe even support people with, their complex feelings.

From Funny Name to Serious Idea: The Birth of the App

The inspiration for this app came alive during a hackathon. Let's just say, the late nights and endless cups of coffee definitely played a role in the creative bit. While our team name, might not have screamed "serious contender", it did spark a surprisingly innovative idea: an emotion detection app that used machine learning.

The Technical Backbone: Emotion Detection and User-Centric Approach

Demonstration of the emotion detection system interface

Imagine this: you're scrolling through social media, feeling a pang of loneliness after seeing everyone's vacation photos. But instead of being bombarded with travel recommendations (which might just amplify that feeling), your phone subtly nudges you towards a funny cat video or a supportive article about fostering connections. This, my friends, is the power of our AI-powered emotion detection app, and it all hinges on a fascinating technique called Retrieval-Augmented Generation, or RAG for short.

RAG: Your Built-in Emotion Whisperer

Imagine you're stressed about a deadline, frantically searching online for research on ancient Egypt. You wouldn't want to be bombarded with a million random websites, right? That's where RAG comes in, like your own personal research assistant with a bottomless library at their fingertips.

Here's how it works: Let's say you type in "history of pyramids." RAG, the super-sleuth, instantly dives into its vast collection of credible sources – think academic journals and top-notch websites. It doesn't just throw everything at you, though. RAG acts like a curator in a museum, picking out the coolest exhibits: the groundbreaking discoveries, the mind-blowing architecture, the unsolved mysteries of the pyramids.

Beyond Recognition: Leveraging Retrieval-Augmented Generation (RAG) for User Support

Simply knowing someone's feeling a bit down isn't particularly helpful. That's where Retrieval-Augmented Generation (RAG) comes in. Imagine RAG as a super-sleuth with a bottomless library at its disposal, but with a keen understanding of emotional nuance. Here's how it personalizes user experience through subtle integration:

  • Emotion Detection: The CNN analyzes the user's facial expressions, discreetly capturing their emotional state.
  • Query Generation: Based on the detected emotion (e.g., sadness), RAG crafts a user-specific query that isn't a dead giveaway. Instead of "Feeling down?", it might formulate something like "Strategies for maintaining motivation."
  • Knowledge Base Retrieval: Armed with the subtle query, RAG dives into its vast knowledge base of credible sources.
  • Content Curation: RAG curates the most relevant information but tailors it for seamless integration. Imagine feeling a tinge of loneliness while scrolling through social media. RAG wouldn't bombard you with articles titled "Beat Loneliness Now!" Instead, it might subtly inject a link to a heartwarming video about fostering friendships.

The Art of Subtle Nudges: Balancing User Privacy and Emotional Wellbeing

Visual representation of the emotion detection privacy features

One of the core principles of our app is user privacy. We understand the potential discomfort of being blatantly told you're feeling a certain way. That's why we leverage RAG's power for subtle yet effective support. This approach ensures a user-centric experience that prioritizes both emotional well-being and privacy by providing indirect nudges towards helpful content.

Beyond the Prototype: The Future of Emotion-Aware Tech

This project is just the beginning. We're constantly refining the prototype, incorporating user feedback, and exploring the vast potential applications of this technology. Imagine educational materials that adapt to your emotional state, or a fitness app that offers personalized encouragement based on your mood.

As we continue developing this technology, we hope to achieve a level of emotional intelligence that surpasses even the most dramatic The Weeknd lyrics. Who knows, maybe one day our app will be able to decipher that look you give your significant other when they forget to take out the trash... but hey, that's a story for another hackathon (and a different team name!).

Acknowledgements

Thanks to Akshat Goel for helping build this info-retrieval masterpiece.

No artificial intelligence was used to generate content for this essay.