0% found this document useful (0 votes)
12 views13 pages

Se Rice

This document presents a deep learning approach for detecting rice leaf diseases using EfficientNet, achieving 95% validation accuracy on a dataset of 1790 images. An Android application was developed to facilitate mobile detection and treatment recommendations, taking approximately 1.7 seconds per image. The model can classify five types of images, including three common rice diseases, healthy leaves, and other plants, providing a practical solution for farmers in Vietnam.

Uploaded by

Destia Suhada
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)
12 views13 pages

Se Rice

This document presents a deep learning approach for detecting rice leaf diseases using EfficientNet, achieving 95% validation accuracy on a dataset of 1790 images. An Android application was developed to facilitate mobile detection and treatment recommendations, taking approximately 1.7 seconds per image. The model can classify five types of images, including three common rice diseases, healthy leaves, and other plants, providing a practical solution for farmers in Vietnam.

Uploaded by

Destia Suhada
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

See discussions, stats, and author profiles for this publication at: [Link]

net/publication/360705531

Deep Learning for Rice Leaf Disease Detection in Smart Agriculture

Chapter · May 2022


DOI: 10.1007/978-3-030-97610-1_52

CITATIONS READS

20 785

3 authors, including:

Nguyen Thai-Nghe
Can Tho University
138 PUBLICATIONS 2,119 CITATIONS

SEE PROFILE

All content following this page was uploaded by Nguyen Thai-Nghe on 15 October 2022.

The user has requested enhancement of the downloaded file.


Deep Learning for Rice Leaf Disease
Detection in Smart Agriculture

Nguyen Thai-Nghe, Ngo Thanh Tri, and Nguyen Huu Hoa

Abstract Vietnam is a country that has the advantage in agriculture, especially


rice. Rice is one of the primary food grains which provides sustenance to almost fifty
percent of the world population and promotes a huge amount of employment. Hence,
detection and prevention of diseases on rice are very important to help enhance rice
production. This work proposes an approach for rice leaf disease detection on mobile
devices using deep learning technique. Specifically, it proposes using EfficientNet
which is a variant in deep learning networks for classification. This approach also
utilizes the pre-trained model on imageNet for transfer learning. The proposed model
can detect five types of images including three common types of diseases on rice
leaf (e.g., brown spot, hispa, and leaf blast), healthy rice leaf, and other leaves. The
model was trained on 1790 images and produced 95% validation accuracy. Finally,
this model was converted to tflite format for running on mobiles or IoT devices.
An Android application was built for rice leaf disease detection using the proposed
model. When applying in practice on a mobile device, it took about 1.7 s for detecting
and providing a treatment solution for a disease, thus this could be a useful solution
to help the farmers.

Keywords Rice leaf disease detection · Smart agriculture · Deep learning ·


EffcientNet

N. Thai-Nghe (B) · N. T. Tri · N. H. Hoa


Can Tho University, 3/2 street, Ninh Kieu District, Can Tho City, Vietnam
e-mail: ntnghe@[Link]
N. T. Tri
e-mail: trib1707000@[Link]
N. H. Hoa
e-mail: nhhoa@[Link]

© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 659
N. H. T. Dang et al. (eds.), Artificial Intelligence in Data and Big Data Processing,
Lecture Notes on Data Engineering and Communications Technologies 124,
[Link]
660 N. Thai-Nghe et al.

1 Introduction

Rice is one of the world’s most significant food. It is a staple meal for more than 4
billion people throughout the world, providing 27% of calories in low- and middle-
income nations.1 Vietnam has about 1.51 million hectares of rice producing about
11 rice tons.2 Rice is one of the primary food grains which provides sustenance to
almost fifty percent of the Vietnamese population and promotes huge amount of
employment.
The climate changes and global warming have affected to agriculture field, espe-
cially the rice. Many rice diseases such as brown spot, hispa, and leaf blast cause
reducing both quality and quantity of rice production and collection. For example, in
Southeast Asia, the diseases cause more than 10% yield loss on average throughout
entire lowland rice cultivation. A severely diseased field might lose up to 45% of its
output.3 Thus, how to apply advanced technologies to help the farmers is necessary.
This work proposes an approach for rice leaf disease detection on a mobile applica-
tion using deep learning. Specifically, it proposes using EfficientNet [1], an approach
in deep learning networks, for disease classification. This work also utilizes the pre-
trained model on imageNet for transfer learning. The proposed model can detect five
types of images including three common types of diseases on rice leaf (e.g., brown
spot, hispa, and leaf blast), healthy rice leaf and other leaves. After building, training,
and testing the model, it was converted to tflite4 format for running on mobiles or
IoT devices. Finally, an Android application was built for rice leaf disease detection
using the trained model.

2 Related Works

There are several works in rice leaf detection using different techniques such as image
segmentation, feature extraction, feature selection and machine or deep learning for
classification [2]. In [3], the authors applied AlexNet [4] technique to detect the three
prevalence rice leaf diseases termed as bacterial blight, brown spot as well as leaf
smut and got about 95% accuracy due to adjusting an efficient technique and image
augmentation.
The authors in [5] were developed ensemble model for classifying six types of
rice diseases: leaf blast, false smut, neck blast, sheath blight, bacterial stripe disease,
and brown spot. Results showed that overall accuracy of 91% was achieved. The
smartphone app was developed based on the above model. Other works can be found
in [2, 6–7].

1 [Link]
2 [Link]
3 [Link]

spot.
4 [Link]
Deep Learning for Rice Leaf Disease … 661

In this work, the proposed model uses EfficientNet [1] for rice leaf disease clas-
sification. After building, training, and testing the model, it was deployed on mobile
device applications.

3 Proposed Method

In this part, first, the datasets are collected and pre-processed. Then, the classification
model was built based on the EfficientNet [1]. Next, this model was evaluated and
compared with other baselines. Finally, an Android application was developed to
deploy the classification model.

3.1 Datasets for Experiments

The datasets have been collected from both manual and public sources.5 The raw
data has several problems such as wrong labels, multiple diseases on a leaf. Thus,
we have pre-processed normalized these data. Each of the images was resized to 300
× 300 pixels as input for deep learning model. After pre-processing, the dataset has
1790 files for five classes as presented in Fig. 1. These data include healthy leaf (346
files), hispa disease (429 files), brown spot disease (345 files), leaf blast disease (337
files), and others (333 files, e.g., grass, other kinds are not the rice leaf). We use 60%
for training and 40% for testing as presented in Table 1.

3.2 Classification Model

The proposed model is based on EffcientNet B3 [1] as presented in Fig. 2. This is


a variant of Convolutional Neural Networks which has 384 layers and 10,783,535
parameters. The input shape used for this network is 300 × 300 × 3 to fix with the
input images pixels. The main building block of this network consists of MBConv
[10] to which squeeze-and-excitation optimization [9] is added.
In this model, BN denotes for the Batch Normalization and Swish is an activation
function that takes the form f(x) = x * sigmoid (βx), where β is a learnable parameter.
Swish exhibits one-sided boundedness at zero, smoothness, and non-monotonicity.
Models and hyperparameters generated for ReLU were simply replaced with this
Swish activation functions [8].
MBConv denotes for Mobile Inverted Residual Bottleneck. To develop even more
efficient layer structures, MobileNetV2 [10] introduced the linear bottleneck and

5 [Link]
662 N. Thai-Nghe et al.

b. Healthy sample
a. Brown spot sample

d. Hispa sample c. Leaf blast sample

… …
e. other samples

Fig. 1 Samples of images: three rice leaf diseases, healthy leaf and others

Table 1 The ratio of


Class #Training images #Testing images
training/testing data
Brown spot 214 131
Healthy 201 145
Hispa 266 163
Leaf blast 204 133
Others 189 144

inverted residual structure. A 1 × 1 expansion convolution is followed by depth-


wise convolutions and a 1 × 1 projection layer to define this structure. If and only
if the input and output have the same number of channels, they are connected using
a residual connection. The MBConv in EfficientNet [11] looks like MobilenetV3
Deep Learning for Rice Leaf Disease … 663

Fig. 2 Architecture of the


proposed model based on
effcientNet B3 [1]

and is presented in Fig. 3, which is a combination of MobileNetV2 and SQUEEZE-


AND-EXCITATION BLOCK [9] (SE block) to build the effective models. Layers
are also upgraded with modified swish nonlinearities.
The IRC denotes Inverted Residual Connection. The Squeeze and Excitation (SE)
is a block that aims to improve the quality of representations produced by a network
by explicitly modeling the interdependencies between its convolutional features’
channels. It has global information access and can re-calibrate filter responses in two

Fig. 3 MBConv architecture [11]


664 N. Thai-Nghe et al.

a. Training and validation loss b. Training and validation accuracy

Fig. 4 Loss and accuracy during training and validation

processes, squeezing and excitation, before feeding them into the next transformation
[9].

4 Experimental Results

The model was trained on Google Colab using Keras library.6 The model parameters
are set as (optimizer = ‘Adam’, learning_rate = 0.001, epochs = 50, batchsize =
32 and image_dims = (300, 300, 3)). After training the model, it was evaluated and
compared with other baselines. This model was then converted to tflite7 format so
that it can be run on mobile or IoT devices. Finally, an Android application was built
for rice leaf disease detection using the pre-trained model. For evaluating the model,
this work uses the Precision, Recall, F-Measure and Accuracy.

5 Model Validation

Figure 4 presents the loss function and accuracy values during training and validation
phases. After 40 epochs, the model becomes stable and reaches more than 95%. The
model accuracy is high during training and validation phases and it does not suffer
from the problem of overfitting.

6 [Link]
7 [Link]
Deep Learning for Rice Leaf Disease … 665

5.1 Results of Classification

The proposed method is compared with other baselines such as Support Vector
Machines (SVM) and the Decision Tree to check whether the deep learning approach
can give better results for developing applications in the next stage. The dataset is
divided into 60% for training and 40% for testing. Figure 5 presents the classification
results of the proposed model on the test set. Results show that the average precision
of the model is higher than 95%.
Figures 6 and 7 show the classification results of the SVM and Decision Tree.
These models were trained using the HOG features which are supported in the sklearn

Fig. 5 Classification results of the efficientNet

Fig. 6 Classification results of the SVM


666 N. Thai-Nghe et al.

Fig. 7 Classification results of the decision tree

and skimage libraries. Results are not good as expected. The Healthy and LeafBlast
classes are almost misclassified by both models.
Figure 8 presents the confusion matrix of the EffcientNet model. The values on
the diagonal of this matrix are very high (more than 95% on average), this means that
the model performance is really good. Figure 9 presents the comparisons between
the three models. These results show that the proposed model, which uses the deep
learning—EfficientNet approach, has the best performance. Thus, it is selected for
integrating to the mobile application for rice leaf disease detection.

5.2 Building Mobile Application

After selecting the prediction model, we have converted the model to tflite format so
that it can be run on mobiles and IoT devices. This application will be transferred
to the farmers, who mostly use Android mobiles, thus, this work has developed
an Android application with Google Firebase as a real-time database. The system
interfaces are demonstrated in Fig. 10.
In this system, the users can load images from the photo library or directly capture
images from the camera. After loading the image, the system checks it is a rice leaf
or not (as in Fig. 11), then, the system classifies what kind of disease and shows the
reasons as well as treatment solutions for this kind of disease.
When applying in practice on a mobile device, it took about 1.7 s for detecting
and providing treatment solutions for a rice leaf image. Thus, using this system, the
farmers can detect the types of diseases and get recommendations from the system
for a better production plan.
Deep Learning for Rice Leaf Disease … 667

Fig. 8 Confusion matrix of the proposed model

Fig. 9 Evaluation comparison between the models


668 N. Thai-Nghe et al.

a. Predict from camera b. Disease reason and way of treatment

Fig. 10 Snapshots of rice leaf disease detection using smart phones

6 Conclusion

This work proposes an approach for rice leaf disease detection on mobile devices
using deep learning technique. Specifically, it proposes using EfficientNet which is
a variant in deep learning networks for classification. This approach also utilizes the
pre-trained model on imageNet for transfer learning. The proposed model can detect
five types of images including three common types of diseases on rice leaves in
Vietnam (e.g., brown spot, hispa, and leaf blast diseases). Two other classes are also
included such as healthy rice leaf and other leaves (grass, plant, etc.). The model was
trained on 1790 images and produced 95% of accuracy. This model was converted
to tflite format for running on mobile or IoT devices. Finally, an Android application
was built for rice leaf disease detection using the pre-trained model. When applying
in practice on a mobile device, it took about 1.7 s for detecting and providing a
treatment solution for a disease, thus this could be a useful solution to help the
farmers.
This work continues to improve by collecting more data (both the numbers of
images for each disease and other kinds of rice diseases) to re-train the models as
well as to compare with other deep learning approaches. Moreover, the application
will be developed for multi-platforms so that it can be run on iOS devices.
Deep Learning for Rice Leaf Disease … 669

Fig. 11 Checking whether an image is rice leaf

References

1. Tan M, Le QV (2019) EfficientNet: rethinking model scaling for convolutional neural networks.
ArXiv, abs/1905.11946
2. Sethy PK, Barpanda NK, Rath AK, Behera SK (2020) Image processing techniques for
diagnosing rice plant disease: a survey. Proc Comput Sci 167:516–530
3. Matin M, Khatun A, Moazzam M, Uddin M (2020) An efficient disease detection technique of
rice leaf using alexNet. J Comput Commun 8:49–57. [Link]
4. Krizhevsky A, Sutskever I, Hinton GE (2012) ImageNet classification with deep convolutional
neural networks. Commun ACM 60:84–90
5. Deng R, Tao M, Xing H, Yang X, Liu C, Liao K, Qi L (2021) Automatic diagnosis of rice
diseases using deep learning. Front Plant Sci 12:701038. [Link]
701038
6. Bera T, Das A, Sil J, Das AK (2019) A survey on rice plant disease identification using image
processing and data mining techniques. In: Abraham A, Dutta P, Mandal J, Bhattacharya
A, Dutta S (eds) Emerging technologies in data mining and information security. Advances
in Intelligent Systems and Computing, vol 814. Springer, Singapore. [Link]
978-981-13-1501-5_31
7. Hong Son N, Thai-Nghe N (2019) Deep learning for rice quality classification. In: 2019 inter-
national conference on advanced computing and applications (ACOMP), pp 92–96. [Link]
org/10.1109/ACOMP.2019.00021
8. Ramachandran P, Zoph B, Le QV (2017) Swish: a self-gated activation function. arXiv: Neural
and Evolutionary Computing
9. Hu J, Shen L, Sun G (2018) Squeeze-and-excitation networks. IEEE/CVF Conf Comput Vision
Pattern Recogn 2018:7132–7141. [Link]
670 N. Thai-Nghe et al.

10. Sandler M, Howard AG, Zhu M, Zhmoginov A, Chen L (2018) MobileNetV2: inverted resid-
uals and linear bottlenecks. In: 2018 IEEE/CVF conference on computer vision and pattern
recognition, pp 4510–4520
11. Howard AG, Sandler M, Chu G, Chen L, Chen B, Tan M, Wang W, Zhu Y, Pang R, Vasudevan
V, Le QV, Adam H (2019) Searching for mobileNetV3. In: 2019 IEEE/CVF international
conference on computer vision (ICCV), pp 1314–1324
12. Alhichri HS, Alswayed AS, Bazi Y, Ammour N, Alajlan NA (2021) Classification of remote
sensing images using efficientNet-B3 CNN model with attention. IEEE Access 9:14078–14094

View publication stats

You might also like