During the maintenance and management of solar photovoltaic (PV) panels, how to efficiently solve the maintenance difficulties becomes a key challenge that restricts their performance and service life. Aiming at the multi-defect-recognition challenge in PV-panel image analysis, this study innovatively proposes a new algorithm for the defect detection of PV panels incorporating YOLOv7-GX technology. The algorithm first constructs an innovative GhostSlimFPN network architecture by introducing GSConv and depth-wise separable convolution technologies, optimizing the traditional neck network structure. Then, a customized 1 × 1 convolutional module incorporating the GAM (Global Attention Mechanism) attention mechanism is designed in this paper to improve the ELAN structure, aiming to enhance the network’s perception and representation capabilities while controlling the network complexity. In addition, the XIOU loss function is introduced in the study to replace the traditional CIOU loss function, which effectively improves the robustness and convergence efficiency of the model. In the training stage, the sample imbalance problem is effectively solved by implementing differentiated weight allocations for different images and categories, which promotes the balance of the training process. The experimental data show that the optimized model achieves 94.8% in the highest mAP value, which is 6.4% higher than the original YOLOv7 network, significantly better than other existing models, and provides solid theoretical and technical support for further research and application in the field of PV-panel defect detection.
The performance of photovoltaic modules determines the lifetime of solar cells; however, accurate detection remains a challenge when facing smaller defects. To address this problem, in this paper, we propose a YOLO-WAD model based on YOLOv10n. Firstly, we replace C2f (CSP bottleneck with two convolutions) with C2f-WTConv (CSP bottleneck with two convolutions–wavelet transform convolution) in the backbone network to enlarge the receptive field and better extract the features of small-target defects (hot spots). Secondly, an ASF structure is introduced in the neck, which effectively fuses the different levels of output features extracted by the backbone network and enhances the model’s ability to detect small objects. Subsequently, an additional detection layer is added to the neck, and C2f is replaced by C2f-EMA (CSP bottleneck with two convolutions–efficient multi-scale attention mechanism), which can redistribute feature weights and prioritize relevant features and spatial details across image channels to improve feature extraction. Finally, the DyHead (dynamic head) detection head is introduced, which enables comprehensive scale, spatial, and channel awareness. This greatly enhances the model’s ability to classify and localize small-target defects. The experimental results show that YOLO-WAD detects our dataset with an overall accuracy of 95.6%, with the small-target defect detection accuracy reaching 86.3%, which is 4.1% and 9.5% higher than YOLOv10n and current mainstream models, verifying the feasibility of our algorithm.
To improve the detection performance of small defects in photovoltaic modules, we propose an enhanced YOLOv11n model—YOLO-FAD. Its core innovations include the following: (1) integrating RFAConv into the backbone network and neck network to better capture small defect features in complex backgrounds; (2) adding DyC3K2 for adaptive convolution optimization to improve accuracy and robustness; (3) employing ASF for multi-layer feature fusion, and combining it with DyHead-detect in the fourth detection layer to refine the classification and localization of small targets. Testing on our dataset shows that YOLO-FAD achieves an overall accuracy of 94.6% (85.3% for small defects), outperforming YOLOv11n by 3.0% and 10.1% in mAP, respectively, and surpassing YOLOv12, RT-DETR, Improved Faster-RCNN, and state-of-the-art (SOTA) improved models.