You are on page 1of 20

Details of the Project:

Dataset:
The data set which I collected from the UCI machine learning repository
is not enough for training and testing. Hence in order to increase the data set I
collected more images from the plant village website, International rice research
institute website and from the Kaggle dataset base. After that I finally got 300
images per disease for the training and 50 images per disease for the testing.
Convolutional Neural Network:
The proposed convolutional neural network architecture consists of an
input layer,two convolutional layers, two relu activation layers, two maxpooling
layers, a fully connected layer ,a softmax layer, and a classification output layer.
The convolutional layers, relu activation layers and the maxpooling layers are
collectively known as the feature extraction network. The fully connected layer,
softmax layer and the classification output layer are collectively known as the
classification network. The input image enters into the feature extraction
network. The extracted feature signals enters the classification neural network.
The classification neural network then operates based on the features of the
image and generates the output.
Parameters of the Neural Network:
*The input image size is set to [227 227 ] in the input layer.
*The first convolution layer consists of 8 [16 16] filters with stride [1 1]
and padding is set to same.
*Stride is the number of pixels a convolutional filter moves, like a sliding
window, after passing on the weighted average value of all the pixels it just
covered.
*Padding = Same: means the input image ought to have zero padding so
that the output in convolution doesnt differ in size as input. in simple, we add a
n-pixel borders of zero to tell that ‘dont’ reduce the dimension and have same as
input.
*These filters, stride, padding are said to be hyper parameters and these
parameters won’t change during the training.
*The parameters s such as weight and bias are the learnable parameters
.These parameters gets updated during the training process.
*In neural network ,weight is the very basic term. weight will have the
information about the input and it compares with a threshold value in order to
pass the information further in the networks.
*Bias is like a condition element, if it receives the suitable weight then it
will activate the neuron. bias will have condition statements to pass the weight
through it and to alter the weights for the next set of neurons .A bias will decide
where the information has to pass through.
*ReLU is an activation function for use in a Neural Network .The
formula is relu(x) = max(0, x).It returns x when x is positive, otherwise it
returns 0..It has the property of adding nonlinearity and encouraging some level
of sparsity in the network.It generally learns faster than the more traditional
tanh or sigmoidal nonlinearities (both computationally, and from an
optimization perspective).

*Pooling is responsible for reducing the spatial size of the convoluted


feature. Poolling combines the output of neuron cluster at one layer into a single
neuron in the next layer. Max pooling uses the maximum value from each
cluster of neurons at the prior layer. In the first maxpooling layer the pooling
filter size is[5 5]

*Similarly for the second convolutional layer consists of 16 [3 3] filters


with stride[1 1] and padding is set to same.

*In the second maxpooling layer the pooling filter size is [2 2].

*The fully connected layer will have the layers corresponding to the
number of output classes

*Softmax is a function to be used for a classification problem that


involves more than two labels.

*The final classification layer classifies the output.

Training:
*In the training ,the data set is split into 80 percent for the training and 20
percent for the validation. The validaton of data will be done at an interval of 5
iterations during the training.
*The mini batch size is set to 128 and it consists of randomized images of
the classes which is to be classified. This mini batch is used for the one iteration
of the training.
*One epoch of training will be done when the total images are used for
the training.
*The learning rate is set to be 0.0001
*The optimizer used for the training is the Stochastic gradient descent
method.
CNN Layer Outputs:
Bacterial Leaf Blight:
The Convolved feature map of the convolution layer 1 :
The output of a CNN layer is a set of filtered images as a
result of 8 [16 16] filters.

The Activated feature from the Convolution Layer 1:


This layer extracts the leaf from the background.White pixels represent
the strong positive activations and Black pixels represent the strong negative
activations.
The Convolved feature map of the maxpooling layer 1 :

The activated feature map of the maxpooling layer 1:


This layer activates the edges of the disease in the leaf.
The Convolved feature map of the convolution layer 2 :
The output of a CNN layer is a set of filtered images as a result of
16 [3 3] filters.

The activated feature of the convolution layer 2:

This layer extracts the leaf disease but along with the disease the
background is also get activated.
The feature map of the maxpooling layer 2:

The activated feature of the convolution layer 2:

This layer extracts the disease feature of the leaf. This feature is passed to
the classification network .
Classification :

Based on the extracted feature the input leaf image is classified as the
Bacterial leaf blight disease infected leaf.

Brown Spot:
The Convolved feature map of the Convolutional Layer 1:
The activated feature of the Convolution layer 1:

The leaf is extracted from the background in this layer.

The Convolved feature map of the maxpooling layer 1:


The activated feature of the maxpooling layer 1:

This layer activates the edges of the disease.


The Convolved feature map of the Convolutional Layer 2:
The activated feature of the Convolution layer 2:

The feature map of the maxpooling layer 2:


The activated feature in the maxpooling layer 2:

This layer extracts the diseased feature and this feature is passed on to the
classifier network.
Classification:

Based on the extracted feature the input leaf image is classified as the
Brown spot disease infected leaf.
Leaf Smut:
The Convolved feature map of the Convolutional Layer 1:

The activated feature from the convolution layer 1:

In this layer the leaf is extracted from the background.


The feature map of the maxpooling layer 1:

The extracted feature of the maxpooling layer 1:


The feature map of the Convolution Layer 2:

The extracted feature of Convolution Layer 2:


The Feature map of maxpooling layer 2:

The Extracted feature of maxpooling layer 2:

This layer extracts the diseases leaf portion and this extracted feature is
passed on to the classifier network.
Classification:

Based on the extracted feature the input leaf image is classified as the
Leaf Smut infected leaf.

Accuracy Of the Model:

The accuracy of the model is found to be 82.79%


Trial Model Results:
Before Constructing this CNN model I have constructed various models
by varying several parameters such as number of Convolutional filters, size of
the convolutional filters, number of layers in the convolutional network, varying
the learning rate , varying the Stride ,training options etc.., but the accuracy of
those models were not satisfactory. The accuracy of those models were given
below.
Trial 1:

In this trial Accuracy of the model is found to be 27.92%


Trial 2:

In this trial Accuracy of the model is found to be 31.67%


Trial 3:

In this trial the accuracy of the model is found to be 40.42%


Trial 4:

In this trial the accuracy of the model is found to be 42.08%


Trial 5:

In this trial the accuracy of the model is found to be 53.09%


Trial 6:

In this trial the accuracy of the model is found to be 69.67%


Trial 7:

In this trial the accuracy of the model is found to be 73.77%


Trial 8:

In this trial the accuracy of the model is found to be 77.87%


Now I am trying data augmentation, to increase the accuracy further more.

You might also like