Over fall break, two of us were in a hurry to get to the airport to make it onto our flights on time and forgot about preparing the apartment for our five day absence. Although for the most part this proved not be an issue, we encountered one significant issue upon our return– much of the perishable foods that we had purchased at Harris Teeter two days prior to our departure had expired; in fact, several items had even accumulated mold and begun to smell extremely unpleasant. A simple reminder of some kind would have saved us close to $100 worth of groceries and a lot of trouble. Thus was born our first idea for WasteNoMore, an app that would keep track of all grocery purchases and their associated expiration dates, automatically reminding users several days prior to the expiration of perishable foods, with reminders increasing in frequency until marked as resolved by the user.

What it does

WasteNoMore is an iOS app that allows users to keep track of all perishable items purchased at any point at a grocery store. The app scans receipts and automatically enters all perishable foods into the system. Once a food is entered into the system, the app will send push notifications beginning three days prior to estimated expiration and will continue to send notifications up to the day of expiration until the user marks the food as resolved (either the food is eaten or thrown away, presumably).

How we built it

Our app has two components. The first is a utilization of Google Cloud’s Optical Character Recognition, which allows us to scan and parse through receipts, outputting an array that contains items on the receipt, which have been screened to not include strings that contain numbers, punctuation, or are common receipt words ("subtotal", "total", "tax", etc.). The second component is coded in Swift on the Xcode platform. Here we compare all of the items found in the receipt to a hardcoded list of foods and associated estimated expiration horizons. If a food from the receipt is also contained in our hardcoded database of foods, we take the estimated expiration horizon and apply it to the current date, creating a projection for when a certain food is likely to go bad. Now that the food is in the system with an associated expiration date, the system is able to send push notifications to the user’s phone, beginning three days prior to the expiration of a certain food and continuing until expiration or resolution.

Challenges we ran into

It was difficult to implement the client library for Google Cloud Vision. However, once some authentication issues were resolved, it was rather simple to use the commands given by the Google Cloud Vision documentation. In addition, team members worked on various aspects of the code on their own computers, so we ran into some problems with integration when it was time to bring all of the code together.

Accomplishments that we're proud of

We are very proud of the fact we were able to implement Google Cloud Platform into our project. It allowed us to pull and analyze text from an image of a receipt.

What we learned

We learned how to use and connect many different software components. Upon familiarizing ourselves with Google Cloud, we learned the API for the Optical Character Recognition and the process by which a document can be scanned and only certain words outputted based on a parsing system. In addition, we learned how to parse JSON files using Xcode and use Xcode UI view controllers to make a fully-functional custom camera.

Built With

Share this project: