AutoRecycle is the ultimate solution to have automatic segregation of recyclables from other garbage. The project is a bold attempt to use image content analysis of your garbage items and machine learning to automatically partition whatever you toss in your trash can. Although analyzing and deciphering the contents of an image is not very accurate, what we wish to leverage is the ease of having an all-in-one solution which analyses any given garbage item without manual intervention.
The stress on recycling and use of recyclables has been on the rise since the last few decades with major shifts in government policies and manufacturing of consumer products. To ensure sustainability of resources and reduce pressure on conventional energy sources, we need to strengthen the cycle of reuse, reduce and recycle.
In spite of the advancement in technology, the process of segregating recyclables from other garbage is a manual job left largely on consumers like you and me! For example, here in NYC, you must have noticed 3 trash cans – one for bottle and cans, one for paper and other for trash; however, do you always use the right bin? While the trash is disposed in landfills, it's the bottles, cans and paper that is recycled. This project aims at automating this segregation process and having one single smart "autoRecycle" trash can.
AutoRecycle uses a fairly non-conventional way of machine learning. As we know that cascaded classifiers have a much higher accuracy and lower false positive rates as compared to one single heavy classifier. Using this principal, we trained a classifier on top of the tags returned by the image content analysis APIs. The Python ML libraries from SCIKIT were used to extract features. Every tag was assigned a unique id by building a dictionary in Python because strings cannot be used as inputs for training. Below is an example of the tags returned by Google Vision API (NOTE the tags are most of the times vague).
For this project, the following ML classifiers were trained – SVM - support vector machine – GNB - Gaussian Naïve Bayes
To automate the partitioning of the garbage, a simple motor system with a Raspberry Pi3
and a webcam is used (all under 100$). A few IR sensors to indicate bin full and
triggering of capture are also used.
Details regarding the architecture, components and prototype are below:
The architecture of autoRecycle is summarized in the figure below. Also, the following section lists the technical components.
– Sensors: IR sensors, camera (Creative Live Sync)
– Mechanical parts which re-direct the trash correctly (high torque motor)
– Server for interaction with embedded systems
– Program for interaction with image recognition APIs
– Image-tag matching and filtering algorithm
– Classification algorithm (SVM and GNB)
The prototype was built by adding a partition within a normal dustbin. A slanting plank to hold the thrown garbage was placed with a black background to ensure accruate image capture. All circuitary was fitted at the back to the prototype to avoid damage or exposure to garbage.
The results of the system were quite impressive. At the beginning of the project, we were quite skeptical as the tags returned by the image content analysis are very vague. However, with a large training dataset os positive and negatives, the accuracy of the calssifer was inproved. Although a small amount of false positive and flase negatives still reamin. A total of 80 positives (45 bottles, 35 cans) and 80 negatives (of other common non-recyclable garbage) were used for training. A summary of the reulst is included below. Testing was done with 27 new data images that were not used for training.
Accuracy = Correct identification of recyclable/non-recyclable
False positives = Non-recyclable being identified as recyclable
False negative = Recyclable being identified as non-recyclable
As is seen, even though the accuracy is pretty high, the high false positive and false negative rates reduce the reliability of the classifier. To improve the same, a larger data set is required and this project can be extended to implement the same.
1. Solid waste bin detection and classification using Dynamic Time Warping and MLP classifier, Md. S. Islam, M.A. Hannan, H. Basri, A. Hussain, M. Arebey
2. Intelligent computer vision system for segregating recyclable waste papers, M. O. Rahman, A. Hussain, E. Scavino, H. Basri, M.A. Hannan