Description:

Growing up, I always wanted to change the world, but I wasn't often thinking that "charity begins at home". Somehow, the problems I faced in my everyday life have always seemed insignificant compared to global warming, economic inflation, and poverty. But - what about when the same problems are reoccurring in millions of households around the world? Roughly one-third of the food produced for human consumption goes to waste - and a large percentage of that is simply for lack of access to organized knowledge. Our project culminates in an app that tracks your groceries, and makes sure you remember to use it (or donate it!) before it needs to be thrown out.

Inspiration:

I've already had to throw out half of my grocery haul from last week. Let's be real, so has everyone else I know. Bananas go on the counter, milk in the fridge, and chicken in the freezer - who knew? Last month's food poisoning suddenly seems like it could have been very avoidable. Despite daily desperate Google searches, I still forgot that my mushrooms needed to be used up within 3 days. For someone who's an avid foodie and exceedingly organized, I'm pretty disappointed in myself. Add to that my strained grocery budget, and painful awareness of food insecurity around the world - and I'm drowning in an ocean of shame. Thankfully, there appears to be a simple solution to this ubiquitous problem, and I'm glad we have the time and resources to vanquish our food-wastage demons once and for all!

What it does:

Our web app tracks your groceries and their shelf lives. Every time you buy or use any of your food, just make sure to log it on your virtual fridge. After a new grocery haul, you'll know exactly where to put each food item - on the shelf, in your fridge, or in the freezer. There's no lengthy data entry or barcode scanning involved - just snap a photo of each food item and our app automatically detects what it is! You'll get a warning when an unused item is approaching its use-by date, and a reminder to throw food out when it's no longer safe for consumption.

How we built it:

The app took a photo from a live video stream of the computer's webcam and sent it through Clarifai's public food recognition model. The output was matched with the chart we created of shelf lives of common grocery items. The backend was written in Python and the server end which interfaces with the SQLite database was created using the Flask framework. The frontend uses the Semantic UI CSS framework, and minor jQuery for AJAX requests and actions.

Challenges we ran into:

One of our first setbacks was losing one of our team only 4 hours into hacking, which was still too late to find a replacement. The initial plan was to make an Android app, and he was the only one who had an Android device. Only one out of our remaining three computers ever worked with an Android emulator, leaving us seriously questioning our technology choices. We spent hours poring through Android Studio tutorials and attending Android development workshops, and even some time trying to learn React native as an alternative front-end technology. Even though our final product is a web app, throughout most of the hackathon we were simultaneously developing on multiple platforms hoping that at least one of them would work out in the end. The second most significant challenge we faced was realizing that in spite of the multitudes of food safety data available on the internet, there were no accessible and aggregated sources of shelf-life information. Even though we found a few charts on pdf files, we didn't have the expertise to learn to scrape data from them and convert to a CSV or JSON file in the time available to us. This issue was complicated by factors such as the ranges of shelf-lives typically listed on charts (e.g. "3-5 days if opened or 6-12 months if unopened") which were hard to average out into a single number for the purposes of our algorithms. We eventually decided to manually create a database of optimal shelf-lives of commonly bought produce, meat/fish, dairy and baked goods under unopened/unsliced conditions.

Accomplishments that we're proud of:

Firstly, for each of us, it was only our first (or second) hackathon! The entire format and culture of hackathons was alien and overwhelming for us to start. We thought of many possible hacks, but didn't know enough about the effort required or technologies involved in pulling them off. The fact that we took an idea that felt important for us (rather than something which sounded flashy) and created a working prototype of an app - is something we're very proud of. Coming in with limited exposure to the technologies out there, we're pretty amazed by our learning curve this weekend - as well as the fact that we were able to successfully interface multiple technologies and resources.

What we learned:

Don't limit your dreams! - cheesy but true. We've dreamed for years of changing the world and never felt like we were good enough. We finally feel like in this niche we're creating something that doesn't already exist but is sorely required for the progress of the earth. Additionally, each of us learnt to work with 3 or more brand new technologies this weekend - a possibility we'd have scoffed at last week. Sadly, we learnt that Android isn't a very reliable development platform. Android Studio took hours to download, install, and load functionality, and the emulator didn't work on 2 out of 3 devices.

What's next:

Lots! There's sadly a limit to what you can accomplish in 33.5 hours! The first thing we'd like to accomplish is to expand our database by scraping current food-safety charts (none of which is currently in a format that's easily accessible through code). What's next on our list of priorities is to incorporate the functionality to display shelf-lives for multiple storage locations. For instance, butter can keep well at room temperature for 2 days, in the fridge for 1 month, and in the freezer for 6 months. We also want to be able to display item-specific notes. For instance, it's recommended that you ripen your apples at room temperature before putting them in the fridge. Peeled and unpeeled onions have different storage recommendations. The expiration date for milk can be calculated relative to its sell-by date....and so on. Also, what signs (texture, smell, visual) should you be looking for to tell whether your food just isn't at its best, as opposed to unsafe for consumption? Finally, we were inspired by an idea pitched to us by another student - many recipe websites will show you ingredient lists and also allow you to add the foods to a virtual shopping list or cart. Using that ingredient data could allow our app to predict how far into the future you could hope to make a particular recipe, relying solely on the foods currently in your fridge. (Alternatively, how far in advance should you shop for Thanksgiving or that birthday meal?)

Built with:

Python, Javascript, Flask, HTML, CSS, SQLite, jQuery, Clarifai, Sublime Text

Prizes we're going for:

TBI Pro Gaming Headset

$100 Amazon Gift Cards

Grand Prize

Jetbrains Pro Software

Lutron Caseta Wireless Kit

Misfit Shine 2

Team Members

Will Pine, Meghadeepa Maity, Julia Beatty
View on Github