You are on page 1of 6

E-Waste Detection and Collection assistance system

2021 IEEE International Conference on Computation System and Information Technology for Sustainable Solutions (CSITSS) | 978-1-6654-0610-9/21/$31.00 ©2021 IEEE | DOI: 10.1109/CSITSS54238.2021.9682806

using YOLOv5
Risha Dassi Sakshi Kamal B Sathish Babu
Computer Science and Engineering Computer Science and Engineering Computer Science and Engineering
RV College of Engineering RV College of Engineering RV College of Engineering
Bangalore, India Bangalore, India Bangalore, India
rishadassi.cs18@rvce.edu.in rishadassi.cs18@rvce.edu.in rishadassi.cs18@rvce.edu.in

Abstract— E-waste, or electronic waste, encompasses


electrical and electronic equipment that’s outdated, unwanted,
or broken. When electronics are mishandled during disposal,
these chemicals end up in soil, water, and air. A majority of the
E-waste producers in India are either unable to or unaware
about how to dispose of the generated waste and this creates a
threat of them being disposed of in an incorrect manner which
has severe environmental consequences. The detection of E-
waste is the fundamental step for safely disposing and recycling
this waste to minimize its impact on the environment. This study
proposes a system that uses YOLOv5, to identify and classify E-
waste and a portal to connect the waste producers and collectors,
making the collection process more accessible. The ultimate goal
is to apply technology for effectively disposing waste and
minimizing the harmful impacts of incorrect or no disposal.
Fig. 1. Consumer E-waste selling strategy [Source: Dwivedy and Mittal
Keywords— Object Detection, YOLOv5, E-waste, Waste (2012)[4]]]
disposal, Convolutional Neural Network
B. Relevance of the research for present/future scenarios
I. INTRODUCTION
The prevalence of technology in the Indian society due
A. Motivation For Research to accessibility to devices has led to an inevitable increase
The rapid economic and technological development and in the quantity of waste that is generated. The waste
the continuous rise in people’s living standards have generators in the purview of this paper refers to household
significantly accelerated the waste generation rate of electrical and localized generators of waste that provide their E-
and electronic equipment (EEE) in the world [1]. The usage waste to the informal sector. The collectors are the local
time of EEE is shortening due to the availability of cheaper companies or shops that deal in E-waste collection and
products with new and improved features. As a result, a lot of either sell it to recycling centres or recycle the waste
old electronic gadgets have gone out of use and need themselves. The lack of awareness on proper disposal
recycling. Electronic waste (E-waste) includes a wide variety amongst waste generators leads to improper disposal,
and range of devices such as bulb, battery, mobile phones, amplifying the harm due to the increasing rate of
remote, audio-video player, computer, laptop, tablet, generation of E-waste. Figure 2 demonstrates that the
television, washing machine, refrigerator, air conditioner, etc. quantity of electronic waste is not likely to reduce anytime
which has been rejected by the end-user. Numerous studies soon.
have been conducted that showcase that E-waste comprises
hazardous chemicals like mercury, lead, beryllium, On-Demand waste collection, where the resident requests
chromium, arsenic, polyvinyl chloride, etc. which require the collection from a household is one of the methods for the
special handling during the disposal and recycling process [2]. waste collection process highly suitable for cities [5]. This
study aims to enhance this method by creating a bridge
The E-waste management situation in India is alarming between the waste generators and producers in the form of an
with about 10 lakh tonnes of E-waste generated in the year object detection system that helps classify the E-waste
2019, with growth rates of 32% (in 2020) and only 10% being
effectively collected [3]. Most of the E-waste ends up being
processed by the informal sector as seen in Figure 1. This is
mainly because the majority of the E-waste producers in India
are unaware about how to dispose of the generated waste
while the collectors don’t know which areas to collect the
waste from. There isn’t any dedicated system to ease the entire
process of waste management in an organized manner.

978-1-6654-0610-9/21/$31.00 ©2021 IEEE

Authorized licensed use limited to: PES University Bengaluru. Downloaded on October 14,2023 at 08:25:31 UTC from IEEE Xplore. Restrictions apply.
Fig. 2. Year wise E-waste generation in India [Source: Centre for Science to enhance communication between producers and collection
and Environment, 2020 compiled from the Global E-waste Statistics companies. The concept is to use a digital image to facilitate
Partnership]
the exchange of information between a waste collection
company and residents that are requesting waste retrieval
services. This model offers advantages of organization,
and enables the collectors to make appropriate logistics and data collection that can further help the collection
arrangements for the collection and processing of the same. companies to plan the collection based on the type, size and
quantity of E-waste [7].
C. Proposed System
The proposed system aims to connect waste producers and At present, the mobile applications which support waste
waste collectors via a portal that deploys an object detection collection have a rather limited scope, mainly used for
model (YOLOv5). The end-user (here, waste producer) is locating waste collection points or to set reminders about
required to click an image of the E-waste of one or more types waste collection schedules [7].
and upload on the portal. This image will be fed to the Object B. Object Detection Models
Detection model, which will classify the image based on the
basic classes defined (bulb, battery, mobile phone, monitor, An object detection model using CNN to classify the E-
keyboard, laptop, mouse and phone). The deep learning waste and a faster Region Based Convolutional Neural
algorithm YOLO-You Only Look Once which is a real-time Network (R-CNN) to automate the identification of multiple
object detection system, is used in this process. Once the objects and size of the equipment, with modifications to the
detection is completed, the relevant data such as the type and CNN layer organization in three ways- number of filters, size
quantity of E-waste mapped with the region is stored and can of filters and method of scanning inputs to achieve the best
be retrieved by the waste collector. An important factor used network accuracy. The R-CNN network gave an accuracy of
in this work while connecting the generators to the collectors 90-96.7% and the two CNN network configurations gave
is their geographical location which has been narrowed down accuracy of 93.3% and 96.7% respectively. The study was
to the area under the same pin-code which is approximately a based on a small dataset for training and the model covered
5km radius. The waste collectors can accordingly plan the only three types of equipment- refrigerators, washing
collection to optimally use resources and minimize machines, and monitors or TV sets. The planning process
transportation costs. Overall, the model aids in simplifying the could be supported using intelligent algorithms to optimize
process of identifying E-waste and assisting the waste collection vehicle routes [7].
collectors and generators in disposing the waste in the right Municipal solid waste (MSW) have landfilling,
manner. composting and incineration as the main ways of disposal.
D. Organization of the Paper Materials like glass, metals, electronic scraps, batteries etc,
aren’t fit for disposal in any of these categories and hence
The introduction of the paper is followed by a brief preliminary sorting is essential to use MSW efficiently as a
description of the related works. Post the literature survey, the resource. The design is an automated sorting unit that uses a
proposed work with the overview of the system, dataset neural network that detects and classifies waste on a conveyor
information and model architecture have been covered. After belt and transports the waste to collection bins according to
the proposed work, the results of the project, that is, details type. The study uses a R-CNN model to identify multiple
about YOLOv5 model training and the detection results based objects of different types within an image. The mean Average
on the evaluation metrics have been discussed. precision (mAP) score of 64.1% was obtained by the model.
The model performed training on a small dataset, which
II. RELATED WORKS
couldn’t fully represent all possible features of the classes of
A. Online E-waste Market images under consideration [8].
With increase in the generation of household E-waste and The model performed training on a small dataset, which
no organized market, majority of it ends up in landfills or couldn’t fully represent all possible features of the classes of
incinerated along with municipal waste. Developed countries images under consideration [8]. The main focus is to automate
have well-structured systems to control their E-waste with classification of recyclables from E-waste into broad
some fees for recycling. But this method is likely to fail in categories like PCB, metal, plastic, and glass using thermal
India as it imposes cost to the end users. Indian end-users are imaging-based techniques and augment sharpness as a feature
willing to sell their E-waste to door-to-door waste collectors vector extracted from the detected thermograms to improvise
for a nominal price. The end-users’ major problems and the classification accuracy rate. This approach gave a success
concerns regarding their E-waste can be solved significantly rate of 84-96% for the simulated E-waste. The method can be
by an online E-waste market. This approach was observed to enhanced to classify more diverse E-waste by augmenting
have benefits of being time saving, convenient collection hyperspectral imaging (HSI) sensors to thermal imaging
facility, proper disposal and recycling, easily accessible techniques [9].
market, earning of some money by the producers, reducing E-
waste at home, attractive exchange offers by dealers/retailers The paper proposes a refined feature-fusion structure
and reuse by others. An online E-waste market was also Single Shot Detector (RFSSD) network in order to raise the
shown as an important predictor for economic, environmental, detection accuracy of Single Shot Detector (SSD). RFSSD
social and health benefits [6]. achieves 79.23% mAP which is 2.03% higher than that of the
original SSD. The proposed RFSSD has better speed and
Internet-based solutions for waste collection methods as a accuracy than both Faster R-CNN and DSSD321. Even
result of recent studies demonstrates the potential of an online though RFSSD is slightly slower due to its larger size, its
waste collection service. Smartphones and web/mobile detection performance is surpassing YOLOv2 and SSD300.
applications are everywhere and can serve as a suitable means The feature-refined structure has scope to be applied to other

Authorized licensed use limited to: PES University Bengaluru. Downloaded on October 14,2023 at 08:25:31 UTC from IEEE Xplore. Restrictions apply.
neural networks for better performance, such as the Faster R- C. Model Architecture
CNN and YOLO series [10]. YOLOv5, "You Only Look Once" Version 5, is a single-
An attempt towards waste segregation using the YOLOv3 phase detector and regional-based object detection network
algorithm and highlighting the drawbacks of its predecessors that redefines object detection as a retrieval problem leading
and a comparative analysis between YOLOv3 and YOLOv3- to high processing speed. It has three main components - the
tiny algorithm. The experimental results demonstrate that the backbone, the neck and the head (for detection).
detection capability and prediction probability of YOLOv3 The backbone contains CNN that collects and organizes
(mAP%- 94.99) is significantly higher than YOLOv3-tiny image elements in various formats while the centre and scale
(mAP%- 51.95). The study does not consider the garbage prediction (CSP) Bottleneck creates image elements [16].
consisting of many complexities, such as objects made up of YOLOv5 incorporates cross-stage partial net-work (CSPNet)
more than one type of material and may inherit other-class into Darknet, creating CSPDarknet as its backbone. CSPNet
objects [11]. solves the problems of duplicate gradient information in large
The presence of an online E-waste market is the need of backbones, and incorporates gradient changes to the feature
the hour and the work may help better in disposing off the e- map, thereby reducing the parameters and FLOPS (floating
wastes. After understanding the scope of different models for point operation per second) of the model, which not only
object detection, the most recent development in the YOLO ensures end speed and accuracy, but also reduces model size
series of algorithms, the YOLOv5 model, was opted, which [17]. In e-waste detection, this can be of great utility as the
gives real-time object detection. major requirement is of speed and accuracy and a compact
model size to have faster inference and lesser training time.
III. PROPOSED WORK
For its neck, YOLOv5 uses the path aggregation network
A. Overview (PANet), to increase the flow of information. PANet adopts a
The system constitutes of three primary divisions, namely, new network, feature pyramid network (FPN) and an
the Waste Generator, Waste Collector and the Object improved bottom-up path, which improves the transmission of
Detection Model. The waste producer uploads an image of the low-level features. Concurrently, adaptive feature integration,
e-waste of one or more types from which electronic waste is which links the feature grid to all feature levels, is used to
detected by the YOLOv5 model. The object is classified into generate useful information at each feature level and distribute
specific categories and thereafter the information is made it directly to the next subnetwork. PANet enhances the use of
available for a waste collector. Figure 3 below shows an precise localization features in the lower layers, which can
overview of the proposed system. significantly increase the spatial accuracy of the object [17].
Hence, by employing the PANet neck structure, the detector
is enabled to produce better localization of the e-waste objects
within the image.
The YOLOv5 head, i.e. the YOLO layer, produces 3
different sizes (18 × 18, 36 × 36, 72 × 72) feature maps to
achieve multi-scale predictions, allowing the model to handle
smaller, medium and large objects. Therefore, the model can
detect objects in images taken closer to the e-waste source or
far from it since it supports detection for multiple sizes.
Discovery or detection is a process that uses features from the
head and takes box and class prediction steps [16]. A diagram
of the YOLOv5 architecture is shown in Figure 4.
Fig. 3. Proposed System YOLOv5 has different models based on size and
capability. A smaller model lets you train faster but with a
B. Dataset reduced mAP value. Figure 5 illustrates the comparisons of
these models. In this study, the small model is employed, in
The dataset for this project is created by combining some
order to obtain the fastest possible results.
existing sources of E-waste datasets on platforms such as
Kaggle [12] [13] and a customized dataset created by
downloading images of E-waste that is found in India. The
images range from individual images of the object classes to
more complex images with multiple objects in the same
frame to keep it as realistic as possible.
Once the images are collected, all of them are annotated
manually using LabelImg, which is a graphical image
annotation tool written in Python [14]. With the dataset
images and annotations ready, preprocessing and data
augmentation steps are added using Roboflow which
provides an interface to convert images into formatted
datasets that can be used by a wide variety of machine
learning models [15].
The dataset consists of over 2.4k images in total with a
Train: Valid: Test split of 2100:202:101 images respectively.

Authorized licensed use limited to: PES University Bengaluru. Downloaded on October 14,2023 at 08:25:31 UTC from IEEE Xplore. Restrictions apply.
B. E-waste detection results
Fig. 4. Architecture of YOLOv5 [17]

Fig. 5. Comparison of different YOLOv5 models [18]

IV. RESULTS
A. Model Training
With the main aim to achieve the most accurate results by
training the YOLOv5s model (Pytorch implementation from
ultralytics) [18] on the e-waste dataset constructed, the model
was trained using the 195 e-waste images for each class (i.e., To evaluate object detection models like R-CNN and
monitor, keyboard, mouse, bulb, battery, laptop and mobile YOLO, the mean average precision (mAP) is used. The mAP
phone). The dataset was split into Train: Valid: Test split since compares the ground-truth bounding box to the detected box
it can minimize the possibility of overfitting and enable the and returns a score. The higher the score, the more accurate
model to be trained in a better way. Figure 6 and Figure 7 show the model is in its detections. The mAP of a model is derived
the ground truth for training data before and after from the metrics of precision-recall, average precision and
augmentation. intersection over union (IoU). Average precision can be
obtained using Equation 1.

=∑ − +1 ∗
(1)

= 0, =1
= !"# % &ℎ ℎ (

Fig. 6. Ground truth for training data

Fig. 8. Uploaded Image

Fig. 7. Ground truth for augmented training data

The model was validated with a validation set of 202


images that comprised of images of different classes and with
instances of possible noise in images in terms of brightness or
cropped images etc. The model's robustness was tested with
intact e-waste appliance images and also with damaged e-
waste images. The model was able to detect the e-waste in
both these scenarios. The model was tested extensively and
evaluated before obtaining the deployable version in order to Fig. 9. Detected Image
prevent over-fitting on the training data and be able to function
efficiently in real time. In order to calculate mAP, a series of precision recall
curves are drawn with the IoU threshold set at varying levels

Authorized licensed use limited to: PES University Bengaluru. Downloaded on October 14,2023 at 08:25:31 UTC from IEEE Xplore. Restrictions apply.
of difficulty, for each class. The metric calculates the average E-waste recycling and disposal and minimizes the harms
precision (AP) for each class individually across all of the IoU caused by incorrect processing of the waste.
thresholds. Then the metric averages the mAP for all classes
to arrive at the final estimate. Figure 8 and 9 show the visual ACKNOWLEDGMENT
representations of metrics precision/recall curves and mAP for The authors would like to thank Prabindh Sundareson for
the trained model respectively. contributing towards the project’s initial concept and
methodology.
Fig. 10. Metrics: Precision/Recall graphs

REFERENCES
[1] L. A. Guerrero, G. Maas, and W. Hogland, “Solid waste management
Fig. 11. Metrics: Metrics: mAP graphs challenges for cities in develop- ing countries,” Waste Management,
vol. 33, no. 1, pp. 220–232, 2013, ISSN: 0956-053X. DOI: https
://doi.org/10.1016/j.wasman.2012.09.008. [Online]. Available: https : /
Table 1 shows the same in a tabular form for the different / www. sciencedirect. com/ science/ article/pii/S0956053X12004205)
classes. It can be deduced that the model gives an mAP of [2] Chan, G. H. Xing, Y. Xu, Y. Liang, L. X. Chen, S. C. Wu, C. K. C.
0.352 for mAP ranges over an IoU of 0.5 to 0.95 in steps of Wong, C. K. M. Leung, and M. H. Wong, “Body loadings and health
risk assessment of polychlorinated dibenzo-p-dioxins and dibenzofu-
0.05. The calculated mAP for this model (YOLOv5 small) is rans at an intensive electronic waste recycling site in china,”
significantly better than other models in the YOLO series as Environmental Science & Technology, vol. 41, no. 22, pp. 7668–7674,
well as other detectors. The time for training and detection is 2007, PMID: 18075072. DOI: 10.1021/es071492j. eprint:
significantly less, having completed 500 epochs in 2.5 hours. https://doi.org/10.1021/ es071492j. [Online]. Available: https : / / doi.
org/ 10 . 1021/es071492j.
Figures 8 and 9 show the uploaded image and detected image
after running the model respectively. [3] D. Staff, “Electronic waste management approaches: An overview,”
Waste management (New York, N.Y.), vol. 33, p. 01, Jan. 2021. DOI:
10. 1016/ j. wasman.2013.01.006.
TABLE I. RESULTS FOR YOLOV5 MODEL TRAINING (T-TARGETS, P-
PRECISION, R-RECALL) [4] M. Dwivedy and R. Mittal, “An investigation into e- waste flows in
india,” English, Journal of Cleaner Production, vol. 37, no. Complete,
Class T P R mAP@.5 mAP@.5:.95: pp. 229–242, 2012. DOI: 10.1016/j.jclepro.2012.07.017.
all 329 0.88 0.579 0.646 0.352 [5] A. Kr o´l, P. Nowakowski, and B. Mro´wczyn´ska, “How to improve
battery 52 0.856 0.687 0.736 0.43 weee management? novel approach in mobile collection with
bulb 49 0.814 0.537 0.563 0.197 application of artificial intelligence,” Waste Management, vol. 50, pp.
keyboard 36 0.744 0.667 0.681 0.298 222–233, 2016, ISSN: 0956-053X. DOI: https : / / doi . org / 10 . 1016
laptop 49 0.835 0.796 0.869 0.598 / j . wasman . 2016 . 02 . 033. [Online]. Available: https:// www.
mobile phone 72 0.887 0.694 0.75 0.439 sciencedirect. com/ science/ article / pii / S0956053X16300800.
monitor 31 0.896 0.613 0.764 0.453 [6] S. Agrawal and D. Mittal, “Need of an online e-waste market in india,”
mouse 39 0.979 0.641 0.746 0.365 International Journal of Environment and Waste Management, vol. 19,
p. 21, 2017.
[7] P. Nowakowski and T. Pamuła, “Application of deep learning object
TABLE II. MAP VALUES FOR DIFFERENT EPOCHS YOLOV5 MODEL classifier to improve e-waste collection planning,” Waste Management,
TRAINING vol. 109, pp. 1–9, May 2020. DOI: 10.1016/j.wasman.2020.04.041.
Epochs 500 600 700 [8] A. V. Seredkin, M. P. Tokarev, I. A. Plohih, O. A. Gobyzov, and D. M.
mAP@.5:.95: 0.352 0.322 0.347 Markovich, “Development of a method of detection and classification
of waste objects on a conveyor for a robotic sorting system,” Journal
of Physics: Conference Series, vol. 1359, p. 012 127, Nov. 2019. DOI:
10 . 1088 / 1742 - 6596 /1359/1/012127. [Online]. Available:
V. CONCLUSION https://doi.org/ 10.1088/1742-6596/1359/1/012127.
In this paper, object detection model YOLOv5 was used [9] S. P. Gundupalli, S. Hait, and A. Thakur, “Classification of metallic
to assist the e-waste detection and collection process. The and non-metallic fractions of e- waste using thermal imaging-based
technique,” Process Safety and Environmental Protection, vol. 118, pp.
model was trained for 500 epochs using a 2.4k e-waste images 32–39, 2018, ISSN: 0957-5820. DOI:
dataset and gave a mAP value of 0.352 for IoU of 0.5 to 0.95 https://doi.org/10.1016/j.psep.2018.06.022. [Online]. Available:
in steps of 0.05 for all classes. on further training the mAP https://www.sciencedirect.com/science/article/pii/S095758201830343
values fluctuations were negligible hence showing that the 4
optimal mAP value was reached at the 500 epochs mark. [10] S. Chen, J. Hong, T. Zhang, J. Li, and Y. Guan, “Object detection using
deep learning: Single shot detector with a refined feature-fusion
The portal was developed to serve as the User Interface for structure,” 2019 IEEE International Conference on Real-time
the Object Detector backend. It assists the waste detection and Computing and Robotics (RCAR), 2019. DOI: 10 . 1109 /
collection process by enabling the waste generators or rcar47638.2019.9044027.
producers to either upload images of e-waste to be recycled or [11] S. Kumar, D. Yadav, H. Gupta, O. P. Verma, I. A. Ansari, and C. W.
Ahn, “A novel yolov3 algorithm- based deep learning approach for
download the information (as csv) for waste collections waste segregation: Towards smart waste management,” Electronics,
respectively. This serves towards a bigger goal of simplifying

Authorized licensed use limited to: PES University Bengaluru. Downloaded on October 14,2023 at 08:25:31 UTC from IEEE Xplore. Restrictions apply.
vol. 10, no. 1, 2021, ISSN: 2079-9292. [Online]. Available: https : / / [16] J. Ieamsaard, S. N. Charoensook, and S. Yammen, “Deep learning-
www. mdpi. com/ 2079 - 9292 / 10 / 1/14. based face mask detection using yolov5,” in 2021 9th International
[12] z. wang ziang, Waste-pictures, Oct. 2019. [Online]. Available: Electrical Engineering Congress (iEECON), 2021, pp. 428–431. DOI:
https://www.kaggle.com/wangziang/waste- pictures. 10.1109/iEECON51072.2021.9440346.
[13] Kerneler, Starter: E-waste dataset, Mar. 2020. [Online]. Available: [17] R. Xu, H. Lin, K. Lu, L. Cao, and Y. Liu, “A forest fire detection
https:// www. kaggle. com/ kerneler/ starter-e-waste-dataset-93b07fb8- system based on ensemble learning,” Forests, vol. 12, p. 217, Feb.
a/data. 2021. DOI: 10 . 3390 / f12020217.
[14] Tzutalin, Tzutalin/labelimg. [Online]. Available: [18] Ultralytics, Ultralytics/yolov5: Yolov5 in pytorch. [Online]. Available:
https://github.com/tzutalin/labelImg. https : / / github. com / ultralytics / yolo
[15] A. Takimoglu and N. *, What is data augmentation? techniques, benefit
and examples, Apr. 2021. [Online]. Available:
https://research.aimultiple.com/data- augmentation.

Authorized licensed use limited to: PES University Bengaluru. Downloaded on October 14,2023 at 08:25:31 UTC from IEEE Xplore. Restrictions apply.

You might also like