0% found this document useful (0 votes)
45 views14 pages

Alguliyev Et Al - 2021 - Plant Disease Detection Based On A Deep Model

This paper proposes using a deep learning model consisting of a convolutional neural network and gated recurrent units to accurately identify plant leaf diseases from images. The model is trained on a dataset of 14 plant species and tested for its ability to detect healthy and damaged leaves. Experimental results show this approach achieves higher accuracy than other models for diagnosing plant diseases.

Uploaded by

bigliang98
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)
45 views14 pages

Alguliyev Et Al - 2021 - Plant Disease Detection Based On A Deep Model

This paper proposes using a deep learning model consisting of a convolutional neural network and gated recurrent units to accurately identify plant leaf diseases from images. The model is trained on a dataset of 14 plant species and tested for its ability to detect healthy and damaged leaves. Experimental results show this approach achieves higher accuracy than other models for diagnosing plant diseases.

Uploaded by

bigliang98
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/ 14

Soft Computing (2021) 25:13229–13242

https://doi.org/10.1007/s00500-021-06176-4 (0123456789().,-volV)(0123456789().
,- volV)

METHODOLOGIES AND APPLICATION

Plant disease detection based on a deep model


Rasim Alguliyev1 • Yadigar Imamverdiyev1 • Lyudmila Sukhostat1 • Ruslan Bayramov1

Accepted: 18 August 2021 / Published online: 1 September 2021


 The Author(s), under exclusive licence to Springer-Verlag GmbH Germany, part of Springer Nature 2021

Abstract
Careful monitoring of plant conditions and their diagnosis are necessary, but a human cannot control a large area of land
where the crop grows. This paper proposes the solution of this problem. Early diagnosis and accurate detection of plant leaf
diseases can prevent the spread of the disease. In the last decade, machine learning methods and image classification tools
have been used to identify and diagnose plant diseases. This paper proposes an accurate approach to identify plant leaf
diseases based on the deep convolutional neural network and gated recurrent units. The PlantVillage dataset of damaged
and healthy plant leaves images is used. The proposed model is trained to identify common plant leaf diseases of 14
species. The experimental results are compared to other well-known models. This study shows that the proposed model
based on deep learning provides the best solution in the diagnosis of plant diseases with high accuracy, and that the gated
recurrent unit neural network considered as a classifier can improve the accuracy of the convolutional neural network
model. The comparison results demonstrated that the proposed approach achieved higher performance than other models.

Keywords Plant disease identification  Plant leaves  Deep learning  Machine learning

1 Introduction excess and other), and various parasitic organisms (bacte-


ria, viruses, fungi, roundworms (nematodes), and even
In recent years, the development of globalization and trade, others plants (Barbedo 2016).
as well as climate change, has led to an increase in plant The study of plant diseases is the science of phy-
diseases (Kamilaris and Prenafeta-Boldú 2018; Iqbal et al. topathology. It studies how to deal with these ailments and
2018). In several countries, this has reached the scale of the prevent their occurrence. Plants must be correctly, accu-
epidemic, which can lead to crop losses and therefore rately, and promptly diagnosed to defeat diseases. There
threaten the food and nutritional security of people (Mo- are many methods for this diagnosis. In recent decades,
hanty et al. 2016). with the development of molecular methods of analysis,
Specialists have to protect agricultural plants. Causes of more and more new ones are being actively developed,
plant diseases can be both environmental factors (summer gradually displacing classical approaches from practice.
drought or winter frosts, lack of nutrients in the soil or their Food and Agriculture Organization (FAO) of the United
Nations conducts surveillance and monitoring, plans
emergency activities, and strengthens and broadens com-
& Lyudmila Sukhostat munication between researchers. It officially announced the
[email protected] organization, in 2020, of the International Year of Plant
Rasim Alguliyev Health (IYPH) by the United Nations to draw the attention
[email protected] of the world community to how plant health can end
Yadigar Imamverdiyev hunger, reduce poverty, protect the environment, and
[email protected] accelerate economic development (FAO 2018).
Ruslan Bayramov Early detection of plant diseases can prevent huge losses
[email protected] in agribusiness. Traditional methods are the detection of
1
diseases by visual inspection. But this process is ineffi-
Institute of Information Technology, Azerbaijan National
Academy of Sciences, 9A, B. Vahabzade Street, cient—a person is prone to errors. The difficulty also lies in
AZ1141 Baku, Azerbaijan

123
13230 R. Alguliyev et al.

the impossibility of manually diagnosing plants in a large et al. 2018). Researchers propose new methods and extend
area by a person. existing algorithms to solve this problem (Table 1).
But if this task is solved by a special program that Table 1 shows the results of some recent studies on the
implements machine learning technology, the efficiency classification of plant diseases. These studies have several
will increase significantly. For a trained computer, diag- problems. The classification efficiency, measured by
nosing plant diseases is essentially image recognition. accuracy (Table 1), is quite low. Although accuracy
After analyzing hundreds of thousands of photographs of achieved by Mokhtar et al. (2015) is 99.83%, the consid-
diseased plants, a machine learning algorithm can deter- ered dataset contains only two classes (healthy and infected
mine the type of disease and its severity. In the future, it leaves). In other words, the proposed system (Mokhtar
will even be able to recommend methods of control in et al. 2015) can detect the presence of a disease in a leaf
order to limit crop losses from diseases. without information about the type of the disease.
Machine learning allows more accurately diagnosing Dey et al. (2016) devoted their research to the detection
plant diseases (Barbedo 2016). It will save resources and of leaf rot disease for betel vine based on an image pro-
help protect against incorrect diagnoses. Farmers can cessing algorithm by determining the color characteristics
upload field images received by satellites, unmanned aerial of a rotten leaf area. Subsequently, the decayed region was
vehicles, smartphones. And special software will analyze, segmented, and the area of the decayed part of the leaf was
diagnose, and develop an action plan. deduced from the data of the observed plant traits. This
The paper proposes an approach based on deep learning document describes steps to create an effective and inex-
to diagnose plant diseases based on leaf images. At the pensive system acceptable to farmers and agricultural
initial stage, the input image is pre-processed. Then, the researchers, as well as to study the disease of rot on grape
resulting image of the plant leaf is sent to the convolutional leaves. The methodology uses a combination of machine
neural network (CNN) to extract a set of features. The vision and machine intelligence for agriculture. In terms of
gated recurrent unit neural network (GRU) is considered to machine vision, image processing is used where the details
ensure fast classification. The obtained features are passed of the area of the leaf affected by the disease will be
through GRU to classify the obtained result. CNN is con- extracted.
sidered by its effectiveness in implicit feature extraction. Singh and Misra (2017) provided an overview of the
The proposed CNN ? GRU model is tested to detect classification methods used to detect plant leaf diseases,
healthy and damaged plant leaves. and an algorithm for image segmentation that can be used
Above all, the contribution of this research is presented to automatically detect leaf diseases later. Banana, beans,
as follows: jackfruit, lemon, mango, potatoes, tomato, and sapota are
some of the ten types that validate the proposed algorithm.
(1) A novel approach is proposed for plants disease
Therefore, related diseases for these plants were taken for
detection to improve the adaptability of the deep
identification. With very little computational effort, opti-
learning based on CNN and GRU.
mal results were obtained, which also shows the effec-
(2) Real (observational data) large dataset is used to
tiveness of the proposed algorithm in the recognition and
evaluate the performance of the proposed approach.
classification of leaf diseases.
(3) The metrics such as accuracy, precision, recall, and
Sharif et al. 2018 developed a hybrid method for iden-
F-measure are considered to evaluate the classifica-
tifying and classifying diseases of citrus plants. The pro-
tion quality.
posed method consists of two main stages: (a) detection of
The rest of the paper is organized as follows. Section 2 the lesion on citrus fruits and leaves; (b) classification of
describes a literature review. Section 3 presents the pro- citrus diseases. Citrus lesions are removed using the opti-
posed deep CNN ? GRU model. The experimental data- mized weighted segmentation method, which is performed
sets description, the evaluation metrics, and the on the enhanced input image. Also, the best attributes are
experimental results are given in Sect. 4. Finally, the selected by implementing a hybrid feature selection
concluding remarks and future research directions are method, which consists of principle component analysis
discussed. (PCA) estimation, entropy, and asymmetry-based covari-
ance vector. The selected features are transferred to the
multi-class support vector machine (M-SVM) for the final
2 Related work classification of citrus diseases. The proposed technique
was tested on a dataset of the citrus image gallery and a
Recently, a large number of studies have been devoted to combined dataset (a database of plants and images of citrus
the diagnosis of plant diseases based on machine learning infected with scales). This paper proposes a hybrid
(Barbedo 2018; Kamilaris and Prenafeta-Boldú 2018; Iqbal approach for automatically detecting and classifying types

123
Plant disease detection based on a deep model 13231

Table 1 Summary of methods for the diagnosis of plant diseases


References Proposed approach Main contribution Dataset size Accuracy

Liu et al. A deep convolutional neural network model for A deep convolutional neural network model 13,689 97.62%
(2018) accurate based on AlexNet with adjusted convolution images 9 4
identification of apple leaf disease kernel size classes
Sharif A hybrid approach for the automatic detection and Top-hat filter and Gaussian function are used 670 95.8%
et al. classification of types of citrus diseases based on for efficient diseases spot segmentation images 9 7
(2018) optimized methods of weighted segmentation Both entropy and covariance vector based on classes;
and feature selection higher feature value are selected as feature 5,632
vector images 9 4
classes;
580
images 9 5
classes
Singh and An algorithm for image segmentation for The use of evaluators for automatic 125 97.6%
Misra automatic detection and classification of plant initialization of cluster centers, so there is no images 9 5
(2017) leaf diseases need for user input during segmentation classes
Plant diseases can be detected at an early stage
or an initial stage
Dey et al. An algorithm for segmentation of leaf rot diseases Otsu thresholding-based image processing 12 images 100%
(2016) in betel vine leaf algorithm for leaves segmentation
A leaf disease severity scale is calculated using
the total leaf area and finding the percentage
disease
Zhang A method of plant leaves images segmentation Superpixel clustering is applied to dividing the 4 images 100%
et al. based on hybrid clustering original color disease leaf image into a few
(2019) hundreds of small compact regions
The color disease leaf images can be fast and
accurately segmented by EM
Amara Deep learning approach for banana leaf diseases Minimal image pre-processing is required 3,700 * 97%
et al. classification images 9 3
(2017) classes
Fuentes Deep learning approach for detecting diseases and It can be applied to images captured using 5,000 83.06%
et al. pests on tomato leaves devices with different resolutions images 9 10
(2017) classes
Cruz et al. A modified LeNet approach for olive tree leaves Combining data at different levels of 224 99%
(2017) classification abstraction to improve system performance images 9 3
classes
Mokhtar An approach for identification of unhealthy GLCM is used for the texture of the tomato 800 images 99.83%
et al. tomato leaves using image processing based on leaves characteristics extraction
(2015) SVM
Singh and An approach for plant disease detection based on GLCM is used for the texture of the tomato 40 images 9 3 97%
Kaur the k-means clustering algorithm and KNN leaves characteristics extraction classes
(2019)
Lu et al. Rice diseases identification method based on deep Sparse-auto encoding is used to learn the 500 95.48%
(2017) CNNs features from images images 9 10
The stochastic pooling method is applied to the classes
proposed model

of citrus diseases based on optimized methods for weighted Zhang et al. (2019) proposed a new method for plant
segmentation and feature selection. For each citrus disease, leaf image segmentation based on hybrid clustering. The
the classification process was performed. The proposed image of the entire color leaf is first divided into several
results were compared to four classification methods (i.e., compact and almost uniform superpixels to accelerate the
ensemble boosted tree (EBT), K-nearest neighbors (KNN), convergence rate of the expectation–maximization (EM)
decision trees (DT), and linear discriminant analysis algorithm, and then, damage pixels are quickly and accu-
(LDA)), obtaining the best accuracy of 95.8%. rately segmented from each superpixel using the EM

123
13232 R. Alguliyev et al.

algorithm. Superpixel clustering is used to separate the explored spatial relationships in the image. The merger
original color image of a disease sheet into several hundred occurred temporarily, at the beginning of the processing
small compact areas. Compared to the segmentation of the pipeline, or mixed in the training process. It has been
leaves image based on K-means, the method based on improved with a checkerboard data merge scheme that
superpixels is effective. The algorithm is reliable for the implements features at growing levels of abstraction,
problem of color image segmentation, since the initial allowing the network to detect additional factors leading to
parameters of the EM algorithm are estimated in a compact the disease. A study of the nonlinear relationships found by
superpixel, and noise is suppressed to some extent. the network will help to better understand the relationship
Liu et al. (2018) described a deep CNN model based on between the structure of plant leaves and their appearance,
AlexNet, the size of the convolution kernel of which is symptoms of the disease.
regulated. GoogLeNet’s Inception is used to extract fea- Mokhtar et al. (2015) propose a detection method based
tures. The limitation of the proposed approach consists of on a SVM algorithm for identifying unhealthy tomato
an insufficient number of apple pathological images for the leaves using image processing methods. Since the texture
training model. characteristic is one of the most important characteristics
A deep-learning approach that automates the process of that describe the tomato leaf, the proposed system uses the
classifying banana leaf diseases was proposed by Amara gray-level co-occurrence matrix (GLCM). The SVM
et al. (2017). The results demonstrate the effectiveness of algorithm with various kernel functions is used at the
the proposed approach, even in difficult conditions, such as classification stage. Singh and Kaur (2019) devoted
lighting, complex background, different resolutions, size, research work to the detection of plant diseases using the
location, and orientation of images in a real environment. A KNN classifier with the GLCM algorithm. In this approach,
new system based on CNN for the recognition of diseases using statistical characteristics, texture features are
of banana plants was proposed. extracted and analyzed using the GLCM algorithm,
Fuentes et al. (2017) presented a deep-learning approach k-means clustering is used for area-based segmentation,
to the detection of diseases and pests on tomato plants and the KNN classifier is used to predict disease.
using images obtained locally from devices with different Türkoğlu and Hanbay (2019) use methods of transfer
resolutions. Thus, the authors examined and compared learning and deep feature extraction that adapt these deep
three main families of detectors: a faster region-based CNN learning models to the issue at hand. Characteristics
(faster R-CNN), a region-based fully convolutional net- obtained using deep feature extraction are then classified
work (R-FCN), and a single shot multibox detector (SSD), by SVM, extreme learning machine (ELM), and KNN.
that is, known as ‘‘meta-architecture’’ of deep learning. Evaluation results show that deep feature extraction and
Each of these meta-architectures was combined with a SVM/ELM classification gave better results than transfer
VGG-16 network and a residual neural network (ResNet). training. In this paper, the nine most commonly used deep
Despite the complexity of the scenarios, the faster R-CNN learning networks (AlexNet, GoogleNet, VGG16, VGG19,
with VGG-16 shows the best recognition results. ResNet50, ResNet101, InceptionV3, Inception ResNetV2,
To enhance recognition in the wild and reduce com- and SqueezeNet) are examined for plant diseases and deep
puting costs, Zhu et al. (2018) described an advanced deep feature extraction.
CNN based on the faster R-CNN and Inception V2 mod- Lu et al. (2017) offer a new method for identifying rice
ules. The original images are cut into hundreds of smaller diseases based on CNNs. Under a tenfold cross-validation
sub-images and then sequentially uploaded to the proposed strategy, the proposed CNN-based model achieves high
network. A region supply network (RPN) with a common accuracy compared to the well-known machine learning
convolution network is used to forecast regional objects. models (standard BP, SVM algorithm, and particle swarm
The generated results (sub-images) are glued back to the optimization (PSO)). Images are classified from a reduced
final recognition images in the final phase. dataset using convolution and pooling.
Cruz et al. (2017) developed a vision-based program for Summarizing the above works they have several limi-
identifying symptoms of olive leaf disease called X-FIDO tations: (a) a small number of examples in datasets (from
(Xylella FastIdiosa Detector for O. Europaea L.). This 71 to 800); (b) most papers examine a particular plant
paper demonstrates that transfer training can be used when species, but do not assess the universality of approaches for
it is not possible to collect thousands of new leaf images. A other plants and their diseases. In this regard, to overcome
new algorithm was introduced, combining data at different the shortcomings of existing approaches, we propose a
levels of abstraction to improve system performance. It CNN ? GRU model for the detection of plant leaf
detects low-level elements from raw data. The results were diseases.
obtained using CNN trained by the stochastic gradient
descent method. Existing deep learning applications

123
Plant disease detection based on a deep model 13233

3 Proposed approach first be selected. The area of interest (ROI) method is used
to capture samples.
The proposed approach for the detection of plant diseases CNNs have become very popular for detecting leaves
based on images using deep neural networks consists of the and their diseases in images (Fuentes et al. 2017). Among
following main stages: the pre-processing stage, the region them, the following methods can be noted: R-FCN (Dai
of interest selection, data augmentation, feature extraction, et al. 2016), faster R-CNN (Ren et al. 2017), and others.
and classification (Fig. 1). This paper considers faster R-CNN.
Image resizing was done to adapt to the requirements of
3.1 Image pre-processing the proposed model. A size of 256 9 256 has been selec-
ted. Labels are assigned to individual leaves based on the
Input images about the state of plants can be obtained using available dataset of leaf images of the diagnosed plants.
sensors and cameras. To improve the quality of images,
which usually contain noise, their pre-processing is nec- 3.3 Data augmentation
essary (Dyrmann et al. 2016; Potena et al. 2016). To this
end, image resizing, color space conversion (YCbCr ( the Data augmentation is carried out to eliminate the problem
presence of blue color (Cb) and red color (Cr) for a given of overfitting in the proposed model when the number of
luminance intensity (Y)), HIS (Hue Saturation Intensity), images in the dataset is insufficient. It includes several
and CIELAB (International Commission on Illumination image transformations: resizing, cropping, rotation, hori-
(CIE) L*a*b*) color space model (Al Bashish et al. 2011)), zontal flip, increasing contrast and brightness, adding
image filtering (e.g., median filtering), and others are noise, and others (Krizhenvshky et al. 2012; Fuentes et al.
performed. 2017).
During transformation, all pixels in the image rotate at a
3.2 Region of interest selection certain angle around the center of the image. The coordi-
nates of the image center are denoted as ðx0 ; y0 Þ. And the
Because the camera can capture several leaves of one and coordinates of the image point are calculated as
even different types of plants at the same time, they must

Fig. 1 The overall structure of


the proposed CNN ? GRU
approach for plant disease
diagnosis

123
13234 R. Alguliyev et al.


x0 cos h þ y0 sin h As an activation function, a ReLU activation function is
ð1Þ used on each layer of the CNN model. A dropout of 0.2 is
x0 sin h þ y0 cos h
introduced to overcome the overfitting. The output layer
where h is the angle of the image rotation specified by the consists of the number of considered leaf classes (in our
user. case, 38).
In our experiments, the image rotation angle is 30, 60, In this model, we submit images of plant leaves to CNN.
and 45, and horizontal symmetry is applied. Elements extracted by the last CNN layer are then used by
GRU layers to extract information from the characteristics.
3.4 Proposed plant disease detection model The flattened output of the last convolutional layer is
transmitted to the input nodes of the hidden GRU neural
This section describes the proposed model for solving the network. Figure 1 shows a simplified version of the pro-
problem of detecting plant diseases using CNN and GRU. posed CNN ? GRU model. Both convolutional and GRU
Our model is based on the use of CNNs as they perfectly layers are trained together. As a result of the CNN ? GRU
derive the correct characteristics from images. model training, an image label is obtained.

3.4.1 Feature extraction using a convolutional neural 3.4.2 Classification using the GRU model
network
GRU model consists of three layers. The first GRU layer
The CNN architecture was created for feature extraction. includes 10 units, and the second contains 20 units. They
The model extracts the most important features from are followed by one fully connected layer consisting of
images of healthy and damaged leaves and is described in 1024 units.
detail below. The GRU layers units are calculated as follows (Cho
The proposed architecture of the CNN model is intended et al. 2014):
for processing color images of leaves with a resolution of
256 9 256 9 3. The input image is processed using the ztGRU ¼ rðWz ½ht1
GRU ; F GRU Þ
t ð4Þ
proposed architecture, which consists of a series of three GRU ; F GRU Þ
rtGRU ¼ rðWr ½ht1 t ð5Þ
convolution layers with 2 9 2 maxpooling layers and a
3 9 3 kernel. The first convolution layer gives 16 maps of ytGRU ¼ ð1  zGRU
t
GRU þ zGRU  tanhðW½r GRU
Þ  ht1 t t
objects that are fed to the second layer with the maxpool-
 hGRU ; F GRU Þ
t1 t
ing, which reduces their dimension to 128 9 128 for each
channel. ð6Þ
The output of the convolutional layer can be calculated where ztGRU is an update gate, yGRU
t is an output of GRU,
as:
X rtGRU is a reset gate, fF1GRU ; F2GRU ; :::; FTGRU g is a
xij ¼ xl1
i  wlij þ bij ð2Þ feature vector, hGRU are the hidden states, and W , W and
z r
t1
i2Nj
W are the weight matrices.
where l is the l th layer, wij is the convolutional kernel, bj RMSprop optimization is applied at the training stage,
represents the bias, and Nj denotes a set of input feature and the softmax cost function is used for entropically
maps (Lu et al. 2017). maximized probabilistic classification. The proposed
Then, the second convolutional layer applies 32 3 9 3 architecture is shown in Fig. 2. The predictive probabilities
filters, which are transferred to the maxpooling layer, to for all classes are calculated using the softmax activation
reduce the feature maps to 64 9 64. Then, the last con- function:
volutional layer processes them with 64 3 9 3 filters and k1
ðjÞ
e xm k
then performs maxpooling in 32 9 32 object maps. All pðx^ ¼ jjxÞ ¼ PS k1 ðsÞ ð7Þ
pooling layers perform maximum merging, as in the fol- s¼1 e xm k
lowing equation where S is a number of plant leaf states (in our case
pj ¼ max ni ð3Þ S ¼ 38).
i2Rj
Cross-entropy is used to calculate the loss (Kingma and
where Rj is the pooling region j in the feature map n, i Ba 2014). The process begins with random initialization of
represents the index of each element, and p are the feature all model parameters. The loss function was chosen as a
maps (Zeiler and Fergus 2013). natural cost function, which will prove the correct classi-
It is followed by one fully connected hidden layer of fication of the input data.
1024 neurons.

123
Plant disease detection based on a deep model 13235

Fig. 2 Architecture of CNN ? GRU model

The proposed CNN ? GRU architecture will maximize results with the ground truth, is also considered to evaluate
the benefits of deep learning in the context of detecting the proposed model.
plant diseases based on leaf images. Precision is used to determine the number of objects
classified as positive that are truly positive:
TP
4 Experimental dataset description Precision ¼ ð9Þ
TP þ FP

The PlantVillage dataset was collected by researchers at Recall measures the proportion of positive samples that
Penn State University (US). PlantVillage is a not-for-profit are correctly classified and is calculated as:
project by Penn State University and Swiss Federal Insti- TP
Recall ¼ ð10Þ
tute of Technology in Lausanne (Hughes and Salathe 2015; TP þ FN
New Plant Diseases Dataset 2020). The dataset contains
F-measure is a weighted average value of recall and
87,867 images. They cover fourteen types of crops: grape,
precision metrics:
soybean, blueberry, cherry, orange, peach, bell pepper,
potato, raspberry, squash, apple, strawberry, and tomato. 2  Recall  Precision
F  measure ¼ ð11Þ
The PlantVillage dataset includes images of seventeen Recall þ Precision
fungal diseases, four bacterial diseases, two viral diseases, All considered metrics are widely used performance
two mold diseases, and one tick-borne disease. Twelve indicators in machine learning (Ferri et al. 2009).
types of crops also have images of healthy leaves that are
not susceptible to any diseases. The dataset contains thirty-
eight classes. The number of images in each category is 6 Experimental results
shown in Table 2.
The proposed approach is implemented in Python 3.7.4
using various libraries, including Tensorflow, and Keras.
5 Evaluation metrics All experiments were conducted on Intel Xeon (R), CPU
X5670 @ 2.93 GHz*24 with 24 GB of RAM machine.
Performance evaluation of the proposed model is based on Table 2 shows the number of samples in each category
the following metrics: accuracy, precision, recall, and and the total number of samples in the training and veri-
F-measure. fication sets. To eliminate overlap and get a better gener-
Accuracy is a fraction of the valid predictions of all alization, various methods were added to supplement the
predictions made, often presented as a percentage. It is data for training samples, such as rotation, shift in width
determined as and height, scaling, and horizontal flipping. Finally, before
TP þ TN applying the training set and validation set to the model, all
Accuracy ¼ ð8Þ the images in these sets were changed to a resolution of
TP þ TN þ FP þ FN
256 9 256 and normalized to the range [0,1].
where TP defines true positive values, TN are true negative
We performed optimization of hyperparameters for the
values, FP are false positive values, and FN are false
proposed model and found that five CNN layers, two GRU
negative values.
layers of 10 and 20 blocks, respectively, and one fully
The confusion matrix, which shows the effectiveness of
connected layer with 1024 units are enough to achieve high
the classification model on the test set by comparing the
model accuracy. Table 3 shows the important parameters

123
13236 R. Alguliyev et al.

Table 2 Summary of the experimental dataset


Type of Leaves category The number of samples in the training The number of samples in the validation
plant dataset dataset

Apple Apple_scab 2016 504


Apple_Black_rot 1987 497
Apple_Cedar_rust 1760 440
Apple_healthy 2008 502
Blueberry Blueberry_healthy 1816 454
Cherry Cherry_Powdery_mildew 1683 421
Cherry_healthy 1826 456
Corn Corn_Gray_leaf_spot 1642 410
Corn_Common_rust 1907 477
Corn_Northern_Leaf_Blight 1908 477
Corn_healthy 1859 465
Grape Grape_Black_rot 1888 472
Grape_Black_Measles 1920 480
Grape_Isariopsis_Leaf_Spot 1722 430
Grape_healthy 1692 423
Orange Orange_Citrus_greening 2010 503
Peach Peach_Bacterial_spot 1838 459
Peach_healthy 1728 432
Bell pepper Bell_Pepper_Bacterial_spot 1913 478
Bell_Pepper_ healthy 1988 497
Potato Potato_Early_blight 1939 485
Potato_Late_blight 1939 485
Potato_healthy 1824 456
Raspberry Raspberry_healthy 1781 445
Soybean Soybean_healthy 2022 505
Squash Squash_Powdery_mildew 1736 434
Strawberry Strawberry_Leaf_scorch 1774 444
Strawberry_healthy 1824 456
Tomato Tomato_Bacterial_spot 1702 425
Tomato_Early_blight 1920 480
Tomato_Late_blight 1851 463
Tomato_Leaf_Mold 1882 470
Tomato_Septoria_leaf_spot 1745 436
Tomato_Two- 1741 435
spotted_spider_mite
Tomato_Target_Spot 1827 457
Tomato_Yellow_Leaf_Curl_Virus 1961 490
Tomato_mosaic_virus 1790 448
Tomato_healthy 1926 481
Total 70295 17,572

used to train the proposed model. We also used the were trained over ten epochs with a learning speed of 0.01,
RMSprop optimizer. and SGD was chosen as the optimization algorithm. The
This section compares the proposed model with pre- detection loss and accuracy curves for PlantVillage dataset
trained models, such as VGGNet-16, ResNet-20, and is are shown in Fig. 3.
trained on the entire dataset. ResNet-20 and VGGNet-16

123
Plant disease detection based on a deep model 13237

Table 3 Training parameters of considered healthy. Therefore, the proposed CNN ? GRU
Parameter Value
the proposed model model has a good ability to identify the type of plant and
Batch size 100 accurately detect leaf diseases.
Epochs 10 According to the F-measure metric for the apple tree,
Optimizer RMSprop apple black rot disease was more accurately recognized and
Initial learning rate 0.001 amounted to 94.49% (Table 6). Precision detection of
cherry powdery mildew reached 98.34%. Corn diseases
were identified with F-measure of 88.14%, 97.84%, and
As shown in Table 4, the proposed model achieved an
91.42% for corn gray leaf spot, corn common rust, and corn
accuracy of 91.19% on the experimental data set, which is
northern leaf blight, respectively. For grapes, the model
higher than that of other models.
showed the greatest accuracy according to the precision
Table 5 shows the confusion matrix for our model, and
metric for grape black measles and grape leaf spot. The
the proportion of accurately recognized leaf images for
least accuracy was obtained for tomato leaves with Tomato
each of the twelve classes is presented in detail. The best
target spot disease according to the precision and F-mea-
results in the table are marked in bold. As the analysis
sure metrics and amounted to 60.25% and 72.59%,
showed, 489 images were accurately recognized out of a
respectively. The recognition accuracy of healthy plants
possible 497 for Apple_Black_Rot disease, 414 out of 421
averaged to * 90% according to the F-measure metric.
images for Cherry_Powdery_mildew, 452 out of 456
Figure 4 shows the classification results of the CNN ?
images for healthy cherry leaves, and 475 out of 477
GRU model on five representative images of the five plant
images for Corn_Common_Rust disease were identified.
disease classes. Leaves images with corn common rust and
However, due to the quality of images from 504 leaves
potato early blight diseases were classified correctly with a
with Apple_Scab, 405 were correctly identified, 44 were
certainty of 100%, while the images of apple, tomato, and
mistaken for healthy leaves of the apple tree.
grape diseases were separated with a certainty of 72.40%.
For corn leaves, the plant type was accurately identified;
Tomato spider mite disease was identified with a certainty
however, some samples with Corn_Gray_Leaf_Spot dis-
of 94.31%, and grape black measles with a certainty level
ease were identified as Corn_Common_Rust and
of 99.73%, respectively.
Corn_Northern_Leaf_Blight. For tomato leaf diseases,
such as Mosaic_Virus, from 448 samples, eight were

Fig. 3 Plant disease classification loss and accuracy curves for the training and validation datasets for CNN ? GRU

Table 4 Evaluation of the


Training loss Validation loss Training accuracy (%) Validation accuracy (%)
proposed model
CNN ? GRU 0.3157 0.3455 90.88 91.19
ResNet-20 0.0489 0.5025 91.76 85.32
VGGNet-16 0.4512 1.0230 96.05 88.78

123
13238

123
Table 5 Confusion matrix for the CNN ? GRU model
Class Predicted
Apple Blueberry Cherry Corn Tomato
Scab Black Cedar Healthy Healthy Powdery Healthy Gray Leaf Common Northern Leaf … Mosaic Healthy
Rot Rust Mildew Spot Rust Blight Virus

Ground Apple Scab 405 20 13 44 0 0 0 1 0 0 .. 0 1


Truth .
Apple Black Rot 0 489 1 0 0 0 1 0 0 0 .. 0 2
.
Apple Cedar Rust 0 0 405 0 0 3 0 0 0 0 .. 0 0
.
Apple Healthy 1 0 0 466 7 0 0 0 0 0 .. 0 8
.
Blueberry Healthy 7 3 1 6 385 0 0 0 0 0 .. 0 2
.
Cherry Powdery 0 0 0 5 0 414 0 0 0 0 .. 0 1
Mildew .
Cherry Healthy 0 0 0 0 0 0 452 0 0 0 .. 0 0
.
Corn Gray Leaf Spot 0 0 2 1 0 0 0 364 17 21 .. 0 0
.
Corn Common Rust 0 0 0 0 0 0 0 1 475 0 .. 0 0
.
Corn Northern Leaf 0 0 1 0 0 0 0 50 1 421 .. 0 0
Blight .
.. … … … … … … … … … … .. … …
. .
Tomato Mosaic 0 0 0 0 0 0 0 0 0 0 .. 375 8
Virus .
Tomato Healthy 1 0 2 0 0 0 0 0 0 0 .. 0 395
.
R. Alguliyev et al.
Plant disease detection based on a deep model 13239

Table 6 Classification results of


Class Precision (%) Recall (%) F-measure (%)
the proposed model
Apple_scab 80.36 95.74 87.38
Apple_Black_rot 98.39 90.89 94.49
Apple_Cedar_rust 92.05 94.41 93.21
Apple_healthy 92.83 79.12 85.43
Blueberry_healthy 84.80 97.47 90.69
Cherry_Powdery_mildew 98.34 96.73 97.53
Cherry_healthy 99.12 94.76 96.89
Corn_Gray_leaf_spot 88.78 87.50 88.14
Corn_Common_rust 99.58 96.15 97.84
Corn_Northern_Leaf_Blight 88.08 95.03 91.42
Corn_healthy 99.35 99.78 99.57
Grape_Black_rot 89.83 94.22 91.97
Grape_Black_Measles 99.38 88.17 93.44
Grape_Isariopsis_Leaf_Spot 99.77 90.70 95.02
Grape_healthy 96.93 85.59 90.91
Orange_Citrus_greening 98.29 97.34 97.81
Peach_Bacterial_spot 91.77 94.85 93.28
Peach_healthy 95.02 97.45 96.22
Bell_Pepper_Bacterial_spot 93.72 86.34 89.88
Bell_Pepper_ healthy 90.77 81.43 85.85
Potato_Early_blight 98.50 92.49 95.40
Potato_Late_blight 89.58 89.36 89.47
Potato_healthy 82.34 95.66 88.50
Raspberry_healthy 96.77 82.42 89.02
Soybean_healthy 84.00 93.33 88.42
Squash_Powdery_mildew 95.02 97.20 96.10
Strawberry_Leaf_scorch 95.50 98.96 97.20
Strawberry_healthy 92.75 93.92 93.33
Tomato_Bacterial_spot 92.75 92.75 92.75
Tomato_Early_blight 89.75 79.78 84.47
Tomato_Late_blight 73.82 96.42 83.62
Tomato_Leaf_Mold 85.75 96.08 90.62
Tomato_Septoria_leaf_spot 78.25 88.92 83.24
Tomato_Two-spotted_spider_mite 82.75 94.30 88.15
Tomato_Target_Spot 60.25 91.29 72.59
Tomato_Yellow_Leaf_Curl_Virus 94.00 95.92 94.95
Tomato_mosaic_virus 93.75 96.90 95.30
Tomato_healthy 98.26 68.10 80.45
Total: 92.00 91.20 91.26

7 Conclusions low-level elements (border, color, and angle) and high-


level features (shape and object) to improve recognition of
This paper proposes a model based on deep neural net- diseases plants.
works (CNN and GRU) for the accurate identification of The demonstrated results are satisfactory, and the pro-
plant diseases, which can automatically diagnose signs of posed model can obtain a recognition accuracy of 91.19%,
leaf diseases and is performed with high accuracy. which is higher than the classification accuracy obtained
Compared with traditional approaches based on CNN for the compared models (ResNet-20 and VGGNet-16).
models, the proposed model can not only automatically The experimental results show that the proposed model
extract the best features from leaf images, but also studies based on CNN and GRU can identify common types of

123
13240 R. Alguliyev et al.

Fig. 4 Representative examples Class C


Certainty
of testing image classifications
Potato_Early__blight: 100.00%

Tomato_Septo
T oria_leaf_spot: 0.00%

Bell_Pepper_
B pot: 0.00%
_Bacterial_sp

Strawberry_L
Leaf_scorch: 0.00%

Tomato_Late_
T _blight: 0.000%

A
Apple_scab: 772.40%

Tomato_Leaff_Mold: 11.8
T 85%

Apple_healthyy: 11.45%
A

Tomato_Earlyy_blight: 2.7
T 77%

Peach_Bacterrial_spot: 0.558%

C
Corn_Commo
on_rust_: 100
0.00%

C
Corn_Gray_le
eaf_spot: 0.000%

C
Corn_Norther
rn_Leaf_Blig
ght: 0.00%

A
Apple_Rust: 00.00%

A
Apple_Black_
_rot: 0.00%

T
Tomato_Two -spotted_spider_mite: 94
4.31%

T
Tomato_Targ
get_Spot: 5.41%

T aic_virus: 0.16%
Tomato_mosa

T
Tomato_Early
y_blight: 0.0
04%

Potato_healthhy: 0.04%

G
Grape_Black_
_Measles: 99
9.73%

G
Grape_Black_
_rot: 0.27%

A
Apple_Black_
_rot: 0.00%

B
Bell_Pepper_
_Bacterial_sp
pot: 0.00%

T
Tomato_Early
y_blight: 0.0
00%

123
Plant disease detection based on a deep model 13241

plant leaf (tomato, potato, apple, grape, bell pepper, peach, recognition. Sensors 17(9):1–21. https://doi.org/10.3390/
cherry, corn, and strawberry) diseases with high accuracy. s17092022
Hughes DP, Salathe M (2015) An open access repository of images
In the future, to expand the capabilities of the imple- on plant health to enable the development of mobile disease
mented model, it is possible to improve the existing diagnostics, arXiv preprint http://arxiv.org/abs/1511.08060,
localization method. The classifier will become more pp 1–13.
accurate and variable, having received new data for train- Iqbal Z, Khan MA, Sharif M, Shah JH, Ur Rehman MH, Javed K
(2018) An automated detection and classification of citrus plant
ing the model, thus expanding the number of samples. diseases using image processing techniques: a review. Comput
Electron Agric 153:12–32. https://doi.org/10.1016/j.compag.
Acknowledgements This research did not receive any specific grant 2018.07.032
from funding agencies in the public, commercial, or not-for-profit Kamilaris A, Prenafeta-Boldú FX (2018) Deep learning in agricul-
sectors. ture: a survey. Comput Electron Agric 147:70–90. https://doi.
org/10.1016/j.compag.2018.02.016
Declarations Kingma DP, Ba J (2014) Adam: A method for stochastic optimiza-
tion. In: Proc. 4th Int. Conf. Learning Representations (ICLR),
pp 1–15.
Conflict of interest The authors declare that they have no conflict of
Krizhenvshky A, Sutskever I, Hinton G (2012) Imagenet classifica-
interest.
tion with deep convolutional networks. In: Proc. Conf. Neural
Information Processing Systems (NIPS’12), pp 1097–1105.
Liu B, Zhang Y, He D, Li Y (2018) Identification of apple leaf
References diseases based on deep convolutional neural networks. Symme-
try 10(1):1–16. https://doi.org/10.3390/sym10010011
Al Bashish D, Braik M, Bani-Ahmad S (2011) Detection and Lu Y, Yi S, Zeng N, Liu Y, Zhang Y (2017) Identification of rice
classification of leaf diseases using K-means-based segmentation diseases using deep convolutional neural networks. Neurocom-
and Neural Networks. Inform Technol J 10(2):267–275. https:// puting 267:378–384. https://doi.org/10.1016/j.neucom.2017.06.
doi.org/10.3923/itj.2011.267.275 023
Amara J, Bouaziz B, Algergawy A (2017) A deep learning-based Mohanty SP, Hughes DP, Salathé M (2016) Using deep learning for
approach for banana leaf diseases classification. In: Proc. image-based plant disease detection. Front Plant Sci 7:1–10.
Database systems for business, technology and web (BTW) https://doi.org/10.3389/fpls.2016.01419
Workshops. pp. 79–88. Mokhtar U, El Bendary N, Hassenian AE, Emary E, Mahmoud MA,
Barbedo JGA (2016) A review on the main challenges in automatic Hefny H, Tolba MF (2015) SVM-based detection of tomato
plant disease identification based on visible range images. leaves diseases. In: Filev D et al (eds) Intelligent Systems’2014.
Biosyst Eng 144:52–60. https://doi.org/10.1016/j.biosystemseng. Advances in Intelligent Systems and Computing, 323. Springer,
2016.01.017 Cham, pp 641–652. https://doi.org/10.1007/978-3-319-11310-4_
Barbedo JGA (2018) Factors influencing the use of deep learning for 55
plant disease recognition. Biosyst Eng 172:84–91. https://doi. New Plant Diseases Dataset, 2020. Available online at: https://www.
org/10.1016/j.biosystemseng.2018.05.013 kaggle.com/vipoooool/new-plant-diseases-dataset.
Cho K, Van Merrienboer B, Gulcehre C, Bahdanau D, Bougares F, Potena C, Nardi D, Pretto A (2016) Fast and accurate crop and weed
Schwenk H, Bengio Y (2014) Learning phrase representations identification with summarized train sets for precision agricul-
using RNN encoder-decoder for statistical machine translation. ture. In: International conference on intelligent autonomous
In: Int. Conf. SIGDAT, pp 1724–34. https://doi.org/10.3115/v1/ systems. Springer, Cham, Shanghai, China, pp 105–121. https://
D14-1179. doi.org/10.1007/978-3-319-48036-7_9.
Cruz A, Luvisi A, Bellis LD, Ampatzidis Y (2017) X-FIDO: An Ren S, He K, Girshick R, Sun J (2017) Faster R-CNN: towards real-
effective application for detecting olive quick decline syndrome time object detection with region proposal networks. IEEE Trans
with deep learning and data fusion. Front Plant Sci 8:1–12. Pattern Anal Mach Intell 39(6):1137–1149. https://doi.org/10.
https://doi.org/10.3389/fpls.2017.01741 1109/TPAMI.2016.2577031
Dai J, Li Y, He K, Sun J (2016) R-FCN: object detection via region- Sharif M, Khan MA, Iqbal Z, Azam MF, Lali MIU, Javed MY (2018)
based fully convolutional networks. In: Proc. 30th Int. Conf. Detection and classification of citrus diseases in agriculture
Neural Information Processing Systems (NIPS’16), pp 379–387. based on optimized weighted segmentation and feature selection.
Dey AK, Sharma M, Meshram MR (2016) Image processing based Comput Electron Agr 150:220–234. https://doi.org/10.1016/j.
leaf rot disease, detection of betel vine (Piper BetleL.). Procedia compag.2018.04.023
Comput Sci 85:748–754. https://doi.org/10.1016/j.procs.2016. Singh J, Kaur H (2019) Plant disease detection based on region-based
05.262 segmentation and KNN classifier. In: Pandian D, Fernando X,
Dyrmann M, Karstoft H, Midtiby HS (2016) Plant species classifi- Baig Z, Shi F (eds) Proceedings of the International Conference
cation using deep convolutional neural network. Biosyst Eng on ISMAC in Computational Vision and Bio-Engineering 2018
151:72–80. https://doi.org/10.1016/j.biosystemseng.2016.08.024 (ISMAC-CVB). Lecture Notes in Computational Vision and
FAO, 2018. Championing an International Year of Plant Healt. Div. Biomechanics, 30. Springer, Cham, pp 1667–1675. https://doi.
Note 1549, Food and Agriculture Organization of the United org/10.1007/978-3-030-00665-5_154
Nations, Rome, Italy. Singh V, Misra AK (2017) Detection of plant leaf diseases using
Ferri C, Hernández-Orallo J, Modroiu R (2009) An experimental image segmentation and soft computing techniques. Inf Process
comparison of performance measures for classification. Pattern Agric 4:41–49. https://doi.org/10.1016/j.inpa.2016.10.005
Recognit Lett 30(1):27–38. https://doi.org/10.1016/j.patrec. Türkoğlu M, Hanbay D (2019) Plant disease and pest detection using
2008.08.010 deep learning-based features. Turk J Electr Eng Comput Sci
Fuentes A, Yoon S, Kim S, Park D (2017) A robust deep-learning- 27:1636–1651. https://doi.org/10.3906/elk-1809-181
based detector for real-time tomato plant diseases and pests

123
13242 R. Alguliyev et al.

Zeiler MD, Fergus R (2013) Stochastic pooling for regularization of Zhu X, Zhu M, Ren H (2018) Method of plant leaf recognition based
deep convolutional neural networks. Proc. Int. Conf. Learning on improved deep convolutional neural network. Cogn Syst Res
Representation (ICLR), pp. 1–9. 52:223–233. https://doi.org/10.1016/j.cogsys.2018.06.008
Zhang S, You Z, Wu X (2019) Plant disease leaf image segmentation
based on superpixel clustering and EM algorithm. Neural Publisher’s Note Springer Nature remains neutral with regard to
Comput Appl 31:1225–1232. https://doi.org/10.1007/s00521- jurisdictional claims in published maps and institutional affiliations.
017-3067-8

123

You might also like