ML VS CNN
ML VS CNN
DOI:10.32604/cmc.2022.021875
Article
Deep Learning Based Automated Detection of Diseases from Apple Leaf Images
Swati Singh1 , Isha Gupta2 , Sheifali Gupta2 , Deepika Koundal3, * , Sultan Aljahdali4, Shubham Mahajan5
and Amit Kant Pandit5
1
Department of Electronics and Communication Engineering, University Institute of Technology, Himachal Pradesh
University, Shimla, 171005, India
2
Chitkara University Institute of Engineering and Technology, Chitkara University, Punjab, India
3
Department of Systemics, School of Computer Science, University of Petroleum and Energy Studies, Dehradun, India
4
Department of Computer Science, College of Computers and Information Technology, Taif University, P.O. Box 11099,
Taif 21944, Saudi Arabia
5
School of Electronics & Communication, Shri Mata Vaishno Devi University, Katra, 185320, India
*
Corresponding Author: Deepika Koundal. Email: [email protected]
Received: 18 July 2021; Accepted: 30 August 2021
This work is licensed under a Creative Commons Attribution 4.0 International License,
which permits unrestricted use, distribution, and reproduction in any medium, provided
the original work is properly cited.
1850 CMC, 2022, vol.71, no.1
1 Introduction
Apple also known as malus domestica is commercially the chief significant moderate fruit in
India and its industry is an essential constituent of India’s whole agricultural economy. India is
the sixth major apple manufacturer in the world. The agriculture of apple plants in farming has
become considerable more than merely an earning to feed ever increasing population [1]. Apple is
the most substantial energy source, in both human life and the other living creatures that exist in
the world. Therefore, identifying the infection at an appropriate time and accurately is the utmost
importance [2–4].
Pathology of plants can be perceived in numerous ways. Symptoms that are visible are
associated with certain infections that cannot be noticed at all times and several of them seem
only when it is too late when any precaution can’t be taken care [5–7]. Therefore, there is a need
to develop a technique to solve all of these problems [8].
By usage of image-processing in arrangement with recognition of pattern and classification
tools, a lot of the difficulties will be determined or reduced. Apple leaves mainly are affected
through many diseases like alternaria, black spot, Marsonina, Apple Scab and leaf miner pest.
Diseases like alternaria, black spot and leaf miner pest have been detected in the past by the
use of image processing but no work has been done on detecting Apple Scab and Marsonina
coronaria apple leaf diseases by taking live background of the diseased images. This research
work aims in detecting the two apple diseases, Apple Scab and Marsonina coronaria through
machine learning and deep learning. Leaf affected with Marsonina coronaria is shown in Fig. 1a
and Apple Scab disease is shown in Fig. 1b.
Figure 1: Diseased apple leaves: (a) Marsonina Coronaria, (b) Apple Scab
This novel saliency detection approach intends to detect the apple leaf diseases by training
the proposed CNN algorithm with the infected diseased apple leaf images. Database used is
composed of images taken from farms of H.P and Uttarakhand (India). Total of 50000 live
background images are collected, from the total database 25000 are of Marsonina coronaria
and 25000 of Apple Scab diseases with the help of State Agriculture Universities of Himachal
Pradesh and Uttarakhand. The collected data was also verified by the Horticulture department of
Himachal Pradesh. The proposed algorithm is compared with already obtainable machine learning
techniques and other CNN based architectures. The major contributions of the study are as
follows:
CMC, 2022, vol.71, no.1 1851
• A database of 50000 apple leaf images Marsonina coronaria and Apple Scabs diseases
with live background have been collected from apple farms of two different states of India
Uttarakhand and Himachal Pradesh.
• The images of the dataset are increased to 2 lakh by using different augmentation
techniques and the images were saved separately.
• A Convolutional Neural Network (CNN) based model is proposed having 19 layers with 6
convolutional layers, 3 max-pooling layers, 4 dropout layers, 3 Batch normalization layer, 1
flatten layer and 2 dense layers to detect above said apple diseases.
• The performance of the proposed model is compared with state of art models using various
evaluation metrics.
The remaining paper is structured as follows. Section 2 reviews the past literature on machine
learning and deep learning techniques. Section 3 gives description of materials and methods
and also the proposed methodology. Experiments results and comparison of machine learning
algorithms with the designed CNN are given in Section 4 and lastly the Section 5 gives the
findings and conclusion.
2 Literature Review
An early detection of diseases apple leaf enhances the possibility of better crop yield, and
there is a possible chance of recovery. Efforts are also being done to develop various algorithms
that can categorize apple leaf and apple fruit diseases accurately and efficiently.
The existing widespread machine learning classifiers has been technologically advanced for
early detection of apple diseases. The commonly used methods are built using support vector
machine (SVM), K-nearest neighbor (KNN) method and linear discriminant (LDA) [4]. The
studies developed an automated classification system based on initial segmentation and extraction
of features to describe the morphology or their arrangement. The study demonstrated a support
vector machine based classifier to detect infected potato plants providing the accuracy of 89% [5].
The authors had used Support Vector Machines (SVM) technique for classifying various plant
diseases and achieved high accuracies [6]. Chávez et al. proposed a method to detect foliar
symptoms of potato with the usage of reflectance in the regions of spectrum of light reflection
to be attained with a “trained” human eye [7]. While all mentioned classifiers were designed in
previous studies, to classify manually selected regions of interest. Machine learning algorithms are
in need of engineering in the field of feature selection or extraction and to organize the data
with discriminative information [8]. Sometimes, the power of discriminative is the method which
is inadequate to the competitive cost of identification of features for classification. Prior studies
introduced a new dataset of diseased apple leaf images as the studies carried down previously
were on small dataset. Among different approaches, the convolutional neural network is widely
used in the current era of research for the recognition of patterns in different images problems [9].
In [10], proposed a new identification method for disease in rice plants using deep convolutional
neural networks (DCNN). The dataset used contains 500 original images from fields of leaves of
rice plant, diseased and healthy both. The network was trained for the identification of ten main
diseases in rice plants. The average accuracy of 95.84% is attained by this proposed experiment.
In [11] a CNN based technique is proposed to identify the chemical stained images of apple leaves
and the technique used is a self-adaptive momentum rule for updating the parameters of CNN
model. The accuracy result obtained by the experiment done is 96.08%. In [12], the new system
is suggested for the identification of disease in leaves of cucumber plant using convolutional
neural networks. The accuracy achieved by the proposed CNN system by using the fourfold
1852 CMC, 2022, vol.71, no.1
cross-validation strategy is 94.9% in identification of cucumber leaf between disease leaves and
healthy leaves. In [13], a model using deep convolutional neural networks for the detection of
disease in plants. The different thirteen common plant type’s diseases were identified using the
proposed CNN model. The accuracy achieved by the proposed network is 96.3%. In [14], a CNN
based model is designed for the detection of twenty six different types of diseases and crop species
fourteen in number using the dataset which is publically available of healthy and diseased leaves.
Also the study showed that convolutional neural networks are able to exceed outmoded texture
descriptors. Moreover, only a little work is done in this field of research which has opened the
doors to exploration by using deep learning methods to propose the identification of diseases in
apple leaves automatically [15].
The key aim of this research is to propose a computerized model to examine the diseased
images of apple leaves. This involves an algorithm which will automatically detect Marsonina
Coronaria and Apple Scab from diseased apple images.
3 Proposed Methodology
Here, a CNN based automatic detection model system is developed for automatic classi-
fication of diseased apple leaf images into Marsonina Coronaria and Apple Scab. A research
methodology has been proposed in the following sections which are divided into various stages as
discussed below.
Figure 2: Marsonina diseased apple leaf images: (a) with Live Background, (b) with Black
Background, (c) with White Background
Figure 3: Apple scab diseased images (a) with Live Background, (b) with Black Background, (c)
with White Background
Figure 5: Result of data augmentation of apple scab image: (a) Original image; (b) Rotation
clockwise; (c) Horizontal flipping; (d) Scaling by 15%; (e) Gaussian noise
Figure 6: Result of data augmentation of marsonina coronaria image: (a) Original image; (b)
Rotation clockwise; (c) Horizontal flipping; (d) Scaling by 15%; (e) Gaussian noise
(Continued)
1858 CMC, 2022, vol.71, no.1
Table 4: Continued
S. No. Name of Input image Filter No. of Activation Output with Parameter
layers size size filter function padding
6 Dropout 25 ∗ 25 ∗ 32 0.25 – – 25 ∗ 25 ∗ 32 0
7 Convolutional 25 ∗ 25 ∗ 32 3∗3 64 ReLU 25 ∗ 25 ∗ 64 18496
8 Convolutional 25 ∗ 25 ∗ 64 3∗3 64 ReLU 25 ∗ 25 ∗ 64 36928
9 Maxpooling 25 ∗ 25 ∗ 64 2∗2 – – 12 ∗ 12 ∗ 64 0
10 Batch 12 ∗ 12 ∗ 64 – – – 12 ∗ 12 ∗ 64 256
normalization
11 Dropout 12 ∗ 12 ∗ 64 0.25 – – 12 ∗ 12 ∗ 64 0
12 Convolutional 12 ∗ 12 ∗ 64 3∗3 86 ReLU 12 ∗ 12 ∗ 86 49622
13 Convolutional 12 ∗ 12 ∗ 86 3∗3 86 ReLU 12 ∗ 12 ∗ 86 66650
14 Maxpooling 12 ∗ 12 ∗ 86 2∗2 – – 6∗6∗ 86 0
15 Batch 6∗6∗ 86 – – – 6∗6∗ 86 344
normalization
16 Dropout 6 ∗ 6 ∗ 86 0.25 – – 6 ∗ 6 ∗ 86 0
17 Flatten 6 ∗ 6 ∗ 86 – – – 3096 0
18 Dense 3096 512 – ReLU 512 1585664
19 Dropout 512 0.25 – – 512 0
20 Dense 512 2 ReLU 2 1026
99.7% and 97.8% is obtained with CNN-C model as compared to the CNN-B and CNN-A. It
is seen that deeper the convolutional neural networks architecture better are the results when
compared on the basis of layers.
1.5
1
Accuracy
0.5
Sensitivity
0 Specificity
CNN-A CNN-B CNN-C
CNN Models
From the table it is seen that sensitivity of 85.4% is achieved using sigmoid kernel. Also, an
accuracy of 82% with sigmoid kernel, classification error of 19.9% with linear kernel and finally
precision of 76.9% with linear kernel is obtained. It can be analyzed that the sigmoid kernel
performs better in terms of accuracy and sensitivity but when compared to the proposed three
CNN models, their results are unsatisfactory.
Table 11: Random forest parameter analysis with 6000 testing images
Parameter N_estimator (1000) N_estimator (1500) N_estimator (2000)
Accuracy 0.827 0.843 0.839
Classification error 0.173 0.157 0.161
Sensitivity 0.772 0.802 0.804
Specificity 0.863 0.870 0.862
False positive rate 0.136 0.129 0.137
Precision 0.794 0.808 0.799
Table 12: Logistic regression performance metrics with 6000 testing images
Parameter Binomial Multinomial Ordinal
Accuracy 0.789 0.819 0.82
Classification error 0.211 0.181 0.18
Sensitivity 0.727 0.770 0.772
Specificity 0.834 0.852 0.852
False positive rate 0.167 0.147 0.147
Precision 0.755 0.78 0.780
Overall, the deep learning technique gives better performance as compared to machine learning
techniques.
5 Conclusion
Apple is a highly essential product for India’s economy, and it has played a significant role
in our economy in the past. However, due to numerous diseases harming the crop, it is not
CMC, 2022, vol.71, no.1 1865
as abundant as it once was. The key goal of the research is to detect diseases like Marsonina
Coronaria and apple scab in apple leaves using automatic digital system. Firstly, three different
convolutional CNN networks are proposed for computerized detection of diseased apple leaf
images; secondly, machine learning techniques used for CAD systems, are applied on the dataset,
which can help detect the apple diseases. Lastly, the CNN model is compared with the already
existing machine learning techniques and also with the previous literature. The focus is on explor-
ing how the developed system performs when various performance parameters are implemented,
thus providing a better accuracy and sensitivity than the already existing techniques. The first stage
of the classification is done by convolution neural network in which CNN-C gives best result, and
then the classification is done by machine learning technique in which SVM classifier gives the
best result. Later various performance measures like accuracy, sensitivity, specificity, false positive
rate, classification error and precision are evaluated for machine learning. Out of the performance
measures, accuracy and sensitivity is chosen as the main parameter to judge the best classifier.
Accuracy of 99.2% and sensitivity 99.7% is obtained by taking 200000 histopathology images
using proposed CNN model C.
This work successfully exhibits better classification accuracy and sensitivity for the classi-
fication of apple leaf diseases images using 19 layer convolutional neural networks to classify
Marsonina Coronaria and Apple Scab diseases images of apple leaves. The usage of various
machine learning techniques and convolutional neural networks leads to better classification
accuracy. Apple diseases like alternaria, fire blight, cork spot, powdery mildew, black rot and
phytophthora rot may be considered for future disease detection. For real time solutions, there is
a need to develop mobile based applications which will guide the farmers to detect the disease
in apple leaves on their own. Further other plant diseases can also be taken for detection and
identification of diseases using CNN models and transfer learning models.
Funding Statement: This work was supported by Taif University Researchers Supporting Project
(TURSP) under number (TURSP-2020/73), Taif University, Taif, Saudi Arabia.
Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding
the present study.
References
[1] Z. Chuanlei, Z. Shanwen, Y. Jucheng, S. Yancui and C. Jia, “Apple leaf disease identification using
genetic algorithm and correlation,” International Journal of Agricultural and Biological Engineering, vol.
10, no. 2, pp. 74–83, 2017.
[2] Z. Peng, L. Gang, L. Minzan and L. Daoliang, “Management information system for apple diseases
and insect pests based on GIS,” Transactions of the Chinese Society of Agricultural Engineering, vol. 22,
no. 2, pp. 150–154, 2006.
[3] Y. Atoum, M. J. Afridi, X. Liu, J. M. McGrath and L. E. Hanson, “On developing and enhancing
plant-level disease rating systems in real fields,” Pattern Recognition, vol. 53, no. 5, pp. 287–299, 2016.
[4] P. R. Rothe and R. V. Kshirsagar, “Cotton leaf disease identification using pattern recognition
techniques,” in Proc. of the 2015 Int. Conf. on Pervasive Computing (ICPC), Pune, India, pp. 1–6, 2015.
[5] P. B. Padol and A. A. Yadav, “SVM classifier based grape leaf disease detection,” in Proc. of the 2016
Conf. on Advances in Signal Processing (CASP), Pune, India, pp. 175–179, 2016.
[6] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed et al., “Going deeper with convolutions,” in Proc. of
the 2015 IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, pp. 1–9,
2015.
1866 CMC, 2022, vol.71, no.1
[7] S. S. Gaikwad and S. Singh, “Fungi classification using convolutional neural network,” Turkish Journal
of Computer and Mathematics Education (TURCOMAT), vol. 12, no. 10, pp. 4563–4569, 2021.
[8] Y. Zhong and M. Zhao, “Research on deep learning in apple leaf disease recognition,” Computers and
Electronics in Agriculture, vol. 168, no. 2, pp. 105146, 2020.
[9] P. Jiang, Y. Chen, B. Liu, D. He, C. L. Jiang et al., “Real-time detection of apple leaf diseases using
deep learning approaches based on improved convolutional neural networks,” IEEE Access, vol. 7, no.
2, pp. 59069–59080, 2019.
[10] M. B. Tahir, M. A. Khan, K. Javed, S. Kadry, Y. D. Zhang et al., “Recognition of apple leaf diseases
using deep learning and variances-controlled features reduction,” Microprocessors and Microsystems, vol.
7, no. 1, pp. 104–127, 2021.
[11] Y. H. Jin, S. C. Hwan and L. D. Hyuk, “Apple leaf disease identification through region-of-interest-
aware deep convolutional neural networks,” Journal of Imaging Science and Technology, vol. 64, no. 2,
pp. 20507-1, 2020.
[12] S. Baranwal, S. Khandelwal and A. Arora, “Deep learning convolutional neural network for apple
leaves disease detection,” in Proc. of Int. Conf. on Sustainable Computing in Science, Technology and
Management (SUSCOM), Jaipur-India, Amity University Rajasthan, 2020.
[13] H. J. Yu and C. H. Son, “Leaf spot attention network for apple leaf disease identification,” in Proc.
of the IEEE/CVF Conf. on Computer Vision and Pattern Recognition Workshops, China, pp. 52–53, 2020.
[14] Q. Yan, B. Yang, W. Wang, B. Wang, P. Chen et al., “Apple leaf diseases recognition based on an
improved convolutional neural network,” Sensors, vol. 12, no. 2, pp. 3535–3541, 2020.
[15] B. Liu, Y. Zhang, D. J. He and Y. Li, “Identification of apple leaf diseases based on deep convolutional
neural networks,” Symmetry, vol. 10, no. 1, pp. 11–16, 2018.
[16] P. Bansal, R. Kumar and S. Kumar, “Disease detection in apple leaves using deep convolutional neural
network,” Agriculture, vol. 11, no. 7, pp. 617–620, 2021.
[17] I. Gupta, S. Gupta and S. Singh, “Breast cancer detection using deep learning and machine learning
techniques,” Journal of Advanced Research in Dynamical & Control Systems, vol. 11, no. 2, pp. 1487–1498,
2019.
[18] S. Singh and S. Gupta, “Apple scab and marsonina coronaria diseases detection in apple leaves using
machine learning,” International Journal of Pure and Applied Mathematics, vol. 118, no. 5, pp. 1151–1166,
2018.
[19] S. Singh and S. Gupta, “Digital image processing techniques for early detection and classification of
different diseased plants,” International Journal of Bio-Science and Bio-Technology, vol. 8, no. 4, pp. 61–
66, 2016.
[20] I. Gupta, S. Gupta and S. Singh, “Invasive ductal carcinoma in histopathology images using machine
learning techniques without deploying feature extraction,” Journal of Computational and Theoretical
Nanoscience, vol. 7, no. 16, pp. 2589–2595, 2020.
[21] S. Mahajan, A. Raina, X. Z. Gao and A. K. Pandit, “Plant recognition using morphological feature
extraction and transfer learning over SVM and AdaBoost,” Symmetry, vol. 13, no. 2, pp. 356–363,
2021.
[22] J. Lu, L. Tan and H. Jiang, “Review on convolutional neural network applied to plant leaf disease
classification,” Agriculture, vol. 11, no. 8, pp. 707–710, 2021.
[23] S. Uguz and N. Uysal, “Classification of olive leaf diseases using deep convolutional neural networks,”
Neural Computing and Applications, vol. 33, no. 9, pp. 4133–4149, 2021.
[24] N. Kaur and V. Devendran, “Plant leaf disease detection using ensemble classification and feature
extraction,” Turkish Journal of Computer and Mathematics Education, vol. 12, no. 11, pp. 2339–2352,
2021.
[25] S. K. Kim and J. G. Ahn, “Tomato crop diseases classification models using deep CNN-based
architectures,” Journal of the Korea Academia-Industrial Cooperation Society, vol. 22, no. 5, pp. 7–14,
2021.