Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 9

COTTON LEAF DISEASE DETECTION AND

PREDICTION WEBAPP
Yogeshwar khandagre
Yogkhandagre444@gmail.com
Mrs. Sherin Eliyas
sherine@hindustanuniv.ac.in
Department of Computer Applications
Hindustan Institute of Technology and Science, Padur chennai
Abstract— This paper is based on Artificial Intelligence system
especially Deep learning. As Farmer, we know Farmer can’t
Cotton plant is one of the cash crops in India. As solve Farm’s complex and even small problems due to lack
most part of the Indian financial system is dependent on of perfect education. So as AI enthusiastic we decided to
agriculture production. Agriculture is one of the solve this problem using the latest technology like AI. In
important professions in many countries including India. which implements Convolutional Neural Network to detect
For more profit its intense care is necessary. The cotton leaf diseases. Cnn is easy to use for discover
taxonomy and identification of crop infection got much infection created by Bacteria and environmental effects. In
importance in technical as well as economic in the early stage Disease detection is challenging task for farmers
Agricultural Industry. While keeping track of diseases in where physical presence is a must. Disease detection and
plants with the help of specialists can be very costly in recognition is the very important. There are various
agriculture region. There is a need for a system which algorithms in image processing for disease recognition by
can automatically detect the diseases as it can bring image classification like KNN, SVM, Random Forest,
revolution in monitoring large fields of crop and then Artificial Neural Network and CNN.
plant leaves can be taken cure as soon as possible after
detection of disease. The aim of the proposed system is to We all know many Farmer can’t solve Farm’s complex
develop an application which recognizes cotton leaf and even small problems due to lack of perfect education.
diseases. Our Goal Is build a website where we can The goal of this application is to develop a system which
upload an image of any cotton plant leaf and this website recognizes crop diseases. Our Goal Is build a website where
it will tell you information about which decease it is on we can upload an image of any cotton plant leaf and this
plant and how we can treat plant decease. Cotton farmer website it will tell you information about which decease it is
need to upload the image and then with the help of on plant and how we can treat plant decease.
image processing we can get a digitized color image of a
diseased leaf and then we can proceed with applying
CNN to predict cotton leaf disease. Many researchers
are using machine learning for early detections of cotton
plant disease. Convolution neural network (CNN) is a
deep feed forward artificial neural network. This
algorithm is little faster as compared to other A. Purpose of Proposed System:
classification algorithms. In this paper, CNN is used for
1. Developing a user-friendly web-based system for
classification of the diseased portion of cotton plant
farmers.
images. 
2. Recognizing Cotton leaf diseases accurately from
Keywords— agriculture production with AI, AI based input images.
website, Deep Convolution neural network , Artificial
3. Providing corrective and preventive measures for
neural network
the detected diseases
4. Provide disease information and treatment solution
for disease.

1.Introduction B. Cotton leaf diseases focused:


In India most of the land is used for agriculture purpose. 1. Alter aria Macrospore.
It is also the back support for Indian farmer’s financial
condition. In recent days, huge amount of loss in quality 2. Bacterial Blight.
and quantity of cotton yield due to different diseases
affecting the plant There are various diseases which
2.Literature Review
obstruct the growth of crops in fields which may cause huge
loss in the quality of products. Nowadays image processing In recent year, limited number of works has been done
is used a lot for detecting such diseases, Pests like the germ, related to cotton disease classification, cotton stage
fungus, and microorganisms are main cause of the disease to Identification using deep learning models.
crops due to failure in excellence and extent of production. S.Batmavady, S.Samundeeswari [1] focused on applying
It is huge loss to the farmer. image processing and neural network techniques to identify
the diseased cotton leaf. The leaf images are taken from wilt. After prediction of plant disease system can also
village plant dataset. Segmentation is done using FCM recommend pesticides to the farmers using android app.
Techniques and classification is done by RBF Neural Android App is also used to display the soil parameters
network. values such as humidity, moisture, and temperature along
Muhammad Waseem Tahir et al.[2] gives a novel fungus with the water level in a tank. By using Android app farmers
dataset for the detection of fungus using CNN and can ON/OFF the relay to control the motor and sprinkler
distinguish different types of fungus. The designed CNN assembly according to need.
architecture gives 94.8% accuracy with 5 fold validation.
Furthermore, extracting texture feature could be used in
Sukhvir Kaur et al. [3] provide a technique for the detection
detecting plant diseases. Patil and Kumar proposed a model
of disease from Soybean leaf images. A rule-based
for plant disease detection using texture features such as
semiautomatic system using concepts of k-means is
inertia, homogeneity, and correlation obtained by
designed and implemented to distinguish healthy leaves
calculating the gray level cooccurrence matrix on image [9].
from diseased leaves. The experiment is performed on color
Combined with colour extraction, they experimented on
features, texture features, and their combinations to train
detecting diseases on maize leaves.
three models based on support vector machine classifier.
Using SVM classify the proposed system classify the leaf
another approach based on leaf images and using
disease in 3 classes like i.e. downy mildew, frog eye, and
ANNs as a technique for an automatic detection and
sectorial leaf blight etc. The proposed system gives
classification of plant diseases was used in conjunction
maximum average classification accuracy reported is ~90%
with -means as a clustering procedure proposed by the Z. H.
using a big dataset of 4775 images.
Zhou and S. F. Chen, “Neural network ensemble,” [10].
Patil Tushar et al [4] established IOT application using ANN consisted of 10 hidden layers. The number of outputs
image pre-processing, image segmentation, feature was 6 which was the number of classes representing five
extraction and classification of plant disease. These steps diseases along with the case of a healthy leaf. On average,
are all performed by Net beans. After completion of each of the accuracy of classification using this approach was
the above phase, Waterfall model is used to check the 94.67%
project.
3.METHODOLOGY
S. Supriya et al [5] surveyed cotton leaf disease detection
technique. Red spot disease, White spot disease, Crumple In this procedure of developing the model for cotton plant
leaf diseases are taken as references. Many techniques like disease recognition using deep CNN .system classifies the
f-means clustering, neural network, Median filter; Otsu leaf image using image classification algorithm CNN. It can
thresholding, Active contour model etc are reviewed. automatically detect and recognize diseases based on
extracted features at each convolution layer. The complete
Ranjith et al.[6] provide smart irrigation system has been process is divided into several necessary stages, starting
proposed which can control the irrigation automatically with gathering images for classification process using deep
using an android mobile application. Apart from this, the neural networks. The system used image processing
photos of plant leaves are captured and are sent to the cloud technique for disease detection. The user or cotton former
server, which is further processed and compared with the needs to upload the cotton plant leaf image. And the system
diseased plant leaf images in the cloud database. Based on can preprocess the uploaded image and then apply CNN
the comparison a list of plant diseases suspected is given to technique. CNN technique system can test the image with
the user via the Android mobile application. trained dataset and extract the features.

In addition, plant disease detection could be achieved by


A. Project Description:
extracting shape features method. Patil and Bodhe applied
this technique for disease detection in sugarcane leaves The model for plant disease recognition using deep
where they have used threshold segmentation to determine CNN. the complete process is divided into several necessary
leaf area and triangle threshold for lesioning area, getting stages, Appropriate datasets are required at all stages of
the average accuracy of 98.60% at the final experiments [7]. object recognition research, starting from training phase to
evaluating the performance of recognition algorithms.
Adhao Asmita Sarangdharet al.[8] give Support Vector Protection field, which ultimately leads to crops
Machine based regression system for identification and management. The proposed system for plant leaf disease
classification of five cotton leaf diseases i.e. Bacterial detection is based on the infected images of various plants.
Blight, Alternaria, Gray Mildew, Cercospora, and Fusarium All the images collected for the dataset were downloaded
from the Internet, searched by disease and plant name on the dth filter over the input volume with a stride of S, and
various sources , infected images of various plants. Images then offset by dth bias.
of the infected plants are captured by digital camera and
v. A common setting of the hyper parameters is F=3,
processed using image growing , image segmentation
S=1,P=1
techniques to detect infected parts of the plants.
1. Image Acquisition:
C. Implementation:
In this phase, raw image is taken as input from the
user and converted into equivalent gray scale Real time images are collected using web camera and stored
image. Also the image is resized into size of in database. Stored database images are converted into test
128*128. images and train images. In the Google drive, the upload
folder option is used to upload the test and train dataset.
1. Convolutional Layers:
Implementation steps used in Google colab (Google
After the alteration of captured image, the
colaboratory) is described below.
processed image further passes through three
different hidden layer in which feature extraction,
1. Dataset collection.
pooling and flattening layer are also performed.
2. Uploading the dataset into drive.
2. Disease Prediction: 3. Accessing colab.
4. Mounting drive in Google colab.
After applying CNN, using Softmax layer the leaf
5. Coding implementation , testing and training.
image is predicted with disease which is gaining
highest probability of occurrence
1.1 Data set collection.
B. Algorithm: Real time images are collected using web camera and
Traditional feature learning methods rely on semantic stored in database. Stored database images are converted
labels of images as supervision. They usually assume that into test images and train images.
the tags are evenly exclusive and thus do not point out
towards the complication of labels. The learned features 1.2 Uploading the Dataset into Drive-
endow explicit semantic relations with words. We also In the Google drive, the upload folder option is used to
develop a novel cross-model feature that can both represent upload the test and train dataset which are named as test
visual and textual contents. CNN itself is a technique of cotton and train cotton.
classifying images as a part of deep learning. In which we
apply single neural network to the full image. 1.3 Accessing Colab-
* First, sign in the Google accounts.
i. Accepts a volume of sizeW1×H1×D1 * proceed to the Google colab welcome page.
ii. Requires four hyper parameters: * Click on the newpython3 notebook option to start the
session fresh.
 Number of filters K * Select runtime menu option or notebook option to select
 Their spatial extent F GPU.
* Configure notebook instance, to download the necessary
 The stride S packages.
 The amount of zero padding P
1.4 Mount Drive in Google Colab-
iii. Produces a volume of size W2×H2×D2 where: Click on mount drive option, an authorization code is
a. W2=(W1-F+2P)/S+1 generated and it is entered in Google drive, which generates
the image folder path.
b. H2=(H1−F+2P)/S+1(i.e. width and height
are computed equally by symmetry) 1.5 Code Implementation, Test and Train-
c. D2=K. Python coding implementation based Python coding
implementation based on different CNN model like VGG16
iv. With parameter sharing, it introduces F*F*D1
and RESNET50. We should train the above CNN model and
weights per filter, for a total of (F*F*D1)*K weights and K
test the images to get better accuracy and get the predicted
biases. In the output volume, the dth depth slice (of size
disease.
W2*H2) is the result of performing a valid convolution of
1. First, sign in the Google accounts. And proceed to Fig1 .Model accuracy
the Google colab welcome page.
2. Click on the newpython3 notebook option to start
the session fresh. b. model loss in every epoch
3. Select runtime menu option or notebook option to
select GPU.
4. Configure notebook instance, to download the
necessary pack Flask server is used to deploy the
Web Application on local computer. Server
handles the request and response to system use.

4.RESULTS AND DISCUSSION


The results training with the whole database containing both
original and augmented images. As it is known that
convolutional networks are able to learn features when
trained on larger datasets, results achieved when trained
with only original images will not be explored.
After fine-tuning the parameters of the network, an overall
accuracy of 96.3% was achieved, after the 100th training
iteration (95.8% without fine-tuning). Even after the 30th
Fig2.model loss
training iteration high accuracy results were achieved with
exceedingly reduced loss, but after the 60th iteration, the
balance in accuracy and loss was carried out in high
accuracy.
The trained model was tested on each class individually.
5. SYSTEM ARCHITECTURE
Test was performed on every image from the validation set.
The results are displayed to emphasize how many images
from total of each class are accurately predicted.
Figure 8 illustrates trained model’s prediction results
separated for every class. The class numbers follow
enumeration from Table.

a. model accuracy in every epoch


6. SOFTWARE INTERFACE DESIGN

b. Healthy cotton plant output

8. Conclusions

There are many methods in automated or computer vision


plant disease detection and classification process, but still,
this research field is lacking. In addition, there are still no
commercial solutions on the market, except those dealing
with plant species recognition based on the leaves images.

In this system, a new approach of using deep learning


method was explored in order to automatically classify and
detect plant diseases from leaf images. The developed
model was able to detect leaf presence and distinguish
between healthy leaves and different diseases, which can be
7. SOFTWARE WORKING SCREENSHOT visually diagnosed. The complete procedure was described,
respectively, from collecting the images used for training
and validation to image pre-processing and augmentation
and finally the procedure of training the deep CNN and fine-
tuning. Different tests were performed in order to check the
performance of newly created model.

New plant disease image database was created, containing


more than 3,000 original images taken from the available
Internet sources and extended to more than 30,000 using
appropriate transformations. The experimental results
achieved precision between 91% and 98%, for separate class
tests. The final overall accuracy of the trained model was
96.3%. Fine-tuning has not shown significant changes in the
a. Diseased cotton plant output overall accuracy, but augmentation process had greater
influence to achieve respectable results.

9.References.

1. P. R. Reddy, S. N. Divya, and R.


Vijayalakshmi, “Plant disease detection
techniquetool—a theoretical
approach,” International Journal of Innovative
Technology and Research, pp. 91–93, 2015.View Research in Computer and Communication
at: Google Scholar Engineering”,Volume. 3, Issue 11, 2015.

2. A.-K. Mahlein, T. Rumpf, P. Welke et al.,


9. S. Arivazhagan, S.Vineth Ligi, “Mango
“Development of spectral indices for detecting and
Leaf Diseases Identification Using Convolutional
identifying plant diseases,” Remote Sensing of
Neural Network”, International Journal of Pure and
Environment, vol. 128, pp. 21–30, 2013.View
Applied Mathematics, Volume 120 No. 6, 11067-
at: Publisher Site | Google Scholar.
11079, ISSN: 1314-3395, 2018.

3. P. R. Reddy, S. N. Divya, and R.


10. [DarshanaS.Wankhade,VijayAgrawal,“Cl
Vijayalakshmi, “Plant disease detection
assification Of Diseases On The Leaves Of Cotton
techniquetool—a theoretical
Using Generalized Feed Forward (GFF) Neural
approach,” International Journal of Innovative
Network”, International Journal of Engineering
Technology and Research, pp. 91–93, 2015.View
Research and General Science Volume 5, Issue 3,
at: Google Scholar.
2017.

4. W. Xiuqing, W. Haiyan, and Y. Shifeng,


“Plant disease detection based on near-field 11. Farhana Sultana, Abu Sufian, Paramartha
acoustic holography,” Transactions of the Chinese Dutta, “Advancements in Image Classification
Society for Agricultural Machinery, vol. 2, article using Convolutional Neural Network”, Fourth
43, 2014.View at: Google Scholar. International Conference on Research in
Computational Intelligence and Communication
5. W. Xiuqing, W. Haiyan, and Y. Shifeng,
Networks, IEEE Xplore,2018.

“Plant disease detection based on near-field


acoustic holography,” Transactions of the Chinese
Society for Agricultural Machinery, vol. 2, article
12. Chaudhari Vaishnavi, Gondkar Sayali,

43, 2014.View at: Google Scholar. Shivarkar Pooja,”Survey on detection and


prediction of leaf diseases using CNN”, Indian
Journal of Automation and Artificial Intelligence,
6. P. Revathi and M. Hemalatha,
Volume 6(10), 2019

13. K. Jagan Mohan,


“Identification of cotton diseases based on cross
information gain_deep forward neural network
classifier with PSO feature
selection,” International Journal of Engineering M. Balasubramanian,
and Technology, vol. 5, no. 6, pp. 4637–4642,
2014.View at: Google Scholar. “Detection and
Recognition of
7. K. Jagan Mohan, M. Balasubramanian,
“Detection and Recognition of Diseases from Diseases from Paddy
Paddy Plant Leaf Images”, International Journal of
Computer Applications (0975 – 8887) Volume 144 Plant Leaf Images”,
– No.12, 2016.
International Journal
8. Reena Tijare, Pawan Khade, Rashmi of
Jain, “The Survey of Disease Identification of
Cotton Leaf, International Journal of Innovative

You might also like