Abstract
Currently, defect detection in photovoltaic (PV) cells faces challenges such as limited training data, data imbalance, and high background complexity, which can result in both false positives and false negatives during the detection process. To address these challenges, a defect detection network based on an improved YOLOv8 model is proposed. Firstly, to tackle the data imbalance problem, five data augmentation techniques—Mosaic, Mixup, HSV transformation, scale transformation, and flip—are applied to improve the model’s generalization ability and reduce the risk of overfitting. Secondly, SPD-Conv is used instead of Conv in the backbone network, enabling the model to better detect small objects and defects in low-resolution images, thereby enhancing its performance and robustness in complex backgrounds. Next, the GAM attention mechanism is applied in the detection head to strengthen global channel interactions, reduce information dispersion, and enhance global dependencies, thereby improving network performance. Lastly, the CIoU loss function in YOLOv8 is replaced with the Focal-EIoU loss function, which accelerates model convergence and improves bbox regression accuracy. Experimental results show that the optimized model achieves a mAP of 86.6% on the augmented EL2021 dataset, representing a 5.1% improvement over the original YOLOv8 model, which has 11.24 × 10^6 parameters. The improved algorithm outperforms other widely used methods in photovoltaic cell defect detection.
Introduction
As the global energy transition accelerates toward solar power, the reliability of photovoltaic (PV) cells has become a critical industrial concern. Silicon cells are susceptible to microscopic defects—such as "black cores," "finger defects," and hairline cracks—that significantly degrade energy conversion efficiency. Detecting these anomalies is difficult because they are often tiny, low-contrast, and obscured by the complex crystalline background of the cell.
Standard computer vision models often struggle in this domain due to three primary factors: extreme data imbalance where certain defects are rare, information loss during standard downsampling (striding), and high false-positive rates caused by background complexity.
Proposed Methodology
The researchers developed an optimized architecture based on YOLOv8s, introducing three key enhancements to address the specific requirements of industrial PV inspection.
SPD-Conv: Preserving Fine-Grained Detail
Traditional convolutional layers use striding or pooling to reduce spatial resolution, which often discards the very pixels containing evidence of a hairline crack. To combat this "information tax," the model employs Space-to-Depth Convolution (SPD-Conv). Instead of skipping pixels, SPD-Conv reshapes the image to increase channel depth while reducing spatial dimensions, effectively preserving the richness of features necessary for detecting small-scale defects.
Global Attention Mechanism (GAM)
To help the model distinguish between actual defects and background noise, a Global Attention Mechanism (GAM) was integrated between the network's neck and head. GAM utilizes both channel and spatial attention to strengthen global dependencies. This allows the network to maintain a "global context" of what a healthy cell looks like, making local anomalies stand out more clearly.
Focal-EIoU Loss Function
The standard CIoU loss was replaced with Focal-EIoU. This loss function improves bounding box regression by more accurately considering aspect ratios and center-point distances. Crucially, the "Focal" component helps the model focus on difficult-to-detect samples, mitigating the impact of class imbalance.
Experimental Results and Discussion
The model was rigorously tested on the PVEL-AD-2021 dataset, which contains 12 distinct defect types. The results demonstrate a significant performance leap:
- Accuracy: The improved model achieved 86.6% [email protected], a 5.1% increase over the baseline YOLOv8s. It also outperformed newer architectures like YOLOv9s (80.9%) and YOLOv11s (81.6%).
- Efficiency: With approximately 11.24 million parameters, the model maintains a detection speed of 71.5 FPS, meeting the requirements for real-time industrial inspection lines.
- Generalization: When tested on the general-purpose COCO2017 dataset, the model's mAP improved from 0.623 to 0.664, suggesting that the architectural improvements enhance feature extraction capabilities beyond just PV cells.
Conclusion
By integrating SPD-Conv and GAM attention, the researchers successfully addressed the information loss and background noise issues inherent in PV cell inspection. While the model still faces challenges with visually ambiguous defects like surface scratches, the 5.1% improvement in mAP and high inference speed represent a substantial step forward for automated quality control in the solar industry.
Summary updated