An Improved Deep Residual Convolutional Neural Network for Plant Leaf Disease Detection

In this research, we proposed a novel deep residual convolutional neural network with 197 layers (ResNet197) for the detection of various plant leaf diseases. Six blocks of layers were used to develop ResNet197. ResNet197 was trained and tested using a combined plant leaf disease image dataset. Scaling, cropping, flipping, padding, rotation, affine transformation, saturation, and hue transformation techniques were used to create the augmentation data of the plant leaf disease image dataset. The dataset consisted of 103 diseased and healthy image classes of 22 plants and 154,500 images of healthy and diseased plant leaves. The evolutionary search technique was used to optimise the layers and hyperparameter values of ResNet197. ResNet197 was trained on the combined plant leaf disease image dataset using a graphics processing unit (GPU) environment for 1000 epochs. It produced a 99.58 percentage average classification accuracy on the test dataset. The experimental results were superior to existing ResNet architectures and recent transfer learning techniques.


Introduction
Agriculture is an important sector for many countries and provides raw resources for many businesses [1]. Diseases, insects, and nutrient deficiencies are the most common threats to the growth of crops. Disease diagnosis and treatment, pest management, and fertiliser application are performing an important role in decreasing yield loss [2]. e traditional process for disease detection is not feasible for all crop fields and farmers. Finding suitable human experts for disease diagnosis and treatment requires more time and money. An artificial intelligence approach is required for the automatic detection of plant diseases to overcome difficulties in the traditional approach [3].
Deep learning is a type of artificial intelligence technique that extends from artificial neural networks [4]. e deep learning technique imitates how humans make intelligent decisions through acquiring knowledge [5]. It is increasingly being used in various industrial applications for decision support to increase productivity, reduce errors, and reduce costs. Deep learning techniques perform better than traditional artificial intelligence techniques in terms of decision accuracy and reliability [6]. Deep convolutional neural networks (DCNN) are a class of supervised deep learning techniques.
e DCNNs are most successful in image classification and object detection tasks [7]. A large volume of data is required to train the DCNN models for use in various domains [8]. e data augmentation technique was introduced to increase the amount of training data without data collection for better training performance of DCNN models [9]. Training the DCNN model needs huge computation and storage. e graphics processing units (GPUs) are commonly used to train models more efficiently [10]. e major contributions of this research are as follows: (i) e leaf diseases of twenty-two different plants were diagnosed using novel deep residual convolutional neural networks. e research article is organized as follows: In Section 2, we provided a brief study about plant leaf disease detection using various machine learning and deep learning approaches. In Section 3, the data preparation, the ResNet197 architecture, and the corresponding training process were presented. In Section 4, we experimentally compared the performance of ResNet197 with recent deep transfer learning techniques and discussed the outcomes. Finally, we concluded the research by summarizing the outcomes and future directions in Section 5.

Literature Survey
e recent developments in artificial intelligence techniques support efficient identification of numerous diseases and pest attacks in precision farming. is survey discusses the modern artificial intelligence approaches to plant leaf disease detection. In [11], the authors compared the performance of standard machine learning and deep transfer learning techniques in plant leaf disease detection. ey identified that the performance of the deep learning techniques was better than that of machine learning techniques in leaf disease detections. e VGG-16 net produced a classification accuracy of 89.5% on plant leaf disease detection, which is higher than that of other machine learning and deep learning techniques. e authors in [12] proposed a DCNN with nineteen convolutional layers for the classification of two major apple leaf diseases. e classification accuracy of the model on test data for apple disease detection was 99.2%. e model produced a better performance than support vector machine (SVM), k-nearest neighbour (K-NN), random forest (RF), and logistic regression (LR) techniques. On the other hand, the authors in [13] used a capsule network with a bidirectional long short-term memory model for the classification of apple leaf diseases. e classification performance of their model was better than that of the standard machine learning techniques. Also, the ensemble subspace discriminant analysis classifier with a mask region-based convolutional neural network was used to detect the infected regions of apple crop leaves by the authors in [14]. ey achieved a classification accuracy of 96.6% on the tomato leaf disease dataset using their model. e authors in [15] used a dense convolutional neural network (DenseNet) and multilayer perceptron for detecting bacterial leaf blight, brown spot, and leaf smut diseases in rice crops. e maximum classification accuracy of the rice disease detection model was 97.68%. In [16], the authors proposed a rice crop disease detection model using an attention-based neural network and MobileNet. e rice crop disease detection model has classified the diseases with an accuracy of 94.65% on the test data. e authors in [17] developed a VGG16Net-based rice and wheat leaf disease detection model. e rice disease and wheat disease classification accuracy of the model was 97.22% and 98.75%, respectively. ey compared the performance of the model in rice and wheat disease detection with that of other transfer learning techniques.
Likewise, the authors in [18] designed a simple DCNN to diagnose tomato crop diseases, and they achieved a 98.49% of classification accuracy on testing data. In [19], the authors developed a tomato leaf disease detection model using the DenseNet121 transfer learning technique. ey used the conditional generative adversarial network (C-GAN) for creating augmented data for balancing training datasets. e DenseNet121 model achieved an accuracy of 97.11% on tomato disease classification. In [20], the authors proposed a custom convolutional neural network for plant disease classification. e custom network achieved a classification accuracy of 94.5% on the test dataset. e authors in [21] developed an EfficientNet pretrained model for detecting peach plant diseases with an accuracy of 96.6% on the test data. e improved MobileNet model was proposed for cassava disease detection by the authors in [22]. Also, they achieved better performance than other machine learning and transfer learning techniques in cassava leaf disease detection using MobileNet.
Similarly, the authors in [23] proposed a cucumber leaf disease severity classification model using U-Net architecture and achieved a testing accuracy of 92.85% on the cucumber leaf disease dataset. In [24], the authors proposed a pumpkin powdery mildew disease identification technique using principal component analysis (PCA) and SVM. e model detected the pumpkin powdery mildew disease on the pumpkin leaf with an accuracy of 97.3%, and the authors in [25] developed a cotton lesion detection model using the Resnet50 transfer learning technique. e model produced a classification accuracy of 89.2%, which is better than that of GoogleNet and standard machine learning techniques. Moreover, the authors in [26] developed a super-resolution generative adversarial network (SR-GAN) as an augmentation technique for balancing the data numbers in classes of the dataset.
Also, they identified that the augmented dataset increases the classification accuracy of deep learning models. A custom DCNN model with nine layers was proposed to identify the diseases of thirteen different species by the authors in [27]. e model classified 96% of the images accurately in the test dataset. Recently, the authors in [28] proposed a custom DCNN model for the detection of plant leaf diseases on the standard dataset and field-collected images. e custom DCNN model achieved an average testing accuracy of 99.84% on the test dataset. e authors in [29] proposed a DenseNet architecture for the diagnosis of the twenty-seven different classes of diseases from six crops. e validation and testing accuracy of the classification model was 99.58% and 99.19%, respectively. e authors in [30] proposed a custom network for detecting pearl millet diseases.
e literature survey recognized that residual and dense convolutional neural networks performed better than other transfer learning techniques in plant disease detection [32]. e residual and dense network created deeper connections between the layers than simple convolutional neural networks. e residual and dense networks avoided the vanishing-gradient problem and minimized the number of training parameters. e performance of the residual and dense network in existing plant leaf disease detection applications provided the motivation to propose a residual convolutional neural network for plant leaf disease detection. Most of the state-of-the-art transfer learning techniques were trained on the ImageNet dataset. e transfer learning techniques may cause negative transfer and overfitting problems while using the architecture and weights of the pretrained models for new applications.
In addition, the literature survey shows the significance of data augmentation and hyperparameter tuning for the classification algorithms. A novel residual convolutional neural network was proposed in this research with improved performance than existing residual networks and other transfer learning techniques for detecting plant diseases. e subsequent section discussed the architecture and training process of the proposed plant disease detection model.

Materials and Methods
e proposed plant leaf disease detection model implementation steps are classified into two stages. Implementation of the proposed ResNet197 model started with the data preparation. e data preparation phase concentrates on data collection, augmentation, and data preprocessing. e model training phase includes ResNet197 design, fine-tuning, and training processes. e following subsections describe each of the implementation phases in detail.

Data Preparation.
Implementation of a deep learning algorithm starts with the data preparation phase. It includes data collection, data augmentation, and preprocessing stages.
e proposed dataset was collected from various standard leaf disease detection datasets [27,32]. ere are 103 classes of healthy and diseased images in the proposed dataset. Table 1 illustrates the list of diseased and healthy plant leaf classes in the proposed dataset.
Some classes in the original dataset have fewer samples. On the other hand, some classes have more images. For example, the tea leaf blight disease class has only 214 images, but the tomato yellow leaf curl virus disease classes have 3209 samples. e number of samples should be equal in each class to increase the performance of the classification algorithms. Data augmentation techniques were used in this research to increase the number of samples without collecting new data. e scaling, cropping, flipping, padding, rotation, affine transformation, saturation, and hue transformation techniques were used to produce augmented images on the dataset. e data augmentation process equalized the number of images in each class to become 1500. Figure 1 shows the sample augmented images on the plant leaf disease dataset using data augmentation techniques.
After the augmentation step, the dataset was split for the training, validation, and testing process. e images in the dataset were shuffled and randomly selected for training, validation, and testing. e number of images in the training, validation, and the testing dataset is illustrated in Table 2.
e training process of the proposed ResNet197 model was discussed in subsequent sections. e training process includes model design, fine-tuning, and model training steps.

Model Training.
is section discussed the construction and training process of the proposed ResNet197 model for leaf disease detection. Six blocks of layers were used in the proposed model. Also, the proposed model was called a deep   Figure 2.
e input image size of the proposed ResNet197 model was 224 × 224 × 3 pixels. e first block consisted of one convolutional (Conv) layer. e first convolutional (Conv) layer produced 112 × 112 sized outputs using a 7 × 7 Conv function with a stride of 2. e convoluted data were forwarded to the second block. e second block consisted of one max-pooling layer and three Conv layers. e three Conv layers were used three times in sequence. e output of block 1 was forwarded to the max-pooling layer, which uses a 3 × 3 max-pooling function with a stride of 2. e output of the pooling layer was sent as an input to three Conv layers. e second layer block produced an output sized 56 × 56. e output of the second block was forwarded to the third block. e third layer block consisted of three Conv layers sized 1 × 1, 3 × 3, and 1 × 1 filter size. e Conv layers were used 12 times in a sequence. e third block produced an output sized 28 × 28. After the third block layer, the data were forwarded to the fourth layer block. ree Conv layers were available in the fourth block. e three Conv layers were used 47 times in a sequence. e fourth Conv layer produced the output data with a size of 14 × 14. e fifth layer block was introduced after the fourth block. ree Conv layers were used in the fifth block three times in a sequence. e fifth block produced the 7 × 7 sized output. e output of the fifth block was forwarded to the sixth and final block of the model. e sixth block consisted of an average pooling layer and one fully connected (dense) layer with 103 neurons. e softmax activation function was used in this layer for classifying the input leaf images. e suitable batch size, loss function, optimizer function, and learning rate of the proposed ResNet197 model were identified using the evolutionary search technique. Table 3 displays the optimised hyperparameter value of the proposed ResNet197 model. e proposed ResNet197 model was trained on the plant leaf disease dataset using the optimised hyperparameters up to 1000 training epochs. e training progress and validation progress of the proposed ResNet197 model are shown in Figure 3.
ere was no significant change in the validation performance of ResNet197 after reaching 1000 epochs. So, the training process of the model was stopped with 1000 epochs in the GPU environment. e proposed ResNet197 model was deployed after the successful completion of the training process. e testing process of the proposed ResNet197 model was discussed in the upcoming section.

Results and Discussions
is section discussed the performance of the proposed ResNet197 model in plant leaf disease detection. Also, it compares the ResNet197 model with other versions of ResNet models and state-of-the-art transfer learning techniques using standard performance metrics. VGG-19 Net, ResNet-152, InceptionV3 Net, Mobile Net, and Dense-Net201 are the state-of-the-art transfer learning techniques that are used for the performance comparison.
e area under the curve-receiver operating characteristics (AUC-ROC) curve is the most popular metric for estimating the performance of classification techniques. e ROC of classification techniques for a specific class is calculated using the true positive rate (TPR) and false positive rate (FPR) values of the class on the test data. e TPR represents the number of correctly classified positive samples in the test data [27]. Similarly, the FPR represents the   e AUC-ROC curves of proposed and existing models on two randomly selected classes are shown in Figure 4.
e AUC values of ResNet197 on the sample classes were higher than those of other standard transfer learning techniques. e AUC value of the proposed ResNet197 model on the sample classes is between 0.98 and 1.0; it shows the performance excellence of ResNet197 on plant leaf disease classification.
Classification accuracy, precision, recall, and F1-score are the standard measures to assess the overall performance of the classification techniques [27]. e performance of ResNet197 and most recent transfer learning techniques was compared using the abovementioned metrics. e performance comparison of the proposed ResNet197 model and transfer learning techniques is illustrated in Figure 5. Also, Table 4 illustrates the performance comparison of the proposed ResNet197 model and other ResNet models.
In addition, the classification performance of the proposed ResNet197 model was compared with that of existing state-of-the-art transfer learning techniques. e proposed model achieved an average classification accuracy of 99.58% on the test data. e performance comparison of the proposed ResNet197 model and transfer learning techniques using standard performance metrics is illustrated in Figure 6.
Also, Table 5 shows the performance score of the proposed and existing models on the plant leaf disease dataset. e comparison result shows that the proposed model     Computational Intelligence and Neuroscience achieved better classification accuracy, precision, sensitivity, F1-score, and specificity than existing transfer learning techniques. e inceptionV3 network showed better performance among the transfer learning techniques in plant leaf disease detection.
e average classification accuracy of the proposed ResNet197 model on the test dataset was 99.58%, which is 3.15% higher than that of the inceptionV3 network. e average classification accuracy, average precision, average recall, and average F1-score of the proposed ResNet197 model were superior to those of the other transfer learning techniques.
e AUC values and performance metric outcomes of the proposed ResNet197 model showed that the performance and reliability of the proposed ResNet197 model were superior to those of advanced transfer learning techniques in plant leaf disease detection.

Conclusions and Future Works
Automatic plant disease detection is a crucial process in precision agriculture. is research study proposed a novel deep residual convolutional neural network with 197 layers (ResNet197) for the detection of common leaf diseases in 22 different plants. Some standard datasets and a few recent image augmentation techniques were used to prepare the proposed dataset for the ResNet197 training. Scaling, cropping, flipping, padding, rotation, affine transformation, saturation, and hue transformation techniques were used to produce the augmented images. e proposed dataset consisted of 133,900 images of 103 diseased and healthy classes. e evolutionary searching technique was used to identify suitable values for the hyperparameters of the proposed ResNet197 model in plant leaf disease detection. e training process of ResNet197 and existing transfer learning models was performed on GPU-enabled workstations up to 1000 training epochs. e classification accuracy, precision, sensitivity, F1-score and specificity of the proposed ResNet197 model were 99.58%, 99.36%, 99.42%, 99.39%, and 99.27%, respectively. e performance results of the proposed ResNet197 model were superior to those of the transfer learning techniques such as VGG19Net, ResNet152, InceptionV3Net, MobileNet, and DenseNet201. Also, AUC curves demonstrated the performance and reliability of ResNet197 in plant leaf disease detection.
is research concludes that the deep residual convolutional neural networks with the optimised number of layer blocks perform better than traditional deep learning techniques.
is research study also identified that the performance of the classification algorithms can be improved by data augmentation and hyperparameter optimization techniques. e limitation of ResNet197 is its computational density. It requires significantly more FLOPS than similar models such as VGG19Net and MobileNet. e development of a novel deep convolutional neural network using residually connected networks for the diagnosis of a number of plant diseases is a future direction of the research study.
Data Availability e plant leaf disease data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.