# Automatic Detection of Tomato Diseases Using Deep Transfer Learning
## 3 Results and Discussion
Most of the other models experienced less fluctuation; however, the smaller models (i.e., SqueezeNet and GoogleNet) do not seem to benefit from more training data with respect to their sensitivity to the random choices of the images to be included in the training data. The standard deviation of the accuracy results remained 2.0% for SqueezeNet. The highest average accuracy was 99.2% for DenseNet-201 and Darknet-53. Figure 4: The mean, minimum, and maximum accuracy for all algorithms over 10 randomized runs and 50/50 data split. \begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Model** & **F1 Score** & **Precision** & **Recall** & **Specificity** & **MCC** \\ \hline SqueezeNet & 91.8\% & 92.2\% & 92.2\% & 99.3\% & 0.914 \\ GoogLeNet & 94.8\% & 95.2\% & 94.8\% & 99.6\% & 0.937 \\ Inceptionv3 & 98.5\% & 98.6\% & 98.4\% & 99.9\% & 0.978 \\ DenseNet-201 & 99.0\% & 99.1\% & 98.9\% & 99.9\% & 0.99 \\ MobileNetv2 & 97.1\% & 97.3\% & 97.1\% & 99.8\% & 0.957 \\ Resnet101 & 98.9\% & 98.9\% & 98.9\% & 99.9\% & 0.987 \\ Resnet50 & 98.6\% & 98.7\% & 98.6\% & 99.9\% & 0.98 \\ Resnet18 & 97.8\% & 97.9\% & 97.8\% & 99.8\% & 0.976 \\ Xception & 96.7\% & 97.0\% & 96.5\% & 99.7\% & 0.965 \\ ShuffleNet & 97.4\% & 97.6\% & 97.3\% & 99.8\% & 0.973 \\ DarkNet-53 & 98.9\% & 99.0\% & 98.9\% & 99.9\% & 0.987 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The mean overall F1 score, Precision, Recall, Specificity, and MCC using 70% of the data for training. The results are an average of 10 runs. Figure 5: Sample confusion matrices for the best (DenseNet-201) and the worst (SqueezeNet) performing models using 70% of the data for training. (**a**) DenseNet-201; (**b**) SqueezeNet. Pushing toward the extreme case of using 90% of the images for training reveals further insight into the models. Table 3 shows the mean over 10 runs for the F1 score, precision, recall, specificity, and MCC using 90% of the data for training. Both SqueezeNet and GoogLeNet improved further to an F1 score of 93.3% and 95.9%, respectively. However, the other models with high performance values seemed to peek. Darknet53 did not improve and the remaining algorithms showed small improvements (i.e., \(<\)1%). DenseNet-201 achieved the maximum mean F1 score of 99.2% and was closely followed by Inceptionv3 at 99.1%. Figure 7 shows sample confusion matrices for the DensNet-201 and SqueezeNet models using 90% of the data for training. The figure shows that very few images were misclassified. DenseNet-201 classified several categories perfectly. Another observation relates to the ResNet models (101, 50, and 18) with larger numbers in the model's name corresponding to a deeper network; the models' performance improved with an increased depth and number of layers. Regarding the fluctuation of the results with different random choices, Figure 8 shows that SqueezeNet improved to 0.4% standard deviation for the classification accuracy, but GoogleNet had the highest standard deviation with 1.0%. The ShuffleNet model fluctuation does not seem to be affected by more training data and remained almost fixed throughout the various data splitting strategies. The highest average classification accuracy was 99.4% using DensNet-201. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **F1 Score** & **Precision** & **Recall** & **Specificity** & **MCC** \\ \hline SqueezeNet & 93.3\% & 93.8\% & 93.3\% & 99.4\% & 0.93 \\ GoogLeNet & 95.9\% & 96.2\% & 95.8\% & 99.7\% & 0.942 \\ Inceptionv3 & 99.1\% & 99.2\% & 99.0\% & 99.9\% & 0.99 \\ DenseNet-201 & 99.2\% & 99.3\% & 99.1\% & 99.9\% & 0.991 \\ MobileNetv2 & 97.8\% & 98.0\% & 97.8\% & 99.8\% & 0.975 \\ Resnet101 & 99.0\% & 98.9\% & 99.1\% & 99.9\% & 0.99 \\ Resnet50 & 98.8\% & 99.0\% & 98.7\% & 99.9\% & 0.986 \\ Resnet18 & 98.2\% & 98.4\% & 98.2\% & 99.9\% & 0.981 \\ Xception & 97.1\% & 97.7\% & 96.7\% & 99.8\% & 0.971 \\ ShuffleNet & 97.8\% & 98.3\% & 97.6\% & 99.8\% & 0.975 \\ DarkNet-53 & 98.9\% & 99.0\% & 98.8\% & 99.9\% & 0.986 \\ \hline \hline \end{tabular}
\end{table}