Plant Leaf Disease Detection Using CNN
Plant Leaf Disease Detection Using CNN
using CNN
INDEX
• Introduction
• Problem statement
• Dataset used
• Preprocessing
• CNN model
Introduction
• Agriculture plays a crucial role in the everyday life of human beings.
• Not only does it act as a food supply to most of the living creatures on earth, it
also provide numerous raw materials such as latex, crude oil, cotton and log that
has enabled humans to build everyday items.
• The early detection of diseases is important in agriculture for an efficient crop
yield.
• Any technique or method to overcome this problem and getting a warning before
the plants are infected would aid farmers to efficiently cultivate crops or plants,
both qualitatively and quantitatively.
• Thus, disease detection in plants plays a very important role in agriculture.
Problem Statement
• To detect leaf disease using CNN using deep learning.
Dataset used
• We used the PlantVillage Dataset, which is widely available and well-known.
• During the “PlantVillage Disease Classifi- cation Challenge,” crowdAI released
the dataset. We used the PlantVillage Dataset, which is well-known and publicly
available.
• The dataset was released by crowdAI during the ”PlantVillage Disease
Classification Challenge.
Preprocessing
•For the purpose of analysis, the dataset “Plant-Village” is uploaded into the
database
•.The input test image has been obtained.
•In the next stage,the database will be pre-processed after uploading, including
image resizing, rescaling, and con- version to an array format.
•The selected database is separated and pre-processed before being renamed into
appropriate fold- ers,the data is divided into two sets: training and testing.
•The model is then classified after it has been appropriately trained with CNN.
Following the comparison of the test image and the trained model,the result is
displayed.
• If the plant has a fault or disease, the software displays the disease appropriately.
•Then we convert or resize the input dataset images so that they can be fit for
training.
•And load the images from the specified file, if the image exists, otherwise it
returns an empty matrix if an image cannot be read.
•In the next step we change the dimensions of an image, be it width alone, height
alone, or both.
•Here we resize image to 227 x 227 because the input image resolution for AlexNet
is 227 x 227.
•Also, the aspect ratio of the original image could be preserved in the resized
image.
• We then iterate through the plant disease dataset folder, resize the
images from each of the folders and convert or load them into a NumPy
array.
•After loading the image dataset, we map each label or class of each
plant disease to a unique value for the training task.
•For preparing the datset for CNN training the data from the dataset is
shuffled and normalised. 20% of the data is used for validation and
80% of data for training.
CNN Model
• The first layer of CNN(Alexnet) of input is 227*227*3 and kernel size is 11*11.The second layer of CNN is
kernel size is 11*11.The third,fourth and fifth layer of CNN is kernel size is 3*3 with activation funtion
relu.There are 3 dense layer with activation function relu. The output layer consists of activation function
softmax.
Test results and discussion
• This study demonstrates the necessity of recognising plant diseases in today’s
world.
• A convolution neural network model is built, with AlexNet. 0.001 as the model’s
learning rate
• .Number of epochs to train the model is 25 with a accuracy of 91.98%.