Deep Consensus Network for Recycling Waste Detection in Smart Cities
1 Department of Computer and Self Development, Preparatory Year Deanship, Prince Sattam bin Abdulaziz University, 16278, AlKharj, Saudi Arabia
2 Department of Information Systems, College of Computer and Information Sciences, Princess Nourah bint Abdulrahman University, P. O. Box 84428, Riyadh, 11671, Saudi Arabia
3 Department of Computer Science, College of Science and Arts, King Khalid University, Mahayil Asir, 62529,Saudi Arabia
* Corresponding Author: Manar Ahmed Hamza. Email:
Computers, Materials & Continua 2023, 75(2), 4191-4205. https://doi.org/10.32604/cmc.2023.027050
Received 10 January 2022; Accepted 04 March 2022; Issue published 31 March 2023
AbstractRecently, urbanization becomes a major concern for developing as well as developed countries. Owing to the increased urbanization, one of the important challenging issues in smart cities is waste management. So, automated waste detection and classification model becomes necessary for the smart city and to accomplish better recyclable waste management. Effective recycling of waste offers the chance of reducing the quantity of waste disposed to the land fill by minimizing the requirement of collecting raw materials. This study develops a novel Deep Consensus Network with Whale Optimization Algorithm for Recycling Waste Object Detection (DCNWO-RWOD) in Smart Cities. The goal of the DCNWO-RWOD technique intends to properly identify and classify the objects into recyclable and non-recyclable ones. The proposed DCNWO-RWOD technique involves the design of deep consensus network (DCN) to detect waste objects in the input image. For improving the overall object detection performance of the DCN model, the whale optimization algorithm (WOA) is exploited. Finally, Naïve Bayes (NB) classifier is used for the classification of detected waste objects into recyclable and non-recyclable ones. The performance validation of the DCNWO-RWOD technique takes place using the open access dataset. The extensive comparative study reported the enhanced performance of the DCNWO-RWOD technique interms of several measures.
Waste management is most serious problem that the world in 21st century is about to face. A recent study reported that the amount of waste annually reaches up to 2.2 billion tons in the next 3–4 years that might cost around $375 billion to the management of waste . Other studies of the Food and Agriculture Organization (FAO) of the United Nations has shown that almost 33% of the overall food is produced worldwide for everyday utilization which is almost 1.3 billion tons in weight, is wasted or lost . This irregular waste management might cause a negative effect on the environments, public health, and economy . The waste recycling method is extremely important interms of the environment and economy . In many emerging nations, the local municipal corporation manually recycles the waste that is costly, time utilizing, and very inefficient since the corporation has to recruit a great number of laborer’s to manually work . Fig. 1 illustrates the application of smart city.
Machine Learning (ML) method describes an important process of Artificial Intelligent (AI) technique which permits a system the capacity for automatically making the decision and learn with no being explicitly trained . The ML method is scientific research of several statistical algorithms and models. Because of the exceptional feature in computing, the prevalence of ML was obtained the maximum peaks. These statistics obviously shows the prominence of ML based application. Likewise, deep learning (DL) methods are an important part of ML method . The convolution neural networks (CNN) are momentous classes of deep neural network (DNN) systems, especially, DL method. The CNN presents considerable advances in image classification. Generally, it can be employed to estimate visual imagery and frequently functioned besides image recognition.
CNN was enjoyed a great achievement in image classification and recognition . The accuracy and popularity of the CNN to an image classifier was improved because of the high-speed GPU, wide largescale integrated system, and accessibility of public data of image for the learning and image processing . The hybrid model of utilizing a multi-layer perceptron with CNN is another effective method. The sensor technique fused in the scheme is capable of detecting metal waste object that is later categorized into certain groups . Therefore, image processing using DL method has assisted municipalities to discard manual waste classification. The application of smart waste classification has been employed and provides better outcomes.
This study develops a novel Deep Consensus Network with Whale Optimization Algorithm for Recycling Waste Object Detection (DCNWO-RWOD) in Smart Cities. The proposed DCNWO-RWOD technique involves the design of deep consensus network (DCN) to detect waste objects in the input image. For improving the overall object detection efficiency of the DCN model, the whale optimization algorithm (WOA) is exploited. Finally, Naïve Bayes (NB) classifier is used for the classification of detected waste objects into recyclable and non-recyclable ones. The performance validation of the DCNWO-RWOD technique takes place using the open access dataset.
Ghanshala et al.  presented ML based structure for classifying the regions that are free in garbage and regions containing maximum density garbage. Baker et al.  examined the developing requirement for automatic e-waste recycling as a vital condition for coping with fast-developinge-waste streaming and it can be shed the light on effect of AI from supportive the recycling procedure with smart classifier of devices, in which the smartphone was analysis. This technique was executes transfer learning (TL) as a particular method of AI with fine-tune the resultant layer of AlexNet as pre-training method and implementing the execution on small-size data set which has 12 classes in 6 smartphone brands. Niu et al.  analyzed for implementing TL approaches for constructing a robust method dependent upon somewhat small set of trained data with transmitting data in present deep network namely AlexNet, Resnet, and DensNet. While the alteration, can be present a novel domain loss function, Dual Dynamic Domain Distance (4D) for producing further correct area distance measurements.
Alqahtani et al.  progress the IoT based Urban Waste Management system. An IoT device is utilized for monitoring human activity and for supporting waste management. The information on a city has gathering and processing from cuckoo search (CS)-optimizing long short-term recurrent neural network (RNN). The network enabled the study of waste sources, waste variety, and truck size. This data notified the waste management center for appropriating performances are obtained. Khoa et al.  propose the examination case executed at the real campus of Ton Duc Thang University (Vietnam) for evaluating the efficiency and feasibility of model execution. It can be examining data transfer on LoRa component and illustrate the benefits of presented method that is executed with easy circuit planned with minimum cost, usability, and replaceability. This method saved time by determining an optimum route from the management of waste collections.
In , an effective solution to smart and effective waste management utilizing ML and IoT was presented. During the presented solution, the researchers have utilized moisture sensor, Arduino UNO microcontroller, and ultrasonic sensor. The hardware prototype is also established to present structure. Therefore, the projected solution to effective waste management realizes the purpose of establishing clean and pollution-free city. In , the concept of realtime smart waste classifier technique was projected which utilizes a hybrid method for classifying waste as to different classes. There are 2 ML techniques as multilayer perceptron (MLP) and multilayer CNN (ML-CNN) are executed. The MLP was utilized for providing binary classifiers, for instance, metal or non-metal wastes, and CNN recognizes the class of non-metal wastes. The camera was located facing the waste conveyor belt that gets an image of wastes and classifies it.
In this study, an effective DCNWO-RWOD technique has been developed to properly identify and classify the objects into recyclable and non-recyclable ones. The proposed DCNWO-RWOD technique undergoes major subprocesses namely DCN based object detection, WOA based hyperparameter tuning, and NB based classification. For improving the overall object detection efficiency of the DCN model, the WOA is exploited.
Initially, the DCN model is employed for the detection of waste objects in smart cities . The DCN is an identical structure as RetinaNet and utilizes a Feature Pyramid Network (FPN) for extracting features at several scales in ResNet-50 support with squeeze-and-excite process to residual. For enabling notice tiny objects, it can be utilized a maximum resolution different of FPN. In order to high-resolution DCN, it is comprised of a further upsampling layer for restoring the similar spatial resolution as input. The extracting feature map at all scales was forwarded to Centroid Proposal Network (CPN). Besides the RetinaNet, the CPNs at all the scales don’t share weights for capturing distinct demonstrations at all scales as every image in the assumed that microscopy data sets are similar magnification. Conversely, an region proposal network (RPN) that forecasts the bounding boxes, the CPN forecasts the group of centroids with equivalent confidence score . Related to the RPN from RetinaNet, it can be utilized anchor as prior, however with distinct configurations.
To all spatial place from grid, it can be utilized anchors from entire containing one anchor with no offset, 8 anchors with length 0.5 pixels, and 8 anchors with length one pixel. The anchor vector is replaced that it well covers a unit disk. The anchors was implemented to forecasted vector obtaining:
where refers the spatial place from the grids and represents the scaling factor for normalizing the distributions of . Therefore, every feasible anchor from the anchor outline is added to every place from the grid. The network regresses offset vector in these places. Relating the anchor with spatial places from the grid supports individual neuron for specializing, as it is concentrated on forecasting tiny offsets of the subset of centroid places. For encouraging the network to favour anchor that equal, the confidence score of huge regression values to the magnitude of are penalization (regularization) for computing the confidence score of :
In order to numerical reason, the CPN forecasts the logit (logarithm of odds) Rather of directly forecasting the confidence score . Therefore, the regularized from (2) was executed from logit space obtained the regularization logit :
The feature extracting of presented CPN was various in RPN from RetinaNet with concatenating the regressed offset with features extracting in the FPN resultant , with feature map, previously forecasting the logit vector of confidence score .
For optimally modifying the hyperparameters of the DCN model, the WOA  is applied to it to increase the classifier results. Mirjalili and Lewis developed a WOA which is Meta heuristic method where it stimulates the foraging behavior of humpback whales. As another optimization model, the WOA optimization method begins with random population initialization. The entire searching method is separated as, search the prey, encircle the target, and spiral bubble-net feeding maneuver. Since a system efficiency is based on the balance among local and global search models, WOA employs these 3 stages for balancing between exploitation and exploration phases, based on certain conditions. Finally, the algorithm ends according to predetermined conditions.
Based on its existing position, whales randomly search the target . These characteristics of humpback whales are utilized for amplifying the exploration ability. It could be mathematically expressed by the subsequent formula:
where as denotes a location vector of population, indicates a vector is arbitrarily selected in the existing populations, the existing iteration is signified as shows the distance amongst the current and random individual of populations, the dot operator specifies the element-wise multiplication procedure, and is utilized for defining accurate values.
The two variables also called as , and coefficient vectors are estimated by:
In which the value of represent a value linearly reduced from 2 to at the iteration time, and indicates an arbitrary value. In the prey encircling process, the optimal solution established until now is considered as the solution which is closer to the optimum values. The residual individual in the population updates the position nearer the existing optimal solution. It could be mathematically expressed by the subsequent formula as:
In which denotes the present optimal solution. In WOA, during the search process, the bubble-net strategy is executed by:
In which b is utilized for determining the shape of logarithmic spiral, and the values of has a constant, denotes an arbitrary value estimated by the Eq. (12):
In the equation, the values of linearly reduce with the values to in the iteration, and is an arbitrary value within [0, 1]. In the searching phase, switching between the exploitation and exploration phase is selected on the basis of When the exploration phase takes place that allows global search through Eqs. (4) and (5). If , upgrade the position of individual is implemented by Eqs. (9) or (11). Based on a probabilities value that is 0.5 to all the WOA processes switch among encircling prey or bubble-net attack model. Fig. 2 demonstrates the flowchart of WOA.
At the last stage, the NB classifier  is utilized for the classification of detected waste objects into recyclable and non-recyclable ones. The NB classifier method was dependent upon Bayes rule that considers that every feature are conditional independent of everyone. So, if has of features conditional independent of one another provided , it can be determined as Eq. (14)
Usually, has some discrete value variable and features are some separate or real valued feature. The purpose is for training a classifier which resultants the probability on feasible values of , to all novel instances is that forecasted. Based on the Bayes rule, the probabilities that is undertaking their feasible value was provided in Eq. (15)
where the sum over entire feasible values of was attained. According to the assumption that feature are conditional independent offered , Eq. (15) is altered as Eq. (16) that is the elementary formula to NB technique.
In order to a novel test instance, , the above in Eq. (16) computes the probabilities that is affect a certain class, provided the observed feature values of , distribution and as evaluated in the trained data. For determining the high probable value of , the last decision rule to NB classifying is provided in Eq. (17)
As the denominator was independent , to decreases to the subsequent in Eq. (18)
The performance validation of the proposed model takes place using the benchmark dataset from Kaggle repository (available at https://www.kaggle.com/asdasdasasdas/garbage-classification). The dataset comprises images under six class labels namely cardboard, glass, metal, paper, plastic, and trash. The results are examined in two ways namely training/testing of 80:20 and 70:30. The amount of samples under each class is depicted in Table 1. Figs. 3–4 illustrates the sample images of waste classification.
Fig. 5 depicts the confusion matrix derived by the DCNWO-RWOD technique on the train/test data of 80:20. The figure reported that the DCNWO-RWOD technique has proficiently classified 75 images into class 0, 95 images into class 1, 80 images into class 2, 115 images into class 3, 93 images into class 4, and 22 images into class 5.
Table 2 and Fig. 6 demonstrate the overall classifier result analysis of the DCNWO-RWOD technique under train/test data of 80:20. The results have shown the effectual outcome of the DCNWO-RWOD technique under all class labels. For instance, with class 0, the DCNWO-RWOD technique has attained of 0.9747, of 0.9747, of 0.9919, of 0.9747, and MCC of 0.9699. Simultaneously, with class 3, the DCNWO-RWOD methodology has gained of 0.9831, of 0.9915, of 0.9939, of 0.9872, and MCC of 0.9833. Concurrently, with class 5, the DCNWO-RWOD approach has obtained of 0.9600, of 0.9600, of 0.9959, of 0.9600, and MCC of 0.9579.
Fig. 7 showcases the confusion matrix derived by the DCNWO-RWOD approach on the train/test data of 70:30. The figure portrayed that the DCNWO-RWOD system has proficiently classified 115 images into class 0, 144 images into class 1, 117 images into class 2, 173 images into class 3, 138 images into class 4, and 32 images into class 5.
Table 3 and Fig. 8 illustrate the overall classifier result analysis of the DCNWO-RWOD approach under train/test data of 70:30. The outcomes exhibited the effectual outcome of the DCNWO-RWOD approach under all class labels. For instance, with class 0, the DCNWO-RWOD method has obtained of 0.9664, of 0.9746, of 0.9905, of 0.9705, and MCC of 0.9648. Besides, with class 3, the DCNWO-RWOD method has attained of 0.9886, of 0.9886, of 0.9946, of 0.9886, and MCC of 0.9850. Finally, with class 5, the DCNWO-RWOD methodology has gained of 0.8889, of 0.8421, of 0.9865, of 0.8649, and MCC of 0.8581.
Fig. 10 portrays the receiver operating characteristic (ROC) analysis of the DCNWO-RWOD method train/test data of 70:30. The figure depicted that the DCNWO-RWOD approach has reached improved outcomes with a maximum ROC of 99.9469.
Fig. 9 demonstrates the sample waste classification results obtained by the DCNWO-RWOD technique. The figure reported that the DCNWO-RWOD technique has effectually identified and classified different classes of waste objects.
A comparison study of the garbage waste classification model with recent approaches is shown in Table 4. Fig. 10 illustrates the comparative analysis of the DCNWO-RWOD approach with recent methods. The figure reported that the CNN model has accomplished ineffectual outcome with the lower value of 0.8860. In line with, the MHS technique has resulted in slightly increased value of 0.9710. Followed by, the MLP and ML-CNN techniques have accomplished moderately closer values of 0.9800 and 0.9800 respectively. But the DCNWO-RWOD technique has surpassed the other methods with of 0.9807.
Fig. 11 depicts the comparison analysis of the DCNWO-RWOD approach with recent techniques. The figure revealed that the CNN approach has accomplished ineffectual outcome with the lower value of 0.0680. Likewise, the MHS approach has resulted in somewhat superior value of 0.9230. Also, the MLP and ML-CNN systems have accomplished moderately closer values of 0.0840 and 0.9800 respectively. But the DCNWO-RWOD method has surpassed the other techniques with of 0.9804.
Fig. 12 demonstrates the comparative analysis of the DCNWO-RWOD system with recent methods. The figure portrayed that the CNN method has accomplished ineffectual outcomes with the lesser value of 0.8770. Also, the MHS approach has resulted in slightly higher value of 0.9160. Afterward, the MLP and ML-CNN systems have accomplished moderately similar values of 0.9900. But the DCNWO-RWOD methodology has surpassed the other approaches with of 0.9946.
In this study, an effective DCNWO-RWOD technique has been developed to properly identify and classify the objects into recyclable and non-recyclable ones. The proposed DCNWO-RWOD technique undergoes major subprocesses namely DCN based object detection, WOA based hyperparameter tuning, and NB based classification. For improving the overall object detection efficiency of the DCN model, the WOA is exploited. Finally, the NB classifier is used for the classification of detected waste objects into recyclable and non-recyclable ones. The performance validation of the DCNWO-RWOD technique takes place using the open access dataset. The extensive comparative study reported the enhanced performance of the DCNWO-RWOD technique interms of several measures. Therefore, the DCNWO-RWOD technique has been employed as an effective tool for waste object detection and classification. In future, the detection performance of the DCNWO-RWOD technique can be boosted by the design of ensemble of DL models.
Funding Statement: The authors extend their appreciation to the Deanship of Scientific Research at King Khalid University for funding this work under grant number (RGP2/42/43). Princess Nourah bint Abdulrahman University Researchers Supporting Project number (PNURSP2022R114), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia.
Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding the present study.
- M. W. Rahman, R. Islam, A. Hasan, N. I. Bithi, M. M. Hasan et al., “Intelligent waste management system using deep learning with IoT,” Journal of King Saud University-Computer and Information Sciences, pp. S1319157820304547, 2020.
- S. Kumar, D. Yadav, H. Gupta, O. P. Verma, I. A. Ansari et al., “A Novel YOLOv3 algorithm-based deep learning approach for waste segregation: Towards smart waste management,” Electronics, vol. 10, no. 1, pp. 14, 2020.
- O. Adedeji and Z. Wang, “Intelligent waste classification system using deep learning convolutional neural network,” Procedia Manufacturing, vol. 35, pp. 607–612, 2019.
- A. R. Pathak, M. Pandey and S. Rautaray, “Application of deep learning for object detection,” Procedia Computer Science, vol. 132, no. 6, pp. 1706–1717, 2018.
- Z. Q. Zhao, P. Zheng, S. T. Xu and X. Wu, “Object detection with deep learning: A review,” IEEE Transactions on Neural Networks and Learning Systems, vol. 30, no. 11, pp. 3212–3232, 2019.
- S. Sudha, M. Vidhyalakshmi, K. Pavithra, K. Sangeetha and V. Swaathi, “An automatic classification method for environment: Friendly waste segregation using deep learning,” in 2016 IEEE Technological Innovations in ICT for Agriculture and Rural Development (TIAR), India, pp. 65–70, 201
- K. D. Sharma and S. Jain, “Overview of municipal solid waste generation, composition, and management in India,” Journal of Environmental Engineering, vol. 145, no. 3, pp. 04018143, 2019.
- A. Madankar, M. Patil and P. Khandait, “Automated waste segregation system and its approach towards generation of ethanol,” in 2019 5th Int. Conf. on Advanced Computing & Communication Systems (ICACCS), United States, pp. 571–573, 2019.
- K. Habib, J. Schmidt and P. Christensen, “A historical perspective of global warming potential from municipal solid waste management,” Waste Management, vol. 33, no. 9, pp. 1926–1933, 2013.
- S. Xie, R. Girshick, P. Dollar, Z. Tu and K. He, “Aggregated residual transformations for deep neural networks,” in 2017 IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, pp. 5987–5995, 2017.
- T. Ghanshala, V. Tripathi and B. Pant, “A machine learning based framework for intelligent high density garbage area classification,” in Proc. of the Future Technologies Conf., Canada, pp. 147–152, 2020.
- N. Baker, P. S. Müller and U. Handmann, “Transfer learning-based method for automated e-waste recycling in smart cities,” EAI Endorsed Transactions on Smart Cities, vol. 21, no. 16, pp. 169337, 2018.
- S. Niu, J. Wang, Y. Liu and H. Song, “Transfer learning based data-efficient machine learning enabled classification,” in 2020 IEEE Int. Conf. on Dependable, Autonomic and Secure Computing, Int. Conf. on Pervasive Intelligence and Computing, Int. Conf. on Cloud and Big Data Computing, Int. Conf. on Cyber Science and Technology Congress (DASC/PiCom/CBDCom/CyberSciTech), Calgary, AB, Canada, pp. 620–626, 2020.
- F. Alqahtani, Z. A. Makhadmeh, A. Tolba and W. Said, “Internet of things-based urban waste management system for smart cities using a cuckoo search algorithm,” Cluster Computing, vol. 23, no. 3, pp. 1769–1780, 2020.
- T. A. Khoa, C. H. Phuc, P. D. Lam, L. M. B. Nhu, N. M. Trong et al., “Waste management system using iot-based machine learning in university,” Wireless Communications and Mobile Computing, vol. 2020, pp. 1–13, 2020.
- R. Khan, S. Kumar, A. K. Srivastava, N. Dhingra, M. Gupta et al., “Machine learning and iot-based waste management model,” Computational Intelligence and Neuroscience, vol. 2021, no. 3, pp. 1–11, 2021.
- A. Gondal, M. I. Sadiq, T. Ali, M. Irfan, A. Shaf et al., “Real time multipurpose smart waste classification model for efficient recycling in smart cities using multilayer convolutional neural network and perceptron,” Sensors, vol. 21, no. 14, pp. 4916, 2021.
- T. Wollmann and K. Rohr, “Deep consensus network: Aggregating predictions to improve object detection in microscopy images,” Medical Image Analysis, vol. 70, no. 4, pp. 102019, 2021.
- S. Mirjalili and A. Lewis, “The whale optimization algorithm,” Advances in engineering software, vol. 95, no. 12, pp. 51–67, 2016.
- S. Chakraborty, A. K. Saha, S. Sharma, S. Mirjalili and R. Chakraborty, “A novel enhanced whale optimization algorithm for global optimization,” Computers & Industrial Engineering, vol. 153, no. 5, pp. 107086, 2021.
- N. Singh and P. Singh, “A hybrid ensemble-filter wrapper feature selection approach for medical data classification,” Chemometrics and Intelligent Laboratory Systems, vol. 217, pp. 104396, 20