# A Mobile-Based System for Detecting Ginger Leaf Disorders Using Deep Learning
## 3 Materials and Methods
### Classification Approaches  
Deep learning is widely used in machine vision and pattern recognition domains [30]. In contrast to traditional machine learning techniques, which require a largely manual process, deep learning-based methods can perform latent feature extraction autonomously [31]. This study implemented well-known deep learning models such as CNN and VGG-16 for ginger plant disorder classification.  
A widely used model in deep learning is CNN, which has an edge in image identification due to the enormous model capacity and detailed information produced by CNN's core structure properties. It is a complex network structure that performs convolution operations. Due to CNN's better feature extraction abilities, CNN-based classification networks have been adopted and are now the most frequently used model in classifying plant diseases and pests. Input, hidden, and output are the three levels of the CNN model.  
Figure 4: Sample input data of ginger plant disorders.  
Figure 3: Distribution of the dataset. (**a**) Data distribution for pest patterns. (**b**) Data distribution for nutritional deficiency. (**c**) Data distribution for soft rot disease.  
A tumbling convolution layer and a pooling layer in the CNN feature extraction phase typically follow a full connection layer and a sigmoid classification structure [18].  
We also implemented the VGG-16 model on ginger plant disease, nutritional deficiency, and pest attack detection. VGG-16 is a CNN architecture, which took place in the ILSVRC 2014, and has over 138 million parameters. The most significant feature of this architecture is that it never varies the convolutional layers, the padding and maximum pooling layers, which always use a 2 \(\times\) 2 filter with stride 2, and the maximum pooling layer, which uses a 3 \(\times\) 3 filter with stride 1. The VGG-16 architecture adheres to this design of convolution and maximum pooling layers. The last three fully connected (FC) layers are the last with sigmoid activation function and the first two with ReLu. The 416 \(\times\) 416 image size is given to the input layer in this 16-layer design [30]. Recent research has demonstrated the efficiency of the VGG-16 network in identifying the images of affected crops [32]. In our experimental study, CNN models also demonstrated substantial results in classifying plant disease detection [33; 34]. We selected these models for this experiment in prior investigations. We assessed and compared the model's behavior to the acquired images in the field dataset of the ginger crop. We adopted the standard training strategy to train our dataset's model layers. Weights were randomly initialized rather than using pre-trained weights in training the models. The training and validation datasets were trained by models using a 120-batch size with 42 epochs, whilst the \"Adam\" optimizer was trained with default values parameters using a 0.001 learning rate. The binary cross entropy function was deployed as the loss function throughout the training phase.  
In addition, we also implemented a transfer learning approach (pre-trained network). A deep learning-based MobileNetV2 network was used in our images-based ginger crop dataset. Transfer learning is prevalent nowadays, and we used the MobileNetV2 model as a transfer learning approach. It was developed from MobileNetV1 [31], with the addition of inverse residuals and linear bottleneck modules. The basis of the MobileNet architecture was depth-wise convolution [31]. The model takes an input of 150 \(\times\) 150 pixels image. The pre-trained weights were used in this study, and the other layers were frozen. The model provides the input layer, and the sigmoid function is utilized in the final/output layer. We deployed a pre-trained ImageNet model using the Keras library. The performance of the deployed model is evaluated and compared with the CNN and Vgg-16 models. Table 1 details the hyperparameters used during implementation.