## 3 Results
The F1-confidence curve (Figure 3a) includes the performance for classes B and C, as well as the overall performance across all classes, with the maximum F1 score of 0.89 reached at a confidence threshold of 0.369. This indicates that a confidence threshold of 0.369 is recommended for optimal overall model performance. The curve for Class C demonstrates better and more stable performance than Class B, whose F1 score declines sharply at higher confidence thresholds, suggesting that the model struggles more with precision or recall for Class B at higher thresholds. This analysis aids in selecting the optimal confidence threshold, balancing precision and recall, and provides a detailed understanding of the model's overall performance for individual classes. As the confidence threshold increases from 0 to 1, the precision (Figure 3a) improves steadily for both individual classes and the aggregate. The model achieves perfect precision (1.00) for all classes at a confidence threshold of 1.0, indicating that all predicted positives are true positives at this threshold. The precision for Class C consistently surpasses that of Class B across the confidence spectrum, suggesting the model performs better in predicting Class C with fewer false positives. As the confidence threshold increases from 0 to 1, recall generally decreases (Figure 3c). The model achieves perfect recall (1.00) for all classes at a confidence threshold of 0.000, indicating that at this threshold, all actual positives are correctly identified by the model. The recall for Class C is consistently higher than for Class B across the confidence spectrum, suggesting that the model performs better in capturing true positives for Class C. As the confidence threshold increases, the recall for both classes  
Figure 3: YOLOv8-N performance evaluation metrics. (**a**) F1 score curve; (**b**) \(p\) curve; (**c**) r curve; (**d**) _pr_ curve. declines, with a more pronounced drop observed for Class B, highlighting the model's diminishing ability to identify true positives at higher confidence levels. Finally, the _pr_ curve (Figure 3d) for Class C is the highest, indicating that the classifier is most precise for this class. The _pr_ curve for Class B is lower than the _pr_ curve for Class C but still quite high. The overall mean average precision ([EMAIL_ADDRESS]) is a performance measure of the classifier, calculated as the average precision at 11 points on the _pr_ curve, with a threshold of 0.5 for each point. The [EMAIL_ADDRESS] in the figure is 0.945, which is a relatively high value. The _pr_ curve in the figure shows that the classifier is quite precise for all three classes. The classifier is most precise for Class C and less precise for Class B. The overall mean average precision of the classifier is relatively high. In conclusion, the performance confidence curves for the YOLOv8n model demonstrate its effectiveness across different classes and overall. The F1-confidence curve indicates that the optimal confidence threshold for the model is 0.369, where it achieves a maximum F1 score of 0.89. The model shows better and more stable performance for Class C than Class B, suggesting that the model encounters difficulties with precision or recall for Class B at higher thresholds. The precision-confidence curve reveals that precision steadily improves as the confidence threshold increases, reaching perfect precision at a threshold of 1.0. The model is more precise in predicting Class C, with fewer false positives, than Class B.  
Conversely, the recall-confidence curve shows a general decrease in recall as the confidence threshold rises, with perfect recall at a threshold of 0.000. The model captures true positives more effectively across the confidence spectrum for Class C. The PR curve further confirms that the classifier is most precise for Class C, with high precision also observed for Class B and overall. The high mean average precision ([EMAIL_ADDRESS]) of 0.945 underscores the classifier's strong overall performance.