Inspiration
Food waste accompanies much more problems than it looks. In a personal level, it is a waste of money; however, on a global scale, it not only creates a huge market inefficiency but also damages the environment. The initial idea was to build a fridge that can detect how much/ what food is left in the fridge by using both a pressure sensor and a barcode scanner.
What it does
Unfortunately, we could not find out the pressure sensor, so we wrote code for simulating pressure sensor and focus on the barcode scanner part. Using the data from openfoodfacts , scanning the barcode brings in all the data about the product including its name, nutrition information, category, and quantity. This information is used to calculate how much greenhouse gas emission is associated during the production, processing, transporting, and retailing of this food - which is the green index !
How we built it
Initially it was meant to be a web application with Flask and python, but because it didn't work it is a local version now. To scan barcodes; OpenCV and pyzbar are used. The simple window system is built with TKinter in python. The information about the food products is fetched with the openfoodfacts python module.
Challenges we ran into
- Our initial idea was to reduce household waste by putting a pressure sensor under each level in the fridge. The weights of the products are linked to the specific types of food, and the pressure sensor is able to detect the change and send the data to the software. However, no pressure sensors were available, so instead of building a physical sensor, we went for a simulation of the change in weight. We then shifted our focus to displaying how environmentally sustainable the product is by scanning its barcode using a camera.
- We also had difficulties in embedding the code into a web page. The computer kept crashing while running the code, due to RAM (16gb in my case) being filled completely within seconds. The code ran fine apart from this issue, so in the end we did not integrate the code onto a web page.
Accomplishments that we're proud of
The bar code scanner has very high accuracy and it is successfully linked to the database.
What we learned
I have learned a great deal about how tricky it is to manipulate data, shockingly the easiest parts in terms of implementation were interfacing with the webcam and detecting bar codes - but turning webcam data into images was a massive puzzle. So much so that we had to abandon the Flask web application. Furthermore, I personally learnt a large about about how damaging to our environment certain foods are ad the linear relationship between calorie count and CO2 output during production
What's next for Green Fridge
The use of Green Fridge can be expanded by sharing each user's information that allows them to compare how green and healthy their diet is. For doing that another index that integrates the green index and health index (that indicates how balanced the diet is) can be added on to the existing code. The fridge would be able to inform the users about how much we are contributing to CO2 emission just by consuming food, which can hopefully lead to more efficient food consumption habit.
Built With
- api
- github
- json
- opencv
- python
- tkinter
- visual-studio
- zbar
Log in or sign up for Devpost to join the conversation.