Crop_Disease_Identification_Based_on_Deep_Learning
Crop_Disease_Identification_Based_on_Deep_Learning
Abstract—If a crop has a disease, it will lead to a shape and color characteristics of disease spots, and used
significant decline in crop yield, which will also affect the [1]
sparse representation to classify diseases . Ramcharan
quality of crops, so it is necessary to identify diseases and identified images of cassava pests and diseases collected
treat them in time. Deep learning technology is used to in a field in Tanzania and trained a deep network using
identify diseases, leaf images of 61 crop diseases are used as transfer learning, with a recognition accuracy rate of
research objects, disease features with strong expression
93%[2]. In 2019, Sun Jun improved the convolutional
ability of images are extracted by inception_v3 network
neural network normalized processing convolutional layer,
until the bottleneck layer, stored in the bottleneck layer file,
used as input of the subsequent network layer, the training and the global pooled convolutional network model to
parameters are adjusted, the weight is updated by gradient classify and identify 26 diseases of 14 crops, greatly
descent method, overfitting is alleviated, and the image is improving the accuracy of identification[3]. In 2022, Wang
classified and recognized by softmax. Considering the Zejun et al. proposed a crop disease identification method
practical application, a server for testing crop diseases based on attention mechanism and multi-scale lightweight
based on a training model based on Inception_v3 network network, and the accuracy rate on the test set of 59 types
combined with transfer learning was developed. Integrate of publicly available crop disease images was 88.08%[4].
the front and back ends, load the images to be tested on the
server test page, and the results show the disease category. This paper combines transfer learning and
The experimental results show that the accuracy of inception_v3 convolutional neural network, uses the
Inception_v3 neural network combined with transfer inception_v3 network until the bottleneck layer to extract
learning strategy for identifying crop disease species is the features of the image, and saves the feature vector of
93.90%, and the model has robustness and high the image itself with more compact and stronger
generalization ability, which is of great significance for the expression ability after processing by the bottleneck layer,
study of crop disease identification. and performs layer migration fine-tune on the
experimental dataset, stipulates the parameters on the
Keywords—Crop disease identification, inception_v3 network layer, and fine-tunes the dataset. Using gradient
networks, transfer learning, gradient descent, test servers descent to update the weights in the iterative training
network can effectively alleviate the overfitting
I. INTRODUCTION phenomenon, then identify crop diseases by softmax
Affected by climate warming, environmental pollution classification. The experimental results were extended to
and other factors, the phenomenon of crop diseases and produce practical applications, a server was built on the
pests in the world has intensified significantly in recent Django framework, a disease identification web page
years, crop diseases and pests have led to the reduction of based on the inception_v3 network was developed, and
grain production and the destruction of pastures, seriously the front-end and back-end were set up to realize the
affecting the livelihood of farmers, and posing a non- training of the server calling the model program to
negligible threat to regional food security and social identify disease pictures. This method has been shown to
stability. China is a traditional agricultural country, and be able to accurately identify disease species.
agriculture has gradually changed from traditional
agricultural operation forms to modern agriculture. II. 1EXPERIMENTAL DATA
With the development of science and technology, the A. Image Data
maturity of machine learning related technologies, and the
The dataset used in the experiment is derived from the
increasing intelligence of machine learning and deep
crop disease dataset in the AI Challenger competition. The
learning, it has become possible to use image recognition
dataset contains 47,393 labeled pictures, corresponding to
technology to identify crop diseases and pests.
10 species (apple, cherry, corn, grapes, citrus, peaches,
Researchers at home and abroad use deep learning peppers, potatoes, strawberries, tomatoes), according to
algorithms and neural networks to study crop diseases. the corresponding diseases and degrees of species, the
For example, Zhang S used k-means clustering to segment dataset is divided into 61 categories, 10 healthy
the leaf image of cucumber disease in 2017, extracted the classifications, the total number of diseases corresponding
960
Authorized licensed use limited to: VIT University. Downloaded on September 15,2024 at 10:20:42 UTC from IEEE Xplore. Restrictions apply.
The important parameters involved in Inception_v3 images, input the extracted feature vectors, and connect
network structure are shown in Table 1. the custom fully connected layers to identify the disease
categories.
TABLE I. INCEPTION_V3 THE NETWORK STRUCTURE PARAMETER
TABLE B. Model Training
In this experiment, the Inception-v3 network creates a
Type/Stride Filter Shape/Stride Input Size bottleneck layer feature extractor for feature extraction,
Conv 3×3 / 2 299×299×3 uses gradient descent to optimize the weight parameters in
Conv 3×3 / 1 149×149×32 network training to effectively alleviate the overfitting
Conv 3×3 / 1 147×147×32 phenomenon, and then identifies crop diseases through
MaxPool 3×3 / 2 147×147×64 softmax classification.
Conv 3×3 / 1 73×73×64 During the experiment, the fine-tune method was
Conv 3×3 / 2 71×71×80 performed on the dataset, and the Inception-v3 model was
MaxPool 3×3 / 1 35×35×192 trained first, the parameter sum of the probability vector
Inception Module groups 3Inception Module 35×35×288 of this type of image was obtained, and then the training
Inception Module groups 5Inception Module 17×17×768 data was fine-tuned from the angle that the model
Inception Module groups 3Inception Module 8×8×1080 parameter change was small and the output result
probability vector was very close to suppress overfitting.
Avg Pool 8×8 8×8×2048
The parameters on some network layers in the layer
FC Logits 1×1×2048
migration are specified, and the learning rate is set to very
Softmax Classifier 1×1×1000 little or even 0, and jitter is not allowed to prevent
Inception_v3 network contains three Inception changes[9]. The specific layer migration process is shown
module groups, in the first one, the step size of in Figure 4.
convolution and pooling is set to 1, and the pooling mode
is SAME, which ensures that the size of the image will
not be reduced, and the output size is 35×35 to remain
consistent with the input; In the second module group, set
the step size of convolutional pooling to 2, and the
pooling mode to VALID, so that the size of the image is
compressed to 17×17, and the features of the image are
refined, and the nonlinearization of the network is
improved. The third module group sets the step size of Fig. 4. Layer migration flowchart
convolutional pooling to 2, the pooling mode to VALID,
and compresses the image size to 8×8, so that the output Cross-entropy is used to represent the error between
image tensor is reduced, the amount of computation is the output result and the actual true value, and the
reduced, the network space is simplified, the feature relationship between the two probabilities is depicted[10].
information of more abstract data is extracted, and the The expression formula is formula (2).
expression ability of the network is enriched. The output
of the Inception module group is pooled with an 8×8 (2)
average pooling mode of VALID, so that the output tensor Among them, p represents the correct value, q
size becomes 1×1×2048, connect the Dropout layer and represents the predicted value, and the smaller the value of
1×1 convolution with 1000 output channels, set the cross-entropy, the smaller the distribution of the two
activation function and normalization function to NULL, probabilities, that is, the predicted value is close to the
and then connect a softmax layer to predict and classify correct value.
the test image.
In the experiment, the weights and other parameters in
Delete the last convolutional layer in the original network training are optimized by gradient descent to
structure of the Inception_v3, retain the input of the effectively alleviate the overfitting phenomenon, so that
Inception_v3 network to the bottleneck layer of the the loss function value is minimized to achieve the test
penultimate layer, the image input from the trained result value closer to the actual value. The parameters θ,
convolutional neural network to the bottleneck layer is J(θ) in the neural network are the value of the loss
actually the network extracts features from the image, the function corresponding to the training set given the
output obtained by the bottleneck layer is extracted from parameter θ, and the gradient descent method actually
the image with a feature vector with strong expression looks for the optimal θ so that J(θ) is the smallest. The
ability, and connecting a single-layer fully connected gradient descent algorithm through continuous iteration θ,
network after the bottleneck layer can effectively in order to make the total loss develop towards a smaller
distinguish a variety of types of images. trend, the theta update should follow the opposite
Therefore, when processing crop disease images, the direction of the gradient. The partial derivative of the loss
trained model is used to extract the features of the dataset function represents the gradient of θ, for the gradient of
961
Authorized licensed use limited to: VIT University. Downloaded on September 15,2024 at 10:20:42 UTC from IEEE Xplore. Restrictions apply.
the parameter θ is (∂J(θ))/∂θ, the amplitude change of θ identifying the image under the category, that is, arranged
update is expressed by the learning rate η, and the update from largest to smallest in probability, the first output of
formula of θ can be expressed as formula (3). each image is the result of the model predicting the image
category. In the test results, category 41 is ranked first
(3) with a probability of 0.96335, and the remaining classes
are 46, 6, 0, and the probability is 0.96335>> 0.01393>>
In the experiment, the idea of batch gradient descent 0.00974, 0.96335 is much greater than the probability of
method is adopted, that is, the overall number of iterations other classes, therefore, indicating that the corresponding
of the gradient is reduced by training the loss function in a category 41 is Tomato healthy.
single batch, so that the result convergence is close to
gradient descent. In the experiment, the setting η is 0.01, η
can be set exponentially decay, batch_size 100.
Finally, entering the softmax layer, 61 varieties of
crop diseases were designed, and the number of neurons
was determined to be 61, and the recognition probability
of crop diseases species was finally obtained. The
Softmax function is shown in formula (4).
(a) (b) (c) (d)
(4)
Among which, . Fig. 6. Disease image classification recognition result map
962
Authorized licensed use limited to: VIT University. Downloaded on September 15,2024 at 10:20:42 UTC from IEEE Xplore. Restrictions apply.
配视
图函
数 URL
控制器
until the bottleneck layer, the feature vectors are
调取数据 url匹
Model
输
processed by the bottleneck layer, stored in the bottleneck
调
传递
数据 View.py 入 file of the bottleneck layer, transfer learning and
URL
取
数 Template
访 inception_v3 network are fused, the fine-tune dataset is
据 传递展示数据
html
文件
问
used to fine-tune the parameters of the network layer, the
Database weight is updated by gradient descent method to alleviate
模板 视图 模板 控制器 overfitting, and crop diseases are identified by softmax
classification. Based on the results of the trained model, a
Fig. 7. Django WEB framework flowchart web page under the Django framework is built to detect
disease pictures, and the data contained in the background
The construction of the test server is divided into server is presented to the front end on the network page by
front-end and back-end design, the front-end is mainly to using the fusion of front and back ends, and the
test static pages and pages that recognize the results, the classification results are displayed, which can accurately
back-end is the training and testing of crop disease image identify diseases. The model has high robustness and
recognition based on transfer learning models, and the use strong generalization ability, and can be generalized and
of Python programs to achieve front-end and back-end applied to the identification of other crop disease species.
interaction.
The image to be identified is transmitted on the front- ACKNOWLEDGMENT
end static page, and the test program of the back-end This work was supported by Suzhou Polytechnic
training model recognizes the test picture, feeds the test
Institute of Agriculture Young Teachers Research Ability
results of the image back to the front-end static page, and
Enhancement Program (Grant No.QN[2022]11) and the
displays the recognition content of the loaded picture on
the recognition result interface, including the disease type Doctoral Promotion Program (Grant No.BS[2022]17).
and category name of the measured disease picture. REFERENCES
[1] Zhang S, Wu X, You Z, et al. Leaf image based cucumber disease
B. Test the syestem recognition using sparse representation classification[J].
On the set up server, test pictures to detect whether the Computers and Electronics in Agriculture, 2017, 134:135-141.
server can identify the category of leaf disease. Upload the [2] Amanda R, Kelsee B, Peter M C, et al. Deep Learning for Image-
image to be tested on the initial page, after loading the Based Cassava Disease Detection[J]. Frontiers in Plant Science,
2017, 8.
image, the content of the test picture will be displayed
[3] SUN Jun,TAN Wenjun,WU Xiaohong,et al. Real-time
under Tset, click the test result after loading the picture, identification of sugar beets and weeds in complex background by
and transfer the test picture to the back-end program, the multi-channel depth separable convolutional
back-end will use the structure trained by the inception_v3 model[J].Transactions of the Chinese Society of Agricultural
model to determine the disease category of the picture, Engineering,2019,35(12):184-190.
feedback the judgment result to the recognition result page, [4] WANG Zejun,MA Fengying,ZHANG Yu,et al. Crop disease
display the recognition content of the loaded picture, identification based on attention mechanism and multi-scale
lightweight network[J].Transactions of the Chinese Society of
including the disease type and category name of the Agricultural Engineering,2022,38(S1):176-183.
measured disease picture.The identification results of 57 [5] Bowling S R , Khasawneh M T , Kaewkuekool S ,et al.A logistic
categories of disease pictures are shown in Figure 8. approximation to the cumulative normal distribution[J].Journal of
Industrial Engineering and Management, 2009, 2(1):págs. 114-
127.DOI:10.3926/jiem.2009.v2n1.p114-127.
[6] And H S , Wilman A H .Background field removal using spherical
mean value filtering and Tikhonov regularization[J].Magnetic
Resonance in Medicine, 2014.DOI:10.1002/mrm.24765.
[7] LIN Yu, CHEN Xiaoyong. Research on Road Traffic Sign
Recognition Based on Inception V3 Model[J]. Jiangxi Science,
2018, 36(05):147-150.
[8] SHI Xiangbin, FANG Xuejian, ZHANG Deyuan, et al. Image
Classification Based on Deep Learning Hybrid Model Transfer
Fig. 8. Picture identification result map of disease Learning [J]. Journal of System Simulation, 2016, 28(1):167-173.
[9] LEI Shengyuan, MA Benxue, WANG Wenxia, et al. Recognition
Using the system to detect disease categories, for the of images of damaged cotton leaves under transfer learning mode
category 57 image, the server can accurately detect its based on fine-tuned convolutional neural network[J].Xinjiang
disease category, the page shows the disease category and Agricultural Sciences,2019,56(07):1288-1295.)
the name corresponding to the category Tomato Spider [10] XUE Jinghao, ZHANG Yujin, LIN Xinggang. Cross-entropy and
Mite Damage serious. fuzzy divergence algorithm in image segmentation[J]. Acta
Electronic Sinica, 1999(10):132-135.
V. CONCLUSION
In this paper, the inception_v3 network is used to
extract the features of the leaf images of crop diseases
963
Authorized licensed use limited to: VIT University. Downloaded on September 15,2024 at 10:20:42 UTC from IEEE Xplore. Restrictions apply.