# Coffee-Leaf Diseases and Pests Detection Based on YOLO Models
## 4 Experimental Results and Discussion
### Qualitative Results  
The qualitative analysis considers a visual appreciation of the accuracy of the model detections and the quality of the disease predictions in the samples. In this context, four samples were selected from the enhanced BRACOL test set containing at least one type of disease or pest. Specifically, sample 1 contains three large regions characterizing two different diseases. Sample 2 was chosen because it contains three different diseases occupying five medium regions on the leaf. In sample 3, there are nine small regions containing the same type of disease. Finally, sample 4 also has diseased regions of the same type as sample 3, but with different sizes. Within the YOLO models, the YOLOv8s, YOLOv9m, YOLOv10l, and YOLOv11n variations were used for the analysis, each one being the best variant of its version in terms of mAP. Figure 7 shows the ground truth (GT) of sample 1, containing two red markings indicating the presence of the miner pest, while a green marking indicates the region affected by the phoma disease. Also shown in the same figure are the visual results of disease detection in coffee leaves using the selected versions of YOLO. The bounding boxes indicate the regions detected, accompanied by the class labels and their respective confidence values. It can be seen that the YOLOv8s, YOLOv9m, and YOLOv10l versions have consistent results, with well-defined detections and relatively high confidence levels for both classes. In particular, YOLOv8s stood out for assigning high confidence to its predictions of the miner class, suggesting greater accuracy in detecting this particular disease. A similar behavior is shown by the YOLOv10l model and the phoma class. On the other hand, the YOLOv11n had its results compromised, showing a false positive in the detections for the phoma class. Figure 8 shows the ground truth (GT) of sample 2, with three orange markings for cercospora disease, a green marking for phoma, and a red marking indicating the presence of the miner pest. The same figure shows the results of automatic detection using different versions of YOLO. It can be seen that the YOLOv8s and YOLOv10l versions obtained better detections for the cercospora class, while the YOLOv9m version showed multiple false positives, confusing the cercospora disease with the rust class. The YOLOv11n model had difficulties detecting cercospora, recognizing only phoma and miner with moderate levels of confidence. Figure 9 shows the ground truth (GT) of sample 3, indicating nine regions affected by rust disease on the leaf. Also shown are the results of automatic detection using different versions of YOLO. It can be seen that none of the versions managed to detect all nine regions. YOLOv8s and YOLOv9m were the most effective, identifying seven of the nine affected regions, although with variations in confidence levels. YOLOv10l and YOLOv11n, on the other hand, showed limitations, with fewer regions detected, indicating less sensitivity to diseases in smaller areas. Figure 8: _Cont._  
Figure 7: The GT of sample 1 and YOLO results from the detection of diseases and pests on coffee leaves. (**a**) GT of sample 1. (**b**) Detection of YOLOv8s. (**c**) Detection of YOLOv9m. (**d**) Detection of YOLOv10l. (**e**) Detection of YOLOv11n. Figure 10 shows the ground truth (GT) of sample 4, where various regions of the leaf are marked, indicating the presence of the rust disease. The figure also shows the detection results using YOLO versions. It can be seen that the YOLOv8s and YOLOv9m models identified multiple regions with varying levels of confidence. The YOLOv10l model showed greater sensitivity when detecting smaller regions, but was the only one that failed to detect the largest region. YOLOv11n, on the other hand, correctly identified the disease occupying the largest region, which was detected three times. Also, the lack of detection of the smallest diseased region indicates the lower sensitivity of this model.