Professional Documents
Culture Documents
Disease
(Proof of Concept)
A
Dissertation Work
Submitted as Mini Project in Partial fulfilment for the award of Msc in Data Analytics.
Submitted to
Conducted By
Indian Institute of Information Technology and
Management- Kerala
Submitted By
1
DECLARATION
have done their work as Mini Project for Partial fulfilment of the degree
your supervision.
2
ACKNOWLEDGEMENT
We take this opportunity to express our cordial gratitude and deep sense
of indebtedness to our guide Dr. T. K. Manoj Kumar for the valuable guidance and
inspiration throughout the project duration. We feel thankful to him for his innovative
ideas, which led to successful completion of this project work. We feel proud and
fortunate to work under such an outstanding mentor in the field of Image
Classification. He has always welcoming our problems and helped us to clear our
doubts. We will always be grateful to him for providing us the moral support and
sufficient time. To Prof. Ajith Kumar R for sharing his ideas and giving us an
opportunity for doing this project.
We would also thank our Institution, faculty members and staff without
whom this project would have been a distant reality. We also extend our heartfelt
thanks to our family and well wishers.
Anitta Augustine
Sandeep MA
3
APPROVAL CERTIFICATE
has done their work as Minor Project for partial fulfilment of the degree
4
TABLE OF CONTENTS
Introduction ------------------------------------------------------------------ 6
Methodology ----------------------------------------------------------------- 9
Implementation ------------------------------------------------------------- 15
References -------------------------------------------------------------------- 21
5
INTRODUCTION
6
LITERATURE REVIEW
Deep learning (DL) constitutes a modern technique for image processing, with
large potential. Having been successfully applied in various areas, it has recently also
entered the domain of agriculture. In the current project, we are analysing a set of
paddy leaf images that employ convolutional neural networks (CNN), which
constitute a specific class of DL, applied to various agricultural and food production
challenges. Here we analyse the images of paddy leaves and conclude whether they
are infected by blast diseases or not.
A large sub-set of the volume of data collected through remote sensing and the
IoT involves images. Images can provide a complete picture of the agricultural fields,
and image analysis could address a variety of challenges. Hence, image analysis is an
important research area in the agricultural domain, and intelligent analysis techniques
are used for image identification/classification, anomaly detection, etc., in various
agricultural applications. Also, images can be collected manually.
The most common techniques used for image analysis include machine
learning (K-means, support vector machines (SVM) and artificial neural networks
(ANN). The current survey examines the problems that employ a particular class of
DL named convolutional neural networks (CNN), defined as deep, feed-forward
ANN. Convolutional neural networks extend classical ANN by adding more ‘depth’
into the network, as well as various convolutions that allow data representation in a
hierarchical way and they have been applied successfully in various visual imagery-
related problems. CNN have been employed recently in agriculture, with growing
popularity and success, and the fact that today more than 20 research efforts
employing CNN exist for addressing various agricultural problems. As CNN
constitute probably the most popular and widely used technique in agricultural
research today, in problems related to image analysis, the current survey focuses on
this specific sub-set of DL models and techniques.
7
Convolutional neural networks can increase their probability of correct
classifications, provided there are adequately large data sets (i.e. hundreds up to
thousands of measurements, depending on the complexity of the problem under
study) available for describing the problem. They consist of various convolutional,
pooling and/or fully connected layers. The convolutional layers act as feature
extractors from the input images whose dimensionality is then reduced by the pooling
layers, while the fully connected layers act as classifiers. Usually, at the last layer, the
fully connected layers exploit the high-level features learned, in order to classify
input images into predefined classes. The highly hierarchical structure and large
learning capacity of CNN models allow them to perform classification and
predictions particularly well, being flexible and adaptable in a wide variety of
complex challenges. Convolutional neural networks can receive any form of data as
input, such as audio, video, images, speech and natural language, and have been
applied successfully by numerous organizations in various domains, such as the web
(personalization systems, online chat robots), health (identification of diseases from
MRI scans), disaster management (identifications of disasters by remote-sensing
images), post services (automatic reading of addresses), car industry (autonomous
self-driving cars), etc.
8
METHODOLOGY
The steps that go into this process are broken down as follows:
Step 1: Convolution
Step 1b: ReLU Layer
Step2:Pooling
Step 3: Flattening
Step 4: Full Connection
The first thing you need to know here is the elements that are included in the
operation:
Input image
CNN
Output label (image class)
Based on that, it develops its feature detectors. In many cases, the features
considered by the network will be unnoticeable to the human eye, which is exactly
why convolutional neural networks are so amazingly useful. With enough training,
they can go light years ahead of us in terms of image processing.
9
For example, think of the feature detector as a window consisting of 9 (3x3)
cells. Here is what we do with it:
We place it over the input image beginning from the top-left corner within the
borders we see demarcated above, and then we count the number of cells in
which the feature detector matches the input image.
The number of matching cells is then inserted in the top-left cell of the feature
map.
We then move the feature detector one cell to the right and do the same thing.
This movement is called a and since we are moving the feature detector one
cell at time, that would be called a stride of one pixel.
What you will find in this example is that the feature detector's middle-left
cell with the number 1 inside it matches the cell that it is standing over inside
the input image. That's the only matching cell, and so we write "1" in the next
cell in the feature map, and so on and so forth.
After we have gone through the whole first row, we can then move it over to
the next row and go through the same process.
After going over every pixel in the input image in the example above, we
would end up with these results:
(PTO)
10
Step 1(b): The Rectified Linear Unit (ReLU)
11
The essential difference between the non-rectified version of the image and the
rectified one is the progression of colours. After we rectify the image, we will find the
colours changing more abruptly. The gradual change is no longer there. That
indicates that the linearity has been disposed of.
This property makes the network capable of detecting the object in the image
without being confused by the differences in the image's textures, the distances from
where they are shot, their angles, or otherwise. In order to reach the pooling step, we
need to have finished the convolution step, which means that we would have a feature
map ready.
12
Step 3: Flattening
After finishing the previous two steps, we’re supposed to have a pooled feature
map by now. As the name of this step implies, we are literally going to flatten our
pooled feature map into a column like in the image below.
The reason we do this is that we’re going to need to insert this data into an
artificial neural network later on. We have multiple pooled feature maps from the
previous step. What happens after the flattening step is that we end up with a long
vector of input data that you then pass through the artificial neural network to have it
processed further.
Input layer
Fully-connected layer
Output layer
13
We call the layer in the middle the hidden layer whereas in the convolutional
context we are using the term fully-connected layer. The fully connected layer
connects all neurons in the previous layer to each and every neurons in the current
layer without taking any convolutions. The input layer contains the vector of data that
was created in the flattening step. The features that we distilled throughout the
previous steps are encoded in this vector. At this point, they are already sufficient for
a fair degree of accuracy in recognizing classes. We now want to take it to the next
level in terms of complexity and precision.
Throughout this entire process, the network’s building blocks, like the weights
and the feature maps, are trained and repeatedly altered in order for the network to
reach the optimal performance that will make it able to classify images and objects as
accurately as possible.
14
IMPLEMENTATION
DATA COLLECTION
The data used in this project is collected from a group of farmers directly. The
images used here are raw data given by farmers on paddy blast disease. We are
supposed to create a model using this data and evaluate it by determining whether it is
blast affected or not. Hence basically it is a binary classification problem.
The data we received was a messy one. From around thousand images we
manually selected 45 images each in yes and no class and saved to working directory.
15
The follwing flowchart shows the whole process of data preparation at a
glance.
16
Then we will resize images categorized in different folders i.e., like ‘yes
labels’, ‘no labels’ etc.
Python program corcerning this is given as follows:
BUILDING CNN
17
Next, we created a CNN model. This part is so tricky that we need to tweak the
arguments such as number of filters, window size, type of activation function
etc... to arrive at a better model.
18
For validation of the dataset we will rescale the data as train set and test set.
Then we will set a fit generator model with 5 epochs to find the accuracy of dataset.
The results are as shown.
From the above model we can say that the model has an accuracy of 74.29%.
Next is the test case of a single image. We are taking an image with yes
category of blast and wanted to know if the classifier predicts it as yes.
Here the model is able to predict the output correctly. That means the model
classified the image as having affected with blast disease.
19
FUTURE ENCHANCEMENT
This system can be used by farmers for detecting blast diseases in paddy
leaves. The future enhancement can be done by improving collecting better images,
more number of images for training and validation, by pre-processing to increase
the accuracy of images. Also, better collection of image data can be done for
enhanced accuracy. We also suggests to take images to train and validate, in the range
of thousands.
The whole system can be integrated with mobile phones. By integrating the
system with the DB associated with it, the user with the help of an application can test
whether his crop is affected with blast or not. Whereby the testing image is nothing
but taken from their mobile camera. The scope of the project can be extended to
multiclass classification also.
20
REFERENCES
1) Advancements in Image Classification using Convolutional Neural Network -
Farhana Sultana, Abu Sufian and Paramartha Dutta.
2) Image classification using Deep learning -M Manoj krishna, M Neelima , M
Harshali , M Venu Gopala Rao.
3) Image Classification Using Convolutional Neural Networks- Deepika Jaswal,
Sowmya.V, K.P.Soman.
4) Image Classification using Convolutional Neural Networks-Muthukrishnan
Ramprasath, M.Vijay Anand, Shanmugasundaram Hariharan.
21