# A Mobile-Based System for Detecting Ginger Leaf Disorders Using Deep Learning
## 4 Results and Discussion
### Performance Analysis of the Models  
The systematic evaluation accuracy for classifying the images into accurate classes is shown in Figure 6. An accuracy from approximately 90% (MobileNetV2 in pest patterns) to 99% (CNN in soft rot) was observed in ginger plant disorder detection. The proposed models' testing accuracies were tested for the rise and fall in all ginger disorders' pest patterns, nutrient deficiency, and soft rot. For training purposes, 70% of the dataset was employed, and the models attained the highest accuracies. It can be observed that VGG demonstrated the highest accuracy during the testing phase as compared to other models. The findings indicate that the proposed methods performed admirably despite the dataset's varied and heterogeneous background. These results also demonstrated that a significant number of training images are needed for deep-learning models to identify and extract the fundamental characteristics of the studied data. In Figures 7-9, the confusion matrices are presented for the employed models using the 70-30 data configuration. Here, the diagonal values show that the number of accurately predicted results matched with the validation data. The values presented off-diagonal show the inaccurate prediction results on the validation data. The confusion matrix indicates that the proposed models can accurately predict the healthy and affected ginger disorder leaf images. Figure 6: Performance of the proposed models in terms of accuracy. Figure 7: Confusion matrices on a pest pattern based on 546 validation images. Moreover, the model performance is also evaluated in terms of precision, recall, and F1-score, as shown in Figure 10. The pest pattern results of the evaluation metrics are shown in Figure 10. Here, it is demonstrated that CNN remains average in precision, recall, and F1-score, while the recall was not quite promising for the MobileNetV2 model. The deficiency of nutrients reveals that CNN and VGG-16 perform better than the MobileNetV2 model shown in Figure 10. In Figure 10, the deep learning models CNN and MobileNetV2 reported that the soft rot prediction in precision is outstanding. Recall and F1-score perform better in CNN and MobileNetV2. The VGG-16 model does not attain the best performance but remains average in detecting the soft rot disease of the ginger plant. In Table 3, we present the MCC results against each employed algorithm. In Table 4, we investigate the computational cost of the proposed models in terms of trainable parameters and training time per epoch. It is clear from the Table that MobileNetV2 contains a smaller number of parameters in training the model, while CNN includes a larger number of parameters. Figure 11 shows that the models take a maximum training time per epoch for both the  
Extensible Markup Language (XML) and the Android SDK were used to develop the smartphone application. A smartphone was deployed to accomplish the task of the detection of disease, nutritional deficiency, and pest patterns in a real-time environment. This android application was combined with deep learning models to track the results of classification models. We converted the models of the type.h5 file into type.tflite file for converting and using in the android application. \begin{table}
\begin{tabular}{l l} \hline \hline
**Algorithm** & **Number of Parameters** \\ \hline CNN & 3,453,121 \\ \hline VGG-16 & 14,716,740 \\ \hline MobileNetV2 & 1281 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Number of trainable parameters. Figure 10: Overall average precision, recall, and F1-score. The interface of the application is shown in Figure 12, where the user can select the detection problem and call the corresponding function by pressing the defined buttons. Once we click on the \"Disease Detection\", \"Pest Pattern\", or \"Deficiency Nutrients\" buttons, a new screen appears, as shown in Figure 12b,c. The figures depict the screen view from which farmers either take an image from the affected plant or post a stored image from their smartphone.