Fulldoc - Avc MSC - Trash Classification
Fulldoc - Avc MSC - Trash Classification
1
CHAPTER 1
INTRODUCTION
1.1 BACKGROUND
EXISTING SYSTEM
The traditional method of waste classification involves manual sorting and visual
inspection by human workers. This method is often prone to errors, inconsistencies, and is
time-consuming, labor-intensive, and not scalable. Therefore, there is a need for more
efficient and accurate methods for waste classification. Machine learning and computer
vision-based approaches have been proposed as a solution to these challenges. In existing
system implement support vector machine algorithm to classify the waste images. Support
Vector Machines (SVMs) are a widely used machine learning algorithm that can be used for
waste classification tasks. SVMs work by finding the hyperplane that best separates the data
points in a high-dimensional space. In waste classification, the SVM algorithm can be trained
to classify different types of waste based on their composition, texture, and other features. To
use SVMs for waste classification, waste images are first pre-processed to extract relevant
features such as color, texture, and shape. These features are then fed into the SVM
algorithm, which learns to classify the waste images into different categories based on the
extracted features. SVMs can achieve high accuracy in waste classification tasks and can
handle both binary and multi-class classification problems
They are prone to errors and inconsistencies due to human subjectivity and
judgment.
They are time-consuming and labour-intensive, which can lead to high costs
and low efficiency.
They are not scalable, which means they cannot handle large volumes of waste
materials.
They are not adaptable to changes in waste composition and material, which
can result in inaccurate classification
2
PROPOSED SYSTEM
The proposed system for smart waste classification using VGG16 CNN involves
training a deep learning model using the VGG16 architecture to classify different types of
waste based on images. The VGG16 architecture is a popular CNN architecture that has been
shown to achieve high accuracy in image classification tasks. The system involves several
steps, including data collection, pre-processing, model training, and evaluation. The data
collection process involves collecting a large dataset of waste images, including images of
different types of waste such as paper, plastic, glass, and metal. The dataset is then pre-
processed to resize the images and normalize the pixel values. The pre-processed dataset is
then split into training and testing sets, with a portion of the dataset used for training the
VGG16 CNN model. During the training process, the VGG16 model learns to identify
patterns and features in the waste images that are specific to different types of waste. The
trained model is then evaluated on the testing set to determine its accuracy and performance.
Once the model is trained and evaluated, it can be used for smart waste classification in real-
world scenarios. This can be done by taking an image of a piece of waste and passing it
through the trained model to determine the type of waste. The system can be deployed in
waste management facilities or in public spaces such as parks or streets to automatically sort
waste into different categories, making waste management more efficient and
environmentally friendly
Improved accuracy: The use of deep learning and the VGG16 architecture can
improve the accuracy of waste classification compared to traditional methods.
This can result in better waste management practices and reduced
environmental impact.
Automation: The system can be automated, allowing for efficient waste
sorting and classification in waste management facilities or public spaces. This
can save time and resources compared to manual sorting methods.
Scalability: The system can be scaled up to handle large volumes of waste,
making it suitable for use in industrial waste management
3
1.2 OBJECTIVES
4
1.3 PURPOSE, SCOPE AND APPLICABILITY
The purpose of the project on trash classification using CNNs is to address the
pressing issue of waste management by developing a technology-driven solution that can
automatically classify different types of trash. By accurately categorizing items such as
plastic, paper, metal, and glass, the project aims to improve recycling efforts and reduce
environmental impact.
The scope of the project includes data collection and preprocessing, model selection
and training, evaluation and validation, model interpretability, deployment and integration,
performance optimization, and impact assessment. It involves gathering a diverse dataset of
waste images, training a CNN model for classification, evaluating its performance,
interpreting its decisions, deploying it with a user-friendly interface, and continuously
refining it for better accuracy and efficiency.
The availability of the project will be in the form of a deployable system that can be
integrated with existing waste management processes. It will be scalable and adaptable to
different environments and scenarios, allowing for easy integration with new waste
management systems or expansion to other types of waste classification tasks. The project's
impact will be assessed based on its effectiveness in increasing recycling rates, reducing
waste contamination, and improving resource utilization efficiency, ultimately contributing to
a more sustainable approach to waste management
1.4 ACHIEVEMENTS
Through its innovative approach and tangible results, the project has made a
significant contribution to promoting a more sustainable approach to waste management.
5
1.5 ORGANIZATION OF REPORT
This dissertation mainly provides the newly generated idea, the concepts that have
been applied and finally the output has been shaped. The dissertation contains six chapters.
6
CHAPTER 2
SURVEY OF TECHNOLOGIES
2.1 FRONT END: PYTHON
7
researchers push the state-of-the-art in ML, and gives developers the ability to easily build
and deploy ML-powered applications.
TensorFlow provides a collection of workflows with intuitive, high-level APIs for both
beginners and experts to create machine learning models in numerous languages. Developers
have the option to deploy models on a number of platforms such as on servers, in the cloud,
on mobile and edge devices, in browsers, and on many other JavaScript platforms. This
enables developers to go from model building and training to deployment much more easily.
Keras
Keras is a deep learning API written in Python, running on top of the machine
learning platform TensorFlow. It was developed with a focus on enabling fast
experimentation.
8
programming language. The panda’s library is built upon another library NumPy, which is
oriented to efficiently working with arrays instead of the features of working on Data frames.
NumPy
NumPy, which stands for Numerical Python, is a library consisting of
multidimensional array objects and a collection of routines for processing those arrays. Using
NumPy, mathematical and logical operations on arrays can be performed. NumPy is a
general-purpose array-processing package. It provides a high-performance multidimensional
array object, and tools for working with these arrays.
Matplotlib
Matplotlib is a comprehensive library for creating static, animated, and interactive
visualizations in Python. Matplotlib makes easy things easy and hard things possible.
Matplotlib is a plotting library for the Python programming language and its numerical
mathematics extension NumPy. It provides an object-oriented API for embedding plots into
applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK.
Scikit Learn
Scikit-learn is a Python module for machine learning built on top of SciPy and is
distributed under the 3-Clause BSD license. Scikit-learn are a free software machine learning
library for the Python programming language. Scikit features various classification,
regression and clustering algorithms including support-vector machines, random forests,
gradient boosting, k-means and DBSCAN, and is designed to interoperate with the Python
numerical and scientific libraries NumPy and SciPy.
Pillow
Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python
Imaging Library by Fredrik Lundh and Contributors. Python pillow library is used to image
class within it to show the image. The image modules that belong to the pillow package have
a few inbuilt functions such as load images or create new images, etc.
OpenCV
OpenCV is an open-source library for the computer vision. OpenCV provides the
facility to the machine to recognize the faces or objects. In OpenCV, the CV is an
abbreviation form of a computer vision, which is defined as a field of study that helps
computers to understand the content of the digital images such as photographs and videos.
9
2.2 BACK END: MySQL
MySQL tutorial provides basic and advanced concepts of MySQL. Our MySQL
tutorial is designed for beginners and professionals. MySQL is a relational database
management system based on the Structured Query Language, which is the popular language
for accessing and managing the records in the database. MySQL is open-source and free
software under the GNU license. It is supported by Oracle Company. These queries are:
insert records, update records, delete records, select records, create tables, drop tables, etc.
There are also given MySQL interview questions to help you better understand the MySQL
database.
MySQL is currently the most popular database management system software used for
managing the relational database. It is open-source database software, which is supported by
Oracle Company. It is fast, scalable and easy to use database management system in
comparison with Microsoft SQL Server and Oracle Database. It is commonly used in
conjunction with PHP scripts for creating powerful and dynamic server-side or web-based
enterprise applications. It is developed, marketed, and supported by MySQL AB, a Swedish
company, and written in C programming language and C++ programming language. The
official pronunciation of MySQL is not the My Sequel; it is My Ess Que Ell. However, you
can pronounce it in your way. Many small and big companies use MySQL. MySQL supports
many Operating Systems like Windows, Linux, MacOS, etc. with C, C++, and Java
languages.
Interimages
MySQL is primarily an RDBMS and ships with no GUI tools to administer MySQL
databases or manage data contained within the databases. Users may use the included
command line tools, or use MySQL "front-ends", desktop software and web applications that
create and manage MySQL databases, build database structures, back up data, inspect status,
and work with data records. The official set of MySQL front-end tools, MySQL Workbench
is actively developed by Oracle, and is freely available for use.
RDBMS Terminology
To explain the MySQL database system, let us revise a few definitions related to the database
10
Column − One column (data element) contains data of one and the same
kind, for example the column postcode.
Row − A row (= tuple, entry or record) is a group of related data, for example
the data of one subscription.
Redundancy − Storing data twice, redundantly to make the system faster.
Primary Key − A primary key is unique. A key value cannot occur twice in
one table. With a key, you can only find one row.
Foreign Key − A foreign key is the linking pin between two tables.
Compound Key − A compound key (composite key) is a key that consists of
multiple columns, because one column is not sufficiently unique.
Index − An index in a database resembles an index at the back of a book.
Referential Integrity − Referential Integrity makes sure that a foreign key
value always points to an existing row.
MySQL Database
MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses.
MySQL is developed, marketed and supported by MySQL AB, which is a Swedish
company. MySQL is becoming so popular because of many good reasons −
11
MySQL is customizable. The open-source GPL license allows programmers
to modify the MySQL software to fit their own specific environments.
HTML
Hyper is the opposite of linear. Hyper used to be that computer programs had to
move in a linear fashion. This before this, this before this, and so on. HTML does
not hold to that pattern and allows the person viewing the World Wide Web page
to go anywhere, anytime they want.
Text is what you will use. Real, honest to goodness English letters.
Mark up is what you will do. You will write in plain English and then mark up
what you wrote. More to come on that in the next Primer.
Language because they needed something that started with “ L ” to finish HTML
and Hypertext Markup Louie didn’t flow correctly. Because it’s a language, really
but the language is plain English.
HTML remains for Hyper Text Markup Language. HTML is a basic content designing
dialect used to make hypertext records. HTML is a stage free dialect not at all like most other
programming dialect. HTML is impartial and can be utilized on numerous stage or desktop.
HTML is this component of HTML that makes it mainstream as standard on the WWW.
This adaptable dialect permits the making of hypertext connections, otherwise called
hyperlinks. These hyperlinks can be utilized to unite reports on diverse machine, on the same
system or on an alternate system, or can even indicate purpose of content in the same record.
HTML is utilized for making archives where the accentuation is on the presence of the
record. HTML is likewise utilized for DTP. The records made utilizing HTML can have
content with diverse sizes, weights and hues. HTML can also contain graphics to make the
document more effective.
2.3 WAMPSERVER
WampServer is a Windows web development environment. WampServer allows you
to create web applications with Apache2, PHP and a MySQL database. Alongside,
PhpMyAdmin allows you to manage easily your database.
12
WampServer is a reliable web development software program that lets you create web
apps with MYSQL database and PHP Apache2. With an intuitive interface, the application
features numerous functionalities and makes it the preferred choice of developers from
around the world. The software is free to use and doesn’t require a payment or subscription.
13
CHAPTER 3
REQUIREMENTS AND ANALYSIS
3.1 PROBLEM DEFINITION
14
3.2 REQUIREMENTS SPECIFICATION
HARDWARE REQUIREMENTS
SOFTWARE REQUIREMENTS
15
3.4 CONCEPTUAL MODELS
Symbol Description
A data flow.
16
LEVEL 0
The Level 0 DFD shows how the system is divided into 'sub-systems' (processes),
each of which deals with one or more of the data flows to or from an external agent, and
which together provide all of the functionality of the system as a whole. It also identifies
internal data stores that must be present in order for the system to do its job, and shows the
flow of data between the various parts of the system.
17
LEVEL 1
The next stage is to create the Level 1 Data Flow Diagram. This highlights the main
functions carried out by the system. As a rule, to describe the system was using between two
and seven functions - two being a simple system and seven being a complicated system. This
enables us to keep the model manageable on screen or paper.
18
LEVEL 2
A Data Flow Diagram (DFD) tracks processes and their data paths within the business
or system boundary under investigation. A DFD defines each domain boundary and
illustrates the logical movement and transformation of data within the defined boundary. The
diagram shows 'what' input data enters the domain, 'what' logical processes the domain
applies to that data, and 'what' output data leaves the domain. Essentially, a DFD is a tool for
process modeling and one of the oldest.
19
CHAPTER 4
SYSTEM DESIGN
4.1 BASIC MODULES
Dataset Collection
Preprocessing
Features Extraction
Model Training
Waste Classification
MODULE DESCRIPTION
Dataset Collection
Dataset acquisition refers to the process of obtaining data for use in various
applications, such as machine learning, data analysis, and research. In this module, we can
input the pest datasets that are collected from KAGGLE web sources. It contains the various
waste details as in image format. There are several publicly available datasets for waste
classification, such as the UCI waste classification dataset, the TrashNet dataset, and the
DUST dataset. These datasets can be accessed online and used for training and testing the
model. Dataset important to ensure that the datasets used for training and testing the model
are diverse and representative of the waste that the system will be classifying in real-world
scenarios. This can help ensure that the model is able to accurately classify waste under a
range of different conditions.
Preprocessing
20
the images to grayscale if colour information is not required. These preprocessing steps help
to classification.
Features Extraction
In smart waste classification using VGG16 CNN, feature extraction is the process of
extracting meaningful features from the pre-processed images. This is achieved by using the
convolutional layers of the VGG16 CNN model, which are designed to identify patterns and
features within the images. Feature extraction is a critical step in training the VGG16 CNN
model for smart waste classification. By using the pre-trained convolutional layers of the
VGG16 CNN model, we can leverage the power of transfer learning to extract meaningful
features from the images without having to train the model from scratch. This helps to
improve the accuracy of the model and reduce the amount of time and resources required to
train it.
Model Training
Once the preprocessed images have been passed through the VGG16 CNN model for
feature extraction, the next step is to train the model to accurately classify the images into
their respective waste categories. This is done using a technique called supervised learning,
where the model is trained on a labeled dataset consisting of images and their corresponding
waste categories. The training process is typically repeated for several epochs until the model
has converged and achieved the desired level of accuracy. Once the model has been trained, it
can be used to classify new images into their respective waste categories.
Waste Classification
Waste classification is the process of categorizing waste into different types based on
their characteristics, composition, and potential risks to the environment and public health.
Proper waste classification is important for effective waste management, as it enables the
identification of appropriate disposal methods and the implementation of measures to
minimize the environmental impact of waste. In this module classify the waste using CNN
framework.
21
4.2 DATA DESIGN
22
4.3 USER INTERFACE DESIGN
User interface is the front-end application view to which user interacts in order to use
the software. User can manipulate and control the software as well as hardware by means
of user interface. Today, user interface is found at almost every place where digital
technology exists, right from computers, mobile phones, cars, music players, airplanes,
ships etc.
User interface is part of software and is designed such a way that it is expected to
provide the user insight of the software. UI provides fundamental platform for human-
computer interaction.
Attractive
Simple to use
Responsive in short time
Clear to understand
Consistent on all interfacing screens
23
Waste recognition systems may produce false positives or false negatives,
leading to miscarriages of justice and undermining public trust in the
recyclable.
In python based automatic trash detection project implementation the errors are found
out easily and rectified with the help of error handling concept.
24
CHAPTER 5
Implementation is the stage in the project where the theoretical design is turned into a
working system. The most critical stage is achieving a successful system and in giving
confidence on the new system for the users, what it will work efficient and effectively. It
involves careful planning, investing of the current system, and its constraints on
implementation, design of methods to achieve the changeover methods. The implementation
process begins with preparing a plan for the implementation of the system. According to this
plan, the activities are to be carried out in these plans; discussion has been made regarding
the equipment, resources and how to test activities. The coding step translates a detail design
representation into a programming language
Realization: Programming languages are vehicles for communication between human and
computers programming language characteristics and coding style can profoundly affect
software quality and maintainability. The coding is done with the following characteristics in
mind.
Ease of design to code translation.
Code efficiency.
Memory efficiency.
Maintainability.
Implementation is the stage of the project when the theoretical design is turned out into a
working system. Thus, it can be considered to be the most critical stage in achieving a
successful new system and in giving the user, confidence that the new system will work and
be effective.
25
5.2 CODING DETAILS AND CODE EFFICIENCY
import numpy as np
import os
import random
import glob
# to find files
train_folder ="Data/"
26
img_width = 100
img_height = 100
batch_size = 32
epochs = 10
# Train Dataset
train_class_names = os.listdir(train_folder)
# declaration of functions
# Declaring variables
27
for img_name in image_list:
# Loading images
# Converting to arrary
img = image.img_to_array(img)
# Transfer Learning: this is to apply preprocess of VGG16 model to our images before
passing it to VGG16
# Training Dataset
print("Training Dataset")
print(x.shape)
28
print(y.shape)
model_vgg16 = VGG16(weights='imagenet')
model_vgg16.summary()
model_vgg16.summary()
last_layer = model_vgg16.output
flatten = layers.Flatten()(last_layer)
model.summary()
layer.trainable = False
model.summary()
29
from sklearn.model_selection import train_test_split
model.save("Vggmodel.h5")
acc = history2.history['accuracy']
val_acc = history2.history['val_accuracy']
epochs = range(len(acc))
plt.xlabel('Epochs')
plt.ylabel('Accuracy')
30
plt.legend()
plt.grid(True)
plt.show()
loss_train = history2.history['loss']
loss_val = history2.history['val_loss']
plt.xlabel('Epochs')
plt.ylabel('Loss')
plt.legend()
plt.grid(True)
plt.show()
y_pred = model.predict(xtrain)
print(y_pred)
y_test=np.argmax(ytrain, axis=1)
print(classification_report(y_test, y_pred))
31
cm = confusion_matrix(y_test, y_pred)
print(cm)
plt.xlabel('Predicted Label')
plt.ylabel('True Label')
plt.show()
import warnings
import os
import mysql.connector
app = Flask(__name__)
app.config.from_object(__name__)
app.config['SECRET_KEY'] = '7d441f27d441f27567d441f2b6176a'
@app.route("/")
def homepage():
return render_template('index.html')
@app.route("/Prediction")
def Prediction():
return render_template('Prediction.html')
32
@app.route("/predict", methods=['GET', 'POST'])
def predict():
if request.method == 'POST':
import tensorflow as tf
import numpy as np
import cv2
file = request.files['file']
file.save('static/upload/Test.jpg')
org = 'static/upload/Test.jpg'
img1 = cv2.imread('static/upload/Test.jpg')
noi = 'static/upload/noi.jpg'
cv2.imwrite(noi, dst)
classifierLoad = tf.keras.models.load_model('Vggmodel.h5')
result = classifierLoad.predict(test_image)
print(result)
result = classifierLoad.predict(test_image)
33
print(result)
print(result)
out = ''
pre = ''
if result[0] == 0:
print("cardboard")
out = "cardboard"
pre = "Degradable"
elif result[0] == 1:
print("glass")
out = "glass"
pre = "Non-Degradable"
elif result[0] == 2:
print("metal")
out = "metal"
pre = "Non-Degradable"
elif result[0] == 3:
print("paper")
out = "paper"
pre = "Degradable"
34
elif result[0] == 4:
print("plastic")
out = "plastic"
pre = "Non-Degradable"
elif result[0] == 5:
print("trash")
out = "trash"
pre = "Degradable"
import requests
requests.post(
"http://sms.creativepoint.in/api/push.json?
apikey=6555c521622c1&route=transsms&sender=FSSMSS&mobileno=" + str(
targetno) + "&text=Dear customer your msg is " + message + " Sent By FSMSG FSSMSS")
@app.route("/Camera")
def Camera():
import warnings
35
import cv2
import numpy as np
import os
import time
flag = False
labelsPath = "./yolo-coco/coco.names"
LABELS = open(labelsPath).read().strip().split("\n")
np.random.seed(42)
dtype="uint8")
weightsPath = os.path.abspath("./yolo-coco/yolov3-tiny.weights")
configPath = os.path.abspath("./yolo-coco/yolov3-tiny.cfg")
ln = net.getLayerNames()
36
vs = cv2.VideoCapture(0)
writer = None
flag = True
flagg = 0
while True:
# if the frame was not grabbed, then we have reached the end
# of the stream
if not grabbed:
break
if W is None or H is None:
(H, W) = frame.shape[:2]
swapRB=True, crop=False)
net.setInput(blob)
37
start = time.time()
layerOutputs = net.forward(ln)
end = time.time()
boxes = []
confidences = []
classIDs = []
scores = detection[5:]
classID = np.argmax(scores)
confidence = scores[classID]
38
# the size of the image, keeping in mind that YOLO
# height
confidences.append(float(confidence))
classIDs.append(classID)
# bounding boxes
args["threshold"])
if len(idxs) > 0:
39
for i in idxs.flatten():
if (LABELS[classIDs[i]] in final_classes):
flagg += 1
# print(flag)
confidences[i])
if (flagg == 40):
flagg = 0
out = LABELS[classIDs[i]]
pre = ''
if out=="bottle":
pre = "Non-Degradable"
pre = "Non-Degradable"
40
elif out=="cup":
pre = "Degradable"
pre = "Non-Degradable"
pre = "Degradable"
else:
flag = True
cv2.imshow("Output", frame)
if cv2.waitKey(1) == ord('q'):
break
vs.release()
cv2.destroyAllWindows()
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True, use_reloader=True)
41
5.3 TESTING APPROACH
TESTING
Testing is a set activity that can be planned and conducted systematically. Testing
begins at the module level and work towards the integration of entire computers-based
system. Nothing is complete without testing, as it is vital success of the system.
Testing Objectives:
There are several rules that can serve as testing objectives, they are
1. Testing is a process of executing a program with the intent of finding an error
2. A good test case is one that has high probability of finding an undiscovered error.
3. A successful test is one that uncovers an undiscovered error.
Tests for correctness are supposed to verify that a program does exactly what it was
designed to do. This is much more difficult than it may at first appear, especially for large
programs.
Testing used for implementation efficiency attempt to find ways to make a correct
program faster or use less storage. It is a code-refining process, which reexamines the
implementation phase of algorithm development. Tests for computational complexity amount
42
to an experimental analysis of the complexity of an algorithm or an experimental comparison
of two or more algorithms, which solve the same problem.
Tests for correctness are supposed to verify that a program does exactly what it was
designed to do. This is much more difficult than it may at first appear, especially for large
programs. Test is a code-refining process, which reexamines the implementation phase of
algorithm development. Tests for computational complexity amount to an experimental
analysis of the complexity of an algorithm or an experimental comparison of two or more
algorithms, which solve the same problem.
The testing is carried in the following steps,
1. Unit Testing
2. Integration Testing
3. System Testing
4. Validation Testing
5. Acceptance Testing
6. Functional Testing
1. Unit Testing
Unit testing refers testing of all the individual programs. This is sometimes called as
program testing. This test should be carried out during programming stage in order to find the
errors in coding and logic for each program in each module. Unit test focuses verification
effort on the smallest unit of software design module. In this project, the user must fill each
field otherwise the user to enter values.
Reduces Defects in the newly developed features or reduces bugs when changing the
existing functionality.
Reduces Cost of Testing as defects are captured in very early phase.
Improves design and allows better refactoring of code.
Unit Tests, when integrated with build gives the quality of the build as well.
2. Integration Testing
43
e.g. components in a software system or – one step up – software applications at the company
level – interact without error.
4. System Testing
System testing is used to test the entire system (Integration of all the modules). It also
tests to find the discrepancies between the system and the original objective, current
specification and system documentation. The entire system is checked to correct deviation
to achieve correctness.
3. Validation Testing
Valid and invalid data should be created and the program should be made to process
this data to catch errors. When the user of each module wants to enter into the page by the
login page using the use rid and password. If the user gives the wrong password or use rid
then the information is provided to the user like “you must enter user id and password”. Here
the inputs given by the user are validated. That is password validation, format of date are
correct, textbox validation. Changes that need to be done after result of this testing.
5. Acceptance Testing
Acceptance testing can be defined in many ways, but a simple definition is the
succeeds when the software functions in a manner that can be reasonable expected by the
customer. After the acceptance test has been conducted, one of the two possible conditions
exists. This is to fine whether the inputs are accepted by the database or other validations. For
example, accept only numbers in the numeric field, date format data in the date field and also
the null check for the not null fields. If any error occurs then show the error messages. The
function of performance characteristics to specification and is accepted. A deviation from
specification is uncovered and a deficiency list is created. User Acceptance Testing is a
critical phase of any project and requires significant participation by the end user. It also
ensures that the system meets the functional requirements.
6. Functional Testing
Functional test can be defined as testing two or more modules together with the
intent of finding defects, demonstrating that defects are not present, verifying that the module
performs its intended functions as stated in the specification and establishing confidence that
a program does what it is supposed to do.
44
CHAPTER 6
RESULT AND DISCUSSION
HOME PAGE
MODEL BUILD
M:\Project-2024\BE\KU\Hlaf\WasteClassificationNewPy\venv\Scripts\python.exe
M:/Project-2024/BE/KU/Hlaf/WasteClassificationNewPy/VggModel.py
2024-03-07 20:59:20.787413: W
tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic
library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
45
Variable declaration completed.
Training Dataset
(2527, 6)
2024-03-07 20:59:32.932845: W
tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic
library 'nvcuda.dll'; dlerror: nvcuda.dll not found
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
46
2024-03-07 20:59:35.174664: W tensorflow/core/framework/cpu_allocator_impl.cc:82]
Allocation of 411041792 exceeds 10% of free system memory.
Model: "vgg16"
_________________________________________________________________
=================================================================
47
block3_conv2 (Conv2D) (None, 56, 56, 256) 590080
48
fc1 (Dense) (None, 4096) 102764544
=================================================================
Non-trainable params: 0
_________________________________________________________________
Model: "vgg16"
_________________________________________________________________
=================================================================
49
block1_pool (MaxPooling2D) (None, 50, 50, 64) 0
50
block5_conv1 (Conv2D) (None, 6, 6, 512) 2359808
=================================================================
Non-trainable params: 0
_________________________________________________________________
Model: "model"
_________________________________________________________________
=================================================================
51
block2_conv1 (Conv2D) (None, 50, 50, 128) 73856
block2_conv2 (Conv2D)
52
block5_conv1 (Conv2D) (None, 6, 6, 512) 2359808
=================================================================
Non-trainable params: 0
_________________________________________________________________
Model: "model"
_________________________________________________________________
=================================================================
53
block1_conv1 (Conv2D) (None, 100, 100, 64) 1792
54
block4_conv3 (Conv2D) (None, 12, 12, 512) 2359808
=================================================================
_________________________________________________________________
55
Epoch 1/10
Epoch 2/10
Epoch 3/10
Epoch 4/10
Epoch 5/10
Epoch 6/10
Epoch 7/10
Epoch 8/10
Epoch 9/10
56
Epoch 10/10
TRAINING ACCURACYs
57
TRAINING LOSS
58
CLASSIFICATION REPORT
CONFUSION MATRIX
59
PREDICTION
60
TRASH CLASSIFICATION
PREPROCESSING
61
TRASH CLASSIFICATION
62
6.2 USER DOCUMENTATION
Users of a system are not all the same. The producer of documentation must structure it to
cater for different user tasks and different levels of expertise and experience. It is particularly
important to distinguish between end-users and system administrators:
1. End-users use the software to assist with some task. This may be flying an aircraft,
managing insurance policies, writing a book, etc. They want to know how the software
can help them. They are not interested in computer or administration details.
2. System administrators are responsible for managing the software used by end-users.
This may involve acting as an operator if the system is a large mainframe system, as a
network manager is the system involves a network of workstations or as a technical
guru who fixes end-users software problems and who liaises between users and the
software supplier.
63
CHAPTER 7
CONCLUSIONS
7.1 CONCLUSION
The Trash Classification Using Deep Learning Algorithm system using VGG16 CNN
is an efficient approach towards automatic waste classification using deep learning
techniques. The proposed system aims to solve the issue of improper waste management by
classifying waste materials into different categories. The VGG16 architecture has been used
for the proposed system as it is a powerful and widely used architecture in image
classification. The system requires pre-processing of the images for enhancing the quality of
the input images. The images are then trained using the VGG16 CNN model, and the features
are extracted to perform waste classification. The proposed system has various advantages
such as high accuracy, reduced human intervention, and better waste management. The
system can handle large datasets and can classify the waste into different categories with high
accuracy, which helps in waste management and recycling. Compared to existing waste
classification algorithms, the proposed VGG16-based system showed better accuracy and
robustness. The VGG16 architecture, with its deep layers and ability to learn complex
features, proved to be a powerful tool in image classification tasks.
64
7.3 FUTURE SCOPE OF THE PROJECT
With further research and development, the proposed system can be integrated with a
smart waste collection system to provide real-time waste classification and segregation.
Another possible area for improvement is the integration of real-time waste detection using
sensors and cameras. This would allow for more accurate and efficient waste classification,
as well as the ability to monitor and analyse waste trends over time. Additionally, the
implementation of automated waste sorting systems could be explored, where the waste is
sorted into appropriate categories using robotics and artificial intelligence
65
REFERENCES
BOOKS
WEBSITES
https://docs.python.org/3/tutorial/
https://www.w3schools.com/python/
https://www.tutorialspoint.com/python/index.htm
https://www.programiz.com/python-programming
66