## 3 Result and Discussion  
The overall implementation of the tomato leaf disease detection system is composed of several stages, as shown in Figure 8, integrating a CNN and an RNN to effectively process and classify the images:  
* Stage 1--Dataset Splitting: The process begins with the augmented dataset of tomato leaf images, which includes a training dataset, a validation dataset, and a test dataset with ratios of 70%, 20%, and 10%, respectively. This division ensures that the model can be trained on one portion of the data while the other is reserved for validating and benchmarking its performance. * Stage 2--Feature Extraction: The images are then resized to 64 \(\times\) 64 using Bilinear interpolation and are fed into a pre-trained MobileNetV2 model, which has been fine-tuned to adjust its parameters specifically for the task of tomato leaf disease detection. The classification layers of MobileNetV2 are removed, retaining only the feature extractor layers. These layers output the image feature layers, which are the size of 2 \(\times\) 2 \(\times\) 1280, capturing the essential characteristics of the input images. * Stage 3--Dimensions Reshape: The image feature layers obtained from the feature extraction process are reshaped to the size of 4 \(\times\) 1280, suitable for sequential data processing. This step is crucial for preparing the data for the subsequent RNN, ensuring that the sequential nature of the features is maintained. * Stage 4--Temporal feature processing: The reshaped features are then fed into a CFC layer with an NCP implemented. This layer has 128 neural units, with an input size of 36 and an output size of 32, designed to process the sequential data. The output from the CFC layer is then passed through a dense layer of 11 units with the SoftMax activation function, which classifies it into 11 different classes. * Stage 5--Model Validation: The validation dataset is used to run through the whole trained model again, evaluating the model's predictions to ensure accuracy and reliability. This process is critical to ensure the model does not overfit the training dataset. Figure 8: Model implementation process from image input processing to final validation for each training epoch. This comprehensive architecture leverages the strengths of a CNN for feature extraction and an RNN for sequence learning, creating a robust and efficient model for detecting tomato leaf diseases. By integrating these techniques, the model is well-equipped to handle the complexities of real-world agricultural scenarios. The code and data used in this study are available to ensure transparency and reproducibility. All scripts developed for data preprocessing, model training, and evaluation are accessible through the GitHub repository available at [43]. This repository includes detailed instructions on how to replicate the experiments and results presented in this research. Additionally, the original dataset can be accessed via [23], and the augmented dataset has been uploaded to the same repository with the source code. By providing open access to the code and data, we aim to facilitate further studies and advancements in the field of tomato plant disease detection using hybrid CNN-RNN models. After training using the defined hyperparameter configurations, the confusion matrix can be found. From this matrix, True Positives (TP), False Positives (FP), True Negatives (TN), and False Negatives (FN) for each class are determined. These values are then used to calculate the five performance metrics, which are summarized in Table 2.  
The metrics table showcases the excellent performance of the proposed model when tested on a separate dataset on which the model had not been trained. The model consistently achieves high scores in accuracy, precision, recall, F1-score, and ROC-AUC across all classes. This indicates the model's effectiveness in correctly identifying true positive cases while minimizing false positives and false negatives.