Detection of Plant Disease by Leaf Image Using Convolutional Neural Network
Detection of Plant Disease by Leaf Image Using Convolutional Neural Network
Abstract - In this paper, a new architecture was proposed node is connected to nodes in other layers. Deep Learning is
for the effective classification of plant diseases. Generally, a community under Machine Learning. Deep Learning has
humans can identify the plants that are affected by certain its application under Computer Vision. With the availability
diseases, but apart from our eyesight, it is tough to detect. of high-end computational power, DL has gained a boost
Without giving the right treatment and immediate actions, the
towards its computation task. There are different methods
entire cultivation land can turn into a diseases affected area,
else all plants which are a neighbor to one another can get which can be applied for learning tasks, one is Supervised
affected by means of spreading. So to detect the plant diseases Learning, second is Unsupervised Learning and last is
in advance and to detect the diseases with the help of modern Reinforcement Learning. Supervised Learning in which
computer technology, we proposed a model for the efficient information label is bind with the supplying input content.
distinguishing plant diseases. The dataset used here consists of Unsupervised Learning is a process in which the is input
several varieties of plants of both affected and healthy, and all data consists of unlabeled characteristics.
these images are collected from various freely available sources
and manually. A new CNN model was trained and tested.
II. RELATED WORK
Finally, this proposed model has given very good accuracy
when tested in field conditions.
There are several methods that are deployed for the
Keywords - Convolutional Neural Network, Layers, Deep investigation of the agricultural land. Deep Learning has
learning, Artificial Neural Networks, Sparse Connectivity, played a very major role in it.
Disease classification.
In this work [1], disease identification is done by
I. INTRODUCTION using a deep learning method. For the implementation of the
deep learning method, the dataset used contains a collection
Current world’s population has made a very huge of images of various types of crops; along with their affected
demand for all the food products, so in order to meet the and healthy image. Two architectures namely AlexNet [2]
exponential growth of the world’s demand, agriculture and GoogleLeNet were used, which also provides an
methods have taken a broad way, by using fertilizers for fast accuracy of 99.35 %. Though this result provides a high
growth. The most important thing is that we have to keep classification rate, their model exposed a low classification
our body healthy. But using these kinds of fertilizers can rate for various kinds of images on a contrasting
affect our body. Generally, if we consume any food that is background.
affected by diseases we obviously get affected to it.
In this work [3], they have proposed a method for
Machine Learning is a field of computer science, in the classification of the plant diseases. All the classification
which a pre-data will be posed to a system and make that was done based upon the images of the crop’s leaf, which
system to learn by its own and to apply its learned model, to contains both the healthy and affected leaf. This model
perform a task. proposed by them was able to classify a count of 13
different types of crop diseases. The dataset used here
Machine Learning has its own application under consist of higher resolution, resized and cropped images.
various areas like Spam filtering in mail services, facial Augmentation process was also used for avoiding the
detection under Computer Vision areas, Natural Language overfitting issues in CNN. Their model has produced an
Processing, Robot gesture under Controls. (Computer accuracy of about 96.3%. In this [4] Deeper Network
Vision, Natural Language Processing, Controls). Artificial architecture is implemented for the grading of plant species.
Neural Network is similar to the process done by biological In their work colored images were used, their model can be
neurons. ANN consists of nodes and hidden layers; each used only for colored images, it was able to identify weed
Obviously, a high computational operation is All the information exchange is taken place through
required during the data pre-processing, in spite [6] has the connectivity. The neurons present in this will
reduced the cost of operation. In [7] they have used an communicate with other neurons through edge between
approach by combing the image texture, color, and shape of them, and this edge can also be removed by having a
the plant leaves. regularization, and all communications are done.
Transfer learning [8] means the reuse of the pre- IV. PROPOSED METHODOLOGY
trained network model, in which the model has a trained
value. Most research works are evaluated by deploying Convolutional Neural Networks finds its own
transfer learning [9,10,11] were similar in nature by application under deep neural networks which is widely
applying the architecture of CNN. used for visual object detection.
III. CONVOLUTIONAL NEURAL NETWORK ALGORITHM Our (PDDNN - Plant Disease Detection Neural
Network) model is proposed for the classification of plants
Convolutional Neural Network knows as CNN affected by certain types of diseases. We had done this
consists of the Input layer, Middle layers, and the Output model from scratch so that this work will focus only on
layer. plant disease images. While training [10,12], the model
Input layer is the one which accepts features as the would learn certain properties which are present in the
input, in other words, images are given as input through this subjected image (Background information) and will consider
layer. The Middle layer consists of the desired number of the property into a different class most probably. Thus in
nodes based on the application. Output layer produces an order to focus only on the plants and its types of diseases,
output. we have trained our model from scratch by supplying only
the respected images in a segmented manner.
A. Convolutional Layer
It performs a convolutional operation over the pixel Our model consists of the following layers
values in it along with the kernel matrix. The kernel matrix
is slid over the pixel matrix, and value is determined. • Layer 0 - Input Image (100*100*1)
B. MaxPooling Layer • Layer 1 - Conv 32 filters (2*2) and Stride = 1
This is used for reducing the final size of the filter • Layer 2 - Conv 32 filters (2*2) and Stride = 1
map produced as an output. This helps in prevention • Layer 3 - Conv 32 filters (2*2) and Stride = 1
overfitting issues. • Layer 4 - MaxPool (2*2)
C. ReLU Activation Function • Layer 5 - Dropout = 0.4
Rectified Linear Units, this function will simply • Layer 6 - Conv 32 filters (2*2) and Stride = 1
replace all the negative values present, by zero (0) which are • Layer 7 - Conv 32 filters (2*2) and Stride = 1
present in the output matrix and retain all the positive • Layer 8 - MaxPool (2*2)
values. • Layer 9 - Dropout = 0.4
D. Fully Connected Layer • Layer 10 - Conv 32 filters (2*2) and Stride = 1
In this layer, every node in the previous hidden • Layer 11 - MaxPool (2*2)
layer is connected with the next set of node in the following • Layer 12 - Conv 32 filters (2*2) and Stride = 1
hidden layer, shown in Fig. 1. There may be desired • Layer 13 - MaxPool (2*2)
numbers of nodes present in the FC layer. FC layer is
otherwise called as Dense Nodes. All layers will be • Layer 14 - FC (95)
connected to all other previous and next layers by means of • Layer 15 - FC (95)
edge connectivity between the neurons present in it. • Layer 16 - SoftMax (10)
2
2019 International Conference on Vision Towards Emerging Trends in Communication and Networking (ViTECoN)
B. Augmentation
In this stage, every image is augmented. This
augmentation is done by using (Python), in which the
different types of transformation are applied to the given
image every time, every epoch.
A. Dataset
The data collection for our work is done in two
ways. One is collecting data from the freely available open
source dataset namely (Plant Village). This dataset will
consist of different types of plants and their diseases. In
order to exploit this model under a real-time scenario, we
have added image manually other fields (Images belonging
to classes listed in the primary data set – which exhibits
different properties). Fig.3 represents the images present in
the database (A) Maize, (B) Grape, (C) Apple, (D) Tomato.
A. Regularization
Regularization is done here by applying Batch
Normalization and dropout.
3
2019 International Conference on Vision Towards Emerging Trends in Communication and Networking (ViTECoN)
both training and testing. Heterogeneous types of data will Accuracy – Final number of correctly identified predictions.
increase the role of play in real time classification [12].
Table II shows the accuracy value for the prediction of ten
TABLE I classes (86.00%) and accuracy value for the Apple Healthy
NUMBER OF CLASSES USED IN OUR MODEL
class is shown by Table III.
Class No. and their Number of Number of
name images for images for VI. RESULTS AND DISCUSSION
training testing
[0] Apple Healthy 1805 40 There two different conditions for training and
[1] Apple Scab 690 40 testing. One is under the lab conditions, which means that
[2] Maize Healthy 1915 40 the model is tested with the images from the same dataset
[3] Maize Rust 1126 40 from which it is used for both training and testing.
[4] Grape Healthy 1858 40
[5] Grape Measles 965 40 The other condition is that field condition; this
[6] Tomato Healthy 1556 40 means that our model has tested with the images taken from
[7] Tomato Blight 1968 40 the real world conditions (land). Since the lighting
[8] Potato Healthy 1941 40 conditions and background properties of the images are
[9] Potato Blight 986 40 totally different when we take samples from the real field,
Total 14810 400 there is a chance that our model to produce a very low
accuracy, when comparing to the accuracy values acquired
B. Evaluation metrics during the lab conditions. So to overcome this impact, we
Here the metric for ranking this model is Confusion had an idea of having a mixed variety of images during the
Matrix. Based on the images supplied for testing, we have training phase (heterogeneity).
calculated the confusion matrix.
TABLE II
Overall Confusion Matrix for all Ten (10) Class
Samples “No” “Yes” Calculated
(14810) Predicted Predicted Values
4
2019 International Conference on Vision Towards Emerging Trends in Communication and Networking (ViTECoN)