​​## Inspiration Donating to food banks can be challenging, especially when most rely on canned goods that leave communities without access to fresh food. Our platform changes that by allowing charities to request fresh foods and enabling users to scan their extra food to see if it's needed. Together, we reducewaste and help bring fresher options to those in need.

What it does

Our product first starts by loading a user into a user interface. Over here the user can see their life-time donations, their statistics on donated products, and food banks.

Over on the home page, there is a button to help track new items you wish to donate. Clicking this button allows you to take a picture of a product, and using object detection, it automatically scans the item and determines how good the food item is for donation, and whether any food banks are in need of it.

This makes the donation process incredibly quick and easy, letting the user decide whether the item is worth donating or not given the current demand and shelf-life and helps link individuals with charities to reduce the logistical burden on charities which prevents them from receiving fresh food.

Lastly, Food bank institutions are able to request for specific items, which is then stored in the database.

How We Built It

We developed the front end using React, JavaScript, Vite, and CSS to create a smooth and interactive user experience. On the back end, we implemented Python, Flask, Numpy, and PostgreSQL for efficient data handling and API management.

For the food item detection model, we utilized YOLOv8, training it with a custom dataset we specifically curated for maximum accuracy. Initially, we explored datasets on Roboflow, but found the models offered lower prediction accuracy, so we opted to fine-tune YOLOv8 for better results. To enable real-time object detection, we integrated OpenCV.

Once an item is detected, we used a simple ID lookup in the PostgreSQL database to quickly search for matching items and respond to user or charity needs.

Challenges we ran into

The biggest challenge we faced was integrating the back end with the front end, specifically connecting YOLOv8 to React. YOLOv8 is rarely used in combination with React, and as beginners, we had to build an API system that communicated between Flask and the React components. This process consumed a significant portion of the project, delaying some of the front-end features we initially planned to implement.

Throughout the development, we often questioned whether the project would work at all, as we hadn't seen anything similar online, and our relative greenness left us uncertain. However, through persistence (and all-nighters), we managed to bring it all together and make it a success.

Accomplishments that we're proud of

We are proud about being able to get our webcam do live detection and especially being able to have it run on React. We are also happy how sleek the website looks considering how React was a new language for most of us and the limited time we had. The custom dataset we curated is also something we value highly as it is what gives our model the high benchmark standard of accuracy we strived for

What we learned

The most valuable lessons we learned from this project extended beyond just mastering specific technologies; we gained a deep understanding of how different technologies interact with one another. Most team members had experience in either front-end or back-end development, but not both. This project provided us with a comprehensive experience in creating integrated front-end and back-end applications.

Additionally, many of us were new to React, making learning how it interacts with Flask one of our biggest learning curves. This experience not only broadened our technical skills but also opened doors to areas of development we had never explored before. Overall, this project was instrumental in enhancing our understanding of full-stack development.

What's next for ScanForGood

We plan to build more upon that donor-charity relationship, allowing for communication between both ends. It would be important as well to have direct contact with food banks so as to assist them in setting up donor accounts. This allows them to monitor and find items for donation. For personal goals, we would like to recap and document the lessons learned through making this app.

Built With

Share this project:

Updates