Professional Documents
Culture Documents
A Study On The Performance of Hybrid Approach For Image Classification Using CNNs and SVM For Plant Disease Detection
A Study On The Performance of Hybrid Approach For Image Classification Using CNNs and SVM For Plant Disease Detection
ISSN No:-2456-2165
3
Md. Arif Hossain
Department of Computer Science and Engineering
East West University, Dhaka, Bangladesh
iammdarifhossain@gmail.com
4 5
Toukir Ahammed Md Shakirul Islam
Department of Computer Science and Engineering Department of Computer Science and Engineering
East West University, Dhaka, Bangladesh East West University, Dhaka, Bangladesh
toukir.ahammed@ewubd.edu Shhakirul@gmail.com
Abstract:- In a country where agriculture is the primary aforementioned evaluation criteria, a comparative
industry, plant diseases can have a wide range of adverse analysis of both techniques is presented.
effects on the economy and the management of food
resources. The increasing occurrence of plant diseases Keywords:- Plant Disease Detection, Image Processing,
significantly threatens global food security and plant CNN, VGG19, Xception, DenseNet201, ResNet15V2, SVM.
productivity. Classification is constantly constrained by
issues like overfitting and low accuracy as potential I. INTRODUCTION
diseases manifest on plant leaves. The agricultural sector
needs accurate and error-free analysis to distinguish Plant diseases are a big global concern that poses
healthy products from defective ones. An effective model substantial threats to agricultural production, food security,
of autonomous feature extraction that has been and economic stability [10]. Some plant diseases can even
demonstrated to be reasonably effective for detection be transmitted to humans. As a result of the diverse array of
and classification tasks is deep convolutional neural plants that are cultivated all over the world, including food
networks. Deep convolutional neural networks, on the staples such as rice, wheat, maize, potatoes, and soybeans,
other hand, frequently require a substantial amount of as well as cash plants such as coffee, cotton, bananas, citrus
training data, cannot be translated, and require a fruits, and palm oil, efficient management of plant diseases,
number of parameters to be specified and adjusted. In is essential for maintaining agricultural practices and
this study, we suggested a hybrid deep learning ensuring that enough food is produced on a global scale.
approach for quickly identifying and categorizing
different plant leaf diseases. This hybrid system In recent years, the confluence of Artificial Intelligence
combines support vector machines (SVM), convolutional (AI), Machine Learning (ML), and Computer Vision has
neural networks (CNN), and both. transformed the field of plant disease detection and
diagnosis [11]. AI stands for artificial intelligence, and ML
To summarize, we extract features through model and CV stand for machine learning. New doors for
engineering (ME). To improve feature discrimination conducting precise information analysis based on visual
and processing speed, support vector machine (SVM) representations of plants have been opened as a result of the
models are used. Using the datasets, 25 leaf image sets of incorporation of cameras with high resolution into portable
healthy and diseased leaves of tomato, potato, grape, electronic devices and the application of advanced image
apple, and corn were analyzed. There were roughly processing techniques. Researchers and farmers alike are
31397 images produced as a result of the classification given the ability to recognize illness indicators more
process. SVM is a key component of hybrid feature quickly, which paves the way for more efficient disease
selection; this algorithm's goal is to produce the desired management through the implementation of timely
output with the fewest features possible. By utilizing the interventions.
A common and important disease in terms of economic Corn is frequently affected by common rust, which is
impact is apple scab, which is brought on by the fungus brought on by the fungus Puccinia sorghi. It primarily
Venturia inaequalis. The apple tree's leaves, fruit, and twigs affects the leaves but can also affect other plant parts and
all develop dark, scaly lesions as a result. As a result of manifests as small, circular to elongated, rusty-orange
these lesions, the tree's capacity for photosynthesizing is pustules. A large amount of orange spores is released as the
diminished, which lowers its vigor and weakens the quality pustules rupture. While common rust rarely causes severe
of its fruit. If not properly controlled, apple scab spreads damage, heavy infections can reduce photosynthetic
quickly throughout an orchard and thrives in moist capacity and lead to premature defoliation. Though it can
environments.[21] still happen in warm, humid weather, the disease is more
common in cooler climates. The common rust is typically
Fruit is the main victim of apple black rot, which is treated with fungicides and resistant corn hybrids [26].
brought on by the fungus Botryosphaeria obtusa. It results in
dark, sunken lesions that grow over time and eventually Grape Disease
cause the apples to shrivel and become mummified. Brown, Grapes, which are prized for their use in winemaking
atypical lesions can appear on the tree's leaves as a result of and as table fruits, are susceptible to a number of diseases
the disease. Warm, humid weather promotes the that can negatively affect the health of the vine and the
development of apple black rot, which must be controlled quality of the grapes. Black rot, esca, and leaf blight are
with appropriate fungicide applications and orchard three common grape diseases.
sanitation.[22]
A common and harmful disease of grapevines, black
A complicated life cycle between apple trees and rot is brought on by the fungus Guignardia bidwellii[27]. It
juniper or cedar trees is required for the unique disease mainly impacts fruit, resulting in brown, cirrhotic lesions
known as cedar apple rust. The fungus Gymnosporangium with a distinctive black border. The grapes shrivel,
juniperi-virginianae is the culprit. As the infection spreads, mummify, and prematurely drop as the infection worsens.
the disease begins as small, yellow-orange spots on apple Brown lesions and defoliation can be seen on leaves and
leaves that grow into larger, bright-orange lesions with spore shoots when black rot is present. Black rot is more likely to
structures. The fruit may also be harmed by cedar apple rust, develop and spread during warm, humid weather during the
which can result in raised, corky areas and distorted growth. growing season. For effective management of this disease,
In order to reduce the source of infection, managing cedar proper cultural practices, including pruning and canopy
apple rust frequently involves cutting down nearby juniper management, are necessary [28].
or cedar trees.[23]
A number of different fungal pathogens, including
Corn Disease Phaeomoniella chlamydospora, Phaeoacremonium spp., and
A common crop in every country, corn is susceptible to others, interact to cause the complex grapevine disease
a number of diseases that can reduce its growth and yield. known as esca [29]. It shows up as streaks of necrotic decay
Cercospora leaf spot, gray leaf spot, and common rust are and discoloration in the wood of the vine, most frequently in
three diseases that are particularly prevalent in corn plants. the trunk and cordons. Infected vines display a slow decline,
diminished vigor, and shoot dieback. Esca is frequently
Corn frequently develops the foliar disease Cercospora linked to older vineyards and is spread through pruning
leaf spot, which is brought on by the fungus Cercospora wounds [30]. Although there is currently no known
zeae-maydis. On the leaves, it manifests as small, round to treatment for esca, disease management requires taking
elongated lesions with gray centers and dark brown borders. preventive measures like using disease-resistant rootstocks
The spots may combine as the disease worsens, growing and maintaining strict hygiene [31].
into larger, atypical lesions. As a result of the plant's
reduced ability to photosynthesize and subsequent The fungus Guignardia bidwellii, a pathogen that also
premature defoliation brought on by severe infections, grain causes black rot, is the source of leaf blight, which affects
development may be impacted. Cercospora leaf spot spreads grape leaves [32]. The potential growth of the lesions could
more readily in warm, humid weather.[24] cause defoliation and a reduction in photosynthetic capacity.
Leaf blight can be particularly harmful in wet and warm
Another important condition affecting corn is gray leaf weather, favoring the disease's growth and spread. Cultural
spot, which is brought on by the fungus Cercospora zeae- practices such as proper pruning, leaf removal, and adequate
maydis. Long, rectangular lesions on the leaves with distinct vineyard airflow can help.
gray centers and dark brown borders are its primary
symptom. These lesions frequently appear in the spaces
between the leaf veins and, in warm, humid weather, they
Tomato Disease The viral disease tomato mosaic virus, which affects
As a well-liked and adaptable crop, tomatoes are tomatoes, is typically transmitted mechanically and through
vulnerable to a number of diseases that may have a negative plant material from infected plants. Mosaic leaf patterns,
effect on their development, yield, and fruit quality. stunted growth, and poor fruit quality are some signs of the
Bacterial spots, early blight, late blight, leaf mold, Septoria disease. To effectively manage this illness, it is crucial to
leaf spots, spider mites (particularly two-spotted spider use seeds free of viruses, practice good hygiene, and manage
mites), tomato mosaic viruses, and tomato yellow leaf curl insect vectors.
viruses are among the prevalent tomato diseases [38].
An additional viral disease that severely harms tomato
Tomato plants are affected by bacterial spots caused by plants is the tomato yellow leaf curl virus. It causes leaf
Xanthomonas spp. on their leaves, stems, and fruits. It first curling, yellowing, and a decreased fruit yield. Whiteflies
appears as small, moist lesions that have the potential to are the main vectors of this disease [44]. The management
enlarge and turn black or dark brown [39]. Bacterial spots of this virus requires actions like the use of insecticides, the
can result in fruit blemishes, defoliation, and decreased use of resistant varieties, and the control of whiteflies.
yield. Examples of management strategies include crop
rotation, the use of disease-resistant varieties, and copper- C. Image Processing, Deep learning and Efficiency
based sprays. Our plant disease detection proposed a hybrid approach
which is a Deep Learning algorithm and classification based
A typical tomato disease is called early blight, which is on image processing. For image processing, Deep Learning
brought on by the fungus Alternaria solani. A large number is the best choice for all. For multiclass classification SVM
of brown lesions eventually develop after it first appears as is one of the best classifiers. By considering all factors of all
dark concentric rings on the lower leaves. Early blight has possible interfaces, Machine Learning (ML) minimizes the
the potential to spread quickly, especially in warm, muggy error between the predicted and actual outcomes [22].
weather. Effective controls for this disease include good
sanitation, prompt removal of infected plant material, and
fungicide applications [40].
Plant Disease Detection: The main goal of this project is The ultimate litmus test for our system's prowess came
to develop a system capable of correctly diagnosing a through the rigorous evaluation of esteemed Deep Learning
variety of plant diseases. The goal is to improve the Algorithms. Notable contenders including CNN, VGG16,
accuracy and effectiveness of illness detection DenseNet201, Xception, and ResNet50 were subjected to
procedures via the use of cutting-edge technology. comprehensive testing. This pivotal experiment was
Deep Learning Algorithm Comparison: The study aims conducted on a dataset comprising a diverse array of 25
to undertake a comparative examination of several deep distinct plant diseases alongside healthy plant instances.
learning algorithms with a focus on selecting the best
algorithm for data equilibrium using advanced data The amalgamation of diverse methodologies,
preparation methods. This comparative analysis attempts deliberate data curation, and a holistic evaluation approach
to shed light on the benefits and drawbacks of different culminate in a pioneering system poised to redefine the
algorithms in dealing with the particular difficulties of landscape of plant disease detection.
the research.
Performance Evaluation of the Proposed Model: An G. Proposed Hybrid Approach
essential component of this research is a thorough Our proposed method for detecting plant diseases
assessment of the performance displayed by the involves combining Convolutional Neural Networks
proposed model. This review includes a thorough (CNNs) to extract image features and Support Vector
examination of the model's correctness and effectiveness Machines (SVMs) for accurate classification. By using the
in comparison to earlier models created for similar goals. strengths of both approaches, we aim to optimize the
The goal is to evaluate the suggested model's originality performance of the disease detection system. This approach
and development within the existing area. combines modern image analysis techniques with advanced
Integration of a Hybrid strategy with SVM: The study classification methods, resulting in improved accuracy and
aims to investigate the integration of a hybrid strategy, efficacy in identifying plant diseases.
combining different techniques based on convolutional
neural networks (CNNs) with support vector machine II. RELATED WORKS
(SVM) algorithms. The research intends to enable a
discriminating examination of these techniques' specific In this study, various powerful deep learning
characteristics, consequently offering insightful algorithms, such as AlexNet, AlexNetOWTBn, GoogLeNet,
information about their respective performances. OverFeet, and VGG, were effectively used to differentiate
between healthy and diseased plants. The algorithms were
E. Existing System thoroughly trained on basic leaf images to quickly diagnose
The current system has been used with a variety of and recognize plant diseases with precision. To train the
Deep Learning Models (DL), including ANN, CNN,[6] R- models, a public database containing 87,848 images, 25
CNN, Faster R-CNN [8], Inception V3[6][8], different plant species, and 58 distinct classes of [plant,
DanseNet121[6], RestNet[20], and Logistic Regression. It disease] pair combinations, including healthy plants, was
has also been used with Machine Learning Algorithms, used. The VGG convolutional neural network was the most
including Decision Tree Classifier, Logistic Regression, K- successful model architecture among those that had been
Nearest Neighbor, Naive Bayes Classifier, and so forth. trained, with a success rate of 99.53% in the classification of
Using balancing techniques, some people can make the data 17,548 plant leaf images that the model had never seen
set balanced. before. [3].
B. Dataset Collection
Our suggested model makes use of a combined dataset. The www.kaggle.com website was used to collect three parts of the
dataset. In addition to disinfected plant data, we obtained 31397 images from 20 diseases. The quantity of pictures in each
category is shown in Figure 4.
D. CNN Algorithm amplitude to the layer beneath them in the stack. In its most
The flow of continuous information along with a feed- formal form, max-pooling involves choosing the values that
forward neural network is called as a "convolutional neural are highest across all receptive fields.
network" (CNN). This is an Artificial Neural Network
(ANN) that comes from nature on the basis of the human Connected Layer
brain. The brain's architecture is made up of very simple Only a few pooling and convolutional layers are
parts and layers that change depending on the complexity of stacked on top of one another during the propagation
the cells in the visual cortex [19]. These modules are through to the CNN. By doing this, the high-order generic
followed by a fully convolutional network, which may have characteristics map is obtained. The fully linked layer,
various layers or sometimes one fully linked layer together. which was the final layer to be added, was made to translate
The approaches of a deep CNN model are always built by the results of the calculations made by the layers before it
dealing with the various CNN methods. Although many and to calculate the high-level reasoning function.
different CNN variant architectures can be broken down into
different modules, the most typical CNN components are The following is how a convolutional layer works:
convolutional and pooling layers, and fully connected layer
(FC). 𝐹(𝑖, 𝑗) = (𝐼 ∗ 𝐾)(𝑖, 𝑗) ∑∑ (𝑖 + 𝑚, 𝑗 + 𝑛)𝐾(𝑚, 𝑛)
Convolution Layer The size (m n) 2D filter, the input matrix, and the
The convolutional layer's primary function is to extract output of the 2D feature map are all denoted by the letters
features, and in order to do this, it learns the informative "I," "K," and "F," respectively. I*K offers the convolutional
feature representation from the image that it receives as layer procedure [31] [32].
input. Feature maps in this layer are used to organize the
neurons in the convolutional layer. Figure 5, below shows the approaches of our proposed
CNN model as well as the total trainable and non-trainable
Pooling Layer parameters. Our CNN model has an input size of
The pooling layer in CNN is primarily used to restrict (256,256,3) and ten classes with a softmax activation
the feature space spatial resolution in order to achieve high function. Five convolution layers and three fully connected
positional stability for input distortion [30]. The typical layers with the activation function were used. Our chosen
CNN design makes use of mean pooling aggregation layers polling layer was max polling. We used regularizers and
to distribute an image's average data input to the following dropout in order to avoid overfitting. Figure 6, represents the
layer in the network. The most recent designs, on the other hidden layer of CNN.
hand, use max-pooling layers, which transfer the highest
Figure 6 showcases the comprehensive summary of the VGG19 model. The input image size has been set to (36,969,561)
and the trainable parameter has been disabled for optimum results. The model boasts 25 layers with Relu and softmax activation
functions, and unit sizes of 256 and 128. To ensure minimal overfitting, we have incorporated a Flatten layer and two Dense
layers to convert the 2D array to a 1D array. L2 regularizers and dropouts have been implemented as well. The final layer has a
class size of 25 and utilizes the softmax activation function. It is noteworthy that the trainable parameter count is lower than that
of the original model. Figure 8 has been included to provide you with a visual representation of the modified VGG19 model
F. Xception Algorithm
Deep CNN architecture called Xception is built on Depth Wise Separable Convolutions. The idea from "Inception" is
carried to the identical conclusion of them in "Extreme Inception," or "Xception" [37]. The Inception model combines deeper
convolutional layers with broader convolutional layers. There are two levels in this model, and each level has three convolutional
layers. Because the Xception model has one level of a single layer, which differs from the Inception model along with another
level. The three parts of the result are separated into three layers by this layer and sent on to the following set of filters What
characterizes the Xception model is the Depth-wise Invertible Convolution. Depth-wise and point-wise convolution are used by
Xception model in all deep CNN models, space and channels are dispersed [38]. The summary of the current Xception model is
shown in Figure 9.
I. SVM Algorithm that is desired. The ability of SVM to handle datasets with a
For classification and regression tasks, a well-liked large number of features is one of its main advantages.
machine learning algorithm called the Support Vector Through the discovery of a hyperplane in the reorganized
Machine (SVM) is frequently used. It is a member of the feature space, it successfully overcomes the "curse of
family of supervised learning algorithms and is renowned dimensionality." Since SVM aims to maximize the margin
for its ability to handle datasets with both linear and non- between classes rather than perfectly fitting the training
linear separability. Finding an ideal hyperplane to divide data, it is also renowned for its resistance to overfitting.
data points into different classes in the feature space is the
basic tenet of SVM. In a scenario involving binary J. Hybridization
classification, the hyperplane serves as a decision boundary, The hybridization of CNNs and SVMs will involve
maximizing the distance between the nearest data points of using the pre-trained CNN as a feature extractor for plant
various classes. The support vectors, also known as these leaf images. The CNN will be fed with plant leaf images
data points, are very important in determining the from the dataset, and its penultimate layer's output (i.e., the
hyperplane. layer before the final classification layer) will be extracted
as high-level features.
SVM is a powerful tool for analyzing both numerical
and categorical features in a range of different data types. These features will then be used as the input for the
Based on a kernel function, it increases the dimensionality SVM classifier, which will be trained to differentiate
of the input data to allow for more complex decision between healthy and diseased plants. During the training
boundaries. The choice of kernel function, such as a linear, process, the SVM will learn to optimize the hyperplane that
polynomial, or radial basis function, depends on the best separates the two classes in the feature space.
characteristics of the data and the level of model flexibility
By combining CNN's feature extraction capabilities In this chapter, we have covered how to set up the
with SVM's classification power, we aim to build a reliable experimental environment. This includes selecting the
and accurate system for detecting plant diseases so that appropriate language, environment, libraries, packages,
farmers may efficiently monitor their crops. functions, and parameters. We have also discussed the
evaluation metrics used to measure the performance of
We first add a sequential layer to our model. After we different algorithms. Additionally, we have identified the
made a CNN model with a conv2D layer as our dataset algorithm that performs the best. Table 1 shows the train and
contains 2D images, after that we added a maxpooling layer. test accuracy of our dataset, with two types of accuracy: one
Then we added a dense layer with 512, 256, and 128 nodes from only the CNN model layer and the other from the CNN
and the activation function are ReLu. This is the normal layer with the SVM layer. Figure 12 displays the accuracy
building of the CNN model. Then we added an SVM and loss curve, with blue and red colors representing
classifier layer. As our dataset has 25 classes, we needed to accuracy, validation accuracy, loss, and validation loss for
add a softmax activation function with 25 Dense. And we both graphs.
Table 1 Difference between SVM and non-SVM Accuracy of Our Train and Test Data.
Before Applying SVM After Applying SVM
Model Train Accuracy Test Accuracy Train Accuracy Test Accuracy
CNN 88.02% 89.77% 88.54% 89.79%
VGG19 89.88% 90.30% 89.97% 90.71%
ResNet15V2 84.02% 86.20% 84.31% 84.89%
DenseNet 89.90% 90.01% 90.12% 91.96%
Xception 80.01% 80.78% 81.02% 82.05%
To offer a comprehensive understanding of disease taxonomy, Table 2 serves as a repository, outlining the categorical labels
pertaining to distinct diseases under consideration. This foundational groundwork paved the way for the ensuing stages of
evaluation and analysis.
𝑇𝑃 + 𝑇𝑁 C. Result Analysis:
= Our system uses a well-balanced dataset and the latest
𝑇𝑃 + 𝐹𝑃 + 𝑇𝑁 + 𝐹𝑁
techniques such as SMOTE-ENN, along with advanced
Precision: models like CNN, VGG19, ResNet15V2, DenseNet,
Precision is the ratio of a total number of true positive Xception, and a strong hybrid model with SVM
predictions and a total number of predicted positives. classification. We are excited to report that our models have
achieved exceptional accuracy scores. CNN, VGG19,
𝑇𝑜𝑡𝑎𝑙 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑇𝑟𝑢𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒 ResNet15V2, DenseNet, and Xception each have impressive
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = scores of 90.60%, 91.14%, 89.02%, 91.82%, and 82.82%,
𝑇𝑜𝑡𝑎𝑙 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑃𝑟𝑒𝑑𝑖𝑐𝑡𝑒𝑑 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒
respectively. These scores demonstrate the accuracy and
𝑇𝑃 effectiveness of our system in correctly classifying
= instances.
𝑇𝑃 + 𝐹𝑃