## 3 Results
### YOLOv8  
The YOLOv8 object detection model represents a significant advancement on previous iterations of the YOLO series, characterized by integrating a more efficient and scalable architecture. The network consists of three primary components: the backbone, the neck, and the head. The backbone is typically based on CSPDarknet and is responsible for extracting hierarchical features by utilizing multiple convolutional layers, accompanied by batch normalization and leaky ReLU activations. The subsequent neck element (which incorporates PANet and SPPF [Spatial Pyramid Pooling--Fast]) enhances feature fusion and spatial information. Finally, the head performs object classification and bounding box regression using anchor-free mechanisms, thus improving detection accuracy. YOLOv8 adopts dynamic anchor assignments and decoupled heads, refining detection precision while reducing computational complexity. The efficacy of these modifications is evidenced \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Train** & **Validation** & **Test** \\ \hline Broken & 1192 & 341 & 171 \\ Clean & 1491 & 426 & 213 \\ Dirty & 1571 & 449 & 225 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Number of images based on classes and usages for YOLO. by the capacity of YOLOv8 to attain superior speed and accuracy, rendering it particularly well-suited for real-time applications such as solar panel defect detection. In the YOLOv8 framework, five distinct model weight configurations are available, namely nano, small, medium, large, and X-large, each representing progressively increasing model complexities. Specifically, the nano model corresponds to the smallest architecture, followed by the small model, which offers a balance between computational efficiency and accuracy. The medium model serves as an intermediate option, while the large and X-large models provide enhanced feature extraction capabilities with increased parameter complexity. To ensure a comprehensive evaluation of model performance, all five weight configurations were utilized during both the training and testing phases. Regardless of the model size, the training process was conducted for a total of 100 epochs, ensuring sufficient iterations for learning optimization while maintaining consistency across different weight configurations. The statistical data presented in Table 2 demonstrate that among the various model weight configurations utilized in YOLOv8, the small and medium models outperform the others regarding precision-recall and F1-score. These findings suggest that these two models better balance computational efficiency and classification performance, making them more suitable for solar panel defect detection. Furthermore, the graphical analysis in Figure 4 reveals that the F1-score curve reaches its highest value of 0.93 at a specific threshold of 0.447 for the small model. These observations indicate that the medium model exhibits a lower decision threshold than the small model, which classifies instances with higher confidence at an earlier stage. However, despite this difference in threshold values, both models' overall F1 confidence scores remain identical, highlighting their comparable effectiveness in classification tasks.