Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

WASTE DETECTION AND MANAGEMENT SYSTEM

USING DEEP LEARNING

Project Report submitted by

RAJAT NAIK
4NM20IS414

Under the Guidance of

Ms. Preethi Salian K


Assistant Professor Gd-II

In partial fulfillment of the requirements for the award of

the Degree of

Bachelor of Engineering in Information Science & Engineering

from

Visvesvaraya Technological University, Belagavi

Department of Information Science & Engineering


NMAM Institute of Technology, Nitte - 574110
(An Autonomous Institution affiliated to VTU, Belagavi)

MAY 2023
ACCREDITED WITH ‘A’ GRADE BY NAAC

DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING

CERTIFICATE
Certified that the project work entitled

“ Waste Detection and Management System Using Deep Learning”

is a bonafide work carried out by

Rajat Naik (4NM20IS414)

in partial fulfillment of the requirements for the award of

Bachelor of Engineering Degree in Information Science & Engineering

prescribed by Visvesvaraya Technological University, Belagavi

during the year 2022-2023.

It is certified that all corrections/suggestions indicated for Internal Assessment have

been incorporated in the report deposited in the departmental library.

The project report has been approved as it satisfies the academic requirements in respect

of the project work prescribed for the Bachelor of Engineering Degree.


___________________ ___________________ _______________________
Signature of the Guide Signature of the HOD Signature of the Principal

Semester End Viva Voce Examination


Name of the Examiners Signature with Date

1. __________________________ __________________________
2. __________________________ __________________________
ACKNOWLEDGEMENT

It is with great satisfaction and delight that we are submitting the Project Report on
“Waste Detection and Management System Using Deep Learning”. We have
completed it as a part of the curriculum of Visvesvaraya Technological University,
Belagavi for the award of Bachelor of Engineering in Information Science and
Engineering.
We sincerely thank Dr. Niranjan N Chiplunkar, Principal, NMAM Institute of
Technology, Nitte and Dr. I Ramesh Mithanthaya, Vice Principal & Dean
(Academics), NMAM Institute of Technology, Nitte, who have always been a great
source of inspiration.
We are profoundly indebted to our guides, Ms. Preethi Salian K, (Assistant
Professor Gd.II)Department of Information Science and Engineering for
innumerable acts of timely advice, encouragement and we sincerely express our
gratitude.
We also thank Mr. Vasudeva Pai, Project Coordinator & Assistant Professor Gd
II,Department of Information Science & Engineering for their constant
encouragement and support extended throughout.
We express our sincere gratitude to Dr. Karthik Pai B.H, Head and Associate
Professor, Department of Information Science and Engineering for his invaluable
support and guidance.
Finally, yet importantly, we express our heartfelt thanks to our family and friends
for their wishes and encouragement throughout the work.

RAJAT NAIK (4NM20IS414)


ABSTRACT
The proper management of waste is a critical issue faced by urban areas around
the world. One of the primary challenges in waste management is the maintenance
of garbage bins, which need to be regularly emptied to prevent overflowing and
unhygienic conditions. Traditional methods of monitoring garbage bins can be time-
consuming and inefficient, leading to unsanitary conditions and inconvenience for
citizens. This project we made a web app integrated with YOLOv7model that can
help in managing garbage bins efficiently. The first model is a deep learning-based
YOLOv7 model that can detect whether a garbage bin is overflowing or not based
on an uploaded image by the user and he can make the complaint.The second
model is a CCTV-based garbage bin overflow detection system that can collect
input video data and provide an easy-to-use interface for Admin to manage and
monitor garbage bins in the surrounding areas.Also Admin can assign driver and
update the progress of the work.
TABLE OF CONTENTS

Title page i

Certificate ii

Acknowledgment iii

Abstract iv

List of Contents v

List of Figures vi

CHAPTER 1 INTRODUCTION 1-3

1.1 Overview 1
1.2 Objective 3

CHAPTER 2 LITERATURE SURVEY 4-11

CHAPTER 3 TECHNOLOGIES USED 12-20

3.1 YOLO 12
3.2 Roboflow 13
3.3 WandB 14
3.4 Django 14
3.5 Flask Api 15
3.6 HTML 16
3.7 CSS 17
3.8 Javascript 19
3.9 MYSQL 20

CHAPTER 4 METHODOLOGY 21-22


4.1 Dataset Collection 21
4.2 Splitting Dataset 21
4.3 Training the Model 21
4.4 Analyze the training result 22
4.5 Create flask api 22
4.6 Creating django web app 22

CHAPTER 5 SYSTEM DESIGN 23-25

CHAPTER 6 IMPLEMENTATION 26-33

6.1 Change the annotation from xml to yolo format 26


6.2 Detection on input image 28
6.3 Detection on live video 29
6.4 Integrating Map api 31
6.5 Creating Django web app

CHAPTER 7 SYSTEM TESTING 34-36

CHAPTER 8 RESULTS AND DISCUSSION 37-41

CHAPTER 9 CONCLUSION 42-43

CHAPTER 10 REFERENCES 44-45


LIST OF FIGURES

Fig 4.1.1: Dataset Information 21

Fig. 4.2.1: Train, validation, test, split 21

Fig. 5.1: Workflow diagram 23

Fig. 5.2: Flowchart 23

Fig. 5.3: Sequence diagram 24

Fig. 5.4: ER Diagram 24

Fig. 6.1: Xml to yolo conversion 26

Fig. 6.2: code snippet of image detection 28

Fig. 6.4.1: Code snippet of map feature 31

Fig. 6.4.2: Code snippet of map api integration 31

Fig. 8.0.1: Confusion matrix 37

Fig. 8.0.2: Precision vs Recall curve 37

Fig. 8.0.3: F1 Score vs Confidence curve 38

Fig. 8.0.4: Overall result 38

Fig. 8.0.5: User complaint registration page 39

Fig. 8.0.6: View complaint page of admin 40


0

Fig. 8.0.7: Map to view all bin location 40

Fig. 8.0.8: Cctv detected image in admin panel 41


LIST OF TABLES

1. Table Structure 25

2. System testing table 34-36


Waste detection and management system using deep learning

CHAPTER 1
INTRODUCTION
1.1OVERVIEW

Proper waste management is a critical requirement in countries like India, where


the current lack of sufficient garbage bins presents significant challenges. In the
mornings and afternoons, when a large number of employees commute to their
workstations, the available bins quickly become overwhelmed, resulting in
overflowing trash and inadequate disposal options. This leads to several
detrimental effects.One of the primary issues is the accumulation of waste around
the bins, which creates unpleasant odors. As people continue to dispose of their
trash near full bins or on the sides of the containers, the waste begins to
decompose, emitting foul smells that permeate the surrounding area. This
unpleasant odor not only makes the environment unpleasant for pedestrians and
nearby workers but also has a negative impact on the overall perception of
cleanliness and hygiene in the city.Moreover, when the bins are full, individuals
often resort to littering by leaving their trash on the ground around the bins. This
results in visual pollution and detracts from the aesthetics of the urban landscape.
The littered waste not only includes food covers, polythene bags, and plastic
bottles but may also contain other non-biodegradable materials that further
contribute to environmental degradation.

The presence of overflowing garbage also attracts animals such as cats, dogs,
rodents, and flies. These animals scavenge through the waste, spreading it even
further and contributing to unsanitary conditions. They can tear apart bags, causing
the contents to spill onto the streets, which worsens the situation. The presence of
animals near the garbage bins not only poses risks to public health but also creates
a nuisance for pedestrians and can lead to further contamination of the surrounding
area.In addition to the immediate physical issues caused by overflowing bins, there
are also health concerns associated with improper waste management. The
accumulation of garbage, coupled with the presence of animals, provides a
breeding ground for bacteria, viruses, and other pathogens. This creates an

Department of Information Science and Engineering 1


Waste detection and management system using deep learning

environment conducive to the spread of diseases, posing risks to both human and
animal health. The potential for disease transmission is further amplified when
animals come into contact with the waste and then interact with humans or other
animals.

Addressing these challenges requires a multifaceted approach. Firstly, increasing


the number of garbage bins in high-traffic areas is crucial to provide sufficient
disposal options for the large number of commuters. This includes strategically
placing bins at regular intervals to ensure convenient access for individuals.
Regular collection and emptying of the bins should be prioritized to prevent
overflow and maintain cleanliness. The frequency of collection should be adjusted
based on the specific needs of different areas, considering factors such as
population density and waste generation patterns.Public awareness and education
campaigns play a vital role in promoting responsible waste disposal practices.
These initiatives can help individuals understand the importance of proper waste
management and encourage them to actively participate in keeping the city clean.
The campaigns can emphasize the use of reusable bags, reducing the reliance on
single-use plastics and other non-biodegradable materials.

Implementing waste segregation at the source is another essential aspect of


effective waste management. Encouraging individuals to separate recyclable
materials, such as plastics, paper, and glass, from general waste can significantly
reduce the volume of waste going into landfills. This requires the establishment of
separate bins for different types of waste, along with comprehensive recycling
programs that facilitate the proper processing and reuse of recyclable
materials.Investing in advanced waste management infrastructure is crucial for
long-term solutions. This includes the development of waste treatment facilities,
composting plants, and recycling centers. These facilities can efficiently process
and dispose of waste, minimizing environmental impact and reducing the burden
on landfills. By adopting modern technologies and best practices, urban cities can
optimize waste management processes and move towards a more sustainable and
environmentally friendly approach.

Department of Information Science and Engineering 2


Waste detection and management system using deep learning

1.2 OBJECTIVES

1. Develop a YOLOv7-based deep learning model to detect overflowing garbage


bins from user uploaded images.

2. Implement a CCTV-based garbage bin overflow detection system integrated with


an admin panel for efficient monitoring of garbage bins.

3. Create a web app for the workforce and citizens to manage garbage bin
complaints, track the availability of smart bins, and provide routes for garbage
trucks.

4. Provide a cost-effective solution for the government to efficiently manage


garbage bins using available resource.

5. Improve waste management practices and promote cleanliness in urban areas.

Department of Information Science and Engineering 3


Waste detection and management system using deep learning

CHAPTER 2
LITERATURE SURVEY

Deep learning based waste detection in bins is a new field that has received a lot
of attention from researchers in recent years. Advanced algorithms and methods
for detecting the status of waste bins using deep learning-based models have been
developed through a number of studies. In order to accurately process images and
determine the amount of waste in bins, these models make use of a variety of
computer vision and machine learning methods.

1.Design of Waste Management System Using Ensemble Neural


Networks(Subbiah Geetha , Jayit Saha , Ishita Dasgupta , Rahul Bera , Isah
A. Lawal and Seifedine Kadry )

In this paper The authors propose a novel waste management system , aiming to
overcome the limitations of traditional waste auditing methods and scattered waste.
They acknowledge the hazardous and time-consuming nature of these methods,
as well as the challenges associated with locating waste. To address these issues,
the authors introduce a mobile-based application that utilizes deep neural networks
for precise waste detection, classification, and waste size quantification. This
application allows users to capture images of trash with their smartphones and
geotag them, streamlining the waste management process and improving overall
efficiency.

The authors present a sophisticated neural network architecture as the core of their
waste management method. The architecture consists of three key components:
the backbone layer, the neck layer, and the model head. The backbone layer
employs CSPNet (Cross Stage Partial Network) to extract relevant features from
the input images. The neck layer utilizes PANet (Pyramid Attention Network) to
create feature pyramids that accommodate objects of different sizes. The model
head utilizes anchor boxes to generate output vectors containing classification
scores, bounding boxes, and class probabilities. This comprehensive neural
network ensures accurate waste detection and classification.To facilitate the waste

Department of Information Science and Engineering 4


Waste detection and management system using deep learning

management process, the authors have developed a mobile application that


enables users to capture images of trash and geotag them using their
smartphones' GPS functionality. These geotagged images are then linked to a
database of cleaners. To assign the appropriate cleaner to a specific trash pile, the
authors implemented a genetic algorithm. This algorithm considers factors such as
the location of the trash and the availability of cleaners within a 3 km radius. By
optimizing the distance and throughput of each cleaner using a star-based rating
system, the algorithm assigns ratings or scores based on their performance. Once
a match is made, the application sends a request to the cleaner, who can accept
or decline it.

The authors conducted extensive experiments to evaluate the effectiveness of their


waste management method. They utilized publicly available datasets and achieved
a remarkable detection and classification accuracy of at least 90%. These results
surpassed those of other state-of-the-art methods on the same datasets,
underscoring the efficacy of the authors' approach in accurately identifying and
classifying waste. By integrating advanced deep neural networks, geotagging, and
cleaner notification systems, their proposed method presents a practical solution
to address waste management challenges. It offers an efficient and accurate
approach for waste detection, classification, and management, ultimately
streamlining waste management processes and contributing to a cleaner
environment.

2.Real-Time Detection And Classification for a 360 degree Camera Using A


YOLO Algorithm (Tetiana Lavrenko, Ayman Ahmed, Vladimir Prokopenko,
Thomas Walte1, Hubert Mantz)

The main focus of this paper is the detection and classification of different objects
in real time with the help of a 360°-camera. YOLO, a computer vision algorithm, is
to be used to perform both the localization and classification of the objects present
in the equirectangular panoramic images. The algorithm will be extended in such
a way that the angles and directions with respect to the camera are assigned to
the detected objects. The results of this work can contribute to enhanced road

Department of Information Science and Engineering 5


Waste detection and management system using deep learning

safety at the locations where many traffic accidents take place due to suddenly
appearing road users.

In this paper, an experimental setup for real-time detection and localization for a
360°-camera using a YOLO algorithm will be presented. In the context of improved
road safety, the computer vision algorithm will be extended with the possibility to
estimate an angle of arrival of detected objects assigning them additionally relative
geographical directions with respect to the camera’s position.

The application for such a real-time detection system combining both optical and
radar sensors can be wide-ranging in the context of a smart and sustainable city.
One can start from a basic idea to collect mobility data in public urban surroundings
and make it available on a data platform for agile urban planning. From another
side, the system can be used more specifically for traffic counting of particular road
users irrespective it is urban surround-ings or forestry rural regions. Moreover, the
installation and control of adaptive lightning along the streets can also be supported
by the real-time detection system. Light duration can be adjusted automatically
depending whether a fast moving bicycle or a strolling pedestrian has been
detected passing by. Within the framework of the InnoSüd project the bicycle
counting system in the city Ulm is to be installed based on a real-time detection
system combining both optical and radar sensors.

3.An Object Detection Scheme in Equirectangular Panoramic Images Using


YOLO V3( Dhulipalla Koteswarchand, Moolea Pradeep Kumar, Korapati
Naveen Kumar, Md.Sirajuddin )

The paper presents a novel approach for object detection in equirectangular


panoramic images using the YOLO V3 algorithm. The authors tackle the
challenges posed by processing 360-degree images and propose a multi-
projection variant called m-p YOLO V3. They convert the panoramic image into
stereographic images and employ soft non-maximum suppression (soft-NMS) to
improve the accuracy of object detection. The experimental results demonstrate
the superiority of their approach, with YOLO V3 outperforming other detectors in
detecting objects in panoramic images. Notably, this scheme consumes low GPU

Department of Information Science and Engineering 6


Waste detection and management system using deep learning

computing power, making it efficient while still being capable of detecting small
objects.

The paper begins with a historical overview of panoramic images and their
evolution. It highlights the rise in popularity of panoramic images with the advent
of consumer-level VR devices. However, processing such images presents
challenges due to the lack of annotated datasets, high-resolution imagery, and
geometric distortions away from the central horizontal line. To address these
challenges, the authors employ state-of-the-art detectors, Faster R-CNN and
YOLO V3, trained using existing datasets like ImageNet and COCO. Their
experiments reveal that YOLO V3 outperforms Faster R-CNN in detecting objects
in 360-degree data.

To further enhance the YOLO V3 detector's efficiency, the authors propose a multi-
projection variant, m-p YOLO V3. This variant utilizes stereographic projection to
convert the equirectangular panorama into stereographic images, which are then
used as input for the YOLO V3 algorithm. Additionally, they incorporate soft-NMS
as a post-processing technique to suppress overlapping bounding boxes and
improve the detector's accuracy. The experimental results demonstrate the
effectiveness of their approach, with YOLO V3 achieving better performance
compared to previous models while consuming low computational power.

4.AGDC: Automatic Garbage Detection and Collection(Siddhant Bansal ,


Seema Patel ,Ishita Shah, Prof. Alpesh Patel, Prof. Jagruti Makwana, Dr.
Rajesh Thakker)

The paper addresses the challenges associated with waste management,


particularly in India and other densely populated urban areas. The growing urban
population generates a substantial volume of solid waste, which poses difficulties
for current waste management methods. The proposed system offers an AI-based
approach to detect and distinguish between garbage and valuables. By employing
Machine Learning algorithms and specifically Convolutional Neural Networks

Department of Information Science and Engineering 7


Waste detection and management system using deep learning

(CNN), the system achieves near-human accuracy in real-time garbage detection.


The camera captures images of the garbage, and a pre-trained MobileNet model
is utilized for object detection. While the current prototype can only detect bottles
as waste material, efforts are underway to develop a custom object detection
model capable of identifying all types of garbage.

The paper delves into the methodology employed in the research for garbage
detection and collection. The approach includes two major sections. First, Machine
Learning techniques, specifically object detection and CNN models, are utilized for
garbage detection. The system uses a pre-trained MobileNet model to detect
garbage instances in images and videos, providing the coordinates of bounding
boxes around the detected objects. The second section focuses on estimating the
distance of the garbage from the base of the robotic arm and guiding the arm to
pick it up. This involves calculating the 2D position of the object in front of the
camera, utilizing the PID control principle to minimize the distance between the
object and the screen center, and determining the perpendicular distance of the
object from the camera using relevant information. The distance information is then
used to guide the robotic arm to collect the garbage. The methodology achieves a
detection speed of 3-4 frames per second on the Raspberry Pi and a garbage
detection confidence of 90% or higher in real-time.

The paper discusses the design of the robotic assembly used in the proposed
waste management system. The assembly consists of three main components: the
base, the robotic arm, and the drawer. The base is equipped with four Johnson
geared DC motors, each with a speed of 300 rpm, enabling omnidirectional
movement. The base is responsible for driving the robot towards the garbage. The
robotic arm, constructed using aluminum plates, slabs, nuts, bolts, servo motors,
and bearings, replicates the working of a human arm and is used for collecting the
garbage. The arm is controlled by five servo motors and an Arduino board, utilizing
inverse kinematics to move to specific positions. The drawer serves as a container
for depositing the collected garbage. The overall system offers an efficient and
automated solution for garbage detection and collection, with the ability to operate
in real-time and achieve a high detection accuracy.

Department of Information Science and Engineering 8


Waste detection and management system using deep learning

5.Garbage Detection based on Deep Learning (Ritajya Gupta, Dhruv Kumar,


Kshitij Jaiswal, Neeraj Vishwakarma)

In this paper the authors highlight the pressing issue of waste management faced
by municipalities worldwide and the need for effective garbage detection and
recognition systems. They emphasize the lack of a clear definition of garbage and
the wide range of scenes where it appears, which affects the accuracy of manual
scrutiny and photographic records. To tackle these challenges, the paper proposes
an improved garbage detection and recognition system using a YOLOv5-based
Deep Neural Network (DNN). The system utilizes a dataset of street and city
scenes with litter, trash cans, and containers to train the model and achieve an
accuracy rate of 87.69 percent. However, the system still faces challenges with
objects similar to waste or when they are in the distance, leading to incorrect
predictions.

The research paper discusses the architecture preparation for the garbage
detection model using Computer Vision and a YOLOv5-based Deep Neural
Network (DNN). The paper explains that the YOLOv5 model is written in Python
and built on the PyTorch framework, which offers ease of installation and
integration with IoT devices. The authors mention that the YOLOv5 architecture
can be configured and customized based on specific requirements by adding or
removing layers, integrating additional image processing methods, or changing
optimization techniques. To configure the model's architecture, a "data.yaml" file is
used, which contains information about the input image size, batch size, and
number of training epochs. The file also specifies the paths to training and
validation sets, the number of classes, and the object names. By appropriately
configuring these parameters, the authors aim to optimize the garbage detection
model's performance.

The research paper provides insights into the training process of the garbage
detection model using Computer Vision and deep learning techniques. The authors
explain the key parameters used in the training process, including epochs, data,
cfg, weights, name, and cache. The number of epochs determines the number of
times the model trains on all input images, and it is often chosen based on
experience and intuition. The "data" parameter refers to the path of the data.yaml

Department of Information Science and Engineering 9


Waste detection and management system using deep learning

file, which contains the dataset summary. The "cfg" parameter specifies the model
configuration path, and the "weights" parameter mentions the path to pretrained
weights or initializes random weights if left blank. The "name" parameter is used to
name the result folder, and the "cache" parameter enables caching of images for
faster training. The authors also mention the use of TensorBoard, an add-in for
visualizing the training process and evaluating the model's performance. By
understanding and optimizing these training parameters, the authors aim to
develop an accurate and efficient garbage detection system.

6.Real-Time Object Detection with Yolo(Geethapriya. S, N. Duraimurugan,


S.P. Chokkalingam)

The main Objective of this paper is to detect objects using the You Only Look Once
(YOLO) approach. This method has several advantages as compared to other
object detection algorithms. In other algorithms like Convolutional Neural Network,
Fast-Convolutional Neural Network the algorithm will not look at the image
completely but in YOLO the algorithm looks the image completely by predicting the
bounding boxes using convolutional network and the class probabilities for these
boxes and detects the image faster as compared to other algorithms.

7.Design and development of smart Internet of Things–based solid waste


management system using computer vision(Mookkaiah Senthil Sivakumar,
Thangavelu Gurumekala , Hebbar Rahul , Haldar Nipun , Singh Hargovind)

This paper proposes a CNN-based design approach for Municipal Solid


Waste(MSW) management aiming for higher accuracy and low error rate in waste
classifications. The CNN-based approach primarily performs classification of
collected waste products.

The CNN model is built from scratch and trained to learn and classify the images
of wastages. To increase the accuracy of the image classification in MSW
management, the Inception ResNet V2 derived CNN model is built, trained, and
tested with the same set of data samples. The proposed CNN Inception ResNet

Department of Information Science and Engineering 10


Waste detection and management system using deep learning

model provided an improvement in accuracy to 94.44% during image classification,


which is about a 6.45% improvement from CNN architecture.

8.Smart street-an (ai) artificial Intelligence powered street garbage detection


and alert system(v.rajesh, thotapally santhosh, ganga shirisha, kanugula
rohith)

The aim of this research is to develop a smart waste management system using
TensorFlow based deep learning model. It performs real time object detection and
classification. The bin consists of several compartments to segregate the waste
including metal, plastic, paper. Object detection and waste classification is done in
the TensorFlow framework with a pre-trained object detection model. This program
classifies an input image as clean/unclean. This can later be used to automatically
send alerts to respective authorities when a street is found to be unclean. Once a
street is found to be unclean, it automatically sends an email alert to the respective
authorities who can then take action. It is impossible to manually identify streets
that require cleaning at a given time. With "CCTV Street Garbage Detection And
Alert System", authorities can get updates about the streets that are unclean.

Department of Information Science and Engineering 11


Waste detection and management system using deep learning

CHAPTER 3
TECHNOLOGIES USED

3.1YOLO(You Only Look Once)


YOLO, is a popular object detection algorithm known for its speed and accuracy.
YOLO is extremely fast because it does not deal with complex pipelines. It can
process images at 45 Frames Per Second (FPS). In addition, YOLO reaches more
than twice the mean Average Precision (mAP) compared to other real-time
systems, which makes it a great candidate for real-time processing.YOLO is far
beyond other state-of-the-art models in accuracy with very few background errors.

The algorithm works based on the following four approaches: Residual blocks,
Bounding box regression, Intersection over union and Non-maximum suppression.

Most of the time, a single object in an image can have multiple grid box candidates
for prediction, even though not all of them are relevant. The goal of the IOU is to
discard such grid boxes to only keep those that are relevant.

Since the first release of YOLO in 2015, it has evolved a lot with different versions.

YOLOv2 was created in 2016 with the idea of making the YOLO model better,
faster and stronger. The improvement includes but is not limited to the use of
Darknet-19 as new architecture, batch normalization, higher resolution of inputs,
convolution layers with anchors, dimensionality clustering, and other features.

An incremental improvement has been performed on the YOLOv2 to create


YOLOv3. The change mainly includes a new network architecture: Darknet-53. It
is much bigger, faster, and more accurate compared to Darknet-19, which is the
backbone of YOLOv2.

The YOLOv4 version has an optimal speed and accuracy of object detection
compared to all the previous versions and other state-of-the-art object detectors.
YOLOv4 is specifically designed for production systems and optimized for parallel
computations.

Department of Information Science and Engineering 12


Waste detection and management system using deep learning

YOLOv5, similarly to YOLOv4, uses CSPDarknet53 as the backbone of its


architecture.YOLOv6 is a Single-Stage Object Detection Framework for Industrial
Applications. YOLOv6 introduced three significant improvements to the previous
YOLOv5: a hardware-friendly backbone and neck design.

YOLOv7 is a new version making a significant move in the field of object detection,
and it surpassed all the previous models in terms of accuracy and speed.YOLO
object detection has different applications in our day-to-day life It is mainly used in
the following domains like healthcare, agriculture, security surveillance, and self-
driving cars.

3.2Roboflow
Roboflow is a comprehensive platform and toolset designed to simplify and
streamline the process of working with computer vision datasets. It provides a
range of powerful features that assist researchers, developers, and data scientists
in managing, annotating, and augmenting their image datasets for training machine
learning models.With Roboflow, users can upload their image datasets in various
formats, such as JPEG, PNG, or TIFF, and easily convert them into a standardized
format suitable for training computer vision models. The platform supports popular
annotation formats like Pascal VOC, COCO JSON, and YOLO TXT, enabling
efficient labeling of objects within the images.

One of the standout features of Roboflow is its augmentation capabilities. Users


can leverage a wide array of data augmentation techniques, such as rotation,
scaling, flipping, and noise addition, to create additional training samples and
enhance the diversity and robustness of their datasets. This helps to improve the
performance and generalization of computer vision models.

Roboflow also offers integration with popular deep learning frameworks and
platforms, such as TensorFlow and PyTorch, allowing users to seamlessly
integrate their datasets into their training pipelines. The platform provides
convenient APIs and SDKs that facilitate the integration process and enable easy
data access and manipulation.

Department of Information Science and Engineering 13


Waste detection and management system using deep learning

In addition to its core functionalities, Roboflow provides a collaborative workspace


where teams can work together on dataset management, annotation, and
augmentation tasks. It offers version control, collaboration features, and data
versioning, ensuring that teams can effectively collaborate and iterate on their
computer vision projects.

3.3WandB:
Wandb, short for Weights and Biases, is a versatile platform that facilitates
experiment tracking and visualization for machine learning projects. With Wandb,
researchers and developers can easily log and compare experiments, visualize
metrics, and track model performance over time. It provides an intuitive interface
to monitor training progress, view interactive graphs, and analyze results. Wandb
also offers integration with popular deep learning frameworks, making it effortless
to log and track experiments across different frameworks and environments.
Moreover, it supports collaborative features, allowing team members to share and
collaborate on projects seamlessly. Overall, Wandb is a powerful tool that
enhances productivity and reproducibility in machine learning workflows.

3.4Django:
Django is a high-level Python web framework based on the Model-View-Controller
(MVC) architecture. It was made with the intention of making web development
easier by providing a design that is simple and straightforward. Django is well-
known for its emphasis on scalability, reusability, and the speed with which
complex applications can be built. It gives many underlying highlights, for example,
an ORM, templating motor, structure dealing with, confirmation, and administrator
interface that make it simple to construct web applications.

Engineering of Django:

Django follows a Model-View-Regulator (MVC) engineering design, for certain


slight varieties. The pattern is called Model-View-Template (MVT) in Django. In
order to keep the code organized, manageable, and reusable, the architecture is
designed.

Department of Information Science and Engineering 14


Waste detection and management system using deep learning

The components in Django's MVT architecture function as follows:

Model: Your application's data structure is represented by this component. It


specifies the storage, retrieval, and manipulation of data. Database tables are
created using models, which are defined as Python classes.

View: This component responds to user requests and handles user requests. It
interacts with the models to retrieve data and contains the application's business
logic. Views take in data as input, use that data to take actions, and then return a
response.

Template: The data will be displayed to the user by this component. It characterizes
the design and format of the result that is introduced to the client. HTML files that
contain placeholders for dynamic data are known as templates.

In Django's MVT design, the regulator part is certainly dealt with by the actual
structure, and it's known as the URL dispatcher. The URL dispatcher maps
approaching solicitations to the suitable perspectives and passes control to the
fitting perspective capability.

Overall, Django's MVT architecture encourages separation, making codebase


management and maintenance simpler.

3.5Flask API
Flask API is a Python-based web framework for creating application programming
interfaces (APIs). It is a lightweight and adaptable framework that gives developers
the tools they need to quickly and easily create RESTful APIs. Since the Flask API
is based on the Flask microframework, it inherits many of its features, such as the
Jinja2 templating engine, support for HTTP methods, and easy-to-understand
routing system.

Department of Information Science and Engineering 15


Waste detection and management system using deep learning

Flask API includes additional features to make building APIs easier. These
remember programmed serialization of reactions for JSON design, support for
input approval, and confirmation and approval instruments. Developers can also
use the Flask API to integrate with popular data storage solutions like MongoDB
and SQLAlchemy to create custom error responses.

The Model-View-Controller (MVC) design pattern serves as the foundation for


Flask API's architecture. The application's data and business logic are represented
by the Model, presentation logic is handled by the View, and user input and
coordination of interaction between the Model and View are handled by the
Controller in this pattern.

Similar to the Flask API, Controllers are implemented using Python functions and
classes that interact with the Models and Views. Models are defined using data
models and ORM (Object-Relational Mapping) libraries like SQLAlchemy. Views
are defined using Flask's routing system and handle user input.

In general, Flask API is a Python framework for building RESTful APIs that is
adaptable and simple to use. It is the best option for developers who want to quickly
and easily create APIs that are lightweight and scalable due to its straightforward
architecture and built-in features.

3.6HTML
The standard markup language for creating web pages is HTML (Hypertext Markup
Language). It gives the content of a web page structure and format. Different
elements like headings, paragraphs, lists, images, links, forms, and more are
defined by HTML tags. These components are used to structure the page layout
and give the content meaning.

Department of Information Science and Engineering 16


Waste detection and management system using deep learning

HTML, which is the foundation of web development, is frequently utilized in


conjunction with JavaScript and CSS to create responsive and modern web pages.
Web browsers interpret HTML documents, which are plain text files that can be
created and edited with a text editor, to display web pages.

In order to meet the requirements of modern web development, new versions and
features of HTML have been added over time. HTML5, the most recent version,
includes numerous new attributes and elements that make it simpler to create
dynamic and interactive web pages.

Any web developer must have a solid understanding of HTML in order to create
user-friendly and effective web pages. HTML is a fundamental skill.

3.7CSS
CSS (Flowing Templates) is a template language utilized for portraying the
introduction of a report written in HTML or XML (counting XML vernaculars like
SVG, MathML or XHTML). CSS specifies how elements should appear on paper,
in speech, on a screen, or in any other form of media.

A declaration block and a selector make up CSS. The HTML element(s) that the
declaration block will be applied to are selected by the selector. One or more
declarations are separated by semicolons in the declaration block. Every statement
incorporates a property name and a relating esteem. The value of the property tells
you what you want to change about the element—for example, color or font size—
and the property tells you what you want to change about it.

CSS can be remembered for a HTML record in three ways:

1. Outside CSS: The link> tag is used to link the CSS code to the HTML document
after it is written in a separate file with the extension.css.

Department of Information Science and Engineering 17


Waste detection and management system using deep learning

2. Inward CSS: The CSS code is composed inside the <style> label in the head
part of the HTML archive.

3. CSS inline: The CSS code is written within the HTML element's style attribute.

CSS has a lot of features that help developers make websites that are responsive
and look good. Among the most well-liked CSS features are:

1. Box Model: CSS regards each HTML component as a rectangular box and
applies different properties like cushioning, edge, and boundary to the container.

2. Flexbox: a flexible layout model that lets elements in a container align and share
space with each other.

3. Grid: a layout model in two dimensions with elements arranged in rows and
columns.

4. Media Concerns: a feature that enables web designers to specify distinct styles
for various screen sizes and devices.

5. Transitions and Animations: CSS lets web developers make animations and
transitions that make the user experience better and add more interactivity.

In general, responsive and visually appealing websites are made possible by CSS,
which is an essential component of web development.

Department of Information Science and Engineering 18


Waste detection and management system using deep learning

3.8JAVASCRIPT
The high-level, interpreted programming language known as JavaScript is used to
create responsive and interactive web pages. It is supported by all current web
browsers and is one of the World Wide Web's core technologies. Web applications
that are both dynamic and interactive can be created using JavaScript, a powerful
scripting language.

Client-side scripting, in which the code is executed on the client's computer rather
than the server, is a common use for JavaScript. This permits web engineers to
make more unique and responsive site pages that can respond to client info and
update their substance without expecting to reload the whole page.

Using technologies like Node.js, JavaScript can also be used to create server-side
web applications and APIs.

JavaScript's most important features include:

- Typed dynamically: Variables in JavaScript do not have to be of a particular data


type; rather, they can hold values of any type.

- Object-based: Since JavaScript is an object-oriented language that relies on


prototypes rather than classes, objects are created by cloning existing ones.

- Elementary: The purpose of JavaScript is to respond to user actions like mouse


clicks and keyboard input.

- Offbeat: Web pages can continue to update and respond to user input while
waiting for other operations to finish because JavaScript can execute code
asynchronously.

Department of Information Science and Engineering 19


Waste detection and management system using deep learning

In general, JavaScript is a powerful and adaptable programming language that is


necessary for the development of modern websites. It makes it possible for
programmers to create dynamic, interactive web pages and applications that are
able to update their content in real time and respond to user input.

3.9MYSQL
Open-source relational database management system (RDBMS) MySQL is
frequently utilized in web development. It powers dynamic websites and web
applications by storing and retrieving data efficiently, and it is frequently used as
the backend database for web applications.

MySQL uses a client-server architecture, with the database management and


client request handling handled by the MySQL server. The client can be a
standalone application or a web server that uses SQL queries to communicate with
the MySQL server.

In web improvement, MySQL is regularly utilized with server-side programming


dialects like PHP, Python, and Ruby to make dynamic pages that recover and
control information from a MySQL data set. The data can be retrieved and
displayed in HTML, JSON, and XML, among other formats.

MySQL is a versatile choice for web developers because it can be used with a
variety of web development frameworks, including Django, Ruby on Rails, and
Laravel. Its versatility and unwavering quality make it a famous decision for high-
traffic web applications and internet business sites.

In general, web developers who need to build robust and scalable web applications
that need to efficiently store and retrieve data will find that MySQL is an
indispensable tool. Many developers choose it because it is simple to integrate with
popular frameworks for web development.

Department of Information Science and Engineering 20


Waste detection and management system using deep learning

CHAPTER 4
METHODOLOGY

4.1.Dataset Collection

The dataset for this project is collected from the kaggle named “Clean & Dirty
Containers in Montevideo”of version 6.1.It is a collection of data related to the
cleanliness status of containers in Montevideo,Uruguay.The dataset is created by
the user rodrigo laguna,provides valuable information for analyzing and
understanding the condition of containers in the city.

fig:4.1.1 Dataset information

4.2.splitting dataset

Here we uploaded the dataset with annotations and roboflow conducted


train,validation,test set in the ratio 70:20:10;and applied auto orientation feature
and resize the image to 640X640.It also help to create api so that we can able to
access and integrate the dataset to the training model.

fig4.2.1:train,validation,test split

4.3.training the model

Here we train the model in the kaggle including the official yolov7 folder.fine tuning
the dataset with the yolov7.pt model train it using the NVIDIA TESLA P100 GPU

Department of Information Science and Engineering 21


Waste detection and management system using deep learning

with 55 epochs with the batch size of 16.It will integrated in wandb.ai to make
analysis.

4.4.analyse the training result


Analyzing training results in a YOLO (You Only Look Once) model using wandb.ai
is a crucial step in evaluating the performance and improving the model's object
detection capabilities. By integrating wandb.ai with the YOLO model, we gain
access to a powerful set of tools for monitoring, visualizing, and comparing training
progress. During training, important metrics such as loss, precision, and recall can
be logged and tracked over time, providing valuable insights into the model's
performance. These metrics serve as indicators of how well the model is learning
to detect objects accurately.

4.5.Creating flask api


To create a Flask API for an already trained YOLO model, start by importing the
necessary dependencies, including Flask and the YOLO library. Initialize a Flask
app and define an API endpoint to receive image data. Load the pre-trained YOLO
model within this endpoint and perform object detection on the input image.
Construct a JSON response containing bounding box coordinates and class labels
for the detected objects, optionally including visualizations or annotations. Run the
Flask app, and it's ready to accept image data through the API endpoint,
performing object detection using the pre-trained YOLO model and returning the
results. This Flask API simplifies the deployment and integration of the trained
YOLO model.

4.6.Creating django web app


To create a Django web app with MySQL integration, install Django and MySQL
client dependencies. Configure Django settings for MySQL database connection.
Create models, migrate them for database tables. Develop views and templates
for user interactions. Implement forms, utilize Django's ORM for database
operations. Add validation, error handling. Consider authentication and
authorization.

Department of Information Science and Engineering 22


Waste detection and management system using deep learning

CHAPTER 5
SYSTEM DESIGN

fig 5.0.1 :Workflow Diagram

fig 5.0.2:flow chart

Department of Information Science and Engineering 23


Waste detection and management system using deep learning

fig 5.0.3:Sequence diagram

fig 5.0.4 :ER Diagram

Department of Information Science and Engineering 24


Waste detection and management system using deep learning

fig 5.0.5:table structure

Department of Information Science and Engineering 25


Waste detection and management system using deep learning

CHAPTER 6
IMPLEMENTATION

6.1.Change the annotation from xml to yolo format:

fig6.1.1:code snippet of xml to yolo conversion

The YOLO (You Only Look Once) format represents object detection bounding
boxes using normalized coordinates and dimensions relative to the image size.
The format consists of four values: (x, y, width, height). Here's a breakdown of the
mathematics involved in the conversion from original xml format to yolo format.

size calculation:

dw = 1.0 / size[0]: Calculate the width reciprocal, which represents the ratio of the
width of the image.

dh = 1.0 / size[1]: Calculate the height reciprocal, which represents the ratio of the
height of the image.

Center point calculation:

(box[0] + box[1]) / 2.0: Calculate the x-coordinate of the center point of the
bounding box by taking the average of the minimum and maximum x-coordinates.

Department of Information Science and Engineering 26


Waste detection and management system using deep learning

(box[2] + box[3]) / 2.0: Calculate the y-coordinate of the center point of the
bounding box by taking the average of the minimum and maximum y-coordinates.

Width and height calculation:

box[1] - box[0]: Calculate the width of the bounding box by subtracting the minimum
x-coordinate from the maximum x-coordinate.

box[3] - box[2]: Calculate the height of the bounding box by subtracting the
minimum y-coordinate from the maximum y-coordinate.

Normalization:

x = x * dw: Normalize the x-coordinate of the center point by multiplying it with the
width reciprocal.

w = w * dw: Normalize the width by multiplying it with the width reciprocal.

y = y * dh: Normalize the y-coordinate of the center point by multiplying it with the
height reciprocal.

h = h * dh: Normalize the height by multiplying it with the height reciprocal.

The resulting values x, y, w, and h represent the bounding box coordinates in the
YOLO format, where x and y are the normalized center coordinates, and w and h
are the normalized width and height, respectively.

These calculations ensure that the bounding box coordinates are scaled relative to
the size of the image, allowing the YOLO model to generalize across different
image sizes during training and inference.

Department of Information Science and Engineering 27


Waste detection and management system using deep learning

6.2.Detection on input image

fig6.2.1:code snippet of image detection

The detection function performs object detection using the YOLOv7 model on an
image specified by its path and name. It first constructs the full path to the image
file. Then, it executes a system command to run the detect.py script from the
YOLOv7 package, passing in the necessary arguments such as the weights file,
image resolution, confidence threshold, and source image file path. The script
performs object detection and saves the detected objects' labels in a text file.

Next, the function attempts to open the generated label file and reads its contents.
It iterates over each line of the file, incrementing a container variable for each non-
empty line. It extracts the object label from each line and sets the image_text
variable accordingly, either as "Dirty" or "Clean" based on the label value. If there
is an error opening the label file, it prints an error message.

After that, the function processes the image files generated by detect.py. It loops
through the files in the yolov7-master/runs/detect directory and checks if they have
a valid image file extension. For each valid image file, it resizes it to 350x350 pixels
and saves it in the static/detection-Out directory.At the end it removes the yolov7-
master/runs/detect directory and its contents. If objects were detected (i.e., the

Department of Information Science and Engineering 28


Waste detection and management system using deep learning

container variable is greater than 0), it returns the image_text describing the image
as either "Dirty" or "Clean." Otherwise, it returns the string "No objects detected."

6.3Detection on live video


We imported the necessary modules and libraries, such as os, cv2, shutil, and
requests. These modules provide functionalities for file operations, video capture,
image processing, and sending HTTP requests.Next, we defined several constants
to customize the detection process. These constants include the path to the
YOLOv7 detection script, the path to the model weights, the confidence threshold
for object detection, the interval between frame captures, and the output directory
for detection results. These constants can be adjusted based on our specific
requirements.We implemented the core functionality of the object detection feature
in the detection function. This function takes the path and name of the image to be
processed as input. Inside the function, we executed the YOLOv7 detection script
using the os.system function. This script performed object detection on the image
using the specified model weights and saved the resulting detections as text files.

After running the detection script, we read the generated text files to determine the
presence of dirty containers. We opened the text file containing the object labels
and read its contents. We then iterated over each line in the file, extracted the
object label, and determined if it corresponded to a dirty container or a clean
container. Based on this information, we set the appropriate image description.

To keep track of the number of detected containers, we used a variable called


container. If at least one dirty container was detected, we moved the image to the
output directory using the shutil.move function. If no dirty containers were detected,
we deleted the image using the os.remove function.

Moving on to the main part of the code, we set up the video capture using the
desired video source, such as a CCTV endpoint or a video file. We also set the
buffer size to improve playback smoothness and waited for the connection to be

Department of Information Science and Engineering 29


Waste detection and management system using deep learning

established.Inside the main loop, we read the next frame from the video capture
using the cap.read() function and incremented the frame counter. We captured
frames at the desired interval by checking if the current frame number was a
multiple of the interval multiplied by the frames per second of the video. If it was,
we saved the frame to a temporary directory.We called the detection function to
perform object detection on the captured frame. If a dirty container was detected,
we moved the frame to the output directory. If not, we continued to the next frame.

Additionally, we provided a step to send the annotated image to a specified


endpoint using an HTTP POST request. This step involved using the requests.post
function to send the annotated image file to the endpoint.

The loop continued until the user interrupted it by pressing the 'q' key. At that
point, we released the video capture resources and closed any open windows
displaying the frames.

Department of Information Science and Engineering 30


Waste detection and management system using deep learning

6.4Integrating Map api

fig6.4.1:code snippet of map feature

fig6.4.2:code snippet of map api integration

We focused on two main features: collecting geolocation data and displaying it on


a map. To achieve this, we created a form in our Django application for users to
submit geolocation information. When the form is submitted, the getgeo() view is
triggered. It retrieves the corresponding Bin object from the database and initializes
the MapCreate form. The submitted data is then saved to a new Bin object, and
latitude and longitude values are extracted from the user's cookies and assigned
to the object.

Department of Information Science and Engineering 31


Waste detection and management system using deep learning

To visualize the collected geolocation data, we developed the allMaps() view and
the all_maps.html template. The view retrieves all Bin objects from the database
and prepares the geolocation data for display on a map. In the template, we
integrated the Google Maps API by signing up for an API key through the Google
Cloud Console. We replaced the placeholder API key in the template with the
actual key. Additionally, we ensured the inclusion of the jQuery library and verified
the correct setup of the Django views and templates.

By rendering the all_maps.html template, we loaded the Google Map with the
required settings and displayed markers for each geolocation point. This enabled
users to view the collected data in an interactive and visually appealing manner.
Overall, the integration of geolocation functionality into our Django project involved
collecting data through a form, saving it to the database, and displaying it on a map
using the Google Maps API.

6.5.Creating Django web app

Here we created a virtual environment for our Django project and installed the
necessary dependencies, including Flask, which allowed us to integrate the Flask
APIs into our Django application seamlessly. We also installed other required
packages such as requests for making API calls and the MySQL database
connector for Django.Next, we developed the Flask APIs in a separate Flask app
specifically designed for garbage bin overflow detection. These APIs accepted
image data, performed object detection using the YOLOv7 model, and returned the
detection results. We ensured that the Flask app was running smoothly and tested
the APIs to verify their functionality.

To integrate the Flask APIs into our Django project, we created a Django app
dedicated to garbage bin management. Within this app, we defined Django views
that called the corresponding Flask APIs using the requests library. These views
processed the responses from the Flask APIs and handled them appropriately

Department of Information Science and Engineering 32


Waste detection and management system using deep learning

based on our application's requirements.In addition, we established a connection


with a MySQL database to store and retrieve garbage bin data, such as user
complaints, bin locations, and work progress updates. By configuring the database
settings in the Django project's settings.py file and utilizing Django's ORM, we
easily performed database operations and ensured efficient data management.

To enhance the user experience, we implemented user-friendly panels within our


Django web application. These panels were designed as Django templates and
linked to the corresponding views. For instance, the user panel allowed users to
upload images of garbage bins and submit complaints. The admin panel provided
a comprehensive interface for monitoring garbage bins, assigning drivers, and
updating work progress. The driver panel enabled drivers to access optimized
garbage truck routes and view their assigned tasks.Furthermore, we integrated a
map API, specifically Google Maps, into our Django application. This integration
enabled us to geotag the garbage bins and display their locations on the map.
Users, admins, and drivers could easily visualize the bin locations, track their
status, and optimize garbage truck routes based on the geographical data provided
by the map API.

Department of Information Science and Engineering 33


Waste detection and management system using deep learning

CHAPTER 7
SYSTEM TESTING

The purpose of testing is to discover errors. Testing is the process of trying to


discover every conceivable fault or weakness in a work product. It provides a way
to check the functionality of components, sub-assemblies, assemblies and/or a
finished product. It is the process of exercising software with the intent of ensuring
that the Software system meets its requirements and user expectations and does
not fail in an unacceptable manner. There are various types of test. Each test type
addresses a specific testing requirement.

TESTCASE

S.N SCENARIO INPUT EXPECTED ACTUAL OUTPUT


O
OUTPUT
1 Admin login Admin will Login successfully or if Login successfully or
enter email and incorrect login details Login unsuccessfully
Details
password “Login unsuccessfully”

2 Add Admin will If all the garbage bin Created successfully


enter all “Created Successfully” or created
Garbage
garbage details unsuccessfully
Bin Details

3 Edit and Admin can edit If any changes edit Updated successfully
delete and delete the updated successfully or unsuccessfully
Garbage or delete successfully Delete successfully or
garbage unsuccessfully
details
3 Driver Login Admin will Driver login id will be Created successfully
“Created Successfully” or created
create login id
unsuccessfully
for drivers

Department of Information Science and Engineering 34


Waste detection and management system using deep learning

4 View Work Admin will check Admin view garbage View all garbage
Report the garbage details details
work report
5 View Admin will check Admin will update Updated successfully
Complaint the Complaint Complaint Status or unsuccessfully
details
6 Driver login Driver will enter Login successfully or if Login successfully or
email and incorrect login details Login unsuccessfully
password “Login unsuccessfully”

7 daily work Driver will check Driver will update work Updated successfully
updates the garbage Status or unsuccessfully
details
8 Create Business All the details Create Created
Business created by all successfully successfully or
details like created
name,address unsuccessfully
, phone etc
9 View my Mechanic check Mechanic view business View all business
Business and view all details details
business details
10 Update Geo Mechanic Drag and drop the Updated successfully
Location update location location or unsuccessfully

of shop in
google map

11 Edit and Mechanic can If any changes or non Updated successfully


delete edit and delete available details can edit or unsuccessfully
product or delete Delete successfully or
the details unsuccessfully

Department of Information Science and Engineering 35


Waste detection and management system using deep learning

12 User Login Email and If correct directed to Login successfully


Password home page otherwise or
show “Invalid Login” Login
unsuccessfully

13 User register Email and All the user details Register


Password register successfully successfully
Or
Register
unsuccessfully

14 Create Complaint All the details Create Created


Complaint created by all successfully successfully or
details like created
area, locality unsuccessfully

15 View my user check and User view Complaint View my Complaint


Complaint view all details details
complaint
details
16 Edit My User can edit If any changes or user Updated successfully
Profile and profile can edit profile or unsuccessfully

Department of Information Science and Engineering 36


Waste detection and management system using deep learning

CHAPTER 8
RESULT

fig 8.0.1 confusion matrix

fig 8.0.2 Precision vs Recall curve

Department of Information Science and Engineering 37


Waste detection and management system using deep learning

fig 8.0.3 F1 Score vs Confidence curve

fig 8.0.4 Overall result

The model training process reached epoch 54, and during this epoch, the model
demonstrated promising performance. The model achieved a total loss of 0.04375,
with individual losses for boxes, objects, and classes being 0.02705, 0.004817,
and 0.01188, respectively. The evaluation metrics on the test dataset showed
impressive results, with a precision of 0.882, indicating a high percentage of correct
positive predictions, and a recall of 0.863, reflecting a strong capture rate of actual

Department of Information Science and Engineering 38


Waste detection and management system using deep learning

positive instances. The model's mean average precision (mAP) at an IoU threshold
of 0.5 was 0.92, indicating its effectiveness in accurately detecting objects.
Furthermore, the model achieved an mAP of 0.757 across IoU thresholds ranging
from 0.5 to 0.95, showcasing its consistent performance. Analyzing the results by
class, the model demonstrated excellent performance in detecting both "Clean"
and "Dirty" objects, with precision scores of 0.867 and 0.898, and recall scores of
0.892 and 0.835, respectively. The mAP scores at an IoU threshold of 0.5 were
0.925 for the "Clean" class and 0.914 for the "Dirty" class. On the basis of the
Confusion matrix we got the accuracy of 88.60%.Overall these results highlight the
model's effectiveness in accurately detecting objects, specifically in differentiating
between "Clean" and "Dirty" classes, as evidenced by its high precision, recall, and
mAP scores.

fig 8.0.5 user complaint registration page

Department of Information Science and Engineering 39


Waste detection and management system using deep learning

fig 8.0.6 view complaint page of admin

fig 8.0.7 map to view all bin location

Department of Information Science and Engineering 40


Waste detection and management system using deep learning

fig 8.0.8 cctv detected image in admin panel

Department of Information Science and Engineering 41


Waste detection and management system using deep learning

CHAPTER 9
CONCLUSION AND FUTURE WORK

In conclusion, this project successfully developed a garbage bin management


system using object detection techniques, specifically the YOLOv7 model,
integrated with Flask, Django, MySQL, and Kaggle datasets. The system achieved
good results in detecting overflowing garbage bins from user-uploaded images and
CCTV-based video footage. The web application with user, admin, and driver
panels provided an efficient platform for managing garbage bin complaints,
tracking bin locations, providing routes for garbage trucks, and updating work
progress. The integration of a map API for geotagging further enhanced waste
management practices and promoted cleanliness in urban areas.However, there
are still areas for improvement and future work. Firstly, the model's performance
can be further enhanced by incorporating a larger and more diverse dataset. This
can help improve the model's ability to detect overflowing garbage bins in complex
or cluttered scenes and accommodate different sizes of garbage bins. Acquiring
more annotated images and videos can aid in training a more robust and
generalized model.

Additionally, the system can be extended to include additional features and


functionalities. For example, integrating real-time data from garbage bins equipped
with sensors can provide more accurate and up-to-date information on bin status.
This would enable proactive waste management, allowing bins to be emptied
before overflowing occurs. Incorporating machine learning algorithms to predict bin
fill levels based on historical data can also optimize garbage collection routes and
schedules.

Furthermore, the system can benefit from incorporating advanced analytics and
data visualization techniques. Analyzing historical data on garbage bin usage and
overflow patterns can help identify hotspots and optimize resource allocation.
Visualizing this data through interactive dashboards can provide insights for
decision-makers and aid in strategic planning for waste management.

Department of Information Science and Engineering 42


Waste detection and management system using deep learning

In terms of scalability, the system can be expanded to cover larger geographical


areas and accommodate a greater number of garbage bins. This would involve
scaling up the infrastructure, such as cloud-based storage and computing
resources, to handle the increased data volume and user traffic.

Overall, this project lays a strong foundation for efficient garbage bin management
and waste management practices. By continually refining the object detection
model, incorporating advanced analytics, and leveraging emerging technologies,
such as Internet of Things (IoT) devices and machine learning algorithms, the
system can contribute to sustainable waste management and cleaner urban
environments in the future.

Department of Information Science and Engineering 43


Waste detection and management system using deep learning

REFERENCES

1. Subbiah Geetha , Jayit Saha , Ishita Dasgupta , Rahul Bera , Isah A. Lawal
and Seifedine Kadry. “Design of Waste Management System Using Ensemble
Neural Networks” March-2022

2.Tetiana Lavrenko, Ayman Ahmed, Vladimir Prokopenko, Thomas Walte1, Hubert


Mantz. “Real-Time Detection And Classification for a 360 degree Camera Using A
YOLO Algorithm”

3. Hulipalla Koteswarchand, Moolea Pradeep Kumar, Korapati Naveen Kumar,


Md.Sirajuddin. ” An Object Detection Scheme in Equirectangular Panoramic
Images Using YOLO V3” by October-2021

4. Siddhant Bansal , Seema Patel ,Ishita Shah, Prof. Alpesh Patel, Prof. Jagruti
Makwana, Dr. Rajesh Thakker. “AGDC: Automatic Garbage Detection and
Collection” August-2019

5. Ritajya Gupta, Dhruv Kumar, Kshitij Jaiswal, Neeraj Vishwakarma.“Garbage


Detection based on Deep Learning”

6. Geethapriya. S, N. Duraimurugan, S.P. Chokkalingam. “Real-Time Object


Detection with Yolo” February-2019

7. Mookkaiah Senthil Sivakumar, Thangavelu Gurumekala , Hebbar Rahul ,


Haldar Nipun , Singh Hargovind. “Design and development of smart Internet of
Things–based solid waste management system using computer vision” April-
2022

8. v.rajesh, thotapally santhosh, ganga shirisha, kanugula rohith. “Smart street-an


(ai) artificial Intelligence powered street garbage detection and alert system”

Department of Information Science and Engineering 44


Waste detection and management system using deep learning

9. Joseph Redmon,Santosh Divvala, Ross Girshick, Ali Farhadi. “You Only Look
Once: Unified, Real-Time Object Detection”

10. Peiyuan Jiang, Daji Ergu, Fangyao Liu, Ying Cai, Bo Ma. “A Review of Yolo
Algorithm Developments”

11. Tausif Diwan, G.Anirudh, and Jitendra V. Tembhurne. “Object detection using
YOLO: challenges, architectural successors, datasets and applications”

Department of Information Science and Engineering 45

You might also like