Garbage Detection Using Deep Learning Methods (GD-DLM)
Garbage Detection Using Deep Learning Methods (GD-DLM)
Abstract: In today’s expanding and densely populated world, it’s crucial to design an automatic intelligent garbage sorter
machine that uses advanced sensors. Garbage picture classification is a fundamental computer vision problem that must
be solved before sensors can be included in this system. This research presents a model for autonomous trash classification
using deep learning that can be applied in high-tech garbage sorting equipment. The 2,527 photos in the rubbish dataset
are categorized into six types: trash, cardboard, glass, metal, paper, and plastic. The next step is the creation of GD-DLM,
a deep learning model for garbage categorization that is an upgrade from Xception and DenseNet121 models. At last, the
tests are run to evaluate GD-DLM against the best-of-breed approaches to garbage classification. The suggested Xception
and DenseNet-121 models scored 92.11% and 88.63%, respectively, compared to the baseline accuracy.
How to Cite: M. Mudasar Azeem; Syed Anwaar Mehdi; Muhammad Ali Shahid; Mubasher Hussain; Muhammad Adnan;
Spogmai; Bilal Shabbir Qaisar (2025) Garbage Detection Using Deep Learning Methods (GD-DLM). International
Journal of Innovative Science and Research Technology, 10 (9), 608-618.
https://doi.org/10.38124/ijisrt/25sep396
and recognition systems; these systems rely on deep learning technique would be suggested for the improvement
architectures like VGG. Such solutions work, but they are of accuracy. Following the main contributions of this
computationally expensive in processor, memory, and research:
storage space requirements. Hence, in many applications
with computational limits, like mobile devices, their Developed a Garbage Detection System using Deep
utilisation is not practical. The usage of "mobile" CNN Learning Methods (GD-DLM) that recognizes the
architectures—lightweight CNN designs tailored for mobile cardboard, glass, metal, paper, plastic, and trash classes.
devices—is one viable alternative that has been investigated
in the literature. But as far as we are aware, no research has Improved the accuracy of the existing deep learning
yet looked at how to evaluate appropriate litter detectors with model.
neural network topologies, especially in cases when devices
have limited processing power. Also, there are a lot of cloud II. LITERATURE REVIEW
computing services for machine learning, but they don't have
fast enough reaction times for real-time applications. This is A number of outstanding individuals have made
particularly true in outdoor areas like forests and beaches, indelible marks in the field of waste management-related
where network connection is spotty at best. In addition, there machine learning and internet of things (IoT). An image
is an increase in power consumption during data transfer via processing and Convolutional Neural Network (CNN)
the network. Thus, adopting lightweight neural networks has garbage categorisation system was built in a later study [11]
several benefits, such as reduced energy usage, local (Bobulski and Kubanek, 2019). Their research has been
processing, and efficiency. focused solely on detecting polyethylene. A battery of tests
was run by the researchers to determine the presence of
Mynation has lately implemented policies to reduce its terephthalate, polyethylene, polypropylene, and polystyrene.
own waste output in light of the concerning global increase Capsule-Net, a neural network that can differentiate between
in trash creation over the past few years. A domestic waste plastic and non-plastic products, was employed by the
management system for controlled release, recycling, scientists for solid waste management (Sreelakshmi et al.,
transportation, and treatment of waste is now mandated by 2019). Two publicly available datasets were determined to
the most recent round of revisions to the "Law on Preventing have an accuracy of 96.3% and 95.7%, respectively, by the
and Controlling Environmental Pollution by Fixed Wastes" writers. The full integration was built and tested using
of the People's Republic of China, which took place in 2020. multiple pieces of hardware.
Currently, the majority of the public environment's trash
sorting occurs in a limited number of designated areas. In a recent work (Huiyu and O, O. G. Kim, S. H.,
Ineffective sorting is just one of several issues; another is the 2019), the author developed a novel garbage categorisation
unpleasant working environment. It may be as simple as model by utilising deep learning processes. This method was
sorting trash at home to get to the core of the issue. Landfills also used for recycling waste. Adedeji and Wang (2019) put
collect an overwhelming variety of waste products, and it's out the idea that a deep learning model may be used to
hard to keep track of them all since individuals lack a basic automatically identify trash. The authors also mentioned that
understanding of classification and hence seldom separate the model was employed for the purpose of sorting
waste into discrete groups. A lot of people have been recyclable waste. The authors of the article state that in order
thinking about getting home care robots recently. One to classify trash, they utilised a Support Vector Machine and
example is the rapid industrialisation and widespread public a pre-trained Convolutional Neural Network (CNN) called
adoption of sweeping robots, which were among the first ResNet-50 (Nowakowski and Pamua, 2020). Comparing the
products of their kind. Concurrent with this, mass production model to a publically available dataset revealed an accuracy
of automobiles began. A lot of the sweeping robots on the rate of 87%. A recent study looked into a new method of
market now aren't very smart, even though they have some identifying and categorising e-waste, or electronic trash
basic features like path planning, autonomous charging, and (Misra et al., 2018). Classification was carried out using the
obstacle avoidance. CNN model, while the identification of different types of e-
waste was accomplished using the RCNN model. The
Our top goal should be maintaining a clean, healthy researchers discovered an accuracy range of 90% to 97% for
environment for future generations. Several issues with both detection and classification. Using the IoT for trash
employing deep learning for garbage detection have been management was not mentioned in any of the articles [11, 21,
raised in the current research. One problem was that several 23, 19, 24].
categories, including but not limited to cardboard, cardboard,
glass, metal, paper, plastic, and trash, had yet to be included An essential approach to automated, resilient waste
in earlier research. This research aims to address these gaps management was presented in a publication [26]. The authors
in the existing literature. demonstrated a smart garbage can using the ultrasonic sensor
in conjunction with a number of gas sensors. Additionally,
The current study proposes a Deep Learning Method they suggested using a cloud server and an Android app to
for Garbage Detection (GD DLM), which would identify the provide a live feed of trash. Here, ML methods were
dataset. The proposed method would be trained on the completely disregarded. A clever and economical waste
garbage dataset, which contains six classes such as management system was concocted by the author of a paper
cardboard, glass, metal, paper, plastic, and trash. A deep [4, 41]. As a result of the Internet of Things, the authors have
Fig 2 (a) Cardboard, (b) Glass, (c) Metal, (d) Paper, (e) Plastic, and (f) Trash are Classes of the Garbage Dataset.
Architecture of Xception Base Model The Xception neural network design uses depth-
Scientists have developed inception modules that separable convolutions to complete complex tasks. The
bridge the depth-separable convolution method and the engineers at Google came up with the idea. For convolutional
regular convolution utilised in convolutional neural networks neural networks, Google recommends using inception
(a depthwise convolution followed by a pointwise modules as a "middle ground" between regular convolution
convolution). One way to conceptualise a depth separable and the depth-wise separable convolution approach (a
convolution in this context is as an Inception module with a depthwise convolution followed by a pointwise convolution).
maximum height restriction. Using these findings, we With this analogy in mind, it’s easy to see how a depthwise
provide a novel architecture for a deep convolutional neural separable convolution is analogous to an infinitely tall
network that eliminates the need for Inception modules in Inception module. They propose a unique Inception-like
favour of depthwise separable convolutions. On a dataset architecture for deep convolutional neural networks that use
including 350 million pictures and 17,000 classes, our depthwise separable convolutions in place of Inception
Xception [13] approach surpasses Inception V3. However, modules to take advantage of this discovery.
Xception [13] outperforms Inception V3 somewhat on the
ImageNet dataset (for which Inception V3 was built). The Compared to traditional convolutions, depth-separable
Xception design has improved performance through variants are expected to reduce calculation time significantly.
increased capacity and more efficient use of model In Figure 4, we see the analysed data.
parameters.
Accuracy = T P+T N / (T P+T N +FP+FN) As part of our training and evaluation, we used high-
powered Graphics Processing Units (GPUs) on a brand-new
Precision Google Colab [3] Pro account. To accomplish this, we
When analysing the effectiveness of a model, utilized transfer deep learning models. Training of the
classification accuracy may not always be the most proposed GD-DLM with Sparse Categorical Crossentropy
appropriate metric to employ. For instance, this is one of the loss functions was carried out in all trials with the Adam
scenarios where there is a considerable gap in socioeconomic optimizer and a learning rate of 0.0001. During the training
status. It’s a safe bet to assume that each sample is of the phase, which included 10 iterations and an initial batch size
highest possible quality. If the model isn’t picking up any of 8, the best Val_loss models were retained. The Xception
new information, it would be irrational to infer that all and DenseNet121 models recommended the following
components belong to the best class. Therefore, when we talk parameters: 8 batches, 5 epochs, early termination, and
about accuracy, we refer to the fluctuation in findings you model saving based on Val_loss.
receive while measuring the same object several times with
the same tools. The term "precision" refers to one of these After augmenting it using various methods, we used the
statistics and can be defined as follows: garbage dataset to evaluate the performance of the
provided Xception and DenseNet121 models.
Precision = T P / (T P+FP) When compared to its predecessors, the suggested GD-
DLM demonstrates significant improvement in terms of
accuracy.
The Performance Analysis of the Proposed Garbage be seen in Figure 5, the training accuracy improves from
Detection using Deep Learning Methods (GD-DLM) 72.34% after the first epoch to a final value of 98.53%. As
can be seen in Figure 5, Xception’s validation loss was
The Performance of Xception Base Model drastically cut down from an initial value of 40.69% to just
The performance of the Xception baseline model was 26.16%. After the first training session, the loss was 85.18%,
measured using the garbage data set. From the end of the first and it was 6.39% after concluding training, which is identical
epoch to the end of the most recent epoch, the accuracy of to the initial loss.
the model validation grew from 86.01% to 92.99%. As can
Table 2 shows the results of an unobserved test set on had an average F1 score, recall, and precision of 91%, 90%,
the Xception base model. The model’s overall accuracy on and 91%, respectively. The paper’s class performs
the test set was 92.11%; however, Xception performed exceptionally well, with a 95% F1 score, 95% recall, and
exceptionally well on the cardboard class, with a precision of 95% precision. A typical F1 score, precision, and recall for
98%, a recall of 93%, and an F1-score of 96%. The average the plastics category were 89%, 86%, and 92%. For the
values for the F1 score, precision, and recall for the glass rubbish class, the average values for F1 score, precision, and
class were 93%, 92%, and 94%, respectively. The metal class recall were 83%, 92%, and 76%, respectively.
Table 2 Precision, Recall, F1 Score, and Accuracy of the Xception Base Model
Performance Measures Precision Recall F1 Score Accuracy
cardboard 98% 93% 96% 92.85%
Glass 92% 94% 93% 93.90%
Metal 90% 91% 91% 91.18%
Paper 94% 95% 95% 95.37%
Plastic 86% 92% 89% 91.89%
Trash 92% 76% 83% 75.86%
Average Accuracy 92.11%
A confusion matrix was used to assess the classification will be used to evaluate Xception’s performance (shown in
accuracy of different models visually. Rows in the confusion Figure 6). The confusion matrix shows that when the default
matrix that are not on the diagonal represent predictions that parameters for the Xception model are employed, 92.11% of
turned out to be erroneous. Each class’s associated Xception the data are correctly identified, leaving only 7.89%
base model demonstrated that deeper hues suggested more unaccounted for. According to the confusion matrix, the
important classification accuracy, but lighter shades told Xception base model successfully classified all six samples.
misclassified data. The confusion matrix from the test set
The Performance of DenseNet121Base Model 97.34% after the last epoch. Figure 7 displays a significant
The performance of the DenseNet121 model was reduction in validation loss for DenseNet121, from 54.67%
analysed on the garbage dataset. After the first epoch, the to 40.84%. As an added note, the training loss was 75.03%
model’s validation accuracy was 82.32%; after the most after the first period and 10.11% after the final training, both
recent epoch, it was 88.11%. Figure 6 depicts the training consistent with the initial loss.
accuracy improving from 72.68% after the first epoch to
Table 3 shows how the DenseNet121 baseline model and recall for the metal class were 89%, 94%, and 91%. The
fared on an unknown test set. While the model’s overall paper class is outstanding, with a 97% F1 score, a 79% recall
accuracy was 86.63% across all classes in the test set, rate, and a 97% precision rate. On average, the F1 score,
DenseNet121 performed best on the cardboard class, with a precision, and recall for the plastics category were 89%,
precision of 79%, a recall of 96%, and an F1-score of 86%. 84%, and 89%. The recall was 87%, the accuracy was 88%,
The average F1 score, precision, and recall for the glass class and the F1 score was 88% on average for the rubbish class.
were 90%, 90%, and 84%. The average F1 score, precision,
Table 3 Precision, Recall, F1 Score, and Accuracy of the DenseNet121 Base Model
Performance Measures Precision Recall F1 Score Accuracy
cardboard 79% 96% 86% 97.71%
Glass 97% 84% 90% 86.25%
Metal 89% 94% 91% 94.12%
Paper 97% 79% 87% 78.70%
Plastic 84% 96% 89% 95.95%
Trash 87% 90% 88% 89.66%
Average Accuracy 88.63%
We could visually compare the models’ ability to shown in the confusion matrix, the DenseNet121 baseline
classify data using a confusion matrix. Diagonal rows in the model’s predictions are consistent across all image types.
confusion matrix represent incorrect predictions. The more The confusion matrix demonstrates that when the
accurate classification was achieved by the corresponding DenseNet121 model was trained with the default settings,
DenseNet121 base model for each class, as indicated by 88.63% of the data were categorised correctly, and 11.37%
darker colors, while lighter colors depicted less precise were misclassified. By comparing confusion matrices across
classification. To evaluate DenseNet121, we will employ all 6 samples, we can see that the DenseNet121 baseline
confusion matrices from the test set (shown in Figure 8). As model achieves excellent results.