Shrestha 2020

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Proceedings of 2020 IEEE Applied Signal Processing Conference (ASPCON)

Plant Disease Detection Using CNN


Garima Shrestha Deepsikha Majolica Das 1DLZULWD'H\
Dept.of AEIE Dept.of AEIE Dept.of AEIE 'HSWRI(&(
RCCIIT RCCIIT RCCIIT 5&&,,7
Kolkata, India Kolkata, India Kolkata, India .RONDWD,QGLD
[email protected] [email protected] [email protected] QDLZULWDGH\#JPDLOFRP

Abstract— Agricultural productivity is a key component of increase of population, the climatic conditions also cause
Indian economy. Therefore the contribution of food crops and plant diseases. The leaves require close monitoring to detect
cash crops is highly important for both the environment and the disease.
human beings. Every year crops succumb to several diseases. There are several techniques are reported by many
Due to inadequate diagnosis of such diseases and not knowing
symptoms of the disease and its treatment many plants die.
researchers for plant disease detection and monitoring.
This study provides insights into an overview of the plant Usama Mokhtar presented Gabor wavelet transform
disease detection using different algorithms. A CNN based techniques to extract tomato leaf features. They used SVM
method for plant disease detection has been proposed here. to detect leaf diseases. For experiments real sample images
Simulation study and analysis is done on sample images in of tomato leaf have been considered and two types of
terms of time complexity and the area of the infected region. It disease in tomato leaves including early blight and powdery
is done by image processing technique. A total of 15 cases have mildew have been observed. In preprocessing, phase images
been fed to the model, out of which 12 cases are of diseased are resized to 512*512 resolutions to deduce the
plant leaves namely, Bell Paper Bacterial Spot, Potato Early computational time. Background subtraction method has
Blight, Potato Late Blight, Tomato Target Spot, Tomato
Mosaic Virus, Tomato Yellow Leaf Curl Virus, Tomato
been applied to remove the background of the image. In the
Bacterial Spot, Tomato Early Blight, Tomato Late Blight, classification, using kernel function the SVM was trained
Tomato Leaf Mold, Tomato Septoria Leaf Spot and Tomato and tested[3]. Ganesan proposed a fuzzy-based
Spider Mites and 3 cases of healthy leaves namely, Bell Paper segmentation method with computer vision for the early
Healthy, Potato Healthy and Tomato Healthy. Test accuracy is identification of plant leaf diseases. Image segmentation is
obtained as 88.80%.Different performance matrices are also applied to extract the diseased part of the plant leaf
derived for the same. from the input image. Color space segmentation is also
applied to identify the color of the fruit or disease affected
Keywords— CNN, image processing, training set, test set
area [4]. Arthit Srikaew, Kitti Attakitmongcol, and Prayoth
Kumsawat proposed a leaf disease diagnosis method using
I. INTRODUCTION neural networks. An unsupervised method is implemented
India is a country with a population of approximately 1.38 using color imagery. Color and texture, both the features of
billion as of April 2020. Estimates put the total number of the image are processed . The proposed system is consist
farmers in India somewhere between 95.8 million. It must of two parts. One is extraction of disease feature and the
be noted that 18% of India’s GDP is produced from the other one is classification of the same. Former one
agricultural sector. It would, thus, be safe to infer that if emphasizes on feature appearance based on a co-occurrence
agriculture was revolutionized, it’d benefit the country matrix depend on gray level along with texture feature
greatly and also apart from alleviating the conditions of equations. Later one deploys the fuzzy ARTMAP neural
local farmers, it’d also create a lot of employment and network which is basically an unsupervised method to
expansion opportunities in the agricultural sectors[1]. categorize different types of diseases. Healthy plant with no
Research and development on pesticides, fungicides, and disease ,rust, scab, downy and mildew are the five classes
herbicides have progressed very well in India. But, every are considered in this work. With this variations of grape
year, due to natural reasons, crops succumb to various leaf diseased images the proposed system’s classification
known diseases and tonnes of produced corps are lost and performance is examined in terms of accuracy and a
this can be dealt with quick detection of plant diseases in desirable score of 90% is obtained for the same[5]. The
proper time. It will help to get over the dire economic study is presented by H. Sabrol and K. Satish where five
conditions faced by the country’s farmers[2]. Nowadays kinds of tomato diseases is considered for classification for
technology has changed lives for the better. Due to the example tomato late blight, bacterial spot, Septoria spot,
internet, almost everything is within reach. With the help of bacterial canker, tomato leaf curl. The classification is
a normal camera, one can easily click photos of affected carried out by extricating the following features color,
parts and upload it to the system which detects the particular texture and shape of the plant leafs . Pictures are taken for
disease and provides the exact treatment as well as a both healthy and diseased tomato plants . The extricated
pesticide if required. Most of the plants are infected by features ,after segmentation ,are provided as input to the
various fungal and bacterial diseases. The exponential classification tree . The Overall classification accuracy is

‹,(((

109
ISBN: 978-1-7281-6882-1 PART: CFP20P52-ART
Authorized licensed use limited to: Auckland University of Technology. Downloaded on December 19,2020 at 10:43:06 UTC from IEEE Xplore. Restrictions apply.
Proceedings of 2020 IEEE Applied Signal Processing Conference (ASPCON)

obtained as 97.3% is obtained with these six kinds of tomato Adam optimizer is utilized. The framework consequently
images [6]. N. Petrillis has reported a smart phone based distinguishes the picture of leaf given and pre-processes the
diagnosis application for plant disease detection. Color picture further for prediction. The model will produce 15
normalization has been used for the same[7-8]. Multiclass distinctive probability values for 15 labels respectively
plant diseade detection using SVM is implemented by M. among which the probability value with highest score to the
Islam[9]. Haiguang Wang, Guanlin Li, Zhanhong Ma, and relating name will be the anticipated disease or result for
Xiaolong Li developed a method to realize image that particular image.
recognition of plant diseases, four kinds of neural networks
including backpropagation (BP) networks, radial basis
function (RBF) neural networks, generalized regression
networks (GRNNs) and probabilistic neural networks
(PNNs) were used to distinguish wheat stripe rust from
wheat leaf rust and to distinguish grape downy mildew from
grape powdery mildew based on color features, shape
features and texture features extracted from the disease
images [10]. K.K. Singh has proposed an cloud based
collaborative platform for plant disease identification. So Fig. 1. Block diagram of the proposed scheme.
that it can be forecasted to farmers for better prevention
purpose[11]. Various procedures for the segmentation III. CNN
method are discussed further which can be applied for
detection of various lesion disease. To identify various In machine learning, CNN takes a varied approach towards
ailments in plant leaf several algorithms were used such as regularization. It is less complicated than conventional
K-means cluster, thresholding etc. For the different inputs, k models of regularization .The layers are described below.
figures depict the original images followed by the output of A. Input Layer
thresholding and K-means cluster for segmented images.
In this layer input is fed to the model. At this beginning
Although the algorithm of k means clustering needs a prior
stage of the neural network, the no of neurons and number
information of specification around a few several cluster
of features are equal. Considering an image the number of
centers. The moderately effective outcome for different
pixels in it is equivalent to the total number of features .
data sets are given by this procedure in contrast with the
The input data is divided into two parts which are used for
thresholding method[12]. Anton Louise P. de Ocampo and
training and testing the model . The major part of data is
Elmer P. Dadios presented a computationally light neural
used for training and the minor part of it is used for testing.
network model for the detection and recognition of plant
Fig. 2 shows two different image of tomato leaves.
diseases and implemented it on a mobile platform[13]. A
two-step training process is used: pre training on the
ImageNet data set of a wide variety of objects and retraining
on data sets of specific plant diseases with a test accuracy of
89.0 %[14].
This paper aimed to evaluate the current position of image
processing in the present scenario using CNN method and
stated about further scope of improvement. It is structured
in the following manner. Section II describes methodology Fig. 2. Sample Images from the database (from left to right) Potato Early
Blight, Tomato Healthy.
and section III describes about CNN method and its
implementation in this present study. Section IV shows B. Hidden Layer
simulation results followed by Section V which concludes This layer receives the output from the input layer. It is
the whole work. dependent upon both the model and size of data as well.
Number of neurons may vary in each of the hidden layer .
II. METHODOLOGY
The proposed plant disease prediction method takes input C. Output Layer
from the plant's leaves images. Fig. 1 represents the block A logistic function receives the data from hidden layer as
diagram of the proposed method. Firstly the data is input The probability score is obtained for each class by
preprocessed by resizing the input images and further a converting the output of each class by a logistic function. It
NumPy array is created for the same. Next the dataset and coverts each class output into an equivalent probability
label of all the images are segregated. The model has been score for the same.
trained on a specific data set consisting of images of the
different diseased plant leaves which are considered for this CNN layers are described below.
study. The labeled data is now stored in pickle files which 1.Convolution layer- It is the first layer for dimensions
are again extracted during the training period of the model. extraction from any input image. Convolution layer
For the model, the convolution layers are declared followed consists of filters which help extract particular
by max-pooling layers. After that, 25% of the whole data is characteristics, which results into a feature map of the input
dropped out. The output is flattened to feed the dense images. This is a mathematical operation which receives
network. The last layer has a softmax activation to predict two inputs. Input and output information is provided below
the disease of the given leaf. To reduce the loss function for this layer. Fig 3 shows rectified linear unit.

110
ISBN: 978-1-7281-6882-1 PART: CFP20P52-ART
Authorized licensed use limited to: Auckland University of Technology. Downloaded on December 19,2020 at 10:43:06 UTC from IEEE Xplore. Restrictions apply.
Proceedings of 2020 IEEE Applied Signal Processing Conference (ASPCON)

Inputs: information about local features in the input image such as


An image matrix (volume)of dimension(h*w*d). edges, blobs, shapes, etc. Each convolution layer holds
A filter (fh*fw*d). multiple filters that represent one of the local features. The
Output: FC layer detains composite and collectively compiled
Output volume dimension (h-fh+1)*(w-fw+1)*1 information from all the convolution layers that matters the
most. Model summary with different parameter values can
be seen in Table I and Table II.

TABLE I. MODEL SUMMARY 1

LAYER OUTPUT PARAMETER


CONV2D_1 (256,256,32) 896
ACTIVATION_1 (256,256,32) 0
BATCH_NORMALIZATION_1 (256,256,32) 128
MAX_POOLING2D_1 (85,85,32) 0
DROPOUT_1 (85,85,32) 0
CONV2D_2 (85,85,64) 18496
ACTIVATION_2 (85,85,64) 0
Fig. 3. Rectified Linear Unit[14]. (85,85,64) 256
BATCH_NORMALISATION_2
CONV2D_3 (85,85,64) 36928
2. Pooling Layer - The pooling layer functions such a way ACTIVATION_3 (85,85,64) 0
that a 2D filter slides over every channel of the feature map BATCH_NORMALISATION_3 (85,85,64) 256
and conveys the features lying within the area enveloped MAX_POOLING2D_2 (42,42,64) 0
by the filter. Given a specified dimension of any feature DROPOUT_2 (42,42,64) 0
map the pooling layer output dimension is expressed as (42,42,128) 73856
CONV2D_4
follows
ACTIVATION_4 (42,42,128) 0
(nh  f  1) (nw  f  1)
n BATCH_NORMALIZATION_4 (42,42,128) 512
s s
CONV2D_5 (42,42,128) 147584
nh – Feature map height
nw – Feature map width. ACTIVATION_5 (42,42,128) 0
nc- Number of channels included in each feature map. BATCH_NORMALIZATION_5 (42,42,128) 512
f- Filter size MAX_POOLING2D_3 (21,21,128) 0
s- Length of stride DROPOUT_3 (21,21,128) 0
FLATTEN_1 (56448) 0
3. Max Pooling Layer – It is that feature map region from
DENSE_1 (1024) 57803776
where maximum numbers of elements are selected and
hidden by the filter. Thus the max-pooling layer output is a ACTIVATION_6 (1024) 0
feature map which contains the most prominent features of BATCH_NORMALIZATION_6 (1024) 4096
the preceding feature map. Fig 4 shows maximum pooling DROPOUT_4 (1024) 0
layer. DENSE_2 (15) 15375
ACTIVATION_7 (15) 0

TABLE II. MODEL SUMMARY 2

Total parameters 58,102,671


Trainable parameters 58,099,791
Non-trainable parameters 2880

Filters and Feature Maps: Filters are not predefined in


Fig. 4. Max Pooling Layer [15].
CNN, rather self-learned by the model itself. In a
convolution layer filters learn to detect abstract concepts,
4. Fully Connected Layer- The fully connected(FC) layer in like the boundary of a face or the eyes of a person. Several
the CNN represents the feature vector for the input. It convolution layers together can extract in-depth
contains crucial information about the input. During the information from an image. It is like a membrane that only
training of the network, this feature vector is further used for allows desired characteristics to pass from it. Feature maps
classification, regression etc. It is also being used as an are the outputs of filters in the convolution layer. Fig 5-Fig
encoded vector. During training, this is used to determine 8 are showing the filter and feature map of 1st and 2nd
the loss and helps the network to get trained. The convolution layer .
convolution layers before the FC layers hold vital

111
ISBN: 978-1-7281-6882-1 PART: CFP20P52-ART
Authorized licensed use limited to: Auckland University of Technology. Downloaded on December 19,2020 at 10:43:06 UTC from IEEE Xplore. Restrictions apply.
Proceedings of 2020 IEEE Applied Signal Processing Conference (ASPCON)

incorporated with 16 GB RAM DDR4, Windows 10, 64-bit


operating system. Total computational time is taken
approximately 30 minutes inclusive of 3 minutes of pre-
processing the data. The input feed from the webcam right
now is not efficient enough to eliminate the background
from the given frames but the input image predictions are
working fine. A model is overfitted if the difference
between its train accuracy and test accuracy is considerably
high which is not desired. Dropout layer has been
incorporated after 1st (p=0.25), 3rd(p=0.25), and 5th(p=0.5)
layer in the proposed model and the final train accuracy is
obtained as 97.42% while test accuracy is 88.80%. The
difference between the two accuracies can be examined to
Fig. 5. Visualization of filter for 1st convolution layer. infer that the model is not overfitted
Comparative study of this method with the existing method
can be shown in Table III. Different performance metrics
are calculated and shown in Table IV. From the given
comparison it can be said that the proposed method is giving
desired result with better accuracy.

TABLE III. COMPARATIVE STUDY OF TWO MODEL

IMAGE NUMBER
TEST
TYPE OF ARCHITECTURE
ACCURACY
IMAGES
CONV 3X3
L1
POOL 2X2
GRAYSCALE 20639 74.19
CONV 3X3
L2
POOL 2X2
CONV 3X3
Fig. 6. Visualization of filter for 2nd convolution layer. L1
POOL 3X3
L2 CONV 3X3
CONV 3X3
RGB 3000 L3 88.80%.
POOL 3X3
L4 CONV 3X3
L5 CONV 3X3
POOL 2X2

TABLE IV. PERFORMANCE METRICES OF THE MODEL

CLASS PRECISION RECALL F1 SUPPORT


SCORE
Fig. 7. Visualization of feature map for 1st convolution layer.
0 1.00 0.02 0.04 45
1 1.00 0.03 0.05 40
2 0.36 0.17 0.23 54
3 0.00 0.00 0.00 43
4 1.00 0.10 0.18 20
5 0.00 0.00 0.00 37
6 0.00 0.00 0.00 41
7 1.00 0.14 0.25 35
8 0.56 0.24 0.33 38
9 0.21 0.39 0.27 33
10 0.00 0.00 0.00 36
11 0.00 0.00 0.00 51
Fig. 8. Visualization of feature map for 2nd convolution layer. 12 1.00 0.19 0.32 32
13 0.00 0.00 0.00 39
14 0.10 1.00 0.18 47
IV. SIMULATION RESULT MICRO 0.16 0.16 0.16 591
The simulation study is carried out using python software AVG
along with Deep Learning and neural networks. 200 images MACRO 0.42 0.15 0.12 591
AVG
of each of the 15 classes, total of 3000 images has been WEIGHTED 0.38 0.16 0.12 591
provided. The dataset is divided in the ratio of 80:20 for AVG
training and test set respectively. The computer on which
training was conducted had an Intel Core i7-9600k
Fig . 9 and Fig. 10 is showing training and validation loss
processor, the clock rate of 3.60 GHz, and 12 Mb Cache;
and accuracy graph respectively.

112
ISBN: 978-1-7281-6882-1 PART: CFP20P52-ART
Authorized licensed use limited to: Auckland University of Technology. Downloaded on December 19,2020 at 10:43:06 UTC from IEEE Xplore. Restrictions apply.
Proceedings of 2020 IEEE Applied Signal Processing Conference (ASPCON)

Using Fuzzy based Approach”, 3rd International Conference on


Science Technology Engineering & Management
(ICONSTEM),Chennai India, 23-24 March 2017, pp. 889-894.
[3] [3] M.Sardogan, A.Tuncer, Y.Ozen, “Plant Leaf Disease Detection
and Classification based on CNN with LVQ Algorithm”, 3rd
International Conference on Computer Science and Engineering
(UBMK), Sarajevo, 20-23 Sept. 2018, pp. 382-385 .
[4] [4] A.Sehgal, S.Mathur, “Plant Disease Classification Using SOFT
COMPUTING Supervised Machine Learning”, 3rd International
Conference on Electronics, Communication, and Aerospace
Technology (ICECA), Coimbatore, India, 12-14June 2019, pp.75-80 .
[5] [5] C.Khitthuk, A.Srikaew, K.Attakitmongcol, P.Kumsawat “Plant
Leaf Disease Diagnosis from Color Imagery Using Co-Occurrence
Matrix and Artificial Intelligence System”, International Electrical
Engineering Congress(iEECON), Krabi, Thailand, 7-9 March 2018.
[6] [6] H.Sabrol, K.Satish, “Tomato Plant Disease Classification in
Digital Images using Classification Tree”, International Conference
Fig. 9. Training loss and Validation loss graph. on Communication and Signal Processing (ICCSP), Melmaruvathur,
India, 6-8 April 2016, pp. 1242-1246.
[7] [7] N.Petrillis, “Plant Disease Diagnosis With color
Normalization”, 8th International Conference on Modern Circuits
and Systems Technologies(MOCAST), Thessaloniki, Greece,13-15
May 2019.
[8] [8] N.Petrellis, “A Smart Phone Image Processing Application for
Plant Disease Diagnosis”, 6th International Conference on Modern
Circuits and Systems Technologies(MOCAST), Thessaloniki, Greece,
4-6May2016.
[9] [9] M.Islam, AnhDinh, K.Wahid, P.Bhowmik, “Detection of Potato
Diseases Using Image Segmentation and Multiclass Support Vector
Machine”, IEEE 30th Canadian Conference on Electrical and
Computer Engineering (CCECE), Windsor, Canada, 30 April- 3 May
2017 .
[10] [10] H.Wang, G.Li, Z.Ma, X.Li, “Application of Neural Networks to
Fig. 10. Training accuracy and Validation accuracy graph. Image Recognition of Plant Diseases”, International Conference on
Systems and Informatics(ICSAI2012), Yantai, China, 19-20 May
V. CONCLUSION 2012, pp. 2159-2164.
The proposed algorithm is implemented successfully to train [11] [11] K.K.Singh, “An Artificial Intelligence and Cloud-Based
Collaborative Platform for Plant Disease Identification, Tracking and
the system. The accuracy percentage on the test set is Forecasting for Farmers”, IEEE International Conference on Cloud
88.80% with no overfitting There is still room for Computing in Emerging Markets(CCEM), Bangalore, India, 23-24
improvement as the remaining 12.20% is covered. This Nov 2018, pp. 49-56.
present work can contribute to agricultural domain and can [12] [12] E.Agustina, I.Pratomo, A.D.Wibawa, S.Rahayu, “Expert System
be used to help people for tracking their house plants and for Diagnosis Pests and Diseases of The Rice Plant using Forward
Chaining and Certainty Factor Method”, International Seminar on
also enables the farmers to keep a track of the harvest. This Intelligent Technology and Its Applications(ISITIA), Surabaya,
work can be expanded into further to develop an app Indonesia, 28-29 Aug 2017, pp. 266-270.
through which one would also know the remedy to a plant [13] [13] A.Louise P.de Ocampo, E.P.Dadios, “Mobile Platform
disease. Implementation of Lightweight Neural Network Model for Plant
Disease Detection and Recognition”, IEEE 10th International
conference on Humanoid, Nanotechnology, Information Technology,
Communication and Control, Enviroment and
REFERENCES Management(HNICEM), Baguio, Philippines, 29 Nov-2 Dec2018.
[14] [14] S.Dubey, M.Dixit, “Facial Expression Recognition using Deep
Convolutional Neural Network”, International Symposium on
[1] [1] U. Mokhtar, M.A.S.Ali, A.E.Hassenian, H.Hefny, “Tomato Advanced Intelligent Informatics(SAIN) , Vol.8, No.1 pp. 96-
leaves disease detection approach based on support vector machines”, 101,Aug 2018.
11th international computer engineering conference (ICENCO),Cairo,
[15] GeeksforGeeks-https://www.geeksforgeeks.org/cnn-introduction-to-
Egypt, 29-30 Dec.2015, pp. 246-250 .
pooling-layer/
[2] [2] Ganesan, S.Sajiv, L.Megalanleo Leo, “CIELuv Color Space for
Identification and Segmentation of Disease Affected Plant Leaves

113
ISBN: 978-1-7281-6882-1 PART: CFP20P52-ART
Authorized licensed use limited to: Auckland University of Technology. Downloaded on December 19,2020 at 10:43:06 UTC from IEEE Xplore. Restrictions apply.

You might also like