0% found this document useful (0 votes)
38 views

Garbage Classification

The document describes a study that uses convolutional neural networks to classify garbage into 12 categories. The researchers used two pre-trained models (VGG-16 and ResNet50) on a dataset of over 15,000 images categorized into batteries, cardboard, paper, etc. Experiments showed the models achieved around 93% accuracy. The models could help improve waste sorting habits and raise environmental awareness.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Garbage Classification

The document describes a study that uses convolutional neural networks to classify garbage into 12 categories. The researchers used two pre-trained models (VGG-16 and ResNet50) on a dataset of over 15,000 images categorized into batteries, cardboard, paper, etc. Experiments showed the models achieved around 93% accuracy. The models could help improve waste sorting habits and raise environmental awareness.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Garbage Classification Method using

Convolutional Neural Network


Quang-Long Nguyen Viet-Hung Nguyen
University of Science, VNU-HCM University of Science, VNU-HCM
Vietnam National University Ho Chi Minh City Vietnam National University Ho Chi Minh City
Ho Chi Minh, Viet Nam Ho Chi Minh, Viet Nam
[email protected] [email protected]

Dang-Khoa Nguyen-Vu Quang-Minh Le-Nguyen


University of Science, VNU-HCM University of Science, VNU-HCM
Vietnam National University Ho Chi Minh City Vietnam National University Ho Chi Minh City
Ho Chi Minh, Viet Nam Ho Chi Minh, Viet Nam
[email protected] [email protected]

Abstract—Undeniably, in this modern day, recycling is an small errors, which is great because it can help people to
essential work for any country. Specifically, garbage classification classify garbage easily. Besides garbage classification, we
is the most important step to enable cost-efficient recycling. also tried two different classifiers that are Sofmax and SVM
Designing a computer vision model to classify garbage images
into recycling categories could be an effective way to process to observe the effect of network performance and optimize
waste. In this paper, we aims to take samples of waste and them. We analyzed the network statistics to identify areas
classify them into 12 classes: battery, biological, brown-glass, of improvement and eliminate potential problems, so we
cardboard, clothes, green-glass, metal, paper, plastic, shoes, trash can maximize speeds and feeds easily. By observing the
and white-glass. The dataset that we used contains around 600 effect of network performance, we can see how the network
images for each class. The models used in the experiments are
Pre-trained VGG-16 and ResNet50. We also tried two different performance affects daily life and the process of garbage
classifiers Sofmax and Support Vector Machine to observe the classification.
effect on network performance. Experiments showed that our The models can help people learn to save resources, use re-
models reached accuracy around 93%. sources, develop good living habits, and improve their personal
quality. Then, people can develop a better waste sorting habit,
I. I NTRODUCTION
they will begin to pay attention to environmental protection
Recently, environmental pollution has been considered a problems, begin to treasure the preciousness of resources in
major problem in the world. The world bank report showed life, and develop the habit of saving resources.
that there are almost 4 billion tons of waste around the
world every year and the urban alone contributes a lot to this II. DATASET
number, the waste is predicted to increase by 70 percent in Most of the images involving garbage is accessible and can
the year 2025. Moreover, The world generates 2.01 billion be found easily on the internet. This data is present in variety
tonnes of municipal solid waste annually, with at least 33 with different types according to different class labels/target
percent of that—extremely conservatively—not managed in labels. In the dataset, there are a total of 15,150 images from
an environmentally safe manner. A reason for such is that 12 different classes of common garbage; batteries, cardboard,
people cannot immediately classify recyclable trash from non- paper, biological, plastic, metal , brown-glass, green-glass,
recyclable trash. Because of that, people will just throw all white-glass, clothes, shoes, and trash. The datasets were taken
kinds of trash together such as organic waste, inorganic waste, from:
toxic waste, etc. into one trash bin. • Most of the clothes category and 22% of the shoes’
In 2019, China started to require residential garbage clas- category were taken from the Clothing dataset https:
sification, in which case the front-end collection is highly //www.kaggle.com/agrigorev/clothing-dataset-full
dependent on people’s awareness. Therefore, the efficiency of • Approximately 29% from the other 9 classes was ob-
the garbage classification still needs to be improved. It is of tained from the Garbage Classification dataset https:
great academic value and practical significance to study an //www.kaggle.com/asdasdasasdas/garbage-classification
effective automatic garbage classification method. • The remaining of the images were created using Web
In order to reduce the amount of waste, we used two models Scrapping.
which are Pre-trained VGG-16 (VGG16) and ResNet50 that • Every image that we create from web scrapping are
can classify most of the input data in spite of having some owned by their original photographers/owners. The im-
Fig. 1. The network structure in VGG16

ages are only used for academic research and is not used paper, speak about a faster Region-based Convolutional Neural
to generate any profit. If the original photographer/owner Network (Faster R-CNN) for object classification, reaching
wish to take down the dataset, then by their request, any a mAP of 68.3%. Maher Arebey et al. proposes to use the
of the images in the data set can be deleted. grey level co-occurrence matrix (GLCM) method in garbage
detection which uses advanced communication mechanisms
TABLE I like radio frequency identification (RFID), Geographical infor-
DATASET OVERVIEW mation system (GIS), etc to strengthen the waste segregation
process. The features obtained from GLCM are given as inputs
Sr no Category Number of Annotated to Multi-Layer Perceptron (MLP) and K-Nearest Neighbours
Images classifier.
1 Battery 945 Yes
2 Biological 985 Yes IV. M ETHOD
3 Brown-glass 607 Yes A. VGG16 with Batch Normalization
4 Cardboard 891 Yes
5 Clothes 5325 Yes In this structure, the convolution layer and the batch normal-
6 Green-glass 629 Yes ization (BN) layer are mainly used to extract image features.
7 Metal 769 Yes The BN [6] layer is used to improve the generalization
8 Paper 1050 Yes ability of the network, disturb the training data, and accelerate
9 Plastic 865 Yes the convergence speed of the model. During the process of
10 Shoes 1977 Yes training, BN is calculated based on each small batch. The
11 Trash 697 Yes mean and variance corresponding to each batch of data during
training are recorded and used to calculate the mean and
12 White-glass 775 Yes
variance of the entire training set, which is performed as
follows:

III. R ELATED W ORK m


1 X 1
µβ = xi , δ 2 = (xi − µβ )2
Many different approaches are taken to this problem by m i=0 m
various papers. Every approach is unique and uses its own
m
different methods to achieve good accuracy. For example a E[x] ← Eβ [µβ ], V ar[x] ← Eβ [δβ2 ]
particular paper uses HOG along with CNN [1]. The training m−1
accuracy reaches 89% and validation accuracy is over 93% where m refers to small batch size, β is a dataset with batch
with Adadelta. The dataset is from Kaggle and its publisher size m, and x is the input of one layer. Batch standardization
has constructed an SVM classifier based on Scale Invariant is carried out for each feature map, i.e., the same operation is
Feature Transformation (SIFT) which achieves a test accuracy taken for batch standardization in different positions of each
of 63% [2]. Another project, RecycleNet, uses DenseNet with feature map. Supposing the size of the feature map is p × q,
an alteration of skip connections to achieve test accuracy of BN for this feature map will be equivalent to normalizing the
81% after 200 epochs [3]. Kaggle’s best model on this topic feature batch with size m0 = |β| = m · pq. BN is selected to
is “MobileNet using Transfer Learning” [4]. It uses sigmoid effectively avoid gradient disappearance and explosion, which
activation function and binary-cross entropy loss function has little to do with the initial values of the parameters and
along with transfer learning. Oluwasanya Awe et al. [5] in their has a regularization effect.
B. ResNet50 space that is much higher than original feature space. Data
ResNet is a classic neural network well known for its can always be divided into two different categories with a
establishment since the kick start of the deep learning era [7]. hyperplane [10]. SVM allows selection of plane that makes up
It has been the backbone for various computer vision tasks. the largest separation range from data. The aim is to choose
It is different from its predecessors like Alex Net because right one to make classification with a minimum error when an
it solved the notorious problem of vanishing gradients - as unknown dataset is encountered. When margin is maximum,
the gradient is back-propagated to earlier layers, repeated classification error is decreased.
multiplication may make the gradient very small. Thus as a E. Proposed Method
network gets deeper, the performance starts depleting.
Fine-tuned CNN structures (VGG16 and ResNet50) were
In ResNet50, researchers use the bottleneck architecture in
used in proposed method. Transfer learning is based on use
the residual block [1]. In each block, there are two convolu-
of these structures. In the context of transfer learning, filter
tional layers with a 3 × 3 convolutional layer surrounded by a
and weight values of previously trained CNN networks with
1 × 1 filter on both sides. Thus the dimensions of the identity
millions of images are assigned as initial values in the training
part and the residual part are maintained. The convolutional
process to be performed for our own images. In this way,
layers
convergence of network has been realized more quickly and
accurately. At the same time, Softmax and SVM were used in
order to observe effect of classifiers on network performance
as in Figure 3.

Fig. 2. The architecture of ResNet50

and pooling layers get through the rough features of the im-
ages. The model uses 16 residual blocks after the convolutional
block. Further an average pooling layer is used to down-
sample the feature matrix, a flatten layer and a dropout layer
followed by a fully connected layer. The dropout is considered
as regularization which helps in adding extra noise and average
the overfitting errors. The cost function used is the RELU
function followed by a Sigmoid SoftMax in the last layer. Fig. 3. Proposed method

C. Softmax We performed a comparative analysis for classification of


SoftMax regression is used for last layer of a deep network images in TrashNet data set. In this analysis, we used half of
where classification task is completed. The feature vector data set for testing data without using any data augmentation
obtained by the previous layers is input of SoftMax regression method. In the context of our proposed method ResNet and
layer. SoftMax regression is a generalized version of logistic VGG-16 were used as a fine tuned model. As can be seen in
regression and is used in multi-class classification problems. Table 1, we tried to obtain the highest classification accuracy
by using two different classifiers such as Softmax and SVM.
D. Support Vector Machine
V. E XPERIMENT
Support Vector Machine (SVM) is an instructive technique
that can be used for classification and regression [8]. It VI. C ONCLUSION
was developed by Vapnik based on statistical learning theory Overall, we can conclude that garbage classification is
[9]. SVM is based on principle of processing features in a very important in current and feature life. It is important
TABLE II [10] Duda R.O., Hart E.P., Stork D.G., 2006. Pattern Classifi-
R ESULT OF P ROPOSED M ETHOD cation, 2nd ed., John Wiley & Sons Asia PTE.
Model Accuracy of Fine-tuned Models (%)
Softmax SVM
ResNet 89.38 94.22
VGG-16 90 97.46

for social welfare, and it becomes important because human


intervention should be avoided to tackle many things such as
sewage cleaning and intervention to clean garbage things, so
if the robot could classify them, only it can clean a particular
area. And there are many methods to implement the garbage
classification. In this paper, we implement EfficientNetB3 and
VGG16, ResNet50. Compared to the old model, the model is
more accurate- up to 97% with garbage dataset from Kaggle
Future work will be focused on improving the accuracy
and speed, also optimizing the memory usage – to give it a
possibility to run directly and real time on devices with small
memory, such as robot, IoT devices.

R EFERENCES
[1] He, Kaiming & Zhang, Xiangyu & Ren, Shaoping & Sun,
Jian. (2016). Deep Residual Learning for Image Recognition.
10.1109/CVPR.2016.90, pp. 770778.
[2] S. L. Rabano, M. K. Cabatuan, E. Sybingo, E. P. Dadios
and E. J. Calilung (2018), “Common Garbage Classification
Using MobileNet”, 2018 IEEE 10th International Confer-
ence on Humanoid, Nanotechnology, Information Technology,
Communication and Control, Environmental and Management
(HNICEM), Baguio City, Philippines, 2018, pp. 1-4, doi:
10.1109/HNICEM.2018.8666300.
[3] O. Awe, R. Mengistu, and V. Sreedhar (2017), “Smart
TrashNet: Waste localization and classification, 2017”.
[4] Maher Arebey, M.A. Hannan, R.A. Begum, Hassan Basri
(2012), Solid watse bin level detection using gray level co-
occurrence matrix feature extraction approach, Journal of
Environmental Management, Volume 104, 2012, Pages 9-18,
ISSN 0301-4797.
[5] S. Begumpure, P.M.Jadhav (2019), “Comprehensive Re-
view Of Generic Object Detection Frameworks Using Deep
Learning Approach”, IEEE International Conference on Con-
temporary Engineering and Technology, April, 26th-27th,
2019, Chennai.
[6] Ioffe, S.; Szegedy, C. Batch Normalization: Accelerating
deep network training by reducing internal covariate shift.
In Proceedings of the International Conference on Machine
Learning, Lille, France, 6-11 July 2015; pp. 448-456.
[7] C.CHANG (2018), “Garbage Classification.” Kaggle,
2018, doi: 10.34740/KAGGLE/DS/81794.
[8] Abubaker A., 2012. Mass Lesion Detection Using Wavelet
Decomposition Transform and Support Vector Machine, IJC-
SIT, 4(2), 33-46.
[9] Saitta L., 1995. Support-Vector Networks, Machine Learn-
ing, 20, 273-297.

You might also like