P: ISSN No. 2394-0344 RNI No.  UPBIL/2016/67980 VOL.- VII , ISSUE- IV July  - 2022
E: ISSN No. 2455-0817 Remarking An Analisation
Apple Leaves Disease Detection using Regularized Convolutional Neural Networks
Paper Id :  16255   Submission Date :  14/07/2022   Acceptance Date :  20/07/2022   Publication Date :  25/07/2022
This is an open-access research paper/article distributed under the terms of the Creative Commons Attribution 4.0 International, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
For verification of this paper, please visit on http://www.socialresearchfoundation.com/remarking.php#8
Kanchan Sharma
Scholar
ECE Department
Deen Bandhu Chhotu Ram University Of Science And Technology
Murthal,Haryana, India
Prachi Chaudhary
Assistant Professor
ECE Department
Deen Bandhu Chhotu Ram University Of Science And Technology
Murthal, Haryana, India
Abstract Plant diseases leads to degradation of quality and quantity of production. Apple trees are probably one of the most popular plants and due to its nutritious values it offers many health benefits. But apple leaf disease affects the apple yield and quality. Alternaria leaf spot, Brown spot, Gray spot, and Rust are four most common type of disease that greatly affects the apple production. As farmers mostly observe the plants with naked eyes which is highly imprecise way to detect the diseases, and early detection of apple leaf disease and its prevention before spreading the disease to other parts of plant is a challenge. Therefore, the automatic diagnosis of apple leaf diseases in plants is required at early stages. Apple leaf disease dataset used in this model is taken from science bank dataset which contains total 1664 apple leaf images, about 51.9% images from laboratory and about 48.1% images from real cultivation fields under different conditions and different times. To address this issues this paper suggests the regularized convolutional neural network (CNN) model for early diagnosis of diseases of apple leaves. Regularization of CNN model is performed during training of neural networks by adjusting regularization methods i.e., Ridge Regression regularization (l2), Dropout regularization. Proposed model detects four different types of apple leaves diseases. The results of experiment shows that, proposed model with Ridge Regression regularization (l2) regularization method detects apple leaf diseases with accuracy 85% and with Dropout regularization method accuracy achieved is 95%. The obtained results suggested that model with dropout regularization method provides better solutions in domain of plant leave disease detection with high accuracy and faster convergence rate.
Keywords Convolutional Neural Network, Disease Detection, Machine Learning, Ridge Regression Regularization, Dropout regularization
Introduction
With a high amount of nutritious food and medicine value, apple trees are probably one of the most popular plants. However, various diseases occur more frequently in the production of apples, thus resulting in significant economic Losses. Timely and effective diagnosis of diseases of apple leaves is important in healthy development of the apple industry assurance and it became a research center for agricultural knowledge. Traditional visual observations by experts have been made to detection of apple plant leave diseases. However, there is a chances of misconception because of similar kinds of diseases and arbitrary perception[1]. In this case, different approaches for diagnosis of plant diseases studied. Howbeit, they needs more accurate tools and detectors [2],[3] which leads to higher costs and lower efficiency. In recent times, with the advent of digicam and other electronic apparatuses, automated plant-base diagnostics using machine learning have become widely used as an acceptable alternative [4]–[11]. However, conventional machine learning methods such as SVM (support vector machine), K-nearest neighbor, and K-means clustering etc. involved very complex data processing steps before model training due to which there is reduction in efficiency and accuracy of diagnosis of plant leave detection. Machine learning techniques works fine to those images which has uniform background and taken in ideal environment of laboratory. In recent, deep learning which is a subset of machine learning with convolutional neural networks has made advancement in field of computer vision and diagnosis of plant leaves [12]–[14]. CNN has a capability of automatic feature extraction from the given input images by ignoring complex preprocessing of input images; hence CNN becomes the area of research in object detection. However, the early diagnosis of apple plant leaf detection is a challenge due to following reasons: same leaf may have multiple spots, disease spots or marks on leaves may vary in size for the same kind of diseases, there can be same spot for different kind of diseases, during training of model most common problems are overfitting, underfittng, vanishing gradient, exploding gradient. To address these issues, this paper suggests the improved convolutional neural network based on latest regularization methods to avoid overfitting. The main contributions of this paper are summed up as follows: 1. For increasing the accuracy and robustness of CNN model, images of apple leaf disease not only used with uniform background but also taken with complex environment at different times of the day. 2. As apple leaf disease dataset is inefficient to overcome the problem of overfitting regularization methods l2 and dropout is used. 3. A convolutional neural network model is employed for early apple leaf disease detection. The proposed model was able to detect four kinds of diseases with high accuracy. Furthermore, proposed model identified the various spots of same disease and also, different diseases of same spots. The results of experiment shows that the proposed regularized CNN model gives an accuracy of 85% by using Ridge Regression regularization (l2) method and 95% by using dropout regularization method. With small dataset by using l2 and dropout regularization methods overfitting problem is resolved. The research paper is arranged as follows- the literature work is introduced in section II, section III discusses methodology used for building a CNN model is described in detail, section IV shows experimental results and detailed discussions regarding obtained results which represents the validation, accuracy and prediction of proposed regularized CNN model. Finally, in section V conclusion is summarized.
Aim of study 1. Images of apple leaf disease were not only collected with a homogeneous background but also in varied environments at various times of the day in order to increase the accuracy and resilience of the CNN model. 2. Since the dataset for apple leaf disease is ineffective, dropout and l2 regularisation techniques are utilised to combat overfitting. 3. To aid farmers in using the proper fertiliser through early identification and diagnosis of apple leaves.
Review of Literature

Recent research papers and articles have been studied to enhance the precision and accuracy of proposed model for apple leave disease detection. Disease of plants is a major threat to plants and their growth yield and many researchers have used great efforts in diagnosing plant diseases. Conventional, visual testing by specialists done to detect plant diseases and biological testing is the second option, if required. In past few years, with the advent of computer technology, machine learning has become increasingly used in training and to detect diseases of plants and is another satisfying way diagnosis of diseases of plants.Peng jiang et al proposed an improved real-time CNN model named as INAR-SSD which was able to extract features of input images apple leaf disease[15]. Their model detected five common types of apple diseases. Sammy V. Militante et al created a model which was capable to identify 32 different plant leaf diseases[16]. Saraansh Baranwal et al proposed the deep learning model for the classification of apple leaf disease detection. By making the changes in various parameters like regularization, number of epochs etc[17]. Prakhar Bansal et al proposed a CNN model based on different algorithms such as DenseNet121, EfficientNetB7 etc. They achieved the accuracy of 90% on the multiple disease on same leaves[18]. Arunabha M. Roy et al, proposed a model with optimization of speed and accuracy for multi-class plant disease detection, result obtained was 56.9 FPS, 9.05% increment in precision, 7.6% increment in F1-score[19]. Yong Zhong et al. proposed a model based on DenseNet121 for the diagnosis of apple leaves disease detection. Their proposed model achieved an  accuracy of 93.51% - 93.71% which was better as compared to model with cross entropy loss function, was 92%[20]

Sampling

The whole process of developing a regularized CNN model of apple leaves disease detection is explained in details. The whole process is divided into several required categories in the paragraphs given below important steps i.e. data collection, data preprocessing and augmentation etc. Figure 1 shows a flow diagram of methodology which is used in building a regularized CNN model.

 

Figure 1. Represents the methodology

A. Data Collection

The database used in this study is a set of openly available data, taken from science bank dataset of apple leaf disease, which contains total 1664 images of apple leaves, out of which about 51.9% images of apple leaves are from laboratory and about 48.1% images taken from real cultivation fields under different conditions and different times of a day. Approx 278 images of alternaria leaf spot, 215 images of Brown spot, 395 of Gray spot, 409 of healthy, and 347 images of rust.

B. Image Acquisition

Apple leaf disease dataset downloaded from science data bank in folder ALDD and uploaded to drive and dataset is uploaded in google collaboratory by mounting drive. The acquired dataset consists of approx. 1664 images and 5 different classes. Grey spot class is shown in figure 2.

 

Figure 2 represent the grey spot class of apple leaf disease

C .Data Pre-Processing and Augmentation

Convolutional Neural Network has end to end learning, it learn from patterns, so deep CNN does not require so much pre- processing. To minimizing random errors we apply augmentation, it involves image rescaling and resizing to reduce computational processes. In data augmentation we flip and rotate images horizontally and vertically. By doing this we can overcome the problem of overfitting.  

D. Data Partition

Apple leaf disease dataset originally consists of 1664 images, having four classes of different diseases. We divide dataset images into the ratio of 80:10:10 for the purpose of training, testing and validation.

E. Model

Our neural network is based on CNN. CNN is a deep learning model which is used to processing of data that consists of grid patterns like images. It is kind of mathematical construction which is made up from various kinds of layers such as convolution, max pooling, flattening layer and full connection layer as represented in figure 3. Convolution layers is used to transforming an input image by using a kernel. In digital images, information is stored in pixel. And pixel values are stored in 2 dimensional array. Kernel which is also known as a feature extractor is applied on each pixel for transforming an image into desired form. Convolutional layer and max pooling are used for feature extraction. Flattening layer is used to convert 2-D images into 1-D. Full connection layer used for mapping of extracted features into final output [20].

 

  Figure 3. represents the steps involved in CNN

F. CNN Model with L2 Regularization Method

During the training of neural network from scratch, I realized that first problem to face will be probably overfitting. Let’s first understand what is overfitting, after training the model it is possible that the decision boundary fits so well in to train dataset and if we want to make a predictions on test dataset then it will not perform well on test dataset. Thus we have high train accuracy but low test accuracy and this condition is known as overfitting. But we ideally wants that smooth curve between training and test dataset. To overcome the problem of overfitting in neural network we use regularization. Highly complex non linearity in neural network results in very deep convolutional neural network, which have many hidden layers and each hidden layer have many neuron and complex connection between each neuron will create highly complex non-linear curve, so if we want to smother curve and decrease non linearity then we want slightly lesser number of neurons so, if somehow we can nullify the effect of certain neurons in hidden layers of neural network then we can increase the linearity and then we can get smother curve that will fit properly. In machine learning model we add the term  with cost function or loss function.

G. CNN Model with Dropout Regularization Method

As mentioned earlier overfitting is the very serious problem in neural networks, to overcome this issue another regularization method we are using is dropout. During training of neural network some of specific neurons may be develop to hold certain kind of parameters in them and for amplification of these patterns our network will increase the value of weights associated to these neurons so our model will strongly recognized those patterns but might fail to recognize other patterns. So, if we drop certain neurons randomly then specifically increased weights associated with certain neurons, our model will evenly distribute that weight among all the weight parameters. Dropout means dropping out hidden and visible units in neural networks i.e. temporary removing units from neural nets with its outgoing and incoming connections. Our aim is to reduce the values of weights to achieve certain values close to zero. In dropout the weights are distributed among all the neurons [22]. 

       

 Figure 4.1 standard network          Figure 4.2 dropout network

Result and Discussion

To restrict overfitting, in this research paper different methods have been utilized. Firstly, our dataset is taken from science bank dataset which consists of apple diseased and healthy leaves, captured under various environment and conditions. About 48.1% images are taken from real fields. Due to complex and uniform background of leaves generalization of our proposed model can be ensured. Secondly, by applying data augmentation on apple leaves, random noise and errors are minimized that helps the model by preventing it from recognizing irrelevant patterns which reduce the occurrence of overfitting. Result obtained from l2 and dropout model is detailed as follows:
A. Result of l2 regularization model
After tuning all the parameters as represented in table 1. proposed model has gained 84% validation accuracy, 92.44% training accuracy and 48% validation loss in 50th epoch and time taken by model to complete one epoch is 4s. Overall accuracy of our model using l2 regularization is 85%. As shown in figure 5(a)

 Table 1. Tuning parameters               

       Parameter

Size

batch size

epochs

train

test

validation

kernel

pooling

regularization

input activation- function

output activation- function

50

50

80

10

10

3x3

maxpooling

l2

relu

 

softmax





















   Fig. 5.1 Represents result of l2 regularization

Fig. 5.2 training vs validation accuracy & loss

 Figure 5.3 Prediction of L2 regularization model
B. Result of dropout regularization model:
We have all the same tuned parameters as l2 regularization shown in table 1 model expect the dropout regularization method. Proposed model gained 94% validation accuracy, 93.44% training accuracy and 17% validation loss in 50th epoch and time taken by model to complete one epoch is 3s. Overall accuracy of our model using dropout regularization is 95%. As shown in figure 5.4
 
                             Fig 5.4 Represents result of dropout regularization

Fig. 5.5 Training vs validation accuracy & loss

Figure 5.6 Prediction of dropout regularization model

Conclusion In this research paper, we are focusing on the overfitting issues that arises during the training of CNN model for early diagnosis of apple leave diseases. A total 1664 images of apple leaves are taken from science databank consists of five classes i.e. Alternaria leaf spot, Brown spot, Gray spot, Rust, healthy, with complex and uniform background collected from laboratory and real fields. Furthermore, generated by data augmentation technique. We improved the CNN model by tuning of regularization techniques, in our proposed model we used l2 and dropout regularization technique to minimize the effect of overfitting of neural network. We achieved overall 95% accuracy with dropout regularization and 85% with l2 regularization technique. Results demonstrate that dropout was able to classify the apple leave diseases with high accuracy. In future we will use dropblock regularization technique to reduce overfitting by implementing a function using algorithm.
References
1. M. Dutot, L. M. Nelson, and R. C. Tyson, “Postharvest Biology and Technology Predicting the spread of postharvest disease in stored fruit , with application to apples,” Postharvest Biol. Technol., vol. 85, pp. 45–56, 2013, doi: 10.1016/j.postharvbio.2013.04.003. 2. A. Mahlein et al., “Remote Sensing of Environment Development of spectral indices for detecting and identifying plant diseases,” Remote Sens. Environ., vol. 128, pp. 21–30, 2013, doi: 10.1016/j.rse.2012.09.019. 3. L. Yuan, “DigitalCommons @ University of Nebraska - Lincoln Spectral analysis of winter wheat leaves for detection and differentiation of diseases and insects,” 2014. 4. F. Qin, D. Liu, B. Sun, L. Ruan, Z. Ma, and H. Wang, “Identification of Alfalfa Leaf Diseases Using Image Recognition Technology,” pp. 1–26, 2016, doi: 10.1371/journal.pone.0168274. 5. Z. Chuanlei, Z. Shanwen, Y. Jucheng, S. Yancui, and C. Jia, “Apple leaf disease identification using genetic algorithm and correlation based feature selection method,” vol. 10, no. 2, pp. 74–83, 2017, doi: 10.3965/j.ijabe.20171002.2166. 6. S. Arivazhagan, R. N. Shebiah, S. Ananthi, and S. V. Varthini, “Detection of unhealthy region of plant leaves and classification of plant leaf diseases using texture features,” vol. 15, no. 1, pp. 211–217, 2013. 7. “Agricultural plant Leaf Disease Detection Using Image Processing,” vol. 2, no. 1, pp. 599–602, 2013. 8. D. Albashish and S. Bani-ahmad, “Detection and Classification of Leaf Diseases using K-means-based Segmentation and Neural-networks-based Classification,” no. February, 2011, doi: 10.3923/itj.2011.267.275. 9. P. Rajan, “Detection And Classification Of Pests From Crop Images Using Support Vector Machine,” 2016. 10. T. Rumpf, A. Mahlein, U. Steiner, E. Oerke, H. Dehne, and L. Plümer, “Early detection and classification of plant diseases with Support Vector Machines based on hyperspectral reflectance,” Comput. Electron. Agric., vol. 74, no. 1, pp. 91–99, 2010, doi: 10.1016/j.compag.2010.06.009. 11. M. Islam, A. Dinh, and K. Wahid, “Detection of Potato Diseases Using Image Segmentation and Multiclass Support Vector Machine,” pp. 8–11, 2017. 12. C. Wu and C. Luo, “A Greedy Deep Learning Method for Medical Disease Analysis,” IEEE Access, vol. 6, pp. 20021–20030, 2018, doi: 10.1109/ACCESS.2018.2823979. 13. H. Lu, Y. Li, M. Chen, H. Kim, and S. Serikawa, “Brain Intelligence : Go Beyond Artificial Intelligence”. 14.J. Li, N. Wang, Z. Wang, H. Li, C. Chang, and H. Wang, “New Secret Sharing Scheme Based on Faster R-CNNs Image Retrieval,” IEEE Access, vol. 6, pp. 49348–49357, 2018, doi: 10.1109/ACCESS.2018.2821690. 15. P. Jiang, Y. Chen, and B. I. N. Liu, “Real-Time Detection of Apple Leaf Diseases Using Deep Learning Approach Based on Improved Convolutional Neural Networks,” IEEE Access, vol. 7, pp. 59069–59080, 2019, doi: 10.1109/ACCESS.2019.2914929. 16. S. V Militante, B. D. Gerardo, and N. V. D. Ĵ, “Plant Leaf Detection and Disease Recognition using Deep Learning,” 2019 IEEE Eurasia Conf. IOT, Commun. Eng., pp. 579–582, 2019. 17. S. Baranwal, S. Khandelwal, and A. Arora, “Deep Learning Convolutional Neural Network for Apple Leaves Disease Detection,” pp. 260–267, 2019. 18. P. Bansal, R. Kumar, and S. Kumar, “Disease Detection in Apple Leaves Using Deep Convolutional Neural Network,” 2021. 19. A. M. Roy and J. Bhaduri, “A Deep Learning Enabled Multi-Class Plant Disease Detection Model Based on Computer Vision,” pp. 413–428, 2021. 20. D. L. Models, “SS symmetry Identification of Apple Tree Leaf Diseases Based on Deep Learning Models,” pp. 1–17. 21. K. Jayech, “Regularized Deep Convolutional Neural Networks for Feature Extraction and Classification Regularized Deep Convolutional Neural Networks for Feature Extraction and Classification,” no. January, pp. 0–9, 2019, doi: 10.1007/978-3-319-70096-0. 22. G. Ghiasi and T. Lin, “DropBlock : A regularization method for convolutional networks,” pp. 1–11.