# Automatic Detection of Tomato Diseases Using Deep Transfer Learning
## 3 Results and Discussion

Table 3: The mean overall F1 score, Precision, Recall, Specificity, and MCC using 90% of the data for training. The results are an average of 10 runs. Figure 6: The mean, minimum, and maximum accuracy for all algorithms over 10 randomized runs and 70/30 data split. Table 4 shows the mean training and validation times for all the models using 50/50, 70/30, and 90/10 data split. The SqueezeNet model trains the fastest in comparison to all other models. However, it also performs the worst. On the other hand, the Resnet18 seems to represent a good compromise between better classification performance and faster training time. The model produced a range of F1 scores of 97.2-98.2% with a corresponding training time of 395.5-491.9 s, which is very fast in comparison to the better performing models. Nonetheless, training times may not affect the ability to deploy the models in real-life applications, especially if no live model update is performed. This is because testing does not involve model update and is usually very fast, and training is done once and offline with respect to the deployment. The inference times were in the range of 0.5-7 millisecond/image, which is very small from a human user perspective. These times are independent of the data split and depend on the hardware planform and size of the model. Figure 7: Sample confusion matrices for the DensNet-201 and SqueezeNet models using 90% of the data for training. (**a**) DenseNet-201; (**b**) SqueezeNet. Several studies were conducted in the literature on the application of machine learning and deep learning algorithms for the identification and classification of plant diseases. Some of these studies (e.g., [PERSON] and [PERSON] [11] and [PERSON] and [PERSON] [14]) used the traditional approach of employing image processing techniques to segment the input images (i.e., separation of the leaf or infected area from the background) and to extract texture features that reflect the disease state of the leaf. These features form the input for non-deep traditional machine learning algorithms (e.g., SVM). However, these studies did not consider images of different backgrounds and the classification performance results were worse than their deep learning counterparts. On the other hand, deep learning algorithms do not require these preprocessing steps and the accompanying overhead and errors. [PERSON] et al. [15] modified the well-established structure of the VGG16 model and produced good performance. However, the original VGG16 model has shown its worth over hundreds of applications and thousands of studies and any modification will need to go through rigorous scrutiny. [PERSON] et al. [13] used a similar approach to ours; however, the comparison was performed for three weaker models only (i.e., AlexNet, GoogleNet, and LeNet). Similarly, [PERSON] and [PERSON] [12] experimente with four models (i.e., LeNet, VGG16, ResNet, and Xception) and produced 99.25% accuracy. However, their results were based on 14,903 leaf images from the same dataset with no apparent reason for dropping the remaining 3257 images. Table 5 shows a summary of the related literature to identify and classify tomato disease. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Data Split** & **50/50** & **70/30** & **90/10** \\ \hline
**Model** & & & \\ \hline SqueezeNet & 353.7 & 398.5 & 422.87 \\ GoogLeNet & 614.5 & 736.2 & 824.9 \\ Inceptionv3 & 1796.5 & 2241.1 & 2595.3 \\ DenseNet-201 & 5852.9 & 7311.8 & 8329.7 \\ MobileNetv2 & 2455.9 & 3133.5 & 3691.3 \\ Resnet101 & 5511.3 & 6951.9 & 8126.9 \\ Resnet50 & 851.1 & 1054.9 & 1210.9 \\ Resnet18 & 395.5 & 452.0 & 491.9 \\ Xception & 6582.1 & 8380.0 & 10,009.1 \\ ShuffleNet & 1822.8 & 2239.0 & 2717.8 \\ DarkNet-53 & 1449.44 & 1722.0 & 2038.3 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The mean training and validation times for all algorithms and data split strategies. All times are in seconds. Figure 8: The mean, minimum, and maximum accuracy for all algorithms over 10 randomized runs and 90/10 data split.