Inspiration
Climate change is an evergrowing problem and our planet is at risk in the very very near future. One way to combat global warming is through recycling by reducing greenhouse gas emissions due to landfills. However, as college students, we generate lots of waste and are sometimes too lazy to properly recycle it. Oftentimes, we can't find a recycling bin nearby and it can be difficult deciding how to properly sort our waste. So, we decided to build an app to ease and incentivize the recycling process on college campuses, aiming to increase global efforts against climate change.
What it does
We devised a prototype that scans your waste and uses a machine-learning model to help you make an informed decision to dispose of it. Furthermore, it will guide you to the nearest and most appropriate disposal site (recycling, compostables, and/or landfill).
How we built it
The application relies on React.js to dynamically render the various frontend components (live camera feed, live interactive map, etc.), and we utilized the Google Maps API to display an interactive map of nearby recycling/waste locations. To create the classification algorithm, we used a pre-trained Convolutional Neural Network (CNN) called MobileNetV2 and we further trained it using PyTorch and Google Colabs on the TrashNet dataset (TrashNet credits: Gary Thung and Mindy Yang, GitHub Repo: https://github.com/garythung/trashnet). Finally, we created a RESTful API using Django Rest Framework to connect our front end to the Python CNN.
Challenges we ran into
We've never used, let alone trained, a machine learning model before. When we came up with the project idea, the model was easily our most intimidating challenge. Luckily, the PyTorch module provides fantastic pre-trained models to choose from. Moreover, we found a fantastic dataset of common recyclable items (paper, plastic, glass, etc.) to train our model. Limited by time and hardware, Google Colab proved essential to quickly increasing the model's accuracy by providing high-end GPU/TPUs through the cloud. Altogether, we learned so much, and we won't forget the excitement we felt the first time it correctly classified one of our recyclable items.
Mapping nearby recycling locations was also difficult, but we created a custom KML (markup for maps) and added 37 recycling locations on campus tagged by types of waste (recycling, compostable, cardboard only, landfill, etc.). React also refused to work with the Google Maps components, but with patience, everything worked out. We resulted in parsing our custom KML file and a library called geolib to compute the nearest distances for the recycling locations and display them to the user.
Accomplishments that we're proud of
We are proud of actually training the model ourselves, rather than only using a pre-trained model, and analyzing its effectiveness using a confusion matrix. Through our training and use of different algorithms, we increased the accuracy from 40% to 73%. We are also proud of the concise code for our app using proper design patterns in React.
What we learned
We already knew a bit of React and Django coming into the competition, but we've never fully integrated a front and backend to make a full-stack application. Battling through the process taught us how to make careful design choices, like choosing the best stack for our use case. One thing we can improve on is time management and using Figma to plan out our UI and functionality rather than building it on the fly.
What's next for EcoRadius
The project was technically challenging for us, so we admit we neglected the UI. Now that we have more time, we want to improve the model's accuracy and train it on more diverse waste data. Finally, we intend to gamify recycling through a point-reward system where colleges can compete against one another. With our efforts, we aim to improve recycling initiatives and reduce waste mismanagement around the globe.
Log in or sign up for Devpost to join the conversation.