Garbage bin sorter is a image classification model for images of waste. It sorts the images into one of:
- Trash
- Compost
- Recycling
We have implemented this model in a variety of ways, including a web application and even a trash sorting robot!
The image classification model is a convolutional neural network built with Keras. It consists of an input layer, 9 convolutional 2D layers, 4 Max Pooling 2D layers, 1 flatten layer, and 3 Dense layers. The model was trained on data from Kaggle.
Upon building the model, I decided to put it into application in the form of a Trash Sorting Robot (TSR). A video of the robot in action can be seen here.
The robot was built on a Raspberry Pi 3 single board computer. I controlled the trash lids with servo motors, two of which were powered by their own 9V batteries, and one that was powered by the Raspberry Pi itself. The Raspberry Pi was also connected to a camera module to scan the trash. Below is a schematic diagram of the robot:
Taking a look at the robot from the front view, we can see the (tiny) camera module connected to the Pi. Note that in future iterations, a stronger camera with it's own power supply will produce better results:
Looking the the back of the trash bins, we can see the servo motor taped to the back. This motor is connected to a circular disk that has a string tied to it. This string is taped to the lid at the top, so that when the motor spins the lid is pulled:
Finally, I decided to show a top-down view. This shows all the wiring and connections. You can see the two batteries as well, next to the Pi:
The application was built on plotly dash and deployed through the google cloud platform. Docker was used to store the container. The application is not currently deployed, but has plans to in the coming weeks.