Our diet as college students look all too familiar - instant noodles, coffee, pints of ice cream, granola bars, and frozen meals. We often settle for the most convenient meal or snack, without thinking about how our emotions can negatively influence our food choices. Rather than getting energized, overly sweet granola bars result in more tiredness and sudden drops of energy levels. Instead of bringing convenience, frozen foods ensue bloating and long-term digestive issues. Our emotions influence what we decide to eat, and this becomes an issue when we don't know what foods can prolong our state of happiness or bring us to a state of relaxation when angry. Why not create an application to solve an issue many of us are facing? And one that makes suggestions that are mentally and physically beneficial for our bodies?

What It Does

Food4Mood is an emotion recognition web app that uses facial expressions. When a user is on the website, he/she is prompted to take and submit a photo for examination. Upon obtaining image data, Food4Mood analyzes what facial expression is most heavily conveyed in the photo and the program recommends various food options to boost the user's mood, whether it be happiness, sadness, anger, surprise, disgust, and even neutral.

How We Built It

We started by building a web application with Flask, then utilized HTML to create a web page that would eventually display our program as well as capture images from a local camera. In order to operate Food4Mood and make it available to everyone, we deployed it in Microsoft Azure’s cloud services. And, through the implementation of Azure’s Face API, our web app is capable of analyzing camera data. Lastly, we developed the actual web app to capture frames and recognize specific emotions. The combination of Flask, HTML, Python, and JavaScript on Microsoft Azure led to the completion of our Food4Mood program. we provide with more than one options of foods, due to potential dietary restrictions.

Challenges We Ran Into

  • Communication between front and backend web development
  • Having to quickly learn HTML, JavaScript, and Flask from scratch
  • Not all members had expertise on the chosen programming language for our project
  • Identifying data structures used to store our information

Accomplishments That We're Proud Of

Not having known each other before AthenaHacks, we are pleased with how well we worked together and translating that into a tangible product. All members have never had any hacking experience before, and we are incredibly proud we built an emotion detecting web application using facial expressions in less than a day.

What We Learned

  • Working with cloud services, more specifically, Microsoft Azure
  • Working with facial recognition
  • Creating a web app
  • Implementing APIs
  • Working with Flask Python
  • Application deployment in the cloud
  • How to develop and build a product in less than 24 hours

What's Next for Food4Mood

  • Taking into consideration age, pregnancies, and dietary restrictions before suggesting foods to consume. While we have kept those with dietary restrictions in mind, we want to explicitly state these in the food recommendations.
  • Incorporating age estimations to analyze which foods are best to recommend for which age demographics.
  • Further developing our program to add a speech-to-text feature. Instead of requiring the user to take a photo, one can simply verbalize how he/she is feeling to get food recommendations.
  • Creating a mobile interface that displays the same application through a chatbot. This would offer a more convenient and quicker experience, rather than having them visit a website.

Food Options Research Links:

Built With

Share this project: