{'fraction_non_alphanumeric': 0.03135125667746738, 'fraction_numerical': 0.019616428759085733, 'mean_word_length': 4.644834404349975, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A novel GCL hybrid classification model for paddy diseases

The demand for agricultural products increased exponentially as the global population grew. The rapid development of computer vision-based artificial intelligence and deep learning-related technologies has impacted a wide range of industries, including disease detection and classification. This paper introduces a novel neural network-based hybrid model (GCL). GCL is a dataset-augmentation fusion of long-short term memory (LSTM) and convolutional neural network (CNN) with generative adversarial network (GAN). GAN is used for the augmentation of the dataset, CNN extracts the features and LSTM classifies the various paddy diseases. The GCL model is being investigated to improve the classification model’s accuracy and reliability. The dataset was compiled using secondary resources such as Mendeley, Kaggle, UCI, and GitHub, having images of bacterial blight, leaf smut, and rice blast. The experimental setup for proving the efficacy of the GCL model demonstrates that the GCL is suitable for disease classification and works with 97% testing accuracy. GCL can further be used for the classification of more diseases of paddy.


Introduction
Since the twenty-first century, the economic levels of all the countries in the world have been greatly improved. Agriculture has a major role in increasing the economic growth of a nation. 18% of the Indian economy comes from the agriculture sector only. Different countries have their demands for food products. Rice is a staple food that is consumed by almost half of the world. It is grown almost everywhere. India is the second largest rice cultivating country. A huge amount of the rice produced is exported to various countries. Rice is a Kharif crop that grows in a hot and humid environment which makes it prone to get affected by various biotic and abiotic infections [1]. The infection in paddy plant can be categorized based on the cause of the infection or part of plant affected by the infection. The symptoms can appear on the leaf, stem, panicle or roots of the rice plant. Based on the cause of the disease, diseases in rice can be caused by some parasite or environmental reasons. Parasitic diseases are the diseases which are caused by some pathogens like bacteria, fungus, virus, weed or pest whereas non-parasitic are caused by deficiency of some nutrients or environmental reasons. Nearly 30-100% of the yield gets devastated due to various infections in rice plant [2]. Traditionally these infections are detected by farmers only, which are difficult to accomplish in case of large fields, and cross-pollinating as it needs expert knowledge in disease detection. In the past, a lot of effort has been made to incorporate calculations such as machine-based methods to better address this problem. Several research articles describe the use of machine learning in early diagnosis [3]. Continuous maturity of machine learning techniques and the rapid development of deep learning algorithms in recent years have made it feasible to early detection, and classify various plant ailments with higher accuracy. This paper considers three such infections in the paddy plant and a hybrid approach of CNN, LSTM, and GAN for the development of a classification model. The rest of the paper is subdivided into six sections. The first section gives a brief introduction to the topic. The second section investigates the literature review. The third section discusses the methodology used for the rice ailments classification model. The fourth section gives the results and the numerical outcomes of the GCL model. The fifth section concludes the paper.

Related work
This section gives an overview of the literature present on the approach used for the classification. The review considered articles that use LSTM or the hybrid of LSTM with various approaches for the classification of different categories. Table 1 summarizes the articles reviewed in this paper with the reference, year of publication, target model used for classification, and the information about the dataset used with the accuracy of the model. In this article [4], the multi-label text classification is done using the fusion of the spotted hyena optimizer (SHO) and LSTM approach. The model is also compared with the LSTM approach with four different datasets. The paper [5] discusses event classification using the hybrid approach of LSTM, and CNN. The proposed model is validated on four different datasets and compared inaccuracy. The accuracy achieved by the hybrid model is better than others. The authors [6], give a survey of the state-of-art human activity recognition based on a deep neural network. In this article [7], an integrated approach of CNN and LSTM is used for the severity prediction of the covid19 disease. Five categories of severity are considered in this paper.
The authors of this article [8], give a review of the various machine learning approaches used for the detection of cereal crop diseases. This work considered 45 articles for the survey. The article [9] discusses the classification of 12 classes of rice diseases. Depth wise separable CNN approach is used for classification and 95.3% testing accuracy is achieved by the proposed model. In this research paper [10], LSTM and CNN assembled to form a hybrid classifier, classifying various categories of the Cifar10 and Cifar100 datasets [11]. In this article [12], an ensemble of CNN with an LSTM algorithm is used for the classification of text. The authors introduce an attention-based model for longer text sequences for better classification. In this research article [13], the Chinese news corpus is used for text classification based on the fusion approach of LSTM and CNN. In this work [14], the multi-layer perceptron is fusioned with the CNN model for the classification of leaf blasts, bacterial blight, and brown spot. The dataset consisted of 3200 images, and the model achieved 95.31% accuracy. In this article [15], Text classification LSTM-CNN 10 Movie review data [22] 91.17% [13] Text classification LSTM-CNN 10 Chinese news corpus [23] 90.68% [11] Rice diseases classification CNN 3 Self-created 95.31% [12] Rice diseases classification Attention-based depth separable neural network with Bayesian optimization 4 Self-created 94.65% [13] Rice diseases classification CNN 3 Self-created 99.7% [24] Potato blight disease severity detection CNN 4 Self-created 94.77% [25] Tomato wild disease severity CNN 4 Self-created 95.23% [18] Electro-Encephlo-Graph LSTM-DNN (depp neural network) --95% the authors proposed an attention-based depth-wise separable neural network with a Bayesian optimization technique for the classification of brown spot, rice hispa damage, and rice leaf blast with 94.65% accuracy. The size of the dataset is 2370 images. In this study [16], three rice diseases, leaf smut, brown spot, and bacterial blight are classified using the convolutional neural. The model is trained with 4000 images and gives 99.7% accuracy [17]. In this article, the authors proposed a hybrid model of recurrent neural network (RNN) and LSTM for the detection of heart disease. The model demonstrated the accuracy of the hybrid model is better than the classic deep learning techniques for the classification of heart disease. Three separate activation functions had been employed by the authors in RNN and the feature extraction had been done by relational, bigram, and densitybased approaches [18]. The authors in this article classify Electroencephalograph, and EEG to measure brain activity in terms of electrical signals. The authors used LSTM deep neural network approach for classification. The model achieved 95% accuracy.

Material and methodology
This paper makes use of bacterial blight, rice blast, and leaf smut rice leaf infections. Bacterial blight is a bacterial infection that causes infected leaves to turn grayish-green in color [26]. Blast [27] and leaf smut are fungal diseases. Firstly the images from various resources are collected to form a raw dataset. Then to increase the size of the dataset, data is augmented using GAN. The dataset is then passed through the hybrid model for the classification of the diseases. The proposed GCL classifier model is composed of four critical elements: Dataset creation, Image pre-processing, Dataaugmentation using GAN, and CNN-LSTM hybrid classifier model. Figure 1 shows the architecture of the overall framework proposed. Firstly the images from various resources are collected to form a raw dataset. These images are then categorized based on the variety of infections. As the images are taken from different resources, these are then converted into a standardized. All the images are pre-processed to remove the noise and make all images of the same size, and shape. Then to increase the size of the dataset, data is augmented. The GAN augmentation approach is used to increase the size of the dataset. The dataset is then passed through the CNN-LSTM hybrid classifier for the classification of the diseases. The convolutional layers of the CNN model extract features from the images, and then it is passed through LSTM for classification. The algorithm used for the classification of three paddy infections. Input to the model is the colored images.

Dataset creation
The dataset is collected from secondary resources. Various standard online repositories are referred to create the required dataset. Table 2 gives a detailed description of the sources of the dataset creation. The online repositories included are Mendeley [28], Kaggle [29], UCI [30], and GitHub [31]. 1584, 40, 40, and 192 images of bacterial blight are collected from Mendeley, Kaggle, UCI, and GitHub repositories respectively. 40 images of leaf smut are taken from Kaggle and 40 images from UCI. Images of rice blast infection are taken from Mendeley and GitHub. The dataset consists of a total of 3535 images of disease-infected leaves. Figure 2 shows the sample images of the bacterial blight rice leaf disease. It specifies the images from different repositories. Figure 1 depicts the difference in the quality of the dataset of different repositories. Figure 1(a) is an image from Mendeley, Fig. 1(b) is from the kaggle repository, Fig. 1(c) is from UCI, and Fig. 1(d) is from GitHub. Figure 3 shows the sample images of the Leaf smut rice leaf disease. It specifies the images from different repositories. Figure 3(a) is an image from UCI, and Fig. 3(b) is from the kaggle repository. Figure 4 shows the sample images of the blast rice leaf disease. Figure 4(a) is an image from Mendeley, and Fig. 4(b) is from GitHub.

GAN augmentation
GAN is a generative model which uses the unsupervised learning approach. In GAN there are samples in the data that are input variables and lack the output variables. It only uses the input variables to train the generative model. It recognizes patterns from input variables and generates the The discriminator network decides whether the data is generated or taken from the real sample using a binary classification problem with the help of a sigmoid function that gives the output in the form of 0 or 1. The generative model analysis the distribution of the data in such a way that after the training phase the probability of the discriminator making a mistake maximizes and the discriminator on the other hand is based on the model that will estimate the probability that the sample is coming from real data or not the generator. The whole process of generator and discriminator can be summarized in the mathematical formula given in Eq. 1: In Eq. 1, D and G represent discriminator and generator respectively. PR and PG are the probability distribution of real data and generated data respectively. DN and GN are the discriminator network and generator network respectively. Figure 5 gives the structure of the GAN model.
The dataset of rice leaf diseases is passed through GAN for the augmentation of data. As the data is taken from various online repositories. The data from different resources have different formats so the images are augmented based on the source f the image. Table 3 gives information about the size of the dataset from various resources before and after applying the GAN augmentation technique. The count of images in Mendeley, Kaggle, UCI, and GitHub was 3024, 80, 80, and 35 respectively which after GAN augmentation becomes 4258, 185, 185, and 492 respectively. Overall GAN increased the count of images from 3535 to 5120 images.

Pre-processing
As the images are collected from various resources, all the images are not in a uniform format. To convert them into a single standardized format, images of the dataset are first pre-processed. The pre-processing consists of making the images of the dataset uniform in terms of size, orientation, shape, and contrast. Normalization and re-scaling of the images are used for maintaining uniformity in the dataset. The size of the images is chosen carefully as a large size increase the training time of the model. The data is then divided into testing-training sets in the ratio of 20-80. The model uses the concept of validating the proposed classifier. First, the dataset as a whole is divided into testing and training datasets.

CNN-LSTM hybrid model
The terminology used in LSTM is gates and cell. LSTM consists of three gates: the input gate, forget gate and the output gate, and two cells. Figure 6 gives the structural description of  where forget gate is represented by 'F', 't' represents the present state or input state, 'W' is the weight, and 'S' represents the state. The term W f is the weight for forget gate, S t-1 represents the previous state or old state and X t is input. Forget gate decides which information to retain and which is to be dropped. The information from the previous state and current state is passed through the sigmoid function and output arrives in 0 or 1 format where 0 specifies information to forget and 1 specifies information to be remembered.
Equation 3 represents the input gate. It is the second sigmoid activation function and first 'tanh' activation function of LSTM. The input gate is represented by I. The term W i is the weights for the input gate, S t-1 represents the previous state or old state and X t is input.
The output gate is represented through Eq. 4. It highlights which information should be going to the next hidden layer. The term W i is the weights for the output gate, S t-1 represents the previous state or old state and X t is input. Equations 5, 6, and 7 represent intermediate, current, and new cell states.
Intermediate Cell state C it = tanh W c * S t−1 + W c * X t CNN is made up of multiple layers that are executed sequentially. CNN has four layers: the convolutional layer, the pooling layer, the flatten layer, and the dense layer. Each layer is responsible for a specific task. The convolutional layer is in charge of extracting image features. A pooling layer is combined with each convolutional layer. The pooling layer can be max-pooling, average-pooling, or min-pooling, among other options. The proposed GCL hybrid model has eight layers. The convolutional layer is the first layer. The convolutional layer is then combined with the max-pooling layer. The output is then sent to the flattened layer, which reduces the image's dimensionality. Following that, the reshape function is used to change the shape of the image so that it can be input into the LSTM layer. The following layer is the LSTM layer. The diseased leaf image is then classified into a variety of infections using two dense layers that are fully connected. Finally, the reshape function is invoked once more. The reshape function is then used to change the shape of the image. Table 4 describes the layers of CNN with information about the output shape and count of parameters at each layer. Convolution layer work on 1792 parameters, LSTM 17,680 parameters, and dense layer 1, and dense layer 2, uses 1344, and 65 parameters respectively. Initially, the images of 64 × 64 dimensions are input to the convolution layer. 64 filters and kernel size 3 × 3 are used at the first layer of CNN. Relu activation function is used at the convolution layer, LSTM layer, and first dense layer. Softmax is used in the second dense layer. The model is compiled using an Adam optimizer with a binary cross-entropy loss function.

3
The model is trained in 30 epochs. Figure 7 provides the architecture of the classification model.

Results and discussions
The performance of the GCL model is evaluated on various metrics. Accuracy, precision, recall, and F1 score are calculated for the proposed model . Fig shows the values of performance metrics for various paddy ailments using the GCL model. The accuracy of the model in the detection of bacterial blight, blast, and leaf smut is 96%, 95%, and 92% respectively. The precision value for blight, blast, and leaf smut disease is 84%, 90%, and 82% respectively. The value of recall for the three rice infections bacterial blight, blast, and leaf smut is 97%, 94%, and 93% respectively. F1 score for blight, blast, and leaf smut is 99%, 95%, and 91% respectively. The model is trained in 30 epochs. Figure 8 shows the accuracy and loss graph for the GCL model over 30 epochs. According to Fig. 8, The accuracy of the model keeps on increasing with the increase in epoch and the loss is decreasing.  Figure 9 shows the training, validation loss, and accuracy of the CNN-LSTM hybrid model. Figure 9(a) is specifying epoch-wise accuracy in the training, and validation phase of the model, and Fig. 9(b) specifies the epoch-wise loss curve in the training and validation phase of the model. The model is also compared with various classification approaches used in the deep neural network. Figure 10 gives the comparison of GCL with other classification algorithms. The accuracy of CNN with LSTM, CNN with Support Vector Machine (SVM), SVM with and without GAN, and CNN with and without GAN is 95%, 96%, 95%, 91.44%, 95.23%, and 93% respectively. Figure 11(a) gives the percentage-wise contribution of GAN augmentation in dataset creation. GAN augmentation contribution in the dataset for Mendeley, kaggle, UCI, and GitHub is 60%, 70%, 70%, and 60% respectively. Figure 11(b) stipulates the contribution of each online repository in the formation of the dataset. Mendeley has maximum contribution in the generation of the dataset. Kaggle and UCI have the contribution. 86% of the total dataset belongs to Mendeley only. 10% of the data belongs to GitHub, and 2% of kaggle, and UCI each.

Comparison with existing works
The comparative study of the existing models with the proposed GCL model is performed based on the various techniques used for the classification. The results of the GCL are compared with SHO-LSTM, CNN-LSTM, and CNN approaches for classification. GCL model can efficiently process huge data sets and no manual feature extraction is required which cannot be feasible in traditional methods. Table 5 provides a comparative analysis of the GCL model with existing models.
It is clear from the table that GCL is the highest accuracy hybrid model. The accuracy achieved by other hybrid models is far less than that achieved by GCL. A pictorial representation of the comparative study is given in Fig. 12. CNN based approach has the highest accuracy of 99.7% but this is on a limited dataset and without using a hybrid model. Out of the entire hybrid model, GCL has the best accuracy of 97% after that depth separable CNN has 95% accuracy in the classification of various classes. At max, 92% accuracy has been achieved by the hybrid of CNN and LSTM.

Conclusion and future scope
This paper introduced a novel GCL model for the classification of three paddy infections: bacterial blight, leaf blast, and leaf smut. GCL is an ensemble of GAN, CNN, and LSTM approaches. GAN is used for the augmentation of the dataset. The approach has shown to work best in case of limited data due to the lack of real data available. GAN requires little overhead in the generation of new images and hence increasing the dataset size. The ensemble used basic CNN convolutional layers for feature extraction to capture the diverse information about the diseases. Then the output of the convolutional layers is inputted to LSTM. It has

3
been demonstrated that the ensemble model achieved higher accuracy in classification than other single approaches. The dataset generated in this work is collected from various online repositories: Mendeley, Kaggle, UCI, and GitHub. The dataset consists of 3535 images. Out of these images 1856 belong to bacterial blight infection, 1599 belong to rice blast, and 40 belong to leaf smut ailment. Mendeley has 3024 images, kaggle, and UCI have 80 images each, and GitHub has 351 images. GAN increased the size of the dataset from 3535 to 5120 images i.e. 47%. The accuracy achieved by the GCL model is 97%. The accuracy is compared with other classification approaches CNN, SVM, hybrid of CNN-SVM, and hybrid of CNN-LSTM but the accuracy of GCL is highest.
Future work could concentrate on expanding the proposed work to classify various diseases based on severity. Paddy diseases severity detection is not yet implemented for the three diseases considered in this research work. Severity detection is essential for the estimating the yield of the field and to work on the treatment of the affected plant. GCL can classify the diseases of paddy with various level of severity when applied the appropriate dataset. The GCL model could be used to detect plant infections in other plants. Thhis work is confined to particular infections of paddy, GCL can be applied to other diseases of paddy also. It increases the size of dataset and the categories for the classification model. Other feature extraction and machine learning methods can be discovered to improve the efficiency and effectiveness of the plant diseases classification model. Funding I, Shweta Lamba declare that this paper is an original work, has been written by me and has not been submitted in any conference/ journal. The experimental work is almost entirely my own work. The   Fig. 11 The a Contribution of GAN in the dataset. b percentage-wise distribution of various repositories (b) (a) Table 5 Comparison of GCL with the existing approaches References Classification approach used Accuracy (%) [4] Spotted hyena optimizer (SHO)-LSTM 89 [5] LSTM-CNN 52.86 [7] CNN-LSTM 79.2 [9] Depthwise separable CNN 95.3 [10] LSTM-CNN 92 [12] LSTM-CNN 91.17 [13] LSTM-CNN 90.68 [11] CNN 95.31 [12] Attention based depth separable neural network with Bayesian optimization 94.65 [13] CNN 99.7 [24] CNN 94.77 [25] CNN 95.23 Proposed GCL model 97 Fig. 12 Comparative study of the various classification models with GCL