Report Prethika
Report Prethika
PHASE I REPORT
Submitted by
(950322405003)
MASTER OF ENGINEERING
IN
DECEMBER – 2023
i
ANNAUNIVERSITY, CHENNAI
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
Engineering Engineering
Thoothukudi-628005 Thoothukudi-628005
This report is submitted for the Project Work Phase I viva-voce examination held
on ……………………
ii
ABSTRACT
Plants and crops that are infected by pests have an impact on the country's
agricultural production. Usually, farmers or professionals keep a close eye on
the plants in order to discover and identify diseases. However, this procedure is
frequently time-consuming, costly, and imprecise. Plant disease detection can
be done by looking for a spot on the diseased plant's leaves. The goal of this
paper is to create a Disease Recognition Model that is supported by leaf image
classification. To detect plant diseases, we are utilizing image processing with
a Convolution neural network (CNN). A convolutional neural network(CNN)
is a form of artificial neural network that is specifically intended to process pixel
inputand is used in image recognition. Farmers do not expertise in leaf disease
so they produce less production. Plant leaf diseases detection is the important
because profit and loss are depends on production. CNN is the solution for leaf
disease detection and classification. Main aim of this research is to detect the
apple, grape,corn, potato and tomato plants leaf diseases. Plant leaf diseases are
monitoring of large fields of crops disease detection, and thus automatically
detected the some feature of diseases as per that provide medical treatment.
Proposed Deep CNN model has been compared with popular transfer learning
approach such as VGG16. Plant leaf disease detection has wide range of
applications available in various fields such as Biological Research and in
Agriculture Institute. Plant leaf disease detection is the one of the required
research topic as it may prove benefits in monitoring large fields of crops, and
thus automatically detect the symptoms of diseases as soon as they appear on
plant leaves.
iii
சசசசசசசசச
சசசசசசசசாசச சாசசசசசசாசசசச சாசசசசசசச சசசசசசச சசசசசசசச சாசசசாசச சாசசாச சசசசசசசசசாசச சாசாசசாசச சசசசசசசாசசசசசசசச. சசசசசசாச, சாசசசசசசசச
சசசசசா சசாசசசா சசாசசசசசசசச சசசசசசசசசச
சசாசசசசசசா சசசசசசசா சாசாசசசசசாச சாசசசசசசச சசசசசசாசாசசச சசசசசசசச சசசசசசசசசசச. சசசசாசாசாசா, சசசச சசசசசசசசச சசாசசசசச சசசசசசச
சசாசசசசசசசசாசாசசசா, சசசசசசசசாசசச சசசசசசச
சசசசசசசசசசசசச. சசசசசசசச சாசசசசசசசா சசசசசாசச சசா சசசசசசசச சசசசசாசசசச சசசசச சாசச சசசசசசச சசாசசசசசாசச. சசச சச சசசசாசாசச சசசசச
சசாசசசசசாசசசசா சசசசச சசசசசசாச சாசாாாசச சசசசாசாசாசசச சசசசசச சாசாசச சசசசசசசசாசச. சாசச சசசசசசசசசச சசாசசசச,
சசசசசசசாசசச சசசாசசச சசசசசசசசாசச (CNN) சசசசச சச சசசசசசாசசசசசசச சசசாசசசசாசசசசசசாசச. சசசசசசசாசசசா சசசாசசச சசசசசசாசசசச (CNN) சசசசசச
சசசசசசச சசசசசசசசா சசசசசசசாசசசா சசச சசசசசாசசசா, சசச சசசாசாசாச சாசசசசச சசசசசசாசசசா சசசசசசசசசாசசசசச சசாசசசசாசசச சசாசாசசச
சசசசசசா சசசசசசச சசாசசசசா சசசசசாசாசசசச சசசசசசசசசச. CNN சசச சசசசச சசாசசசசசா சசசசசசச சசசசாசாசசசாசசசாச சசசசசச. சசசச
சசசசசசசசச சசச சசசசசசசசசச சசசசசசசசசசசசச. சசசச சசச சசசசசசசச சசசசசசசசசச சசசசச சசாசசசசசசசா சசாாச சசசசசசச சசாசாசசசசசா, சசசசசசசச
சாசசசாசசசச சசசசசசசசசச சசச
சசசசசசசாசச சாச சசசசசசசசச சாசசசசச சசாசசசசாசச. சசசசசசாசசசசாசசசச சாசச சாசசசசசா சாசசச VGG16 சசாசசச சாசசசசாச சாசசாசசச
சசசசசச சசாசசசாசசசசசசச சசாசாசசாசசசசசச. சாசச சசச சசசசச சசாசசசசசா, சசசாசசசா சசாசசசாசா சசசசசசச சசசசசசசச சசசசசசசா சசாசசச சசசசசசச
சசசசசசசசச சசசசச சசசசசசச சசசசசசசசசசசசச சசசசசசசசசசசச. சசசச சசச சசசசச சசசசசசசசசசசசசசாசசசசா சசாசசசாசா சசசசாசாசசாசச சசசசாசசசா,
சசசசாசச சசச சசசசசசசாசச சசசசச
சசசசசசசசச சசாசாசசசாசசசசா சசசாசசச சசசசசசசசசசசசா, சசசாசச சாசச சசசசசாசச சசசசச சசசசசசசசசச சசசசசசசசசசசசச
சசசசசசச சசசசசசசசசசசசசச.
iv
ACKNOWLEDGEMENT
First of all I thank GOD THE ALMIGHTY for having helped me in completion
engineering.
I gratefully thank my project guide Mrs. V. Revathy, M.E., (Ph.D) for the timely
Lastly, I thank my parents and friends for their constant encouragement without
v
TABLE OF CONTENTS
NO
ABSTRACT iii
LIST OF FIGURES ix
LIST OF ABBREVIATION X
1 INTRODUCTION 1
1.1 METHODOLOGY 3
2 LITERATURE SURVEY 4
3 SYSYEM ANALYSIS 6
3.3.1 Application 8
3.3.2 Objectives 8
3.3.3 Motivation 9
4 REQUIREMENT SPECIFICATION 10
vi
5 TECHNOLOGY OVERVIEW 11
5.2 FEATURE 11
5.3.1 Numpy 13
5.3.4 Scitlearn 13
5.3.5 Tensorflow 14
5.3.6 Keras 14
6 CONVOLUTIONAL NEURAL
NETWORK(CNN) ARCHITECHTURE 15
7 MODULE BUILDINGS 17
9.2 DATASETS 25
10 TRAINING MODEL 28
11 FEASIBLITY STUDY 33
12 RESULT 35
13 FUTURE SCOPE 40
14 REFERNCES 41
viii
LIST OF FIGURES
2 DISEASE DATASET 2
3 CNN ARCHITECHTURE 15
4 CONVOLUTIONAL LAYER 15
5 POOLING LAYER 16
7 SUPERVISED LEARNING 17
8 UNSUPERVISED LEARNING 18
9 SEMI-SUPERVISED LEARNING 18
10 REINFORCEMENT LEARNING 19
11 PROPOSED WORKFLOW 21
12 EXPERIMENTAL MODEL 23
WITH DISEASE 26
16 FLOW DIAGRAM 27
17 TRAINING MODEL 28
ix
x
LIST OF ABBREVIATIONS
7 DL Deep Learning
xi
CHAPTER 1
INTRODUCTION
1
This approach yields outcomes that are suitable for both little and large-
scale agricultural cultivation. Importantly, the results are precise, and the
disorders aredetected in a very short amount of time. These technologies rely
heavily on deeplearning and neural networks to function. Deep Convolutional
Neural Network is utilized in this study to identify infected and healthy
leaves, as well as to detectillness in afflicted plants. The CNN model is
designed to suit both healthy and sick leaves; photos are used to train the
model, and the output is determined by the input leaf. images divided into
two parts training and testing dataset.
1.Apple scab 2.Grape Esca 3.Corn leaf spot 4.potato Early 5.Tomato
Figure 1. Two parts training and testing dataset.
2
1.1 METHODOLOGY
Data Collection
Preprocessing
Model selection
Data Visualization
Data Modeling
Data Training
Data Testing
Data Prediction
Evaluation
Optimization
Data collection is the process of collecting every detail about the heart
diseases and diabetes like symptoms and the rate of possible counts. After
collecting the every good data set we have to prepare the data set separately for
everything. It will increase the accuracy rate as well as the perfect model.
Preprocessing is the process of data we have to prepare our data set according
to the symptoms. We have to prepare two datasets for the model. Because
preparing the data with possibilities at the same time is not a preparing the
data's that can be understandable by machine. Preprocessing of selecting the
features that will affectour model and which won't change in output. After the
selection of the Features we will use that data to train our model.
3
. CHAPTER 2
LITERATURE SURVEY
4
Applications2019[9].https://data.mendeley.com/datasets/tywbtsjrjv/1.Retrieve
d, http://dx.doi.org/10.17632/tywbt sjrjv.1.Suja Radha, “Leaf Disease Detection
using Image Processing,” Article in Journal of Chemical and Pharmaceutical
Sciences, March 2017[10]. Sneha Patel, U.K Jaliya, Pranay Patel, “A Survey
on Plant Leaf Disease Detection,” International Journal for Modern Trends in
Science and Technology, April 2020.[11]
5
CHAPTER 3
SYSTEM ANALYSIS
6
lesions in plant images, utilizing classification networks. The method
employed involves training CNNs to recognize specific patterns or features in
the input image that are associated with various diseases or pests. After training,
the networkcan be utilized to classify new images as diseased or healthy. The
classification of raw images is a straightforward process that utilizes the entire
image as input to the CNN. However, this approach may be limited by the
presence of irrelevant information or noise in the image, which can negatively
impact the performance of he network. In order to address this problem,
investigators have proposed utilizing are gion of interest (ROI) based approach,
in which is the model is taught to categorize specific regions of the image that
contain the lesion, rather than the entire image. Multi-category classification is
another area of research in this field, which involves training CNNs to
recognize multiple types of diseases or pests in the same image. This approach
can be more challenging than binary classification, as it requires CNNs to learn
more complex and diverse patterns in the input images. The first broad
application of CNNs for plant pest and disease detection was the identification
of lesions using categorization networks. Current study issues include the
categorization of raw pictures, classification following recognition of regions
of interest pest identification can bea highly effective strategy. CNN is a DL
model that is ideally suited for image classification problems since it can
automatically learn picture attributes. To train the network when the team
constructed it independently, a tagged collection of photos of ill and healthy
plants was required. There must be a variety of pests and illnesses,
environmental circumstances within the databases. The team can then
construct the network architecture and choose relevant parameters based on
the specific features of the intended recipient plant pest and disease.
Alternately, during transfer learning, you can employ a CNN model that has
already been
7
fact that the pre-trained network has already acquired generic characteristics
from huge datasets. Notably, transfer learning enables teams t o harness the
performance of a model trained in some data that were developed using
extensive, varied datasets demonstrated to perform well on similar tasks.
Establishing the weight parameters formulti-objective disease and pest
classification networks, obtained through binary learning between healthy and
infected samples as well as pests, areuniform. A CNN model is designed that
integrates basic metadata and allows training on a single multi-crop model to
identify 17 diseases across five cultures by utilizing a unified newly suggested
model which has ability to handle multiplecrops multi-crop model(Picon et al.,
2019). The following goals can be accomplished through the use of the
proposed model:
1. Achieve more prosperous and stable shared visual characteristics than a
single culture.
2.Is unaffected by diseases that cause similar symptoms across cultures.
3.Seamlessly integrates the context for classifying conditional crop
diseases.Experiments show that the proposed model eliminates 71 percent of
classification errors and reduces data imbalance,with a balanced data the
proposed model boasts
3.3.1 Applications:
Biological research
3.3.2 Objectives :
The objective of this research is to concentrate based on potato, tomato,
corn,grapes, and apple leaf disease detection using CNN.
8
3.3.3 Motivation
Identifying and recognition of leaves disease is the solution for saving
the reduction of large farm in crop disease detection and profit in
productivity, it is beneficial in agricultural institute, Biological research.
9
CHAPTER 4
REQUIREMENT SPECIFICATION
RAM : 4 GB
Hard disk : 60 GB
Pandas
Sklearn
Matplotlib
Numpy
Language: Python
Framework: Anaconda
10
CHAPTER 5
TECHNOLOGY OVERVIEW
5.2 FEATURE:
Python is a multi-paradigm programming language. Object-oriented
programming and structured programming are fully supported, and many of its
11
functional programming and aspect-oriented programming (including by meta
programming and meta objects (magic methods)). Many other paradigms are
supported via extensions, including design by contract and logic
programming.Python uses dynamic typing and a combination of referencecounting
and a cycle- detecting garbage collector for memory management. It also
features dynamic name resolution (late binding), which binds method and
variable names during program execution.It supports multiple
programmingparadigms, including structured (particularly, procedural), object-
oriented, and functional programming. Python is often described as a "batteries
included" language due to its comprehensive standard library. Python was
created in the late 1980s, andfirst released in 1991, by Guido van Rossum as a
successor to the ABC programming language. Python 2.0, released in 2000,
introduced new features, such as list comprehensions, and a garbage collection
system with reference counting, and was discontinued with version 2.7 in 2020.
Python 3.0, released in 2008, was a major revision of the language that is not
completely backward-compatible and much Python 2 code does not run
unmodified on Python 3.Python interpreters are supported for mainstream
operating systems and available for a few more (and in the past supported many
more). A global community of programmers develops and maintains CPython,
a free and open- source reference implementation. A non-profit organization,
the PythonSoftware Foundation, manages and directs resources for Python and
CPython development. It currently ties with Java as the second most popular
programming language in the world. Pandas is an open source Python package that
caters diverse toolsfor dataanalysis. The package contains various data
structures that can be used for manydiverse data manipulation tasks. It also
includes a range of methods that can be invoked for data analysis, which
becomes feasible when working on data science .
12
5.3 TOOLS AND TECHNOLOGIES:
5.3.1 Numpy :
5.3.4 Scitlearn :
5.3.5 Tensorflow :
5.3.6 Keras :
14
CHAPTER 6
15
6.3 POOLING LAYER:
The preceding layers' output is "flattened" and turned into a single vector .
Adds weights to the inputs from the feature analysis to anticipate the
proper label.
Offers the probability for each label in the end. Fig 5 shows the internal
working of fully connected layer
16
CHAPTER 7
MODULE BUILDINGS
There is a very wide range of machine learning algorithms to choose
from, mostof which are available in the python library Scikit-learn. However,
most of the implementations of these algorithms do not accept sparse matrices
as inputs, andsince we have a large number of nominal features coming from
our n-grams features it is imperative that we encode our features in a sparse
matrix. Out of thealgorithms that do support sparse matrices in Scikit-learn, I
ended up trying naiveBayes, logistic regression and support vector machine
(SVM) with a linear kernel.I got the best results in cross validation using SVM
with aneuclidean regularization coefficient.
18
7.4 REINFORCEMENT LEARNING :
19
CHAPTER 8
Existing work related to leaf disease detection using CNN show to detect
and classify leaf disease using image processing techniques that follow steps
like Image Acquisition: image acquisition in the first load the image in digital
pictureprocess andthatconsist capturing the image through digital camera and
stores it indigital media for additional MATLAB operations .
20
8.2 IMPLEMENTATIONWORK :
Apple, grape, potato, and tomato plant leaves which are categorized total
24 typesoflabels apple label namely: Apple scab, Black rot, Apple rust, and
healthy. Corn label namely:Corn Cercospora Gray spot, Corn rust, Corn
healthy, Corn Blight [11][13]. Grape label namely: Black rot, Esca, healthy,
and Leaf blight. Potato label namely: Early blight, healthy, and Late blight.
Tomato label namely: bacterial spot, early blight, healthy, late blight, leaf
mold, septoria leaf spot, spidermite, target sport, mosaic virus, and yellow leaf
curl virus[11][13].
The dataset consist of 31,119 images of apple, corn, grape, potato and tomato,
outof 31,119 images 24000 images are used. all Images are resized into 256 x
256,that images divided intotwo parts training and testing dataset, the whole
range of the train test split using 80-20 (80%of the whole dataset used for the
training and 20%for the testing)[11][13]. Then train CNN model.
22
The second dense layer is followed by a soft max activation function to
computetheprobability scores for the ten classes.
Further, in every experiment, the overall accuracy over the whole period
of training and testing regular intervals (for every epoch) will be computed.
The overall accuracy score willbe used for performance evaluation.
Transfer learning is a knowledge- sharing method that reduces the size of the
training data, contains 224*224 image fix size. To transfer the learning of a
pre- trained model to a new model Transfer learning is useful. Transfer
learning has been used in various applications, such as plant classification,
software defect prediction, activity recognition and sentiment classification.
In this, the performance of the proposed Deep CNN model has been
comparedwith popular transfer learning approach VGG16.
23
CHAPTER 9
24
9.2 DATASETS :
25
Apple scab Apple black rot Cader apple Apple healthy Corn rust
Corn healthy Grape rot Grape Esca Grape blight Grape healthy
Potato Mold Tomato blight Tomato Mold Potato healthy Tomato spot
Tomato Bacterial Tomato healthy Tomato Two-spotted Tomato mosaic Tomato Spot
Figure 15. vegetable and fruits leaves with diseases
(1) The first step is to collect data. We are using the PlantVillage Dataset, which
is widelyavailable. This dataset was released by crowdAI.
(2) Pre-processing and Augmentation of the collected dataset is done using pre-
processingand Image-data generator API by Keras.
(3) Building CNN(Convolutional Neural Network) Model (Vgg-19
architecture) forclassification of various plant diseases.
(4) Developed model will be deployed on the Android Application with help of
TensorFlowlite.
26
9.1 FLOW DIAGRAM :
27
CHAPTER 10
TRAINING MODEL
28
Contain Total 1500 dataset images are divided into two parts 1200 are in training
part and300 is the testing part.
29
30
31
Figure 18. CNN Model
32
CHAPTER 11
FEASIBILITY STUDY
1.Economical Feasibility
2.Technical Feasibility
3.Social Feasibility
34
CHAPTER 12
RESULT
A 95.6% accuracy rate was achieved using early stopping while Training
the model on 50 epochs. Figure 7 depicts the visualization of training and
validation accuracy. The result of detecting and recognizing a strawberry plant
is shown in Figure 8. On the left, a healthy plantleaf, and on the right, a sick
infected plant. The result of detecting and recognizing a potato plant is shown
in Figure 9. On the left,a healthy plant leaf, and on the right, a sick infected
plant.
35
SAMPLE CODE :
import pandas
as pd import
numpy as np
import scipy
import matplotlib.pyplot
as pltimport tensorflow as
tf
import seaborn as sns
from tensorflow.keras.layers import *
from tensorflow.keras.models import
*
from tensorflow.keras.preprocessing import image
from flask import Flask
#import numpy
as np#import os
#from tensorflow.keras.preprocessing.image import load_img
#from tensorflow.keras.models import load_model
#filepath =
'C:/Users/preth/Documents/Training'#model
= load_model(filepath)
#print(model)
36
model.add(MaxPooling2D(pool_size=(2,2)))
model.add(Conv2D(128,(3,3),activation='relu'))
model.add(MaxPooling2D(pool_size=(2,2)))
model.add(Conv2D(256,(3,3),activation='relu'))
model.add(MaxPooling2D(pool_size=(2,2)))
model.add(Dropout(0.25)) ### reduce the
overfitting
test_dataset = image.ImageDataGenerator(rescale=1./255)
train_generator =
train_datagen.flow_from_directory('C:/Users/preth/Desktop/t
raining', #'C:/Users/preth/Desktop/plant disease/training',
target_size = (224,224),batch_size = 15, class_mode =
'categorical')
37
validation_generator = test_dataset.flow_from_directory(
'C:/Users/preth/Documents/Testing',
target_size = (224,224),
batch_size = 15,
class_mode =
'categorical')
#### Train the
modelhistory =
model.fit(
train_generator,
steps_per_epoch = 7,
epochs = 2,
validation_data = validation_generator)
print("Training Ended")
plt.figure(figsize=(20,10))
plt.subplot(1, 2, 1)
plt.suptitle('Optimizer : Adam', fontsize=10)
plt.ylabel('Loss', fontsize=16)
plt.plot(history.history['loss'], label='Training Loss')
plt.plot(history.history['val_loss'], label='Validation
Loss')plt.legend(loc='upper right')
plt.subplot(1, 2, 2)
38
plt.ylabel('Accuracy',
fontsize=16)
plt.plot(history.history['accuracy'], label='Training Accuracy')
plt.plot(history.history['val_accuracy'], label='Validation Accuracy')
plt.legend(loc='lower right')
plt.show()
39
CHAPTER 13
FUTURE SCOPE
The forecasting of disease in early stage, so that appropriate measures can be taken
to minimize the loss in crops.
Recommendations of chemicals and their ratio to convert the further spread of
disease on the different parts of plants after the proper identification of diseases.
Other than plant leaf disease identification, it can also be used for identification
and classification of nutrients deficiency of plant leaves.
Creating and training a CNN model can be used to detect the classification of other
plat disease too, by simply training the model using respected datasets.
40
CHAPTER 14
REFERENCES
[2] Suma VR Amog Shetty, Rishab F Tated, Sunku Rohan, Triveni S Pujar, “CNN
[3] Peng Jiang, Yuehan Chen, Bin Liu, Dongjian He, Chunquan Liang, “Real-Time
[4] Geetharamani, Arun Pandian, “Identification of plant leaf diseases using a nine-
[5] Omkar Kulkarni, “Crop Disease Detection Using Deep Learning,” IEEE access
2018.
41
Detection of Unhealthy Leaves using Image Processing Techniques,”
International Conference on Communication and Signal Processing 2019.
[8] Balakrishna K Mahesh Rao, “Tomato Plant Leaves Disease Classification Using
KNN and PNN,” International Journal of Computer Vision and Image Processing
2019.
[9] Masum Aliyu Muhammad Abdu, Musa Mohd Mokji, Usman Ullah Sheikh,
Kamal
Khalil, “Automatic Disease Symptoms Segmentation Optimized for
Dissimilarity Feature extraction in Digital Photographs of Plant Leaves,” IEEE
15th International Colloquium on Signal Processing & its Applications 2019.
https://data.mendeley.com/datasets/tywbtsjrjv/1.Retrieved,
http://dx.doi.org/10.17632/tywbtsjrjv.
42
PAPER PUBLICATION CERTIFICATE
43