# MobiRes-Net: A Hybrid Deep Learning Model for Detecting and Classifying Olive Leaf Diseases
## 5 Implementation and Testbed  
In this section, we analyse the effectiveness of the suggested scheme considering the conducted experiments. To perform the experiments, an Intel Core i7 3.5 GHz processor machine was used, which was equipped with 16 GB RAM and a 2 GB inbuilt NVIDIA graphics card. The implementation of the hybrid DL model took place through python programming making use of deep learning frameworks, namely TensorFlow and Keras. The dataset, as described in Section 4.1, was split into two major groups, (80%) for training and (20%) for validation. The first group was used to carry out the training process while the second group was used to test the final evaluation. The performance of the developed model was analysed using the following metrics: accuracy, precision, recall, and F1-score. Each measure is delineated as follows:  
* **Accuracy:** The accuracy is the percentage of properly predicted images out of the total number of predictions [24]. The accuracy is calculated as: \[Accuracy=\frac{Number\ of\ correct\ predictions}{Total\ number\ of\ predictions}\]
* **Precision:** The ratio of correctly predicted positive results (TP) to the total number of positive results (TP + FP) forecasted by the model is the accuracy metric. The vast  
Figure 7: Architecture of the proposed hybrid MobiRes-Net model. number of FPs results in a lower precision [30]. The precision range is between 0 and 1 and is calculated as follows:  
\[Precision=\frac{Number\ of\ True\ Positives}{Number\ of\ True\ Positives+Number\ of\ False\ Positives}\]  
**Recall:** The recall is utilized to measure the correct positive forecasts by calculating the ratio between the number of true positives results (TP) to the total number of samples (TP + FN) [30]. The recall is calculated using the following equation:  
\[Recall=\frac{Number\ of\ True\ Positives}{Number\ of\ True\ Positives+Number\ of\ False\ Negative}\]  
**F1-score:** The F1-score is one of the metrics used to measure and evaluate the model's performance. The weighted harmonic between the accuracy and recall is used to compute the F1-score. Its definition is as follows:  
\[F1\ score=2\times\frac{Recall\times Precision}{Recall+Precision}\]  
where TP is true positive, FP is false positive, TN is true negative, and FN is false negative. At 100 epoch validation, Figures 8-10 show the results of two performance indictors (accuracy and loss) of the ResNet50 model, MobileNet model, and the proposed hybrid model, respectively. Figure 8 demonstrates the accuracy and loss graphs of the ResNet50 model, where the highest accuracy achieved is 92.86% and the loss is 0.15. Figure 9 illustrates the accuracy and loss graphs of the MobileNet model, where the highest accuracy achieved is 94.63% and the loss reaches 0.15. Figure 10 presents the accuracy and loss performance indicators of the proposed hybrid model, where it obtains an accuracy of 97.08%, while the loss scores 0.09. It is worthwhile to note that the best result is obtained by concatenating the ResNet50 and MobileNet models, thanks to the added fully connected layer. The classification task of the dataset was performed via the three deep learning models to obtain the classification results. The average classification results are shown in Table 3. The table also illustrates the training and testing run time in seconds. As shown in Table 3, the ResNet50 and MobileNet models both provide average accuracy scores below 95%. However, the highest accuracy score of 97.08% is achieved via the proposed MobiRes-Net model. The highest F1-score (96.86%) as well as the highest recall score (97.11%) are also achieved by MobiRes-Net. In addition, the training time of our proposed MobiRes-Net model is 1138 s. This is superior to the ResNet50 (890 s) and MobileNet (940 s) models. Since nothing can be perfect, our proposed MobiRes-Net model has some limitations. One limitation is the higher training and testing run time as compared with other models, because of the complex structure of the models inside modules.