## 3 Results
### YOLOv8

Table 3: Accuracy, specificity, and sensitivity results for YOLOv8-s and YOLOv8-m based on confusion matrix. Figure 6: Confusion matrix for YOLOv8-m.  
scores. This indicates that while both models effectively identify positive instances, the medium model is marginally better at correctly classifying negative cases, improving overall performance. A more detailed analysis of the precision-recall values across different image categories provides further insights into their comparative performance. Specifically, for the dirty panel class, as depicted in Figure 7, the small model achieves a precision-recall value of 0.956. In contrast, in Figure 8b, the medium model attains a slightly lower precision-recall score of 0.952. This suggests that the small model is marginally more effective for identifying dirty panels than the medium model. Conversely, when analyzing the clean panel class, the precision-recall score of the medium model surpasses that of the small model. As shown in Figures 7 and 8b, the medium model achieves a precision-recall value of 0.967, while the small model records a slightly lower value of 0.965. Although this difference is minimal, the medium model performs slightly better at detecting clean panels. Finally, when considering the broken panel class and the overall classification performance across all categories, both models exhibit identical precision-recall values, reinforcing that their ability to detect broken panels remains consistent. These results suggest that while the small model excels in detecting dirty panels, the medium model shows a slight advantage in identifying clean panels and offers improved specificity and accuracy overall. As illustrated in Figure 8a, the F1-score curve for the medium model attains its peak value of 0.93 at a slightly lower threshold of 0.401. As illustrated in Figures 9 and 10, the recall value reaches 1.00, indicating that the model successfully identifies all relevant instances. This suggests that no positive cases were misclassified, demonstrating the model's high sensitivity. Figure 7: Precision–recall curve for YOLOv8-s.  
Figure 8: (**a**) F1–confidence curve for YOLOv8-m. (**b**) Precision–recall curve for YOLOv8-m. (**c**) Precision–confidence curve for YOLOv8-s. (**d**) Precision–confidence curve for YOLOv8-m.  
Figure 9: Recall–confidence curve for YOLOv8-s. Figures 11 and 12 provide a comprehensive summary of the comparative performance of the YOLOv8-s and YOLOv8-m models throughout the training process, offering valuable insights into their respective behaviors regarding loss reduction, precision, recall, and validation stability. Based on the observed results, selecting the small model as the optimal choice in YOLOv8 is justified for several reasons. One of the key findings is that, when analyzing Figure 11, which represents the training performance metrics, it becomes evident that the loss values decrease at a slightly more consistent rate in the small model compared to the medium model. This indicates that the small model exhibits a more stable convergence pattern, which is crucial in ensuring efficient learning and reducing overfitting risks. Figure 11: YOLOv8-s model results. Figure 10: Recall–confidence curve for YOLOv8-m.  
Additionally, an evaluation of precision and recall values across training iterations reveals that the small model maintains higher stability than the medium model. The fluctuations in these metrics are more pronounced in the medium model, whereas in the small model, they remain relatively steady, contributing to improved reliability during inference. A similar trend is observed when analyzing Figure 12, representing validation performance metrics. The mean average precision (mAP) values for the small model demonstrate a more stable pattern than the medium model, further reinforcing its robustness [49; 50]. This suggests that the small model generalizes well across different validation sets, ensuring its predictions remain reliable when exposed to unseen data.