-
-
Introduction Slide
-
A screenshot of the section titled "How it Works" on the home page.
-
A screenshot of the website after accessing the webcam to classify the image recently captured.
-
A screenshot of the "Predictions Portfolio" page, showing some test images and generating the confidence of their correct categorization.
Inspiration
8 million pieces of plastic pollution find their way into our ocean daily. It has become a major environmental concern worldwide due to its adverse effects on wildlife. Plastic ingestion leads to starvation, suffocation, and entanglement. Plastic has even been discovered in the stomachs of deep-sea creatures. Pollution is a global issue, with plastic waste littering coastlines, oceans, and being carried by winds to the most remote corners of the earth. Pollution has even been found in the Arctic.
No doubt, we need to find a way to reduce the harmful impact of pollution on wildlife and the environment. I felt that the only way to stop this wide-spread problem was by creating a solution that can be implemented worldwide on an industial level.
What it does
Trashify is a web app that aims to take images and detect whether the object pictured is cardboard, glass, metal, paper, plastic or unrecyclable trash. Within the website, there is a saved CNN model that does this on pictures taken from the webcam. Additionlly, the website is dynamic and adjusts to different screen ratios.
How I built it
I did data processing in python by transforming, augmenting and analyzing the 2527 image in my dataset so that all of the values became usable and properly recognized. Then I created my model using the keras CNN algorithm in Python. It involved filtering an image through*12 layers* and iterating through the data with 100 epochs to identify patterns. Then Flask allowed me to use python functions in the backend to capture and save images to then classify with my loaded model. It also helped me to connect my HTML to the outputs of the python functions. HTML provided the structure, CSS added styling and visual appeal, while JavaScript added interactivity and dynamic behavior to the website, creating a seamless and engaging user experience.
Challenges I ran into
Creating the model was very challenging. I had never used CNN before and found it to be very complex, as I struggled to optimize hyperparameters, layers, epochs, and methods of image preprocessing and preparation.
Accomplishments that I'm proud of
In the end, the model had an accuracy of around 80%, which was extremely hard for me to acheive. I am very happy with its ability to classify trash, especially in the plastic, glass, and metal categories as they can look very similar once processed. Additionally, the model's integration with the front end is also I have struggled with in the past and I was happy to see how much I had improved.
What I learned
I learned a lot about CNN and full-stack development by creating this project.
What's next for Trashify
I want to imrpove the variety and amount of data that is being used to generate the model, as I worry about regularization. Additionally, I would like for this program to be used by garbage companies to sort their garbage, but there is a long process of refining this model and making that long-term goal feasible.


Log in or sign up for Devpost to join the conversation.