Inspiration

Have you ever want to become environmentally friendly?

Trick question! Of course yes! If you are like us, however, you probably don't prefer the process of classifying your trash into separate categories, especially when you're not even sure if your classification is correct. Are food containers recyclable? Such questions would need one to go put it down, google search, understanding its materials, and so on. This is where Trashier would save you a ton of time.

What it does

Using a webcam and a microphone, Trashier uses a deep-learning neural networks model and webcam to classify new images into different waste categories (plastic bottles, plastic bags, metal can, etc.) and into two Recycle or Compostable. This is done instantaneously, updating with real-time webcam input.

On top of that, voice assistants work alongside providing users with first-hand knowledge about recycling/waste management. Simply asking a question, such as "Is plastic bottles recyclable?", and you are responded with not only facts about its recycling ability but also further advice about washing your bottle before putting it in the bin.

How I built it

We trained a deep learning model that generalizes itself to some common categories of trashes, using trash products we found on Treehacks venue. To increase its accuracy, we limit to only 1 item per frame and incorporated additional data from user Sashaank Sekar on Kaggle. The dataset can be found here: https://www.kaggle.com/techsash/waste-classification-data. After training the model and getting the appropriate weights, we incorporated them into our backend. Here, we develop a real-time and constant loop where the input data into our webcam is constantly run through model and predict the appropriate categories.

Next, we use API from Houndify to assist our voice assistance application. In this process, we came up with as many examples as we can about certain questions that the machine can be asked, such as "What products can be recycled?", or "Can banana be recycled?" (of course no). We also add some other common domains, such as the weather, or the stock market data. This will satisfy users who are interested in stock investment while putting away their trash.

Challenges I ran into

Implementing the API and adding the deep-learning model was first difficult for us at first. After consulting some mentor, we were able to understand it better, and we found some useful youtube tutorials that becomes our friend through the process.

Training the data was also challenging. First, we took online data, which is good and have high accuracy, but is somewhat unstable (it was switching between plastic bag/plastic bottles for a while). Later on, we wanted to design an enclosed environment to increase the accuracy, and this is where we must manually select and take new data into account. Data cleaning, normalizing, and preparing stage needed some more work.

Accomplishments that I'm proud of

We're proud that we were able to make something like this at this hackathon, while also had a lot of fun! We're also proud we had over 10 hours of sleep during the process (for 2 nights). This is really impressive xD.

What I learned

This is the first hackathon in which we were able to create a product, so we learned a lot. We learned how to incorporate and debug API effectively, how computer vision can be integrated into day-to-day applications, and more. Most importantly, we learned how to keep up with hard work, don't give up, and have great fun in hackathons.

What's next for Trashier

Our UI can definitely get some more work, such as formatting the voice assistance application into a chatbox.

In terms of functionality, one goal is to improve the accuracy and performance of the current model. Trash is currently classified only to compostable/recycle (due to limitations in data), while having it in 3 categories (recycle, compostable, and landfill) will be more environmentally friendly. The chatbox can also use more work, mainly to improve its ability to answer a diverse set of questions from users.

We would also introduce additional functionality, including user feedback. This means users can help to classify certain images, such as that of a plastic bag, to proper categories by simply asserting the algorithm as "good", "bad", or "close". Using the feedback, we can incorporate more data into our dataset and improving its accuracy.

On a long-term scale, the goal would be to have the program be cheap enough that it can be incorporated into the city environment.

Built With

Share this project:

Updates