Smart Trash Sorter with Multi-Layered Machine Learning Algorithm

By Henry Zhao
Intermediate Category (Grades 9-10)
Innovation | Big Data / AI, Engineering and Computer Science

Recycling is one of the biggest parts of a sustainable society. In order to encourage recycling, many public spaces, like malls and offices, have different garbage cans for the different types of recycling. There is a problem, though, which is that a lot of waste does not end up in the right can. One of the main reasons for this is that people don’t always know how to sort their trash. It’s often confusing as to which container a certain piece of trash should go in, which results in a lot of recyclable waste being thrown into a trash can. This project was made to take humans out of the equation, and to make sure that as much trash as possible ends up in their correct bins.

Currently, the project consists of a prototype of the smart trash sorter, using custom designed and 3D printed rails and pinions to move a central bin to the correct location. It has a camera for taking images, as well as infrared emitters and receivers for calibration. It is controlled by a Raspberry Pi, which also runs the interpreter for the trained neural network. Novel algorithms have been developed for the isolation and identification of the trash. Before being used for training or identification, images are processed to best isolate the subject. In order to ensure that the reference photo of the empty bin is closest to the subject photo, several feature detection and matching algorithms have been tried , and among those, the best algorithm for the project is “goodFeaturesToTrack” feature detection with “FLANN” feature matching, to warp the two photos to best fit each other. It then uses edge detection against the reference photo in order to find the subject, and a variety of algorithms have been tested, such as “Laplacian” and “Sobel” edge detection. “Canny” edge detection was chosen. It then uses several Morphological Operations to output a photo with the isolated trash. For training, a mixture of over 3000 trash photos, both from an online database and photos taken by me, are used to train the convolutional neural networks. Tensorflow is used as a training platform, and transfer learning has been used on multiple pre-trained models (Resnet, Inception, and Mobilenet) in order to test which model’s feature extraction works the best for this project. Support Vector Machine classification (compared against SoftMax) was also tested as a last step of the training process. Using the above algorithms, the overall accuracy has increased from 80% accuracy with only the pre-trained model to over 90% with the algorithms.

Related Project


Smart DeTech