# Coffee-Leaf Diseases and Pests Detection Based on YOLO Models
## 4 Experimental Results and Discussion
### Quantitative Results  
Table 5 shows the quantitative results obtained by the different YOLO models trained. Each row in the table represents a specific model and its performance in terms of the mAP, recall, and F1-Score metrics. The results show that the YOLOv8s model outperformed the YOLOv10n model in diseases and pests detection on coffee leaves, achieving a mAP of 54.5%, an F1-Score of 54%, and coming second in recall with 93%. The YOLOv9m, YOLOv9s, and YOLOv8n models also achieved relevant results with 54%, 53.8%, and 53.6%, respectively. In general terms, the YOLOv8 and YOLOv9 versions obtained the best results when evaluating the mAP metric compared to the YOLOv10 and YOLOv11 versions. Figure 6: Results of disease and pest detection in coffee leaves using YOLOv8s. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **mAP (\%) \(\uparrow\)** & **Recall (\%) \(\uparrow\)** & **F1-Score (\%) \(\uparrow\)** \\ \hline YOLOv8n & 53.6 & 92 & 52 \\ YOLOv8s & **54.5** & 93 & **54** \\ YOLOv8m & 53.2 & 92 & 49 \\ YOLOv8l & 51.7 & 90 & 47 \\ \hline YOLOv9t & 52.5 & 91 & 49 \\ YOLOv9s & 53.8 & 90 & 49 \\ YOLOv9m & 54.0 & 90 & 50 \\ YOLOv9c & 53.3 & 90 & 53 \\ \hline YOLOv10n & 48.2 & **94** & 48 \\ YOLOv10s & 50.2 & 92 & 47 \\ YOLOv10m & 50.0 & 91 & 49 \\ YOLOv10l & 50.7 & 91 & 51 \\ \hline YOLOv11n & 52.2 & 91 & 51 \\ YOLOv11s & 51.5 & 93 & 52 \\ YOLOv11m & 51.8 & 90 & 48 \\ YOLOv111 & 51.7 & 92 & 51 \\ \hline \hline \end{tabular} Note: The best result is shown in **bold** and the second best in underline. \(\uparrow\) indicates that higher values are better.  
\end{table} 
Table 5: The evaluation results of the trained models. An analysis of the different versions of YOLO according to the mAP metric shows that in version 8, the YOLOv8s variation is the model with the best detection performance. In version 9, YOLOv9m stands out among the others with a mAP of 54%. In version 10, the YOLOv10l variation achieves a mAP of 50.7%, showing the best performance within the version. Finally, the YOLOv11n variation achieved a mAP value of 52.2%, outperforming the other variations in version 11. To analyze the efficiency of the models in the task of disease detection in coffee leaves, the average times required for the different stages of image processing were calculated. The stages include pre-processing, which corresponds to preparing the image before inference, inference, which represents the time taken by the neural network to process and detect objects, and post-processing, which involves applying techniques such as non-maximum suppression (NMS) to refine the results. The total time is obtained by adding up these three metrics and reflects the time taken by each model to perform the detection task. Table 6 shows the average processing times for the images in the test set. The results indicate that YOLOv8n was the fastest model in terms of total processing time, averaging 9.7 ms per image. Next, YOLOv11n (10.8 ms), YOLOv10n (10.9 ms), and YOLOv8s (11.4 ms) also showed reduced processing times compared to the other models, making them viable options for applications requiring real-time detection. On the other hand, the more robust models, such as YOLOv8l (27.3 ms) and YOLOv10l (24.9 ms), showed significantly higher times, which impacts performance in scenarios where speed of response is an important factor. In general, it can be seen that in all YOLO versions, the fastest variants are those with the fewest parameters, as shown in Table 2.  
From the quantitative results achieved, it can be seen that the YOLOv8s model achieves excellent results in terms of performance and image-processing time, proving to be a good model for the real-time detection task. Due to the excellent results in terms of processing time and detection performance, the YOLOv8n model also appears to be an agile alternative. The performance differences observed among the YOLO variants can be attributed to architectural trade-offs between model complexity and feature-extraction capabilities.