Content uploaded by Pratibha Singh
Author content
All content in this area was uploaded by Pratibha Singh on Dec 11, 2020
Content may be subject to copyright.
Vol 11, Issue 7,July/ 2020
ISSN NO: 0377-9254
www.jespublication.com
Page No:61
Trash Classification: Classifying garbage using Deep Learning
Ishika Mittal1, Anjali Tiwari2 , Bhoomika Rana3 and Pratibha Singh4
1-3Student , CSE, ABESEC, Ghaziabad
4Professor. CSE, ABESEC, Ghaziabad
ishika.16bcs1177@abes.ac.in, anjali.16bcs1044@abes.ac.in ,
bhoomika.16bcs115@abes.ac.in, pratibha.singh@abes.ac.in
Abstract—Officials in developing countries like
India usually acknowledge the need for better
management. However, little efforts are done to
improve the situation, and changes take a long
period of time. As we know, India's population is
equivalent to 17.7% of the total population. With
the rise of development of smart cities across
India, a Smart Garbage Management system is
very necessary. Since the amount of waste is
multiplying day by day. It is essential to bring the
best approach to manage this problem because the
generated waste exceeds 2 billion tones. The
existing gms in India practices collection of
domestic and industrial waste and dumping into
big dumping yards . Solid waste separation is
done by laborers which is not so systematic,
consumes a lot of time and it is not even
completely feasible due to large amounts of
garbage. The purpose of this research is to build a
real time application which recognizes the type of
waste and categorize it into defined categories. By
implementing this Trashnet classification system
,we want to reduce the physical efforts and
effectively segregate the waste into different
categories. The model used for this study is
Convolution Neural Network (CNN), a Machine
Learning algorithm which is used on a dataset
containing images of garbage . This system
ensures a best way for waste management and
will also speed up the segregation process with
higher accuracy. This study lasts with remarkable
results and is successful to classify various images
of waste in correct classes.
Keywords—Deep Learning, Convolution neural
network, Trash net, Classification
1. INTRODUCTION
The increasing urbanization of India poses
so many threats as with increase in population land
consumption increases, utilities increases,
consumption of food increases, use of resources
increases and more than these the quantity of waste
generated by 1.37 billion people increases. Waste
management system is a large challenge for urban
areas among most parts of countries all over the
world. A huge quality of garbage is increased each
and every day in India. It is sad to know that 5%
of this huge amount of garbage is recycled. The
only solution to this problem is to identify and
classify the garbage at the initial stage by itself.
The proper separation process of waste is
managed so as to get less amount of risks on our
health and ecosystem. Presently there is no best and
profitable system for classification of wastes. Our
point is to reduce the physical efforts and
effectively segregate the waste . Our goal is to
achieve an increase in efficiency of garbage
processing solution and to classify non-recyclable
garbage because it is very difficult to get a waste
separation process which classifies garbage with
100% accuracy and 0% loss. We need to get
proposed methods which not only provide
environmental benefits but also benefit for saving
manpower and time.
2. PROBLEM STATEMENT
World bank’s calculation that India’s
waste will reach 3.77 lakh tons by 2025, which
makes waste management one of the vital issues in
our country. It has been predicted that since the
growth of population reaches 9.6 billion people by
2050 . It is very difficult to deal with the lot of
waste. To further add to this problem, the world
sees India, a country which generates 1.43 lakh
tones of solid waste per day. This review gives out
various problems related to Waste management in
smart and automated cities, where the waste
collection system is not developed[16].Presently in
India, there is no automatic waste segregation
system at domestic level and so the need of the
hour is developing a tamp, cheap cost , eco-
friendly and feasible classification model for urban
households[2]
Vol 11, Issue 7,July/ 2020 ISSN
NO: 0377-9254
www.jespublication.com
Page No:62
3. RELATED WORK
Over the most recent couple of decades,
specialists and researchers have been dealing with
precisely grouping the pictures into their separate
classes. By custom, because of the need for
computational force and restricted picture datasets,
picture arrangement was difficult. However, today,
because of regularly expanding handling intensity
of the GPUs and the accessibility of enormous
datasets, it has become attainable to utilize PC
vision procedures effectively. In the field of
grouping of pictures, notable and profoundly
skilled CNN design is Alex Net [1], and ImageNet
Large Scale Visual Recognition Challenge
(ILSVRC) was won by it in 2012. The engineering
is nearly straightforward and not very profound,
and is, obviously, known to perform well. Alex Net
was compelling on the grounds that it began a
pattern of CNN approaches being exceptionally
famous in the ImageNet go up against and turning
into the best in class in picture arrangement.
The isolation of waste incorporates two
fundamental advances – ID and partition. The
standard waste isolation procedures incorporate
weight based isolation, Trommel separators which
relies upon the molecule size, Eddy current
separators which is utilized for metal isolation, X-
Ray innovation can be utilized to separate waste
material dependent on their densities. Recognizable
proof of the waste is a significant advance before
detachment and it very well may be done
effectively with the assistance of various AI and
picture preparing calculations. Convolutional
neural systems (CNNs) are most picked for
grouping of pictures. The CNNs permits to remove
interesting characteristics from the picture and
afterward order it into foreordained classes. Some
of the researches that have been done and related to
our review are listed below:-
In paper[1], The tests were carried out on proven
CNN models in this study. The results obtained
from this research, Adam received better accuracies
in the test than Adadelta. In addition , the data
augmentation procedure was implemented to
improve classification accuracy due to small
Trashnet dataset samples. The best results were
obtained from DenseNet121 with 95% fine-tuning.
The success rate of InceptionResNetV2 model was
94% for test accuracy using fine-tuning. It was
found that deep learning models were incorporated
in the classification of recyclable waste. They have
carried out some experiments on known deep
learning models for this purpose; the performance
rate in real-time systems was poor because of the
lack of sufficient data and the images having white
color background.
In paper[2], This paper makes use of
Faster R-CNN to get proposals for regions and
identify objects. Some of the areas where they were
lacking where training of the model was not done
from scratch and instead of that use of the pre-
trained model was done. They have only used ZF
Net that has 5 convolutional layers and 3 fully-
connected layers because of which the architecture
was not good. Test was done on the given dataset
but on the real Images.
In paper[3] , This narrative literature
review evaluated global issues due to different
fractions of waste showing how several pollution
sources affect the environment, population health
and sustainable development.The findings and case
studies presented that serve as a guide for scholars
and stakeholders to measure comprehensive
impacts and to plan integrated solid waste
collection and treatment systems to enhance global
sustainability.
In paper[4], The proposed framework has been
determined for successful programmed isolation of
waste at the source itself, along these lines
diminishing the physical endeavors. The
framework depends on ideas of Machine Learning,
Image preparation. The goal of this undertaking is
to catch pictures of a solitary waste material and
successfully recognize and isolate it into four
classes viz. Metal, glass, paper and plastic. The
model utilized for this task is Convolutional Neural
Network (CNN), a Machine Learning calculation.
This framework will guarantee compelling
robotized squander the board and will accelerate
the procedure of isolation with no human
intervention[7].
A novel application was proposed in this
paper[5] for measuring the cleanliness of a place,
with the use of a deep learning framework. The
application helps in localizing and classifying
waste from three meters of height in RGB images
taken by a camera facing ground. Due to the
unavailability of a waste dataset they used their
proposed acquisition to get photos. We have also
developed an annotation method to mark items for
25 different forms of waste in our dataset.. In order
to increase the accuracy of the existing system we
can attach more images other than the butt of
cigarette leaflet to their dataset.
Vol 11, Issue 7,July/ 2020 ISSN
NO: 0377-9254
www.jespublication.com
Page No:63
In this paper[6] , the specialists took the pictures of
a solitary bit of reusing or trash and grouped it into
six classes consisting of glass, paper, metal, plastic,
cardboard, and rubbish. The models which are
utilized help vector machines (SVM) with scale-
invariant element change (SIFT) highlights and a
convolutional neural system (CNN). Their tests
indicated that the SVM performed better than the
CNN; be that as it may, the CNN was not prepared
to its full capacity because of difficulty finding
ideal hyper parameters. So one has to continue
working on the CNN to figure out why it did not
train well and to train it to achieve a good accuracy.
It is expected that it should have performed
significantly better than the SVM classifier.
This Paper[7] .Al. Convolutional neural
systems have greatly affected example
acknowledgment. Sooner than the presentation of
CNNs, highlights were physically picked and
structured and afterward followed by a classifier.
The CNN has given an additional preferred
position which permits it to consequently take in
the highlights from the preparation information.
The engineering of CNN makes it particularly
strong for picture acknowledgment. The
investigation recommends that enormous marked
informational indexes have opened up for
preparing and approval. In addition, CNN learning
calculations have been actualized on the
enormously equal designs preparing units (GPUs)
which quicken learning and derivation and hence it
gets great for picture acknowledgment [6].
This Paper[8] recommends that CNNs can be
creatively utilized for order of waste substances.
The review additionally expresses that on tuning
hyper parameters suitably, the exactness of the
CNNs can be expanded essentially. In addition, the
dataset likewise assumes a basic job for deciding
the exactness of the model. Hence, the exactness
can be expanded considerably by addition of new
pictures in current datasets [7].
This Paper[9] , proposes a Multilayer
Hybrid profound learning System to naturally sort
squander which is arranged by a people in the
urban open region. CNN-based calculation is
utilized by Multilayer Hybrid System to take out
the picture highlights and a multilayer perceptron
(MLP) strategy to join pictures and other element
data to group squanders as recyclable. This
examination breaks down an aggregate of 50
diverse waste things that are normally found in the
researched territory. Among which, 40 are
recyclable and 10 are the
others[12]. The MHS is skilled and approved
against the physically marked things,
accomplishing in general order exactness higher
than 90% under two divergent testing situations,
which broadly beats a circumstance CNN-put
together technique depending with respect to
picture just data sources. The proposed MHS is
both financially and earthly.
This Paper[10], is planned to expand a
profound learning application which recognizes
kinds of trash into refuse so as to offer recyclability
with a vision framework. Preparing and testing will
be performed with picture information comprising
various classes on divergent trash types. The
informational collection utilized during preparing
and testing will be created from one of a kind
casings taken from trash pictures. Additionally,
Fig.1 System Design for Trashnet
move learning was utilized to get shorter preparing
and test measures with higher precision. As
adjusted models, Alexnet, VGG16, Googlenet and
Resnet structures were yielded In request to
execution trial of classifiers, two unique classifiers
are utilized as Softmax and Support Vector
Machines. 6 distinctive kinds of waste pictures
Vol 11, Issue 7,July/ 2020 ISSN
NO: 0377-9254
www.jespublication.com
Page No:64
were accurately arranged with the most elevated
precision with GoogleNet+SVM as 97.86%[9].
This Paper[11], This paper proposes an
answer that can recognize and characterize the
waste and sort it into the specific waste receptacle
(recyclable, natural and destructive squanders) with
no human hand. The framework utilizes profound
learning calculations to recognize and arrange the
losses into specific classification; the ordered
reused and natural squanders can be utilized for
future better purposes. This procedure will help the
earth in making progressively significant and
environmentally protected and help us to make a
rich green biological system and a promising better
future[10].
4. PROPOSED METHOD
The garbage collection in India still
depends on unorganized collection of waste. The
segregation process is still handled by mankind
which has many health issues, time consuming,
costly and less effective . In the existing system, all
the garbage collected from households and
industries was dumped on the outskirts of towns
and cities. Due to uncontrolled dumping of waste,
it gave rise to the problems like overflowing
landfills but also contributed a huge amount in
terms of ground waste pollution and Global
warming [11].
A new concept uses deep learning
algorithms to segregate the waste at initial level
thus making waste management more powerful.
The designed method sorts the waste into different
categories with higher accuracy. This study
reviews the best and effective approach to
segregate the garbage into different types.
The proposed method mainly focuses on
identification and segregation of waste by using
deep learning algorithms like convolution neural
networks(CNN) . Usually, all the toxic wastes are
dumped with recyclable waste which causes huge
damage to land. This project proposes an idea
where to segregate the toxic waste with higher
accuracy.
This method work in different phrases which are as
follows:
1. Capturing of images
2. Collection of datasets
3. Pre- processing of images
4. Training data
5. Testing data
6. Evaluation of model
3.1 PHRASES OF SYSTEM DESIGN
The phrases of system design are as follows:
a) Capturing of images:
● Waste objects :- In this step , we are
considering different local areas or bins
for collection of waste images.
● Stereo camera :- Stereo camera provides a
Large-scale High-resolution Outdoor
Stereo Dataset. So, In order to get clean
and proper images for the dataset . We
used a stereo camera to capture images of
different types of wastes.
● Object Detector :- Object detector is a
technology which relates to computer
types of application and image processing
that detects and defines various objects
such as humans, buildings and cars from
images. The technology has power to
identify once or various types of objects
within a d image at one. So , we used this
technology to classify images into
different categories like glass, paper,
plastic, metal , cardboard .
b) Collection of Dataset:-
After capturing images, it is classified into
different types such as glass, paper, plastic ,
metal , cardboard. It is important to train the model
to get best accuracy. Initially, it is labeled and
sequential of images have taken place. Further, it
is divided into two categories: training and testing
dataset.
c) Pre – processing of images :-
Various functions on images at cheapest rate
of abstraction whose goal is to improve the images
dataset that conquer undesired deformation or
increase some image information important for
next processing is known as Imagepre-processing.
Pre-processing plays an essential role to get the
best result. Under this , we can perform various
operations which are as follows: batch-size,
rescale, labels, image-size, shear-range, zoom-
range, etc.
d) Training Data :-
In machine learning, a common goal is to
study and develop algorithms that learn from
previous achievements and make various
predictions on a dataset. The model is started from
Vol 11, Issue 7,July/ 2020 ISSN
NO: 0377-9254
www.jespublication.com
Page No:65
fitting of a training dataset that is an example used
to fit the parameters of the model.
Training Set is passed through different layers
of the Convolutional Neural Network. Workings
of following layers are as follows:
● Layer 1 called as Conv2d layer convolves
the images using 32 filters each size of 3*3.
● Layer 2 again Conv2D layer also used as
convolve the images and using 64 filters each
size of 3*3.
● Layer 3 is MaxPooling2D layer picks the
max value in a matrix of size of 3*3.
● Layer 4 is Dropout at a rate of 0.5.
● Layer 5 is flattening the output from layer 4
and this flatten passed to layer6.
● Layer 6 is a hidden layer of the network
containing 250 neurons.
● Layer 7 is an output layer consisting of 10
neurons of 10 types of output using soft max
function.
e) Testing Data :-
Test data is the data that is used in the test of
a software system. Specifically identified data is
known as test data. Test data can be generated by
automation tools and we can also generate test data
by testers. Mainly in regression testing data test is
used as the same data can be used again and again.
f) Evaluation of Model :-
The evaluation of a model is an integral part of
any model development process .It helps us to find
the best suitable model to represent our data and
get the best chosen model for future work. There
and two ways in data science to check the
performance of a model: cross-validation and hold-
out. It is necessary to avoid overfitting so we use a
test set to evaluate the performance of the model.
4. IMPLEMENTATION
The implementation of this project starts with
recognition of an image and then classifying that
image.
4.1 Convolution Neural Network
CNN is a type of Deep Learning algorithm which
accepts input in the form of images , and it will
assign importance to various aspects in the dataset
and be able to metamorphose one from another.
The comparison to various classification algorithms
for pre-processing required in CNN is much less. In
primitive methods with limited training, ConvNets
have the ability to learn these training methods.
The system designed by ConvNet is defined as a
corresponding connection pattern of Neurons in the
Human Brain and inspired by the organization of
the Visual Cortex. A collection of such fields is
used to overlap to cover the entire visual area.
4.2 Dataset Used
A good dataset provides a model to train
in an efficient way. In this project, we used a
different dataset to train our model with
configuration. Datasets used in this study are
mentioned in Table 1 :
Table I Description of various datasets used
Dataset
Resolution of
image
Size of
train
data
Size of
test
data
No. of
classes
Name of
classes
1.Garythung
Yang
512 *384
2390
137
5
Glass, paper,
plastic,
cardboard,
metal
2.Waste
classifier
master
64*64
940
459
2
Cardboard
and metal
3.Trash net
60*30
22564
2481
2
Organic and
recyclable
4.Real images
512*384
940
11
2
Cardboard
and metal
In the below graphs, we are trying to show the
training accuracy against validation accuracy. As
shown in graph, corresponding decrease of losses
in training and validation dataset with the increase
in accuracies.
0
0.2
0.4
0.6
0.8
1
Training Vs Test Accuracy
Traini
ng
acc
Test
acc
Fig. 2 A graph which shows variation between
Training acc and test acc of dataset 1
0
0.5
1
1.5
2
Training Vs test Loss
Train
ing
loss
Test
loss
Fig. 3 A graph which shows variation between
Training and test loss of dataset 1
0
0.2
0.4
0.6
0.8
1
Training Vs test accuracy
Traini
ng acc
Test
acc
Fig. 4 A graph which shows variation between
Training acc and test acc of dataset 2
0
0.2
0.4
0.6
0.8
1
Training Vs Test Loss
Training
Loss
Test
Loss
Fig. 5 A graph which shows variation between
Training and test loss of dataset 2
0
0.2
0.4
0.6
0.8
1
Training Vs Test Accuracy
Traini
ng acc
Fig. 6 A graph which shows variation between
Training acc and test acc of dataset 3
0
0.2
0.4
0.6
0.8
Training Vs test Loss
Trainin
g loss
Test
loss
Fig. 7 A graph which shows variation between
Training and test loss of dataset 3
0
0.5
1
Training Vs test accuracy
Training
Acc
Test acc
Fig. 8 A graph which shows variation between
Training acc and test acc of dataset 4
Vol 11, Issue 7,July/ 2020 ISSN
NO: 0377-9254
www.jespublication.com
Page No:67
Fig. 9 A graph which shows variation between
Training acc and test loss of dataset 4
5. RESULT
We have resized the pictures size to
decrease complexity, reducing the size of the batch
to more appropriate for dataset size. After applying
the deep learning technique CNN to classify the
wastes in different categories. The proposed
method is trained and validated against the labeled
pictures to achieve classification accuracy under
testing scenarios, which performs a CNN-based
model relying on image inputs. In this project, the
implementation part is done by using tensorflow
which is a deep learning software. Here, we used
three dataset which gives following accuracy:
Table II Result accuracy
DATASET
TRAIN
ACCURACY
(%)
TEST
ACCURACY
(%)
Dataset 1
80
78
Dataset 2
90
84
Dataset 3
87
89
Dataset 4
91
81
6. FUTURE SCOPE
● This project indeed has a very vast scope not
only in India but Globally too because the
project is very effective in segregating the
waste this segregation will finally lead to
protecting our environment and people’s
health which is major problem in today’s
world
● Project can be further improved in many
ways
A: It is obvious that after a certain period
of time the bin will get full. Using
modules such as wifi and proximity
sensors etc. the data that bin is filled
completely can be sent to the concerned
authority who can then be alerted to see
and empty the bin.
B: Work can also be extended in
introducing a robot in the bin which
automatically dumps the bin when it finds
it to be full.
7. CONCLUSION
The proposed thought predominantly centers on the
recognizable proof and order of the waste that is
very nearly dumping in squander canister.
Generally, landfill is used to dump the
unsegregated waste and made to rot
which takes several years in the case of non-
biodegradable waste and the blending of poisonous
hurtful squanders will debase the land assets and
water resources [14]. This task proposes a thought
where the machine all alone can distinguish the
loss without human intercession dependent on the
arrangement of datasets, independent of its shape
and size, effectively and order them [8]. Our
proposed framework can learn without anyone else
and hence can constantly refresh itself if there
should arise an occurrence of new materials. The
points of interest to the proposed framework would
incorporate simple disintegration, lesser wellbeing
risks and quicker procedure that requires just an
underlying venture and is programmed. Tweaked
CNN structures were utilized in the proposed
technique.
REFERENCES
[1.] Bogdan Alexe, Thomas Deselaers, and
Vittorio Ferrari, “What is an object?”,
Proceedings of the IEEE Conference on
Computer Vision and Pattern Recognition, 2010.
[2.] Bogdan Alexe, Thomas Deselaers, and
Vittorio Ferrari. “Measuring the objectness of
image windows”, IEEE Transactions on Pattern
Analysis and
Machine Intelligence, 34(11), 2189-2202,
2012.
[3.] Sean Bell, Paul Upchurch, Noah Snavely, and
Kavita Bala, “Material recognition in the wild with
the materials in context database.” Proceedings of
the IEEE Conference on Computer Vision and
Pattern Recognition,3479-3487, 2015“.
Vol 11, Issue 7,July/ 2020 ISSN
NO: 0377-9254
www.jespublication.com
Page No:68
[4.] caffe-android-lib,” at
https://github.com/sh1r0/caffe-android-lib.
[5.] Design of a Convolutional Neural Network
Based Smart Waste Disposal System.
[6.] Thung, Gary and M. Yang. “Classification of
Trash for Recyclability Status.” (2016).
[7.] Gary Thung and Mindy Yang, “Classification
of Trash for Recyclability Status,” CS 229,
Stanford University, 2016.Available:
https://github.com/garythung/trashnet.
[8.] C. Liu, L. Sharan, E. H. Adelson, and R.
Rosenholtz, “Exploring features in a bayesian
framework for material recognition,” in Computer
Vision and
Pattern Recognition (CVPR), 2010 IEEE
Conference on. IEEE, 2010, pp. 239–246.
[9.] George E Sakr, Maria Mokbel, Ahmad
Darwich, Mia Nasr Khneisser and Ali Hadi,
“Comparing Deep Learning And Support Vector
Machines for
Autonomous Waste Sorting” in
Multidisciplinary Conference on Engineering
Technology (IMCET), IEEE International,
November 2 - 4, 2016.
[10.] Rahmi Arda Aral , Şeref Recep Keskin ,
Mahmut Kaya , Murat Hacıömeroğlu
,”Classification of TrashNet Dataset Based on
Deep Learning Models”
in Computer Engineering Gazi University
Ankara, Turkey.
[11.] Fine-Tuning Models Comparisons on
Garbage Classification for Recyclability Umut
Özkaya1* and Levent Seyfi 2 1Department of
Electrical and
Electronics Engineering/Konya Technical
University, Konya, Turkey.
[12.] Smart Waste Management Using Deep
Learning with IoT Jobin Joseph 1 , Aswin R2 ,
Allen James3 , Alwin Johny4 and Prince V Jose5 1
St.
Joseph’s College of Engineering and
Technology.
[13.] S. Dugdhe, P. Shelar, S. Jire, and A. Apte,
Efficient waste collection system, in 2016 Int.
Conf. Internet Things Appl. IOTA 2016, 2016, pp.
143147.https://doi.org/10.1109/IOTA.2016.756271
1
[14.] J. Donovan, “Auto-trash sorts garbage
automatically at the techcrunch disrupt hackathon.”
[15.] G. Mittal, K. B. Yagnik, M. Garg, and N. C.
Krishnan, “Spotgarbage: Smartphone app to detect
garbage using deep learning,” in Proceedings of the
2016 ACM International Joint Conference on
Pervasive and Ubiquitous Computing, ser.
UbiComp ’16. New York, NY, USA: ACM, 2016,
pp. 940–
945.
[16.] S. Zhang and E. Forssberg, “Intelligent
liberation and classification of electronic scrap,”
Powder technology, vol. 105, no. 1, pp. 295–301,
1999.