A Deep Learning Approach For Detection of Disease and Classification of Fruits
A Deep Learning Approach For Detection of Disease and Classification of Fruits
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.
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, 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
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).
Where, = ∅𝑎 (𝐼 ∗ 𝐾 + 𝑏)
dim of K = d1 × d 2 × d c 𝐶𝑜𝑛𝑣(𝐼, 𝐾) = 𝐶
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.
Fig 3 Menu