You are on page 1of 30

CASSAVA LEAF DISEASE DETECTION USING DEEP LEARNING

ATTAH FRANCIS JULIUS


201123030
Nile University of Nigeria, Abuja

COMPUTER SCIENCE

February 2022

1
Abstract
Its goal is to create and train machine learning model for cassava disease detection and
classification utilizing five fine-grained cassava leaf disease categories. Cassava Bacterial Blight
(CBB), Cassava Brown Streak Disease (CBSD), Cassava Green Mottle (CGM), Cassava Mosaic
Disease (CMD), and Healthy are the five categories in which the leaf images fall. Traditionally,
this detection is been done by farmers or agricultural extension workers by physically inspecting
and supervising cassava plants on the farm. However, this is time-consuming, costly, and lacks
the ability to detect cassava infection quickly enough for farmers to apply preventive measures to
the non-infectious cassava plants in order to improve on yields. Using the dataset provided we will
train CNN (Convolutional Neural Network) to do that.

2
Table of Contents
Abstract ......................................................................................................................................................... 2
Table of Contents .......................................................................................................................................... 3
Chapter one .................................................................................................................................................. 5
Introduction .............................................................................................................................................. 5
Statement of the problem ........................................................................................................................ 6
Purpose of the study ................................................................................................................................. 7
Objective ................................................................................................................................................... 7
Literature and related works ........................................................................................................................ 8
Disease classifications ............................................................................................................................... 8
2.1. CGM (cassava green mite) ............................................................................................................. 8
2.2. CBSD ............................................................................................................................................... 8
2.3. CMD................................................................................................................................................ 8
2.4. CBB (cassava bacterial blight) ........................................................................................................ 8
Related Work ............................................................................................................................................ 8
Methodology............................................................................................................................................... 12
Exploratory Data Analysis ....................................................................................................................... 12
Missing Values..................................................................................................................................... 12
Dataset ................................................................................................................................................ 13
Each Class's Images ............................................................................................................................. 13
Augmentation of images ......................................................................................................................... 14
Shifts at Random ................................................................................................................................. 14
Convolutional neural networks............................................................................................................... 14
CNN architectures Used .......................................................................................................................... 15
ResNet-50............................................................................................................................................ 15
Transfer Learning .................................................................................................................................... 16
Hyperparameter Tuning.......................................................................................................................... 17
Metrics for evaluation............................................................................................................................. 17
Results and Discussion ................................................................................................................................ 18
Training result ......................................................................................................................................... 18
Test set prediction/classification ............................................................................................................ 20

3
Android Application Developed .............................................................................................................. 22
Potential Improvements and conclusion .................................................................................................... 27
Improvements : ....................................................................................................................................... 27
Conclusion ............................................................................................................................................... 27
References .................................................................................................................................................. 28

4
Chapter one

Introduction
Although the cassava plant is known for its toughness and capacity to tolerate harsh weather
conditions, disease outbreaks frequently jeopardize crop output and pose a serious threat to farmers
who grow it. While many farmers in Sub-Saharan Africa plant this root, few are equipped to
recognize and manage the disastrous impacts of disease outbreaks, which they are frequently
confronted with. Because leaves are an important element of the plant and serve as a location for
photosynthesis, diseased leaves will have an impact on crop output. The photosynthetic results are
transported to all other sections of the plant through the phloem tissue. The growth of the stems
and tubers is also ideal if the plant's leaves are healthy, and the photosynthetic process is carried
out correctly. When disease attacks the leaves and disrupts the photosynthetic process, the growth
of stems and tubers is also disrupted, resulting in low-quality crop yields.

It is critical to bring technological advancement in the fields of crop productivity to countries like
Nigeria. In the important domain of qualitative farming, research initiatives and a tentative study
process are aimed at improving yield and food crop quality at a low cost, with a higher monetary
outcome. The agricultural building model is based on a complex interlinking of soil with seeds, as
well as chemicals used to boost growth.

Cassava is one of the most important agricultural products currently available. A product value
examination and improvement has always been an important requirement in order to obtain surplus
and effective worthy products. Diseases are impairments to a plant's normal state that translates or
hinders important functions such as transpiration, photosynthesis, fertilization, pollination,
germination, and so on. They are caused by pathogens such as fungi, bacteria, and viruses, and are
spread by pathogens such as fungi, bacteria, and viruses in unfavorable environmental conditions.
As a result, the preliminary stage of diagnosing plant disease is a major undertaking. Farmers
require professional monitoring on a regular basis, which can be prohibitively expensive and time
consuming. As a result, finding quick, less expensive, and more precise ways to intelligently detect
diseases from indicators that appear to be on the plant leaf is critical. In our research, we propose
a system that can be used to identify the specific disease that a cassava leaf may be suffering from.
It is of major concern to identify the type of disease that an important plant such as cassava can
have by implementing upbringing technologies such as image recognition, which visually
represent the application's functioning and is also a major reason for the widespread adoption of
digital technologies.

In the field of machine vision, detecting plant diseases and pests is a critical research topic. It is a
technology that uses machine vision equipment to acquire images in order to determine whether
the collected plant images contain diseases or pests [1]. Machine vision-based plant disease and

5
pest detection equipment has been used in agriculture for some time and has partially replaced
traditional naked eye identification.

Conventional image processing algorithms or manual feature design plus classifiers are frequently
used for traditional machine vision-based plant disease and pest detection methods [2]. This
method typically employs the various properties of plant diseases and pests to design the imaging
scheme and selects an appropriate light source and shooting angle, resulting in images with
uniform illumination. While carefully constructed imaging schemes can greatly reduce the
difficulty of designing traditional algorithms, they also increase the cost of application. At the
same time, it is often unrealistic to expect traditional algorithms to completely eliminate the impact
of scene changes on recognition results in a natural environment [3]. Plant diseases and pests
detection in a real complex natural environment is complicated by factors such as a small
difference between the lesion area and the background, low contrast, large variations in the scale
of the lesion area and different types, and a lot of noise in the lesion image. There are also a lot of
distractions when collecting images of plant diseases and pests in natural light. Traditional
classical methods often appear helpless at this time, and better detection results are difficult to
achieve.

With the successful application of a deep learning model represented by a convolutional neural
network (CNN) in many fields of computer vision (CV, computer-vision), such as traffic detection
[4], medical image recognition [5], scenario text detection [6], expression recognition [7], face
recognition [8,] and so on in recent years, many fields of computer vision (CV, computer-vision)
have sprung up. In the field of agriculture, many people and technological groups are working to
increase yield and throughput. Various techniques have been used in the past to solve problems
related to disease spread in cassava plants. Cassava plant disease detection has become easier and
more precise as technology has advanced. Several deep learning-based plant disease and pest
detection methods are used in real-world agriculture, and some domestic and international
companies have developed a variety of deep learning-based plant disease and pest detection. As a
result, a deep learning-based detection method for plant diseases and pests not only has important
academic research value, but also has a wide market application potential.

Statement of the problem


Early detection in the field is a critical initial step in managing the detection and spread of cassava
diseases. At the moment, farmers must engage with agricultural professionals to evaluate their
plants in person in order to determine whether they are diseased. Unfortunately, this technique is
incredibly labor expensive, slow, and inefficient, putting farmers at increased risk of losing
significant amounts of their yield if an outbreak occurs among their plants. Because traditional
plant disease diagnosis by human experts is time-consuming, capital-intensive, and unable to
detect cassava infection in a timely manner, we need better-automated ways that can aid farmers
in early detection and prevention of cassava diseases.

6
Purpose of the study
The rate of cassava production is critical to a country's economic development. Cassava diseases,
on the other hand, are the most significant impediment to production and quality. Cassava disease
detection at an early stage is critical for global health and well-being of the plant. A pathologist
visually assesses an individual cassava during on-site visits in the traditional diagnosis process,
this method is limited due to lower accuracy and limited human resources. To address these issues,
it is necessary to develop automated methods for detecting and categorizing a variety of cassava
diseases. SVM (support vector machine), random forest, KNN (k-nearest neighbor), Nave Bayes,
decision tree, and other machine learning methods have been used to recognize, discover, and
categorize cassava diseases; however, the advancement of machine learning by DL (deep learning)
is said to have tremendous potential in improving accuracy.

Objective
The objectives of this work are

1. To train a performing CNN-based cassava leaf disease detection model for an early and
reliable detection of cassava leaf disease to assist in the rapid treatment planning.
2. Improvement in CNNs performance by applying data augmentation techniques on cassava
leaf images .
3. Evaluation of the power of CNNs by classifying totally unseen data, consisting of fifty
latest cassava leaf datasets.
4. Validate and evaluate the performance of the model.
5. Producing up to 90% accuracy by the trained CNN models.

7
Literature and related works

Disease classifications
2.1. CGM (cassava green mite)
White patches appear on the leaves as a result of this bug. It begins as tiny spots that spread to
cover the entire leaf surface, resulting in chlorophyll loss and hence a reduction in photosynthesis.
The leaves afflicted by severe CGM dry up, shrivel, and break away from the plant, causing
mottling signs that can be readily mistaken with cassava mosaic.

2.2. CBSD
Whiteflies are the vectors that spread the disease. Symptoms include a distinctive vein yellow that
occasionally enlarges and develops seemingly big yellow patches. CBSD also causes dark-brown
necrotic regions on the tuber root, as well as a decrease in root size.

2.3. CMD
Mottling, mosaic rust, twisted leaves, and a general reduction in the size of leaves, as well as the
afflicted plants, are common foliar signs. Spots of green are constantly blended in with the various
colors of yellow and white patches on leaves. The patches restrict photosynthetic surface area,
leading in stunted growth and low yield.

2.4. CBB (cassava bacterial blight)


Moisture causes this bacterial disease. Cassava plants in damp locations are hence the most
vulnerable. Black leaf patches and blights are the symptoms. As a result of withering, the afflicted
leaves dry out early and shed.

Related Work
We've done a critical analysis of the work from the literature that's been used to identify and
classify plant diseases in this section.

Le et al. [9] proposed a method for detecting and classifying diseases that affect crops and weeds.
To remove the noise from the input images, morphological opening and closing operations were
used at first. The features from the processed sample were then computed using a customized
framework called filtered local binary pattern method with contour mask and coefficient k (k-
FLBPCM). The SVM classifier was trained to categorize several plant diseases using the extracted
features. The technique in [9] has a higher accuracy in classifying plant diseases, but it may not
perform well on samples with perspective distortions. A framework for locating and classifying
plant diseases was proposed by Ahmad et al. [10]. To compute the keypoints, Directional Local
Quinary Patterns (DLQP) were applied to the input image in the first step. The plant disease
classification results were then obtained by training the SVM classifier on computed key points.

8
This method [10] improves plant disease recognition accuracy, but it can be improved even more
by using the input sample's shape and color-based information. Sun et al. [11] proposed a system
for identifying and categorizing tea plant diseases. The Harris method was used to extract the
significant key points after the Simple Linear Iterative Cluster (SLIC) was used to convert an input
sample into blocks. The convex hull approach was used to obtain the fuzzy salient region contour,
and the Gray Level Co-occurrence Matrix (GLCM) approach was used to extract keypoints, which
were used to train the SVM classifier to classify tea plant leaf diseases. Although the method in
[11] has a higher classification accuracy, it has a high computational cost. Pantazi et al. [12]
proposed a method for identifying and classifying different plant diseases. To perform
segmentation, the GrabCut method was first applied to the input image. After that, the segmented
sample was subjected to the HSV transform. Following that, LBP was used to compute the features
from the obtained ROIs, which were then used to train the class SVM classifier. This method [12]
is effective for classifying plant diseases, but it has poor detection accuracy for noisy samples.
Similarly, a hand-coded feature extraction-based approach for plant disease identification and
classification was presented in [13]. The input samples were resized in the first step, and the
histogram equalization (HE) method was applied to them to improve the visual quality of the
images. The segmentation was then carried out using the K-means clustering method on the
processed samples. To compute the features, GLCM and LBP descriptors were applied over the
segmented regions in the next phase. To perform the plant disease classification, the SVM
classifier was trained on the calculated key points in the final step. The method described in [13]
has a higher classification accuracy, but the results are only for a small dataset. Ramesh et al. [14]
proposed a method for classifying plant diseases. The Random Forest (RF) classifier was trained
using these features to classify the samples into healthy and diseased categories using Histogram
of Oriented Gradients (HOGs) features. The method [14] is robust in terms of plant disease
classification, but its performance could be better. Kuricheti et al. [15] proposed a classification
system for turmeric leaf diseases. After preprocessing, the K-means algorithm was used to perform
image segmentation on the input image. After that, the GLCM approach was used to extract
features, and the SVM classifier was trained to perform the leaves classification. Although this
method [15] produces better plant disease classification results, it is unable to perform better on
samples with large brightness variations. From the ML-based approaches discussed above, it can
be concluded that these works are simple to implement, but they require a large amount of training
data and are highly reliant on human expertise. Furthermore, these methods are not resistant to the
wide range of sizes, colors, and shapes of leaf plant diseases. As a result, a more robust approach
incorporating the most recent approaches is required to improve the recognition accuracy of
several Plant leaf diseases [16, 17].

Because of their high recall rate, DL approaches have recently been heavily investigated in a
number of automated applications [18]. Argüesoa et al. [19] presented a DL-based method for
detecting and classifying plant disease called Few-Shot Learning (FSL). To begin, the key points
were calculated using the Inception V3 framework. The extracted features were then fed into a
multiclass support vector machine (SVM). This method [19] is robust to plant disease

9
classification; however, the results are based on a small dataset and must be evaluated on a large-
scale and diverse corpus. To localize and categorize the tomato crop disease, Agarwal et al. [20]
proposed a CNN-based architecture. To extract the key points from the input samples and
categorize them, this method [20] used three convolutions and max-pooling layers. This approach
[15] has a higher accuracy in classifying tomato diseases, but it suffers from the problem of over-
fitting over a small number of classes. Richey et al. [21] developed a technique for detecting and
classifying maize crop disease using a mobile app. For computing the deep key points from the
input images and classifying them into respective classes, a DL-based model called ResNet50 was
trained over the ImageNet database. Although the method in [21] provides a mobile phone-based
solution to crop disease classification, it is computationally complex and not well suited for
cellphones due to memory, processor, and battery power limitations. Zhang et al. [22] proposed a
new DL-based classification system for tomato crop diseases. Researchers presented a custom
Faster-RCNN approach in which the deep residual framework was used to extract features rather
than the VGG16 model in [22]. Furthermore, the bounding boxes were grouped using the k-means
clustering method. However, the method [22] produces better results in terms of tomato crop
disease classification at the expense of increased economic burden. Batool et al. [23] proposed a
method for early detection and classification of tomato leaf disease. The AlexNet framework was
used in the first stage to extract deep key points from the input sample, which were then used to
train the KNN to classify the images as healthy or affected. Although this method [23] improves
classification accuracy, KNN is a slow and time-consuming algorithm. Goncharov et al. [24]
proposed a DL-based model for classifying diseases in different crops such as wheat and corn. The
deep features that were later used to train the KNN for image categorization were computed using
a deep Siamese network. The framework in [24] is effective at detecting plant diseases, but it
suffers from over-fitting when applied to a large dataset. A DL-based approach to detect disease
in tomato leaves was presented by Karthik et al. [25]. The deep features on input samples were
computed using a residual network in [25]. Then, to classify the healthy and affected leaves, a
CNN classifier was trained to compute key points. This method [25] has a higher accuracy in
classifying leaves diseases, but it is inefficient in terms of cost. To localize and categorize tomato
leaf diseases, TM et al. [26] proposed a DL-based framework. Before being used for further
processing, the input samples were resized. The points were then extracted and the samples were
classified into healthy and affected classes using a DL model called LeNet. [26] proposes a low-
cost solution for tomato crop disease classification, but it is unable to demonstrate robust
performance for noisy samples. To classify tomato plant leaf diseases, Sembiring et al. [27]
proposed a solution. The deep features of suspected samples were computed and classified into
ten different classes using a lightweight CNN framework with four layers. Although this work [27]
is computationally efficient, it performs poorly in real-world scenarios. Turkoglu et al. proposed
an ensemble technique in which the deep keypoints of several plants were computed using several
DL-based models, including AlexNet, GoogleNet, DenseNet201, ResNet50, and ResNet101
frameworks. The computed features were then used for SVM training to categorize a variety of

10
plant diseases. However, the approach [28] achieves better plant leaf classification performance at
the cost of increased feature computation time.

Based on the analysis of existing methods for crop disease detection presented above, it is clear
that there is still room for improvement in terms of classification performance and time
complexity.

11
Methodology

The dataset includes 9866 images in the training set and approximately 1766 images in the test set.
The dataset is divided into five Cassava Leaf Diseases categories, as shown below:

Table 1: Cassava Leaf Diseases Labels

Exploratory Data Analysis

Missing Values
It's clear that there's no need to handle missing values after looking at the fraction of missing values
in each variable and the fraction of points with missing values.

Table 2: Missing Value Information

12
Dataset
The dataset contains 11,632 labeled images. The images are collected from a survey in Uganda
and a farm in Nasarawa State

Figure 1: Cassava Leaf Diseases Frequency Bar Plot

Each Class's Images


Let's look at different classes of Cassava Leaf Diseases by picking some images at random.

Figure 2: Cassava Leaf Diseases of Each Class

13
Augmentation of images
In image classification projects, image augmentation is a crucial technique. This technique allows
us to perform various image transformations in order to expand original datasets, reduce overhead
memory, and improve model robustness.

Shifts at Random
One augmentation method for changing the positions of objects in images is image shift. One
possible reason for doing so is that the object may not always be visible in the center of an image.
It's possible to see how shifts work in this image by looking at the diagram below.

Figure 3: Shifts at Random

Convolutional neural networks


The CNN algorithm is the most well-known and widely used in the field of deep learning. The
main advantage of CNN over its predecessors is that it automatically detects relevant features
without the need for human intervention. CNNs have been widely used in a variety of fields,
including computer vision [35], speech processing [36], and facial recognition [37]. Similar to a
traditional neural network, the structure of CNNs was inspired by neurons in human and animal
brains. A complex sequence of cells forms the visual cortex in a cat's brain, and this sequence is
simulated by the CNN [38]. Three key benefits of the CNN were identified by Goodfellow et al.
[39]: equivalent representations, sparse interactions, and parameter sharing. Unlike conventional
fully connected (FC) networks, the CNN uses shared weights and local connections to fully exploit
2D input-data structures such as image signals. This operation uses a small number of parameters,
simplifying the training process while also speeding up the network. This is the same as in the cells

14
of the visual cortex. Notably, these cells detect only small portions of a scene rather than the entire
scene (i.e., these cells spatially extract the local correlation available in the input, like local filters
over the input).

A common type of CNN, similar to the multi-layer perceptron (MLP), has numerous convolution
layers preceding sub-sampling (pooling) layers, with FC layers as the final layers.

Each layer's input x is organized in three dimensions in a CNN model: height, width, and depth,
or m × m × r, where the height (m) is equal to the width. The channel number is another name for
the depth. The depth (r) of an RGB image, for example, is three. Each convolutional layer has
several kernels (filters) that are denoted by k and have three dimensions (n ×n × q), similar to the
input image; however, n must be smaller than m, and q must be equal to or smaller than r.
Furthermore, the kernels serve as the foundation for the local connections, which use the same
parameters (bias bk and weight Wk) to generate k feature maps hk, each with a size of (m – n -1)
and are convolved with input as previously mentioned. As shown in Eq. 1, the convolution layer
calculates a dot product between its input and weights. The inputs are undersized areas of the initial
image size, similar to NLP. Following that, we obtain the following results by applying
nonlinearity or an activation function to the convolution-layer output:

hk = f(Wk ∗ x + bk) (1)

Next, each feature map in the sub-sampling layers is down-sampled. This results in a decrease in
network parameters, which speeds up the training process and allows for the resolution of the
overfitting problem. The pooling function (e.g., max or average) is applied to an adjacent area of
size p * p , where p is the kernel size, for all feature maps. Finally, as in a typical neural network,
the FC layers receive the mid- and low-level features and create the high-level abstraction, which
represents the last-stage layers. The final layer [e.g., support vector machines (SVMs) or softmax]
is used to generate classification scores. Every score represents the probability of a specific class
for a given instance.

CNN architectures Used


Several CNN architectures have been proposed in the last ten years. The architecture of a model
is an important factor in improving the performance of various applications. From 1989 to the
present, various modifications to CNN architecture have been made. Structure reformulation,
regularization, parameter optimizations, and other changes are examples of such changes. We used
ResNet-50.

ResNet-50
ResNet-50 is a 50-layer convolutional neural network. Its architecture can be divided into four
stages as shown in the diagram below. A convolutional layer and max-pooling are used to begin.
Stage 1 begins after max-pooling and continues with three residual blocks, each with three layers.

15
The curve denotes the identity connection, while the dash denotes the residual block. Finally, there
is an average pooling layer followed by a fully connected layer in the network.

Figure 4 ResNet-50 Architecture [34]

Transfer Learning
Transfer learning is a machine learning initialization technique that reuses pre-trained models and
modifies the weights of these pre-trained models. This is a popular method, particularly in deep
learning. There are several advantages to transfer learning. It not only allows us to apply what
we've learned in previous tasks to new ones, but it also allows us to apply what we've learned in
previous tasks to new ones. More importantly, it improves the performance of our deep learning
models by speeding up the training process.

Figure 5 The TL technique's conceptual diagram

16
Hyperparameter Tuning
The technique of selecting the best hyperparameters for a learning algorithm is known as
hyperparameter tuning. A good set of hyperparameters can help us improve the performance of
our model and improve the accuracy of our predictions. We have done hyperparameter tuning on
VGG16 and ResNet50 in this project, and both of them perform better than other models.

Metrics for evaluation


The evaluation metrics used in DL tasks are critical for achieving the best classifier. They are used
in two stages of a typical data classification procedure: training and testing. During the training
stage, it is used to improve the classification algorithm. This means that the evaluation metric is
used to discriminate and choose the best solution, such as a discriminator that can generate an
extra-accurate forecast of upcoming evaluations for a particular classifier. For the time being, the
evaluation metric is used to measure the efficiency of the created classifier in the model testing
stage using hidden data, such as an evaluator. As stated in Eq. 2. The number of successfully
classified negative and positive instances are defined as TN and TP, respectively. Furthermore, the
terms FN and FP refer to the number of misclassified positive and negative instances, respectively.
To assess performance on a per-class analysis basis, we will use a classification report in addition
to the accuracy measure to analyze the models in this study.

Accuracy: Determines the proportion of correctly predicted classes to the total number of samples
tested.

Accuracy = (TP+TN) / (TP+TN+FP+FN) (2)

Sensitivity or Recall: Used to calculate the percentage of correctly classified positive patterns.

Sensitivity = TP/ (TP+FN) (3)

Precision is used to calculate the positive patterns in a positive class that are correctly predicted by
all predicted patterns.

Precision = TP / (TP+FP) (4)

17
Results and Discussion

The cassava leaf disease data set was used to train and test the three deep CNN models. The data
set was divided into training and validation sets, and the images were labeled with five different
classes of diseased cassava leaves, as well as healthy cassava leaves. The outcome is shown below.
The result show that Resnet-50's recognition accuracy is 95.57 percent.

Training result
The performance of the model used to detect disease in cassava leaf images with the overall
accuracy of the data train and validation was 95%. The graph of the level of accuracy and losses
in the training and validation process is shown in Figure 6.

Figure 6 Graph of accuracy and losses in the training and validation process.

18
Above shows the plot of the training and validation accuracies against the number of epochs. It
shows that the validation accuracy starts higher than the training accuracy, indicating that the
validation set contains easier element to recognize that the training set. There was very large
increase in the accuracies in the first two (2) epochs that made the curves to rise quickly. As the
training progress, the training accuracy exceeded the validation accuracy but both were
progressing or increasing. However, it was able to achieve a consistent validation accuracy of
93% and the highest accuracy of 95.57% after that. Furthermore, the overfitting problem has
been solved, with validation accuracy that is nearly identical to training accuracy.

Both training and validation loss decrease with experience until they reach a point of stability, as
shown in the figure above. Both curves have a very similar shape. and the difference between
training and validation loss is very small. Furthermore, the validation loss is slightly smaller than
the training loss, indicating that the learning curve is well-fit.

25 Epochs
Epoch: 01 | Epoch Time: 8m 19s
Train Loss: 5.020 | Train Acc: 23.01%
Val. Loss: 3.708 | Val. Acc: 57.59%
Epoch: 02 | Epoch Time: 6m 38s
Train Loss: 3.034 | Train Acc: 69.47%
Val. Loss: 2.288 | Val. Acc: 76.59%
Epoch: 03 | Epoch Time: 6m 20s
Train Loss: 1.878 | Train Acc: 78.37%
Val. Loss: 1.529 | Val. Acc: 79.25%
Epoch: 04 | Epoch Time: 6m 8s
Train Loss: 1.314 | Train Acc: 81.00%
Val. Loss: 1.154 | Val. Acc: 80.41%
Epoch: 05 | Epoch Time: 6m 1s
Train Loss: 1.057 | Train Acc: 82.02%
Val. Loss: 0.999 | Val. Acc: 80.91%
Epoch: 06 | Epoch Time: 5m 58s
Train Loss: 0.849 | Train Acc: 84.16%
Val. Loss: 0.821 | Val. Acc: 84.09%
Epoch: 07 | Epoch Time: 6m 0s
Train Loss: 0.732 | Train Acc: 85.65%
Val. Loss: 0.711 | Val. Acc: 84.65%
Epoch: 08 | Epoch Time: 6m 4s
Train Loss: 0.646 | Train Acc: 86.75%
Val. Loss: 0.643 | Val. Acc: 84.59%
Epoch: 09 | Epoch Time: 6m 9s
Train Loss: 0.547 | Train Acc: 87.96%
Val. Loss: 0.565 | Val. Acc: 87.46%
Epoch: 10 | Epoch Time: 6m 6s
Train Loss: 0.486 | Train Acc: 89.15%
Val. Loss: 0.503 | Val. Acc: 88.30%
Epoch: 11 | Epoch Time: 6m 1s

19
Train Loss: 0.421 | Train Acc: 90.15%
Val. Loss: 0.501 | Val. Acc: 88.16%
Epoch: 12 | Epoch Time: 5m 53s
Train Loss: 0.372 | Train Acc: 91.31%
Val. Loss: 0.480 | Val. Acc: 88.39%
Epoch: 13 | Epoch Time: 6m 0s
Train Loss: 0.358 | Train Acc: 91.39%
Val. Loss: 0.457 | Val. Acc: 88.65%
Epoch: 14 | Epoch Time: 6m 9s
Train Loss: 0.327 | Train Acc: 92.37%
Val. Loss: 0.375 | Val. Acc: 91.09%
Epoch: 15 | Epoch Time: 5m 51s
Train Loss: 0.309 | Train Acc: 92.01%
Val. Loss: 0.369 | Val. Acc: 90.81%
Epoch: 16 | Epoch Time: 5m 52s
Train Loss: 0.274 | Train Acc: 93.43%
Val. Loss: 0.333 | Val. Acc: 92.02%
Epoch: 17 | Epoch Time: 5m 58s
Train Loss: 0.243 | Train Acc: 93.99%
Val. Loss: 0.306 | Val. Acc: 92.05%
Epoch: 18 | Epoch Time: 6m 1s
Train Loss: 0.233 | Train Acc: 94.09%
Val. Loss: 0.314 | Val. Acc: 91.84%
Epoch: 19 | Epoch Time: 5m 57s
Train Loss: 0.222 | Train Acc: 94.50%
Val. Loss: 0.307 | Val. Acc: 92.29%
Epoch: 20 | Epoch Time: 5m 58s
Train Loss: 0.207 | Train Acc: 94.76%
Val. Loss: 0.286 | Val. Acc: 92.58%
Epoch: 21 | Epoch Time: 5m 53s
Train Loss: 0.198 | Train Acc: 94.89%
Val. Loss: 0.308 | Val. Acc: 92.40%
Epoch: 22 | Epoch Time: 5m 54s
Train Loss: 0.180 | Train Acc: 95.16%
Val. Loss: 0.273 | Val. Acc: 93.03%
Epoch: 23 | Epoch Time: 5m 51s
Train Loss: 0.175 | Train Acc: 95.33%
Val. Loss: 0.253 | Val. Acc: 93.25%
Epoch: 24 | Epoch Time: 5m 48s
Train Loss: 0.180 | Train Acc: 95.35%
Val. Loss: 0.273 | Val. Acc: 93.24%
Epoch: 25 | Epoch Time: 6m 37s
Train Loss: 0.160 | Train Acc: 95.57%
Val. Loss: 0.251 | Val. Acc: 93.36%

Test set prediction/classification


In this section, the performance of the model was accessed using test set. After the training, the
model was used to predict the classes of 1766 cassava images of the test set. Each of the images
belongs to one (1) of the five (5) classes of the dataset. As a result, the model achieved an overall
accuracy of 0.95, precision of 0.95, recall of 0.95 and f1-score of 0.95. As show below.

20
Figure 7: Classification Report.

A confusion matrix for the prediction of the 1766 cassava images from the test set is presented
below. It shows that out of 263 CBB images the model confused 8 for CBDS, 4 for CGM, 4 for
CMD and 1 for HEALTHY. Out of 397 CBSD images, it confused 8 for CBB, 2 for CGM, 11
for CMD and 3 for HEALTHY. Out of 385 CGM images, it confused 1 for CBB, 1 for CBSD, 5
for CMD and 3 for HEALTHY. Out of 399 CMD images, it confused 3 for CBB, 11 for CBSD,
17 for CGM and 3 for HEALTHY. Also, out of 322 HEALTHY images, it confused 0 for CBB,
4 for CBSD, 0 for CGM and 6 for CMD. So, the model predicted 246 out of 263, 373 out of 379,
375 out of 385, 365 out of 399 and 312 out of 322 correctly for CBB, CBSD, CGM, CMD and
HEALTHY respectively. This matrix shows the results of actual vs. predicted data. The healthy
class shows an accuracy of 97%, which is better than the other classes. The CMD disease class is
showing poor outcomes, at 91%.

Figure 8 Confusion Matrix.

21
Android Application Developed
The figures below show the interfaces of the android application.

22
23
24
25
26
Potential Improvements and conclusion

Improvements :
1. Test-Time Augmentation: Test-time augmentation is a technique for lowering our
models' generalized error. On test images, we could also try image augmentation, which
would allow us to generate more test data versions. Then we use our model to predict those
test images, and we can get a variety of accuracies from the test images we created. We are
more likely to have a more generalized model with greater performance after averaging
them.

Conclusion
Deep learning is a relatively new study technique for image processing and pattern recognition
that has shown to be successful in identifying cassava leaf diseases. The five forms of cassava
leaf diseases are classified using the CNN model. The findings of this study demonstrate how
image recognition can be enhanced by transfer learning from convolutional neural networks. For
very accurate automated cassava disease diagnosis, ResNet-50 is a potent technique. With this
approach, models may be trained without difficulty on a desktop and then easily deployed on a
mobile device, avoiding the difficult and time-consuming step of feature extraction from images.
By retraining the model's output vectors on fresh training data, transfer learning can also be used
to implement basic machine learning techniques.

Furthermore, data augmentation helps to enhance the amount of training data and improve model
training efficiency. This project will serve as a model for the creation of an intelligent cassava
disease detection system and is critical in supporting cassava disease control decision-making.

27
References

1. .Lee SH, Chan CS, Mayo SJ, Remagnino P. How deep learning extracts and learns leaf
features for plant classification. Pattern Recogn. 2017;71:1–13.

2. Tsaftaris SA, Minervini M, Scharr H. Machine learning for plant phenotyping needs
image processing. Trends Plant Sci. 2016;21(12):989–91.

3. Fuentes A, Yoon S, Park DS. Deep learning-based techniques for plant diseases
recognition in real-field scenarios. In: Advanced concepts for intelligent vision systems.
Cham: Springer; 2020.

4. Yang D, Li S, Peng Z, Wang P, Wang J, Yang H. MF-CNN: traffic flow prediction using
convolutional neural network and multi-features fusion. IEICE Trans Inf Syst.
2019;102(8):1526–36.

5. Sundararajan SK, Sankaragomathi B, Priya DS. Deep belief cnn feature representation-
based content based image retrieval for medical images. J Med Syst. 2019;43(6):1–9.

6. Melnyk P, You Z, Li K. A high-performance CNN method for offline handwritten


chinese character recognition and visualization. Soft Comput. 2019;24:7977–87.

7. Li J, Mi Y, Li G, Ju Z. CNN-based facial expression recognition from annotated rgb-d


images for human–robot interaction. Int J Humanoid Robot. 2019;16(04):504–5.

8. Kumar S, Singh SK. Occluded thermal face recognition using bag of CNN(BoCNN).
IEEE Signal Process Lett. 2020;27:975–9.

9. Le VNT et al (2020) A novel method for detecting morphologically similar crops and
weeds based on the combination of contour masks and filtered Local Binary Pattern
operators. GigaScience 9(3):giaa017

10. Ahmad W, Shah S, Irtaza A (2020) Plants disease phenotyping using quinary patterns as
texture descriptor. KSII Trans Internet Inf Syst 14(8):3312–3327

11. Sun Y et al (2019) SLIC_SVM based leaf diseases saliency map extraction of tea plant.
Comput Electron Agric 157:102–109

12. Pantazi XE, Moshou D, Tamouridou AA (2019) Automated leaf disease detection in
different crop species through image features analysis and One Class Classifiers. Comput
Electron Agric 156:96–104

13. Oo YM, Htun NC (2018) Plant leaf disease detection and classification using image
processing. Int J Res Eng 5(9):516–523

28
14. Ramesh S et al (2018) Plant disease detection using machine learning. In: 2018
International conference on design innovations for 3Cs compute communicate control
(ICDI3C). IEEE.

15. Kuricheti G, Supriya P (2019) Computer Vision Based Turmeric Leaf Disease Detection
and Classification: A Step to Smart Agriculture. In: 2019 3rd International Conference on
Trends in Electronics and Informatics (ICOEI). IEEE

16. Liu, M., et al., Comparison of multi-source satellite images for classifying marsh
vegetation using DeepLabV3 Plus deep learning algorithm. Ecological Indicators,
2021. 125: p. 107562.

17. Abdollahi A, Pradhan B (2021) Urban Vegetation Mapping from Aerial Imagery Using
Explainable AI (XAI). Sensors 21(14):4738

18. Walter MJggXS (2016) Is this the end? machine learning and 2 other threats to
radiologys future, l3

19. Argüeso D et al (2020) Few-Shot Learning approach for plant disease classification using
images taken in the field. Comput Electron Agric 175:105542

20. Agarwal M et al (2020) ToLeD: Tomato leaf disease detection using convolution neural
network. Procedia Comput Sci 167:293–301

21. Richey B et al (2020) Real-time detection of maize crop disease via a deep learning-
based smartphone app. in Real-Time Image Processing and Deep Learning 2020.
International Society for Optics and Photonics

22. Zhang Y, Song C, Zhang D (2020) Deep learning-based object detection improvement
for tomato disease. IEEE Access 8:56607–56614

23. Batool A et al (2020) Classification and Identification of Tomato Leaf Disease Using
Deep Neural Network. In: 2020 International Conference on Engineering and Emerging
Technologies (ICEET). IEEE

24. Goncharov P et al (2020) Deep Siamese Networks for Plant Disease Detection. In: EPJ
Web of Conferences. 2020. EDP Sciences

25. Karthik R et al (2020) Attention embedded residual CNN for disease detection in tomato
leaves. Appl Soft Comput 86:105933

26. Tm P et al (2018) Tomato leaf disease detection using convolutional neural networks. In:
2018 Eleventh International Conference on Contemporary Computing (IC3). IEEE

29
27. Sembiring A et al (2021) Development of concise convolutional neural network for
tomato plant disease classification based on leaf images. In: Journal of Physics:
Conference Series. IOP Publishing

28. Turkoglu M, Yanikoğlu B, Hanbay D (2021) PlantDiseaseNet: convolutional neural


network ensemble for plant disease and pest detection. Signal, Image Video Processing,
1–9

29. Ghassemi, S., & Magli, E. (2019, June 14). Convolutional neural networks for ON-
BOARD Cloud Screening. Retrieved December 15, 2021,
from https://www.mdpi.com/2072-4292/11/12/1417/htm

30. Brownlee, J. (2020, September 11). Understand the impact of learning rate on neural
network performance. Retrieved December 20, 2021,
from https://machinelearningmastery.com/understand-the-dynamics-of-learning-rate-on-
deep-learning-neural-networks/

31. Vgg16 — convolutional network for classification and detection. (2021, February 24).
Retrieved December 15, 2021, from https://neurohive.io/en/popular-networks/vgg16/

32. Transfer Learning. Retrieved December 20, 2021,


from https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutoria
ls/images/transfer_learning.ipynb#scrollTo=ro4oYaEmxe4r

33. Fang W, Love PE, Luo H, Ding L. Computer vision for behaviour-based safety in
construction: a review and future directions. Adv Eng Inform. 2020;43:100980.

34. Palaz D, Magimai-Doss M, Collobert R. End-to-end acoustic modeling using


convolutional neural networks for hmm-based automatic speech recognition. Speech
Commun. 2019;108:15–32.

35. Li HC, Deng ZY, Chiang HH. Lightweight and resource-constrained learning network for
face recognition with performance optimization. Sensors. 2020;20(21):6114.

36. Hubel DH, Wiesel TN. Receptive fields, binocular interaction and functional architecture
in the cat’s visual cortex. J Physiol. 1962;160(1):106.

37. Goodfellow I, Bengio Y, Courville A, Bengio Y. Deep learning, vol. 1. Cambridge: MIT
press; 2016.

30

You might also like