# Deep Learning for Detecting Verticillium Fungus in Olive Trees: Using YOLO in UAV Imagery
## 6 Discussion  
All YOLO models tested were close in terms of performance, with model m640 outperforming them all by a small margin in most cases. A possible explanation as to why model m640 managed to do that could be attributed to a pattern shown in the results. We can generally see that as input size decreases and model capacity increases, the performance increases. This pattern indicates that for the task at hand, models with high capacity are needed to capture the necessary information for a successful classification. This also works in reverse: input of a smaller size reduces the needed model capacity. Few things should be noted relative to the models' performances: The first general pattern observed is that every YOLO model consistently achieved lesser scores when it came to predicting the damaged class. That could be something that can be attributed to the relatively few instances of that class present in the training set. This is a known problem that affected previous research efforts, even those that had datasets of considerable size. In [7], even though a total of 40,697 trees were used to train the model, the class that was the most underrepresented consistently achieved the lowest scores. More precisely, instances of that class achieved precision, recall, [EMAIL_ADDRESS] and [EMAIL_ADDRESS]:0.95 of 0.546, 0.40, 0.45 and 0.24, respectively, with the instances themselves making up 4% of the total cases. That was in contrast to the metrics of the other classes that outperformed the metrics of the underrepresented one by 12% to 38%. Nevertheless, the metrics reached in our case were satisfactory, especially considering that the algorithm was trained with so few training images, and showed that YOLOv5 models of varying architectures can be utilised to detect trees in UAV imagery and classify their health status effectively. This was an indication that depending on the specific dataset used, the same version of the YOLO algorithm can have quite different results. The second pattern of the models' performances that should be noted is that the metrics of the damaged class were the most sensitive to the choice of model architecture, with the highest variability in precision, recall, [EMAIL_ADDRESS] and [EMAIL_ADDRESS]:0.95. This could be due to the nature of the appearance of the damaged class that is more dependent on model architecture to be detected correctly. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Architecture** & **Model Input** & **Preprocessing** & **Inference Speed** & **NMS Speed** \\  & **Size** & **Speed** & **Inference Speed** & **NMS Speed** \\ \hline Nano & 640 \(\times\) 640 & 1.0 & 94.7 & 5.9 \\ Nano & 1216 \(\times\) 1216 & 1.0 & 77.5 & 2.5 \\ Small & 640 \(\times\) 640 & 1.0 & 178.9 & 2.4 \\ Small & 1216 \(\times\) 1216 & 1.0 & 168.0 & 1.5 \\ Medium & 640 \(\times\) 640 & 1.3 & 328.8 & 1.5 \\ Medium & 1216 \(\times\) 1216 & 1.0 & 318.0 & 2.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Model application on the testing set speed statistics (in milliseconds, per image). YOLO and YOLO-based models have shown that they can be effectively used for real-time agricultural applications. In [43], researchers came up with a model based on the lightweight YOLO v4-tiny model that could detect seedling maize weeds in real time, with the detection speed reaching 57.33 f/s. It is necessary to note that real-time applications also depend on the available and used hardware, as inference times are highly dependent on processing power. Especially in UAVs, the ability of the YOLO model to be lightweight enough but at the same time capable of high quality inference is of critical importance, since typically, hardware of higher processing power are of larger size and weight, requiring larger and thus more expensive UAVs. With our model's inference speed (77.5-328.8 ms), we can deduce that the trained model can be used in real-time or near-real-time applications in precision agriculture tasks.