You are on page 1of 17

FRESH AND

ROTTEN FRUIT
CLASSIFICATION
USING DEEP LEARNING

UNDER THE GUIDANCE OF


SUBMITTED BY-
Dr. Shalini Bhaskar Bajaj Dr. Aman Jatain
PALAK ARORA
HOD, ASET Assistant Professor
BTECH CSE
Amity University Amity University
A50105218032
Amity University
INDEX
 INTRODUCTION
 TOOLS
 TECHNOLOGY
 PROBLEM STATEMENT
 DATASET
 CONVOLUTIONAL NEURAL NETWORK
 STEPS FOR BUILDING CNN MODEL
 PREDICTIONS
 INSIGHTS
 CONCLUSION
 FUTURE WORK
INTRODUCTION
FRESH AND ROTTEN FRUIT CLASSIFICATION
 The proposed model classifies the fresh fruits and rotten fruits from the input fruit images.

 This study comparatively analyses an image dataset containing samples of three types of fruits to distinguish fresh samples

from those of rotten.

 Traditional methods which detect the spoilage of food are slow, laborious, subjective and time consuming. As a result, fast

and accurate automatic methods need to be introduced to industrial applications.

 Detecting the rotten fruits become significant in the agricultural industry.

 If we do not detect those defects, those defected fruits may contaminate good fruits. Hence, we proposed a model to avoid

the spread of rottenness. 

 A Convolutional Neural Network (CNN) is used for extracting the features from input fruit images, and Softmax is used to

classify the images into fresh and rotten fruits.


ANACOND
TOOLS A

JUPYTER
NOTEBOOK
TECHNOLOGY
PYTHON
The Python Programming Language is a high-level
language. It is also an interpreted and the
dynamically typed language. The python contains so
many different types of the libraries; some of the
libraries are the sklearn, pandas, Matplotlib and
many more.. Unlike, many other languages it has
fewer syntactic exceptions and special cases than C or
Pascal.
DEEP LEARNING
Deep learning is a machine learning technique that teaches
computers to do what comes naturally to humans. In deep
learning, a computer model learns to perform classification
tasks directly from images, text, or sound. Deep learning
models can achieve state-of-the-art accuracy, sometimes
exceeding human-level performance. Models are trained by
using a large set of labeled data and neural network
architectures that contain many layers.
TENSORFLO
W
TensorFlow is an open source framework developed by
Google researchers to run machine learning, deep
learning and other statistical and predictive analytics
workloads. It can be used across a range of tasks but has a
particular focus on training and inference of deep neural
networks. Tensorflow is a symbolic math library based
on dataflow and differentiable programming.
KERAS
Keras is a powerful and easy-to-use free open source
Python library for developing and evaluating deep
learning models.
It wraps the efficient numerical computation
libraries Theano and TensorFlow and allows you to
define and train neural network models in just a few
lines of code. Keras is an open-
source software library that provides a Python
 interface for artificial neural networks. Keras acts as
an interface for the TensorFlow library.
PROBLEM The objective is to identify (predict) whether the
fruit is Fresh or Rotten from the given images using

STATEMENT Deep Learning (MODEL) and calculating training


and validation loss and accuracy.

DATASET
The Dataset consist of three fruits- Apple, Orange, Banana
and each fruit has 2 classes fresh and rotten so in all “Fruit
Classification” Dataset has 6 classes.
Dataset is already divided into train and test set. Training
dataset consists total of 10,901 images where 1693
images are of fresh apples, 1581 images of fresh bananas,
1466 images of fresh oranges, 2342 images of rotten
apple, 2224 images of fresh bananas and 1595 images of
rotten oranges. Fresh & Rotten Fruit Classification
CONVOLUTIONAL NEURAL
NETWORK
CNN is a type of neural network
model which allows us to extract
higher representations for the
image content. Unlike the classical
image recognition where we define
the image features ourself. CNN
takes the image's raw pixel data,
trains the model, then extracts the
features automatically for better
classification.
STEPS FOR BUILDING CNN MODEL
STEP 1-
CONVOLUTION

STEP 2- MAX
POOLING

STEP 3-
FLATTENING

STEP 4- FULL
CONNECTION
STEP-1 CONVOLUTIONAL
LAYER
This is the first layer to extract features from
an input image. It preserves relationship
between pixels by learning image features
using small square of input data.

STEP-2 POOLING
LAYER

Pooling layers are another way to reduce the size of


the image in order to speed up computation. It allow
us to determine features that produce highest
impact and reduce overfitting
STEP-3 flattening

In this we are flattening our pooled


map into a single column column.

STEP-4 FULL
CONNECTION

Fully Connected layer inputs the latten


layer and input is passed to hidden
layer, the hidden layer classify the
image and result output
FEATURE LEARNING CLASSIFICATION
PREDICTION After Applying the convolution layer, pooling
layer and flatten the layers now we train the
S model and observe the Predictions.
Our Model yields 97.29% accuracy.
insights The following graph shows the training and validation loss and
accuracy. As you can see from graph how loss decreases for both
training and validation and how accuracy increases for both.

ACCURACY GRAPH
LOSS GRAPH
CONCLUSION
The classification of fresh and rotten fruits is very important in
agricultural fields. In our work, we introduced a model based on CNN and
concentrated on building transfer learning models for the task of
classification of fresh and rotten fruits. The results proved that the CNN
model proposed can classify fresh and rotten fruits firmly and produced
better accuracy. Thus, the proposed CNN model can automate the process
of human brain in classifying the fresh and rotten fruits with the help of
the proposed convolutional neural network model and thus reduces the
human errors while classifying fresh and rotten fruits. The accuracy of
97.29% is attained for the proposed CNN model.
FUTURE SCOPE
The future extent for this work includes increasing varieties of fruits
will be taken for classification, so that every fruit farmer will use the
system. The work proposed is more useful for fruit yielding farmers for
the classification of fresh and rotten fruits in yield so that they can get
better cost price at markets.
THANKYOU

You might also like