Inspiration
As young children, we often went to the renowned beaches of California expecting to have the best times of our lives, but instead, it resulted in trash accumulating near our feet every time we stepped in the water, much of which was plastic. As we grew older, we learned about how harmful our own plastic can be to the very earth we live on. It endangers animals, contaminates our air, disrupts peaceful habitats, and so much more. We choose to do something about this trash mismanagement problem by focusing on how a lot of recyclable trash doesn't reach the recycling systems but instead ends up in our oceans.
What it does
To help solve this problem we decided to create a piece of tech in the form of an attachment that could be put on three trash cans. Once the system detects that something is being thrown in, a camera would click a picture of the object and run the picture through the model. Then the model would predict one of the 6 classes. In the case of the three trash cans, once the model predicts one of the 6 classes, we will hardcode what trash bin that class would go in. (ex. plastic -> recyclable)
How we built it
We built the model on an app called PyCharm with the language python. We used libraries like Keras and TensorFlow to build the convolutional neural network model and re, os, and pandas for reading and getting information in files. Since the images were in jpeg format we didn't need to import any special libraries for reading. After storing our real path file name and the label for that image we created our train, validation, and test (premade). Then we built our model using a Resnet50 model pre-trained on the ImageNet database, a famous model. We choose to keep the weights of this model untrainable since they could prove useful in harder images to classify. We ended up adding two dense layers at the end that had trainable weights.
Challenges we ran into
One of the problems we ran into was regarding code issues. After creating the base model we overlooked the activation function for our final dense layer which was "sigmoid", even though it should have been "softmax" since this was a multi-classification problem. When we realized it wasn't working we relooked at the code and noticed our mistake. Another problem we encountered was memory error which is quite common in machine learning projects. We had to perform the training of our model in batches of 16 because of memory error.
Accomplishments that we're proud of
We are proud of this project because it was able to reach 71% within the time frame as well as create an HTML website to educate others about trash mismanagement. We would like to continue this project in the future and hopefully release a piece of tech that we ourselves can use.
What we learned
Through this project, we were able to get a better understanding of the harmful effects of trash mismanagement. We also learned how amazing it is that models like ResNet50 which is trained on a completely different dataset can prove useful to other models such as ours trying to classify into different trash categories.
What's next for Mitigating harmful repercussions of trash using CNN
In the future, we hope to expand this piece of technology to underdeveloped countries without it being too costly. We would like to add an educational game to our HTML website to help underprivileged kids learn the difference between different types of trash so that when they are older they are more likely to mistakenly put recyclable trash in the wrong bin. When doing research we noticed that younger children are more perceptible and if taught how certain items are color-coordinated to certain bins, would continue doing so when they are older. In a sense teaching them a good habit to keep.
Log in or sign up for Devpost to join the conversation.