CookBookCV

Instantly, find recipes using certain foods you want to get rid of, right from the comfort of your phone camera.

Inspiration

Every year, just in the United States, a third of food is wasted. This equates to just about 133 billion pounds and 160 billion dollars worth every year in just one country across the world. Coming from India, a place where millions of individuals starve to death do not have access to even drinking water, this problem truly resonated with our team. That's how we came with the idea for CookBookCV, simply take a picture of the food you have and we instantly return a delicious recipe complete with instructions on how to proceed.

What does CookBookCV do?

Our application has three main aspects:

First, the user must open up our iOS application and snap a picture of the leftover food they have. Our Machine Learning algorithm then instantaneously recognizes the foods in the photo and sends the array of ingredients directly to our Python Flask server which calls upon our recipe-finding function. Now, using Pandas and NumPy, the function parses through a CSV file with over 60,000 recipes scraped from several food-related websites and matches the inputted ingredients with one of the recipes. Once the recipes are identified, the function returns them back in an array including the title, ingredients, and instructions on how to actually make the dish. This process, while it may seem tedious, occurs in only a couple of seconds!

Challenges we ran into

Our major challenge when creating CookBookCV was to train our Machine Learning model to get a high-enough accuracy on the object (food) detection. We wanted this application to be as seamless and easy-to-use as possible for the end-user and this required us to put in countless hours in trial and error to optimize our code and make it work within seconds.

Accomplishments that we're proud of

We're proud that we were able to get the entire app functional after several trials and errors. Initially, it was difficult to connect all the individual parts of our code but with teamwork and perseverance, we triumphed at the end. Within a week, we were able to create an app that essentially has unlimited potential all across the world, and our team is very proud of that.

What we learned

Overall during this past week, we learned:

  • How to work together efficiently and effectively with team members to create a functional product with the end-user in mind
  • Using Flask to connect the Swift application to the Python recipe function
  • Optimizing functions to run in the least amount of time as possible using different techniques with Pandas and NumPy
  • Reading files from a server with Flask
Share this project:

Updates