Intelligent Waste Classification System Using Deep LearningConvolutional Neural Network
Olugboja Adedeji, Zenghui Wang*
Abstract
The accumulation of solid waste in the urban area is becoming a great concern, and it would result in enyironmental pollution ancmay be hazardous to human health if it is not properly managed. It is important to have an advanced/intelligent waste managementsvstem to manage a variety of waste materials. One of the most important steps of waste management is the separation of the wasteinto the different components and this process is normally done manually by hand-picking. To simplify the process, we propose anintelligent waste material classification system, which is developed by using the 50-layer residual net pre-train (ResNet-50Convolutional Neural Network model which is a machine learning tool and serves as the extractor, and Support Vector Machine(SVM) which is used to classify the waste into different groups/types such as glass, metal, paper, and plastic etc. The proposedsvstem is tested on the trash image dataset which was developed by Gary Thung and Mindy Yang, and is able to achieve an accuracof' 87% on the dataset. The separation process of the waste will be faster and intelligent using the proposed waste materialclassification system without or reducing human involvement.
Keywords: Convolutional Neural Networks, Pre-rain Model, Waste Separation, Automation, Machine Learning, Support Vector Machine
1.Introduction
The world bank report showed that there are almost 4 billion tons of waste around the world every year and the urban alonecontributes a lot to this number, the waste is predicted to increase by 70 percent in the year 2025 (11. According to (11 in the next25 years, the less developed countries’ waste accumulation will increase drastically, With the increase in the number of industriesin the urban area, the disposal of the solid waste is really becoming a big problem, and the solid waste includes paper, wood, plasticmetal. glass etc.The main method of managing the waste is landfilling. which is inefficient and expensive and polluting naturaenvironment, For example the landfill site can affect the health of the people who stay around the landfill site. Another commonway of managing waste is burning waste and this method can cause air pollution and some hazardous materials from the wastespread into the air which can cause cancerl2). Hence it is necessary to recycle the waste to protect the environment and humarbeings'health, and we need to separate the waste into the different components which can be recvcled using different ways
1.1. Motivation
The present way of separating waste garbage is the hand-picking method, whereby someone is employed to separate out thedifferent obiectsmaterials. The person, who separate waste, is prone to diseases due to the harmful substances in the garbage. Withthis in mind. it motivated us to develop an automated svstem which is able to sort the waste. and this svstem can take short time tosort the waste. and it wil be more accurate in sorting than the manual way. With the system in place. the beneficial separated wastecan still be recycled and converted to energy and fuel for the growth of the economy3. The system that is developed for theseparation of the accumulated waste is based on the combination of Convolutional Neural Network and Support Vector MachineSVM), the algorithms, that is, the combination of Convolutional Neural Network and Support Vector Machine deals withrecognition and classification. Due to the fact that the trash image dataset is small, we used a pre-trained ResNet-50 model whichis a type of Convolutional Neural Network architecture.When the depth is increased, the recognition accuracy of the convolutional neural network can be increased 41, but due to theincrease in depth, the signal that is suppose to modify the weight is reduced at the earlier layer of the CNN.(5). This will make learning at the earlier layers inconsequentially and this is called vanishing gradient. Adding more and moreayers to the network always leads to training error. Residual Network(ResNet-50) is different from the normal convolutionalNeural network6 in that. it is able to go around this problem of vanishing gradient by designing the Conyolutional neural networusing modules which are called residual models, the ResNet model and the basic block is shown in Fig.1.
1.2. Related Works
Many different algorithms have been developed for the classification of images, such has RNNs, SVMs, ANN etc, butConvolutional Neural Network which is a Machine Learning algorithm has really performed better than them all. CNNs hit thespot when the algorithm was used to win the 2012 image-Net large-scale visual recognition challenge(lLSVRC) which wasproposed in (7. Since 2012 many different CNN architectures have been developed which has solved many image classificationproblems (8191 101111. Lulea University of technology in 1999 undertook a project, and a system was developed to recycle metalscraps using mechanical shape identifier 121. (131 used the features from SIFT and outline shape on the Bavesian computationalframework and their svstem was based on the Flickr material database. (141151 in 2016 developed an Auto-Trash which was ableto differentiate between compost and was recycled with Raspberry Pi, their system was developed using Google's Tensorflow. Theshort-come of their svstem was that it was only able to differentiate compost materials. A smartphone application was developedby (16) which was able to roughly identify the hip of garbage in the image. This application enables a person to give informationof garbage in their area and obtained a mean accuracy of 85% using AlexNet pre-trained model
1.3. Dataset
For this work, we are using a rash image dataset which was created by Gary Thung and Mindy Yang (17). This is a small datasetand consist of 1989 images, which is divided into four different classes glass, paper, plastic, metal, all the pictures of the imageshave been resized down to 512 x 384. Few samples of the images are shown in Fig. 2
2. Methodolog
For the pre-processing stage, data augmentation method was performed on the images, because of the small size. This techniquewas chosen because of the different orientations of the waste materials. Some of the technique includes, random of the imagetranslating the image, randomly scaling the image, image shearing, randomly scaling of the image. With this technique it maximizethe dataset size. The proposed method was developed based on the ResNet-50 pre-trained model, and the procedure is shown inFig. 3.
2.1. ResNet
In CNN. several lavers makes-up the network1181 191 The lavers in CNN implement some actions. which allow it to classify inputimages. The convolutional layer convolves the image that is inputted using a sequence of filters window sizes of 3 x3. this wasused because what differentiates the obiects are small and local features.The essential features are extracted from the input imagesThe primitive features are extracted with the help of the first few layers. Has the training goes down the layers more and morecomplex and detailed features are extracted. with the help of the loss function probability. that is. Softmax function (20Our model was developed based on the ResNet-50 pre-trained model, this model was pre-trained on lmageNet images with a sizeof 256 x 256 and classified int 1000 classes. As shown in Fig. 3 the ResNet-50 pre-trained model has already being trained on themageNet dataset and a set of weights has been acouired. but we removed the top c asstication aver by setting the ic ude ton -False. only the feature comes out of the network The features are passed to the MulClass SVM model where the classification takes place. based on the features extracted.
2.2. Support Vector Machine (SVM)
SVM can be used to solve both classification and regression problems. t is a machine learning technique and it is considered to beone of the best classification algorithms. With this algorithm. the data item is plotted as a particular point in n-dimensional spaceagainst the feature value of a specific co-ordinate. The items in SVM are classified based on the separation ofhyperplane for eachof the multidimensional data. It finds the hyperplane which the minimum distance is greater for the training data.
3.Experiment and Result
The weight of the network is fixed, and the fully connected layer is removed and replaced by SVM which is trained and used foithe classification. We used the following parameter for SVM optimization, the radial basis kernel was used, the SVM C- parameteiwas set to 1000 and the gamma was set to a value of0.5. The pre-train ResNet-50 used was implemented on mageNet dataset witlan image size of 224 X 224. Standard colour augmentation and batch normalization were used after the convolution and beforeactivation. The momentum and weight decay are 0.9 and 0.0001 respectively, The training was done on a core i5 Intel CPU wit2 epochs. The ResNet-50 CNN was used as the extractor for the features using Kera pvthon with the trash dataset with 1989images. Stochastic Gradient Descent with Momentum (SGDM) was used during the training. With the help of SGDM, the weightsand biases were updated. The sample was selected at random, with a mini-batch of 12. The whole dataset was divided into twoparts with a ratio of8.2, which are used for training and testing samples, respectively. The feature extracted is then classified usingMulti-Class SVM21122. After the entire training, we got an accuracy rate of 87%, after the 12th epochs the accuracy was notncreasing anymore. The criteria for stopping after the 12th epoch is the test loss stopped decreasing and it was on the same valueFigures 4 and 5 show the training loss vs the validation loss and training accuracy and validation accuracy respectively. For thecach of the epoch ofthe training, the dataset is feed into the network and backpropagation is run against each sample. The lossesare stored after each epoch and the mean is calculated. The loss is plotted against the epoch which gives us the training andvalidation loss and it is shown in Fig, 4, The average training accuracv was 94 5% when plotted against the enoch and it is shownin Fig. 5 which was almost perfect.
4.Conclusion
In conclusion, we proposed a waste classification system that is able to separate different components of waste using the Machinlearning tools. This svstem can be used to automatically classify waste and help in reducing human intervention and preventininfection and pollution. From the result, when tested against the trash dataset, we got an accuracy of 87%. The separation processof the waste will be faster and intelligent using our system without or reducing human involvement. f more image is added to thelataset, the system accuracy can be improved In the future, we will tend to improve our system to be able to categories more wasteitem, by turning some of the parameters used.