Inspiration

As a result of the COVID pandemic and the consequent lockdown, we noticed that sales in single-use goods such as plastic water bottles and soda cans have skyrocketed, even in our own households. However, the general consensus that we've noticed in the Bay Area is that recycling is tedious and offers very little in return. As a result, RecycleHub was born, an app that guarantees to get more citizens involved in the process of recycling by making it simple, efficient, and profitable, thus incentivizing users to help make our city greener.

What it does

The app has three main features - the scanner, map, and logs. The scanner classifies what type of trash the user is scanning, and identifies specific recyclable materials in the object. The map points users to nearby recyclable centers, and provides specific information regarding when the center is open, what recyclables it accepts, and how to get there using Google Maps. The logs help the user keep track of their recycling history, provide them with statistics regarding amounts of specific materials recycled, and estimate the amount of money they can make off recycling based on their recycling history.

How we built it

Kyle and Adithya used Python to build the convolutional neural network (CNN) that classifies trash using Google's MobileNetV2 architecture. We chose this architecture because it is very efficient and can easily be run on a mobile device. The network was ported to IOS using the LibTorch library. We were able to achieve 97.69% accuracy in classifying different types of recyclables by training the model for 10 epochs and using stochastic gradient descent with a learning rate of .003 and a momentum of .9.

Nikhil built the features related to google maps using the Google Maps IOS SDK. In combination with the Places Library, Nikhil located recycling centers near Cupertino. By calculating the distance to each possible center, Nikhil was able to determine a relevant list of centers catered to the user's needs and display them on the map's front end.

Dinesh adapted all the features into an IOS app, designed the graphical interface and user experience of the app, set up the scanner to send correctly formatted images to the CNN. He also created a statistics feature for users to keep track of recycling history and their accumulated profit with price values based on guidelines from CARecycle. Dinesh applied Yelp's Fusion API to gather specific data about nearby recycling centers in order to display images, accepted materials, and addresses of recycling centers.

Challenges we ran into

Porting the convolutional neural network from Python to Swift was rather difficult as there was no indicator that we needed to save the network in a special way to make it compatible with Objective C++ until we got an error message saying so. Porting the app was made even harder as none of us knew Objective C++ prior to developing the app.

It was also hard to communicate between different groups since two people worked on Swift while two others worked on Python, so they each had to learn a little bit about what the other was doing to understand what was going on and bridge the tasks together.

However, despite all the setbacks, we persevered, using online tools, APIs, development tools, and each other to help make our vision happen. As a team we discussed our plans, setbacks, and successes, and supported each other to make RecycleHub a reality.

Accomplishments that we're proud of

We're incredibly proud of the app we have created: an iOS app with a rich UI, accurate convolutional neural network, and seamless incorporation of the Google Maps SDK and the Yelp Fusion API. We were able to take on three difficult and seemingly unconnected tasks and integrate them into a single app, despite being unable to meet in person due to the pandemic. Our willingness to work with new and intimidating technologies and persevere through setbacks is an accomplishment that we will forever celebrate.

What we learned

Each member of the team utilized challenging technology, and as a result learned a lot during this week of coding. We became much more familiar with IOS development and the intricacies behind developing user interfaces and layout constraints, as well as the challenge in manipulating data to input into the NN model. We learned how to design, train, and test a neural network in Python and learned how to port a network built in Python into the iOS environment using a new language: Objective C++. We learned how to work with Google’s Map SDK and how to implement it in a Swift application to locate nearby recycling centers.

What's next for RecycleHub

We hope that this app can be used to help inspire people in Cupertino by giving them an incentive to recycle more often.

Currently, our neural network and app can classify images into six categories –metal, glass, plastic, paper, cardboard, and trash– but by adding new materials such as textiles, batteries, and tires, we could make our app more powerful for our users. In addition, adding new images to the dataset used to train our neural network could help increase its accuracy rate. Other features we've brainstormed include upgrading the map section of our app to allow for more user interaction (such as starring commonly visited recycling centers), increasing the element of competition between friends by allowing for the creation of profiles, and implementing a badge system for recycling-related achievements. We could also utilize cloud features such as cloud storage for users to view a more detailed recycling history (account details, chat logs, and previous trash images) as well as cloud computing to make the app faster and more accurate by allowing a deeper network to run on a GPU in a server instead of on a phone as it currently does. These are just a few of the many features that we hope to add to our app in the future to make it an inspiration to recycle for all.

Share this project:

Updates