Sei sulla pagina 1di 5

Cucumber Disease Detection Using Artificial

Neural Network

Ms. Pooja Pawar Dr. Varsha Turkar. Prof. Pravin Patil.


Dept. of Electronics and Dept. of Electronics Engineering Dept. of Electronics and
Telecommunication Engineering Vidyalankar Institute of Technology Telecommunication Engineering
Vidyalankar Institute of Technology Mumbai, India. Vidyalankar Institute of Technology
Mumbai, India. varshaturkar@gmail.com Mumbai, India.
poojapawar479@gmail.com pravin.patil@vit.edu.in

Abstract—India is an agricultural country; wherein most of [14]. Plant disease is one of the major causes of reduction in
the population depends on agricultural products. Disease on any quantity and degrades quality of the product [5]. The visual
plants leads to the considerable reduction in both the quality observation of experts is the main approach adopted in
and quantity of agricultural products. Thus detection and practice for detection and identification of plant diseases.
diagnosis of disease at the right time is essential to the farmer.
This approach is expensive and time consuming in large
Accurate detection and identification of crop diseases plays an
important role in effectively controlling and preventing diseases farms. Further, in some developing countries, farmers may
for sustainable agriculture and food security. For detecting crop need to go long distances to contact experts [5].
disease early and accurately, a system is developed using image In recent years, there are many concepts of image
processing techniques and artificial neural network. The system processing technology that have been applied to identify
mainly includes various concepts related to image processing plant disease. The system designs were based on extraction of
such as image acquisition, image pre-processing, feature color, shape, texture features and on SVM classifier [3]. Also
extraction, creating database and classification by using it was observed that the SVM method based on the different
artificial neural network. In the proposed work, database is a kernel function gives different results. The work was carried
collection of various texture features of cucumber leaves.
out by conducting two sets of tests using different kernel
Keywords— Crop disease, statistical moments, GLCM, functions like RBF kernel function, polynomial kernel
Artificial neural network, diagnosis function and sigmoid kernel function. The results showed
that, the support vector machine method based on the RBF
I. INTRODUCTION kernel function; which considers each spot as a sample; made
the best performance for classification of diseases of
Cucumber (Cucumis sativus) is a widely cultivated plant cucumber [11].Also the system was designed with BP neural
in the gourd family, Cucurbitaceae. Cucumber diseases have network classifier with RGB-to-LAB transformation method
characteristics of high disease incidence, frequent and fast for color extraction [4]. BP neural network with GLCM
infection and so on. Hence cucumber diseases like downy feature extraction method approach was also developed to
mildew and powdery mildew primarily affect the foliage of identify crop disease [5]. Majority of the conventional work
these crops and can result in losses in commercial fields and focuses only on classification. Proposed work will also
home gardens. If diseases occur, the loss of product will be provide treatment to the crop disease. Also texture feature
very serious [11]. extraction will be carried out not only by using GLCM but
also by first order statistical moments method.
Downy mildew is a common disease that occurs on The literature survey suggests that the existing systems do
cucurbits. It is an aggressive, fast-moving disease that is very not provide preventive measures since most of them focus on
difficult to manage once it started. Symptoms of downy classification of crop disease. In order to overcome such
mildew are first appearing as pale-to-bright yellow spots on drawbacks, a system is proposed that will provide diagnosis
the upper surface of leaves in the crown area of the plant. As and treatment to the crop disease. Also features such as
lesions expand and the number of lesions increases, leaves texture will also be extracted using Gray Level Co-
become necrotic and plants will appear scorched [14]. Also occurrence Matrix (GLCM) along with first order statistical
the powdery mildew can affect all cucurbits. Powdery moment’s method. GLCM is a matrix that describes the
mildew first appears as talc like colonies on the upper and frequency of one gray level appearing in a specified spatial
lower surface of leaves that are older or on shaded portions of linear relationship with another gray level within the area of
the plant. As the disease progresses, the entire leaf surface investigation. The contents of this GLCM matrix can be used
will be colonized by the fungus. Severely infected leaves to calculate texture features by observing the measure of
become yellow and then necrotic, these leaves die within a variation in intensity at the pixel of interest.
short period of time and may result in large-scale defoliation
II. PROPOSED APPROACH
The proposed system aims at developing real time system 1) First order statistical moments: The first order
for crop disease diagnosis and giving preventive measures statistics estimate properties (e.g. average and variance) of
and treatment for crop disease. The proposed system is individual pixel values by waiving the spatial interaction
explained with the help of flow chart given below in Fig. 1: between image pixels. First order statistical moments are
mean standard deviation, skewness and kurtosis.
Mean and standard deviation are defined below where x is
the value of the pixel in the sub-image, and n is the number
of pixels

a) Mean: The mean takes the average level of


intensity of the image or texture being examined.

Fig.1. Flowchart for Proposed System


(1)
b) Standard deviation: It is a most widely used
A. Image acquisition
measure of variability or diversity used in statistics. In terms
The first step in the proposed approach is image of image processing it shows how much variation or
acquisition. Farmer should capture the image of infected crop "dispersion" exists from the average (mean, or expected
and this image will act as a input to the system. Also the value). A low standard deviation indicates that the data points
images are needed to train neural network. Images for tend to be very close to the mean, whereas high standard
cucumber crop have been used for training the network. The
deviation indicates that the data points are spread out over a
field work for cucumber images was carried out dated on 10
large range of values.
January 2016 at Ghadne, Wada. Some images are also
obtained from World Wide Web. Images for cucumber crop
disease are shown in Fig.2.

(2)
A fundamental task in many statistical analyses is to
characterize the location and variability of a data set. A
further characterization of the data includes skewness and
kurtosis. Kurtosis and skewness are defined below where μ is
the mean and is the variance of random variable X.

c) Kurtosis:
Kurtosis is a measure of whether the data are heavy-
(a) (b)
Fig.2. Cucumber Crop Disease: (a) Downy Mildew (b) Powdery Mildew
tailed or light-tailed relative to a normal distribution. It is
a related to a fourth order moment.

B. Image Pre-processing:
As quality of cucumber leaf images is good, proposed (3)
work doesn’t uses any pre-processing method. If noise is
detected in image, smoothing filtering can be applied to d) Skewness: Skewness is usually described as a
eliminate noise from the image. measure of a dataset’s symmetry – or lack of symmetry.The
skewness for a normal distribution is zero, and any
C. Feature Extraction: symmetric data should have skewness near zero. It is a
The aim of this phase is to find and extract features that related to a third order moment. Darker and glossier regions
can be used to determine crop disease. In image processing, are tends to be a more positively skewed as compare to
image features usually include color, shape and texture lighter and dull surfaces.
features, etc. Out of these features, texture feature is used to
train the network. This is done by using first order and
(4)
second order statistical moments. First order statistical
moments includes mean, standard deviation, kurtosis and
skewness whereas second order statistical moments includes 2) Second order statistical moments (GLCM): The
Gray Level Co-occurrence Matrix (GLCM) features. GLCM is a well-established statistical device for extracting
second order texture information from images. A GLCM is a Entropy:
matrix where the number of rows and columns is equal to the
number of distinct gray levels or pixel values in the image of
that surface [2]. GLCM is a matrix that describes frequency
of one gray level appearing in a specified spatial linear (7)
relationship with another gray level within the area of d) Homogeneity: Inverse Difference Moment (IDM)
investigation. Given an image, each with an intensity, the is a measure of image texture as defined in Equation (8).
GLCM is a tabulation of how often different combinations of IDM is usually called homogeneity that measures the local
gray levels co-occur in an image or image section. Texture homogeneity of an image. IDM feature obtains the measures
feature calculations use the contents of the GLCM to give a of the closeness of the distribution of the GLCM elements to
measure of the variation in intensity at the pixel of interest. the GLCM diagonal. IDM has a range of values so as to
Typically, the co-occurrence matrix is computed based on determine whether the image is textured or non-textured.
two parameters, which are the relative distance between the Homogeneity:
pixel pair d measured in pixel number and their relative
orientation. Normally, is quantized in four directions (e.g., 0º,
45 º, 90 º and 135 º), even though various other combinations
could be possible. GLCM has fourteen features but between (8)
them most useful features are: angular second moment e) Energy: Energy (E) can be defined as the measure
(ASM), contrast, correlation, inverse difference moment, sum of the extent of pixel pair repetitions. It measures the
entropy and information measures of correlation [9]. uniformity of an image. When pixels are very similar, the
energy value will be large. It is defined in Equation (9) as-
Texture features can be used as useful discriminator for
target images when color or shape features fails to Energy:
discriminate. Five GLCM texture features listed below are
extracted for each image which will be used for training
Neural Network in the next step for classification. Some of
them are defined by the equations given below, where μx, μy
and σx, σy denote the mean and standard deviations of the (9)
row and column sums of the matrix, respectively [related to D. Classification:
the marginal distributions px(i) and py(j)]. Image classification analyzes the numerical properties of
a) Contrast: The contrast (Con) is defined in Equation various image features and organizes data into relative
(5), is a measure of intensity of a pixel and its neighbour over categories of crop diseases. There are two main types of
the image. In the visual perception of the real world, contrast classification: Unsupervised classification and supervised
is determined by the difference in the colour and brightness classification.
of the object and other objects within the same field of view. Unsupervised classification methods includes: self-
Contrast: organizing map, adaptive resonance theory, k-means
clustering, etc. whereas supervised classification methods
includes: neural network, support vector machine, decision
tree algorithm, etc. Proposed method uses artificial neural
(5) network for classification. To classify a pattern, certain
b) Correlation:Correlation measures the linear characteristic values from that particular pattern are input into
dependency of gray levels of neighboring pixels. It is defined the directed graph at the corresponding source nodes. There
as in Equation (6)as: is one sink node for each class. The output value that is
generated indicates the probability that the corresponding
Correlation:
input pattern belongs to that class [13]. The pattern will then
be assigned to the class with the highest probability of
membership. The learning process modifies the labeling of
the arcs to better classify patterns. After the classification is
(6) done for the training set the results are compared with the
c) Entropy:This concept comes from actual classification and the accuracy is computed. Learning
thermodynamics. Entropy (Ent) is the measure of randomness process continues with different weights and with all the
that is used to characterize the texture of the input image. Its training data or until the classification accuracy is adequate
value will be maximum when all the elements of the co- [13].
occurrence matrix are the same. It is also defined as in
Equation (7) as:
Steps followed in NN classifier: 3. The subset of the training data can be used as a
1. Determine the number of output nodes as well as what testing data.
characteristics should be used as input to discriminate
different patterns/classes in image. x Preprocess the data into a form that can be used with a
2. The number of hidden layers (between the input and output neural network. The neural network object in the
nodes) also must be decided. MATLAB toolbox expects the samples along columns
3. Determine weights and activation functions to be used for and its features along rows. Our dataset has its samples
the graph. along rows and its features along columns. Hence the
4. For each pattern in the training set, propagate it through the matrices have to be transposed.
network and evaluate the output predication to the actual
result. If the predication is accurate then adjust weights to x Building the neural network classifier
ensure that this predication has a higher output weight the The next step is to create a neural network (feed
next time. If the predication is not correct then adjust the forward back propagation network) that will learn to
weights to provide a lower output value for this class. identify the classes. Since the neural network starts
5. Steps are repeated till all the patterns are classified to the with random initial weights, the results will differ
appropriate classes. slightly every time it is run. The random seed or
twister is set to avoid this randomness.
E. Diagnosis and Treatment: x A 1-hidden layer feed forward network is created with
Classification diagnoses the cucumber crop disease using 28 neurons in the hidden layer.
ANN. Once the classifier diagnoses crop disease, the system
x Now the network is ready to be trained. Here testing
will give symptoms of disease. Also it will give remedies and
set is created while creating the training set. The
preventive measures for disease.
training set is used to teach the network. Training
continues as long as the network continues improving
III. CLASSIFICATION USING ANN on the validation set. The test set provides a
completely independent measure of network accuracy.
There are three classes for cucumber crop disease
classification such as powdery mildew, downy mildew and x Testing the classifier.
healthy plant. The texture features will act as inputs to a
neural network and the cucumber crop disease will be target. The trained neural network can now be tested with the
Given an input, which constitutes the nine texture features , testing samples. This will give us a sense of how well
the neural network is expected to identify correct cucumber the network will do when applied to data from the real
disease. This is achieved by presenting previously recorded world.
inputs to a neural network and then tuning it to produce the x Computation of classification accuracy using
desired target outputs[13]. This process is called neural confusion matrix.
network training. Algorithm for classification using ANN:
x Preparing the data The network response can now be compared against
the desired target response to build the classification
The texture features like contrast, correlation, matrix which will provide a comprehensive picture of
homogeneity, energy, entropy, mean, kurtosis, a classifiers performance.
skewness and standard deviation are extracted by
using GLCM and first order statistical moments
method. And the values of features are stored in .CSV IV. RESULTS AND DISCUSSIONS
(comma separated by values) files. The first nine Work involves collecting of leaf samples of cucumber
columns of data gives nine texture features and tenth crop diseases. After acquisition of images, dataset is prepared
column gives the class. The classes for ex. Unhealthy to train the neural network. MATLAB 7.10.1 is used for
and Healthy can be represented as [1 0] and [0 1] neural network toolbox. Data is given in CSV file with
respectively. Also if plant is unhealthy then classes, columns representing texture features and rows representing
Powdery mildew and Downy mildew can be image samples. Also it includes three classes: downy mildew,
represented as [1 0] and [0 1] respectively. powdery mildew and healthy plant. First CSV file is used to
Creating training sets: classify two classes healthy and unhealthy plant. If plant is
unhealthy then second CSV file is used to classify cucumber
The whole images are taken to extract texture features crop disease else it will display message plant is healthy.
and stored to CSV file. Classification accuracy achieved is 80.45%.
Creating testing sets: The GUI consisting of diagnosis and treatment for the
1. The test images are taken same as training images. crop diseases is developed for the system. The GUI for
2. The precaution is taken while taking the images. The cucumber crop disease detection is shown below in Fig.3
image should be different than the training image. along with crop disease treatment message box as shown in
Fig.4.
Computation, 2009. ICEC ’09. International Conference on , vol., no.,
pp.79-83, 2-3 May 2009 doi: 10.1109/ICEC.2009.73.
[4] Libo Liu; Guomin Zhou, “Extraction of the Rice Leaf Disease Image
Based on BP Neural Network, " in Computational Intelligence and
Software Engineering, 2009. CiSE 2009. International Conference on,
vol., no., pp.1-3, 11-13 Dec. 2009 doi: 10.1109/CISE.2009.5363225
[5] Sannakki, S.S.; Rajpurohit, V.S.; Nargund, V.B.; Kulkarni, P.,
“Diagnosis and classification of grape leaf diseases using neural
networks," in Computing, Communications and Networking
Technologies (ICCCNT),2013 Fourth International Conference on
,vol.,no.,pp.1-5,4-6 July 2013 doi: 10.1109/ICCCNT.2013.6726616
[6] Rothe, P.R.; Kshirsagar, R.V., “Automated extraction of digital images
features of three kinds of cotton leaf diseases," in Electronics,
Communication and Computational Engineering (ICECCE), 2014
International Conference on , vol., no., pp.67-71,17-18 Nov.2014, doi:
10.1109/ICECCE.2014.7086637
[7] Yasser Alginahi (2010). Preprocessing Techniques in Character
Recognition, Character Recognition, Minoru Mori (Ed.), ISBN: 978-
Fig.3. GUI developed for crop disease detection. Downy mildew is detected 953-307-105-3, InTech, Available from: http://www.intechopen.com/
by the system books/characterrecognition/preprocessingtechniques- in-character-
recognition
[8] Christos Stergiou and Dimitrios Siganos.“Neural Network"[Online].
Available:https:// www.doc.ic.ac.uk/ nd/ surprise96/ journal/vol4 /cs11/
report.html [Accessed on: DEC 29,2015]
[9] P. Mohanaiah, P. Sathyanarayana, L. GuruKumar, “Image Texture
Feature Extraction Using GLCM Approach” in International Journal of
Scientific and Research Publications, Vol. 3, Issue 5, May 2013, ISSN
2250-3153
[10] Revathi, P.; Hemalatha, M., “Advance computing enrichment
evaluation of cotton leaf spot disease detection using Image Edge
detection", in Computing Communication and Networking
Fig.4. Crop Disease Treatment Message Box Technologies (ICCCNT), 2012 Third International Conference on ,
vol., no., pp.1-5, 26-28 July 2012 doi: 10.1109/ICCCNT.2012.6395903
[11] Zhang Jian; Zhang Wei, “Support vector machine for recognition of
V. CONCLUSION cucumber leaf diseases," in Advanced Computer Control (ICACC),
Study involves collecting leaf samples of cucumber crop 2010 2nd International Conference on , vol.5, no., pp.264-266, 27-29
March 2010 doi: 10.1109/ICACC.2010.5487242
diseases. Work is carried out to diagnose cucumber crop
[12] V. A. Gulhane and M. H. Kolekar, “Diagnosis of diseases on cotton
disease and to provide treatment for the detected crop leaves using principal component analysis classifier”,India Conference
disease. Two cucumber crop diseases downy mildew and (INDICON), 2014 Annual IEEE, Pune, 2014, pp. 1-5. doi:
powdery mildew are considered in this work. The GLCM and 10.1109/INDICON. 2014.7030442
first order statistical moments are used to extract texture [13] Varsha Turkar. “Polarimetric SAR image classification by using
features. Classification is carried out by using neural network artificial neural network”, ICWET’10 Proceedings of the International
toolbox of MATLAB 7.10.1. System provides classification Conference and Workshop on Emerging Trends in Technology ACM
New York, NY, USA ©2010 ISBN: 978-1-60558-812-4
accuracy of 80.45%. The proposed work can be applicable doi:10.1145/1741906.1741915
for more than one crop of different types. But for other crop [14] Kenny Seebold, “Foliar Diseases of Cucurbits” Available:
type, system has to select those features only that can classify http://www2.ca.uky.edu/agcollege/plantpathology/ext_files/PPFShtml/
their crop diseases accurately. In future, classification PPFS-VG-10.pdf[Accessed on 15 March.2016]
accuracy can be increased by using additional texture
features. Gabor filter can also be used for texture feature
extraction.
REFERENCES

[1] Dr. R.U. Lokare(2014) “Crop pest surveillance and advisory project
(CROPSAP)”Available: http://www.cips.org.in/documents/2014/
UPAAM Workshop/ Dr. R.U.Lokare. pdf [Accessed on 27 Aug. 2015]
[2] Shodhganga.inflibnet (2016) “ Texture Feature Extraction” Available:
http://shodhganga.inflibnet.ac.in/bitstream /10603/24460/9/09
/chapter4.
pdf [Accessed on: JAN 15,2016]
[3] Qing Yao; Zexin Guan; Yingfeng Zhou; Jian Tang; Yang Hu; Baojun
Yang, “Application of Support Vector Machine for Detecting Rice
Diseases Using Shape and Color Texture Features," in Engineering

Potrebbero piacerti anche