0% found this document useful (0 votes)
48 views7 pages

A Deep Learning Approach For Detection of Disease and Classification of Fruits

The calorie component of fruit is identified using a common photo dataset and several machine learning advancements, including Pre-processing, segmentation, function extraction, and classification which is primarily based on size and shape. Using image processing methods, the dimensions of fruit objects are calculated. Finally, we'll provide users and patients with the best advice for fruit consumption based on our best estimates of the number of calories in the fruit.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views7 pages

A Deep Learning Approach For Detection of Disease and Classification of Fruits

The calorie component of fruit is identified using a common photo dataset and several machine learning advancements, including Pre-processing, segmentation, function extraction, and classification which is primarily based on size and shape. Using image processing methods, the dimensions of fruit objects are calculated. Finally, we'll provide users and patients with the best advice for fruit consumption based on our best estimates of the number of calories in the fruit.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Volume 9, Issue 8, August – 2024 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24AUG177

A Deep Learning Approach for Detection of


Disease and Classification of Fruits
Dr. Sharanabasappa Madival1 Mary Sushmita2
Department of Computer Science and Engineering Department of Artificial Intelligence and Data Science
Faculty of Engineering & Technology (Co-Education) Sharnbasva University
Sharnbasva University Kalaburagi, India
Kalaburagi, India

Abstract:- The calorie component of fruit is identified By applying machine learning techniques such as pre-
using a common photo dataset and several machine processing, segmentation, feature extraction, training, and
learning advancements, including Pre-processing, classification based on shape and size, the calorie content of a
segmentation, function extraction, and classification piece of fruit can be identified using a standard photo dataset.
which is primarily based on size and shape. Using image Using image processing methods, the dimensions of fruit
processing methods, the dimensions of fruit objects are objects are calculated. The last thing to do is figure out how
calculated. Finally, we'll provide users and patients with many calories are in the fruit and then provide the patients
the best advice for fruit consumption based on our best and users with the best advice on how much fruit to eat.
estimates of the number of calories in the fruit. To help Various methods for estimating calories are discussed and
farmers save time and money while improving the evaluated. Season, weather, state, nation, usage, etc. are some
accuracy of plant disease detection, we have developed a of the fruit attributes that we also included.
technology. Thanks to the usage of many speed-enhancing
methods, it outperforms competing systems. An easy-to- II. LITERATURE REVIEW
implement method for picture segmentation,
classification, and reconstruction, the SVM Algorithm is In 2015, Dr. Agrawal et al. [1] presented a method that
what we're employing here. Even when the objective made use of the Internet of Things for its implementation.
function isn't acting well, it may nevertheless perform This approach shows the plant diseases that have been found,
well during global optimization. the reasons behind them, and the best way to manage them.
Consider the leaf: it shows the leaf's wetness, humidity,
Keywords:- Image Processing, Smart Farming, Fruit temperature, and more. It makes use of an LCD monitor,
Grading. MATLAB, and Arduino software, among other things.

I. I.INTRODUCTION In 2015, Bharwad et al. [2] followed the same process


as the one we are using in our work at the moment. Factors
India is the world's second-largest producer of organic such as form, color, and texture were used for extraction.
goods, with its rural population producing 44.04 million tons Additionally, several algorithms are used for distinct
of soil products each year. Ten percent of the world's natural processes.
products are produced in India. Ranchers in India cultivate a
wide variety of organic fruits and vegetables, including In 2016, Bhange et al. [3] proposed an image-
watermelon, papaya, guava, mango, citrus, grapes, and more. processing technique for detecting diseases in fruit plants.
The natural products sector accounts for around 20% of the They used a Support Vector Machine (SVM) with an
country's GDP. The surprising improvement of natural accuracy of 82 percent. Their approach, similar to ours,
goods, the nonappearance of maintenance, and manual involved different components such as color coherence
assessment have all contributed to a decrease in the creation vector, intent search, dataset preparation, and morphology to
of valuable natural products. Pesticides and other chemical achieve results.
pollutants degrade both the quantity and quality of rural
goods. Infections and microbes are the primary causes of In 2011, Jaymala Patil et al. [4] advanced the study of
diseases caused by natural products. Horrible environmental plant diseases by reviewing 24 papers and identifying various
conditions also contribute to the spread of the illnesses. Such methods for disease detection. They found that new
natural product diseases have a wide range of characteristics techniques were continually being introduced, each with
and behaviors, many of which are difficult to identify. An varying levels of accuracy. Examples include wavelet-based
important perspective is the diagnosis of organic product techniques, stereomicroscopic methods, integrated image
disease. A method of manual monitoring is necessary for analysis, and artificial vision systems.
farmers in this area. Unfortunately, the outcome will not be
precise every time. So, we want a single intelligent OS that
can identify both healthy and diseased crops.

IJISRT24AUG177 www.ijisrt.com 247


Volume 9, Issue 8, August – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24AUG177

S.E.A. Raza et al. [5] 2015 developed a for remotely clustering, the Otsu threshold algorithm for segmentation,
detecting infected plants when two types of plants are present and the CCM method for extracting features and
in the same image using a machine-learning system. Using classification by applying the backpropagation method of
thermal imaging to examine plants for unhealthy zones is a ANN.
rapid and non-destructive method. Their goal in writing this
research is to provide a way for automated disease III. SYSTEM ARCHITECTURE
identification in plants using machine learning approaches by
combining data from stereo visible light pictures with  Flow Chart
thermal images. This will help them overcome challenges
like temperature change, leaf angles, and environmental
variables.

In 2015, Patil et al. [6] introduced two fascinating new


key topics: detection and classification. To boost plant
production and economic development, it is crucial to detect
and classify plant diseases. The picture undergoes a series of
operations, including pre-processing, segmentation, feature
extraction, and classification, to identify plant diseases.
Based on the characteristics that are chosen, it sorts the data.

In 2015, Rastogi et al. [7] proposed a system split into


two stages. During the initial stage, the plant is identified
through the analysis of leaf characteristics, which involves
pre-processing leaf images, followed by training and
classifying the images using an Artificial Neural Network
(ANN). In the next phase, the disease on the leaf is identified
using K-Means segmentation to isolate the affected areas,
followed by extracting features from these infected regions.
An artificial neural network (ANN) is then employed to
classify the disease. The severity is determined by evaluating
how extensively the leaf is infected.

In 2015, Bed et al. [8] surveyed methods for identifying Fig 1 Flow Chart
diseased leaves. The paper examined a range of techniques,
including Probabilistic Neural Networks, Principal IV. IMPLEMENTATION
Component Analysis, and Genetic Algorithms. It determined
that Probabilistic Neural Networks is the most accurate  Modules
method for identifying the affected areas of leaves.
 Capturing Image
In 2015, Rajleen Kaur et al. [9] employed an SVM The first stage in detecting a plant illness is to take a
classifier to detect plant diseases. The process begins with picture of the affected plant. We can use digital cameras and
capturing the original image, followed by image processing. mobile devices with at least 8 megapixels.
The image is then separated into its hue and saturation
components, and finally, the diseased areas are identified.  Preprocessing:
This approach utilizes an Enhanced SVM method, which Images are gradually included in the program.
offers improved accuracy compared to previous methods. Preprocessing enhances the image's clarity, allowing us to
make out even the tiniest of elements. We employ Median
In 2012, Anand H. Kulkarni et al. [10] started by filters to isolate pictures and eliminate noise. By applying a
capturing images, which were then filtered and later median filter to a picture, we may keep the relevant details
segmented using a Gabor filter. From the segmented images, while eliminating the noise.
texture and color features were extracted. The combination of
these features, along with the use of an Artificial Neural  Feature Extraction:
Network (ANN), provided better accuracy. The process begins with picture extraction and
continues with applying various filters. Next, things that
In 2012, Dheeb Al Bashish et al. [11] proposed a seem contaminated are grouped. Partitioning and extracting
framework with two key steps: first, segmenting images features are two applications of region growing. Because
using the K-Means algorithm, and then analyzing the these pixels are used in the absence of an edge, it is entirely
segmented images with a pre-trained neural network. dependent on the pixels immediately around them. This
makes use of routines that compute values and keep doing so
In 2015, Sachin D. Khirade and colleagues used until all of the values have been used up.
techniques such as boundary and spot detection, k-means

IJISRT24AUG177 www.ijisrt.com 248


Volume 9, Issue 8, August – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24AUG177

 Segmentation: V. METHODOLOGY
This module splits the photos into many sections. For
image segmentation, a mask or labeled image is used to  Image Segmentation:
divide a picture into smaller, more manageable pieces. Rather Algorithm for K-Means image segmentation – as given
than processing the whole picture, only the relevant parts in steps
may be processed by segmenting it.
 Read the input picture.
 Classification:  Move the picture from the RGB color space to the
As a supervised learning approach, SVM is useful for L*a*b* hue.
regression and binary classification. As such, it serves as a  Sort colors into 'a*b*' categories using K-Means
coordinate for certain observations. The foundation of this clustering.
system is decision planes, which outline the limits of  Using the K-Means findings, assign a name to each pixel
decisions. It did the same thing for objects of various classes, in the picture.
dividing them apart.  It is possible to create pictures by dividing them up
according to color.
 Color moments:  Find the part that has the illness and pick it out.
When it comes to color indexing, color moments are
gold. When using it for picture retrieval, it just takes the first  Feature Extraction:
three color seconds into account. You may use it to see how One common and well-liked method for detecting and
the two photographs stack up in terms of color. extracting picture object edges is canny edge detection. One
method used in image processing to identify the borders of
 HOG function: objects in a picture is edge detection. When the intensity of
In vision and image processing, the histogram of individual pixels in a picture suddenly changes, we say that
oriented gradients (HOG) is used as a feature for identifying there is an edge. The edges of a picture show the limits of
objects. Cells are tiny, linked sections in the picture. It different things or areas with different shades of gray.
remains unchanged after geometric changes since it operates
on local cells.  CNN Algorithm:
In a CNN model, the input data passes through multiple
 Hue Saturation Value (HSV) Appearance: layers, each layer extracting increasingly complex features,
HSV is a measure of color, saturation, and brightness. before the final classification is performed. The main
Consequently, color position and color purity may be utilized elements of a CNN include convolutional layers that use
to search using the color detection method. The pixels are filters to identify features and pooling layers that downsample
detected by it. the data to decrease its size. Following multiple rounds of
convolution and pooling, the data is flattened and fed into
 Estimation of Calorie: fully connected layers, which then handle classification or
After the fruit's area has been identified, its volume is regression using the extracted features.
mostly determined by its unique forms. An apple has been
used in our instance. You may get the first radius by dividing
it by pi (3.14).

As a result, the formula to get the calorie value is:


The volume of a sphere is (4/3)*pi*radius*radius*
radius

 Using the appropriate volume formula, one may


determine the volume of various fruit forms, such as
cylinders (bananas) and ellipsoids (pears, mangoes).

The fruit's mass was determined by comparing the


computed volume value with the density data. The overall Fig 2 CNN Architecture Model
calorie content of the fruit was calculated by taking the food
value per 100 grams into account.  The CNN model consists of two main components:
Feature Learning and Classification.
Estimated Weight = Actual Density × Estimated Volume
 Feature Learning
 Estimated Calories = (Estimated Weight × Calories per Feature learning refers to the methods used to
100 grams) / 100 automatically extract and learn features from input images. In
a CNN, this process is carried out using two main
components: the Convolution Layer and the Pooling Layer.
Let us explain each of these layers individually.

IJISRT24AUG177 www.ijisrt.com 249


Volume 9, Issue 8, August – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24AUG177

 Convolution Layer:  Activation Function:


The convolution layer is responsible for extracting Generally, a bias term ‘b’ is added to the result of the
features. It does this by first applying a convolution function convolution, followed by the application of the activation
and then an activation function to the result. Multiple function
convolution layers may be used to enhance feature extraction.
A kernel or filter is a linear function used in this process to 𝑐 = 𝐹 +𝑏
identify features.
𝑐 = 𝐼∗𝐾+𝑏
Suppose we have an input image described by tensor I of
dimension a1 × a2 × bc. 𝐶𝑜𝑛𝑣(𝐼, 𝐾) = ∅𝑎 (𝑐)

Where, = ∅𝑎 (𝐼 ∗ 𝐾 + 𝑏)

a1 = height of image 𝑤ℎ𝑒𝑟𝑒 ∅𝑎 𝑟𝑒𝑝𝑟𝑒𝑠𝑒𝑛𝑡𝑠 𝐴𝑐𝑡𝑖𝑣𝑎𝑡𝑖𝑜𝑛 𝐹𝑢𝑛𝑐𝑡𝑖𝑜𝑛

a2 = width of image Some of the activation functions, like sigmoid, tangent,


and hyperbolic tangent functions. ReLu is the most commonly
bc = number of channels used activation function which removes negative values.

We use a filter, which is also a tensor with dimensions 𝑅(𝑥) = maximum(0, 𝑥)


n1×n2×nc (where the number of channels in the filter matches
that of the input image). The filter slides across the image
from left to right, performing element-wise multiplication
between the corresponding section of the input image I and
the filter K, and then summing these products. The stride
specifies the step size for moving the filter across the image.
The result of applying I and K is a new tensor with  Pooling Layer:
dimensions (a1−d1+1)×(a2−d2+1)×1 The pooling layer reduces the spatial dimensions of the
features obtained from the convolution layer, thereby
Here, capturing the most prominent features of the imageA pooling
function is utilized on the output from the convolution layer to
dim of I = a1 × a2 × bc accomplish this. Let's consider:

dim of K = d1 × d 2 × d c 𝐶𝑜𝑛𝑣(𝐼, 𝐾) = 𝐶

dim of F = (a1 - d 1 + 1) × (a2-d2+1) × 1 𝑃 = ∅𝑝 (𝐶)

And, 𝑤ℎ𝑒𝑟𝑒 ∅𝑝 𝑖𝑠 𝑎𝑛 𝑝𝑜𝑜𝑙𝑖𝑛𝑔 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛

F[i,j] = (𝐼 ∗ 𝐾)[𝑖,𝑗] The dimension of the pooled part is given as :

The entry of position (i,j) in the feature map is 𝑚1 + 2𝑝 − 𝑛1 𝑚2 + 2𝑝 − 𝑛2


calculated as: dim 𝑜𝑓 𝑃 = ( )×( ) + 𝑚𝑐
𝑠 𝑠
𝑎1 𝑎1 𝑎1
Where,
F[i, j] = ∑× ∑× ∑× 𝐾(𝑥,𝑦,𝑧) 𝐼(𝑖+𝑥−1,𝑗+𝑦−1,𝑧)
𝑥 𝑥 𝑥 𝑚1 × 𝑚2 = 𝑡ℎ𝑒 𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛𝑠 𝑜𝑓 𝑖𝑛𝑝𝑢𝑡 𝑖𝑚𝑎𝑔𝑒

This process is repeated using various filters, each 𝑛1 × 𝑛2 = 𝑡ℎ𝑒 𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛𝑠 𝑜𝑓 𝑝𝑎𝑑𝑑𝑖𝑛𝑔 𝑘𝑒𝑟𝑛𝑒𝑙
capturing different features of the image such as blur or
sharpness. Multiple filters can be applied, which is related to ℎ𝑒𝑟𝑒, 𝑠 𝑠𝑡𝑎𝑛𝑑𝑠 𝑓𝑜𝑟 𝑠𝑡𝑟𝑖𝑑𝑒 𝑎𝑛𝑑 𝑝 𝑠𝑡𝑎𝑛𝑑𝑠 𝑓𝑜𝑟 𝑝𝑎𝑑𝑑𝑖𝑛𝑔
the concept of stride.
 Classification
 Padding: In this approach, multiple hidden layers (comprising
A limitation of the described method is that the filters both convolutional and pooling layers) are used to extract
tend to emphasize the center of the image more than the features. The output is compressed into a single vector after
corners. This issue can be mitigated by using padding. the process of feature extraction. Classification is performed
Typically, zero padding is employed, which involves adding a in this single vector which serves as the input for the fully
border of zeros around the input tensor on all sides. connected layer.

IJISRT24AUG177 www.ijisrt.com 250


Volume 9, Issue 8, August – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24AUG177

 Fully Connected Layer:  Here's a summary of the process:


This layer takes the flattened vector and generates a new
vector within machine learning models, some classes may  The input image is processed through a series of
appear more frequently than others. To address this issue, convolutional layers that use filters to extract features.
balanced weights are assigned to the pooled data, a bias term  Each layer's output is then passed through a rectified linear
is introduced, and an activation function is applied. unit (ReLU) activation function to add non-linearity.
 Pooling layers are employed to reduce the output
The mathematical description is as below: dimensions and enhance model efficiency.
 The convolutional and pooling layers can be stacked
𝑋 = ∑ 𝑤𝑖 𝑃𝑖 + 𝑏 ′ multiple times, depending on the problem's complexity.
𝑖  The output from the final convolutional layer is flattened
and then passed into a fully connected layer, which uses
𝑧 = 𝑔(𝑋) the extracted features to perform classification or
regression.
𝑊ℎ𝑒𝑟𝑒 𝑔 𝑖𝑠 𝑎𝑛 𝑎𝑐𝑡𝑖𝑣𝑎𝑡𝑖𝑜𝑛 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑓𝑜𝑟 𝑓𝑢𝑙𝑙𝑦 𝑐𝑜𝑛𝑛𝑒𝑐𝑡𝑒𝑑 𝑙𝑎𝑦𝑒𝑟 The FC layer's output is processed through an activation
function, such as softmax or logistic regression, along with
In this method, weights are added to the pooled data at cost functions, to generate a class label for the input
each layer, followed by the application of an activation image.
function. Multiple hidden layers are involved, with the final
layer using an activation function to perform classification by VI. VII.RESULT
determining the probability for each class.

Fig 3 Menu

Fig 4 Preprocessing Fig 5 Image Segmentation

IJISRT24AUG177 www.ijisrt.com 251


Volume 9, Issue 8, August – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24AUG177

Fig 6 Calorie Table

Table 1 CNN Report

Fig 7 Fruit Features

IJISRT24AUG177 www.ijisrt.com 252


Volume 9, Issue 8, August – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24AUG177

Fig 8 Training Accuracy V/s Validation Accuracy

VII. CONCLUSION [5]. Shan-e-Ahmed Raza, Gillian Prince, John P.Clarkson


and Nasir M. Rajpoot "Automatic detection of
As a result, we have developed a technology that diseased tomato using thermal and stereo visible light
accurately diagnoses plant diseases while simultaneously images." PLOS-One, April-2015.
saving time and money for farmers. Due to the use of several [6]. Sagar Patil and Anjali Chandavale"A survey on
methods, it outperforms competing systems in terms of methods of plant disease detection." International
speed. Our method is based on the SVM Algorithm, which is Journal of Science and Research, volume-4,issue-2,
easy to apply and has several applications in image pp. 1392-1396, Feb- 2015.
processing, including segmentation, classification, and [7]. Aakanksha Rastogi, Ritika Arora, and Shanu Sharma
reconstruction. Using the CNN algorithm we can predict the "Leaf disease detection and grading using computer
quality of fruit and differentiate them with their respective vision technology and fuzzy logic."International
fruit features. The calorie content of fruit is identified using a Conference on Signal Processing and Integrated
standard image dataset by applying techniques such as pre- Networks, 2015.
processing, segmentation, feature extraction, training, and [8]. Bed Prakash and Amit Yerpude "A survey on plant
classification based on shape and size, all facilitated by disease identification."International Journal of
machine learning methods. Even when the objective function Advanced Research in Computer Science and
isn't acting well, it may nevertheless perform well during Software Engineering, volume 15, issue-3, pp. 313-
global optimization. 317, March 2015.
[9]. Rajleen Kaur and Dr. Sandeep Singh Kang "An
REFERENCES enhancement in classifier support vector machine to
improve plant disease detection." IEEE 3rd
[1]. Dr.G. H. Agrawal, Prof. S. G.galande and Shalaka International Conference, pp. 135-140,2015.
R.Londhe "Leaf disease detection and climatic [10]. Anand H Kulkarni and Ashwin Patil R. K "Applying
parameter monitoring of plants using IOT." image processing technique to detect plant disease."
International Journal of Innovative Research in International Journal of Modern Engineering
Science, Engineering and Technology, volume- Research,volume-2, issue-5, pp. 3661-3664, 2012.
4,issue-10, pp. 9927-9932, Oct- 2015. [11]. Dheeb Al Bashish, Malik Braik, and Sulieman Bani-
[2]. Viabhavi S.Bharwad and Kruti J.Dangarwala" Recent Ahmad "A framework for detection and classification
research trends of plants disease detection." of plant leaf and stem disease." International
International Journal of Science and Research, conference on signal and Image Processing pp. 113-
volume-4,issue-12, pp. 843- 845, Dec-2015. 118,2012.
[3]. Manisha Bhange and H.A.Hingoliwala "Smart [12]. Sachin.D.Khirade and A.B.Patil "Plant disease
framing: pomegranate disease detection using image detection using image processing." in International
processing." Second International Symposium on Conference on Computing Communication Control
Computer Vision and the Internet (VisionNet'15), and Automation, pp. 788-771,2015.
pp.280-288. [13]. Shirke, Suvarna, S. S. Pawar, and Kamal Shah.
[4]. Jaymala K. Patil and Raj Kumar "Advances in image "Literature Review: Model Free Human Gait
processing for detection of plant disease." Journal of Recognition." Communication Systems and Network
Advanced Bioinformatics Applications and Research, Technologies (CSNT), Fourth International
pp. 135-141, June 2011. Conference on. IEEE, 2014.

IJISRT24AUG177 www.ijisrt.com 253

You might also like