An Enhanced Detection Algorithm for Solar Panels Based on DSS-YOLOv11n

In the rapid expansion of renewable energy infrastructure, the reliable operation of solar panels is critical for maximizing photovoltaic power generation. However, defects such as cracks, finger interruptions, black cores, thick lines, star cracks, and horizontal dislocations in solar panels can significantly degrade energy conversion efficiency and even pose safety risks. Traditional manual inspection methods are subjective, slow, and dangerous, while most existing deep learning models struggle with extracting weak edge features from electroluminescence images of solar panels under complex backgrounds. To address these challenges, I propose an improved detection framework named DSS-YOLOv11n, which integrates three novel components: a Different-scale Edge Information Select (DEIS) module, a Soft Feature Pyramid Network (SFPN), and a Shared Detail-Enhanced Detection Head (SDED). I conduct extensive experiments on the public PVEL-AD dataset of solar panels, and the results demonstrate that my method achieves a precision of 88.1%, recall of 83.1%, and mAP50 of 90.8%, while reducing model parameters by 14% compared to the original YOLOv11n. This work provides a lightweight yet accurate solution for real-time defect detection in solar panels.

Deep learning, particularly the YOLO family, has become the backbone of object detection in industrial applications. In the context of solar panels, YOLOv11n offers a good balance between speed and accuracy. However, its performance on tiny, low-contrast defects in solar panels is limited. The main problems are threefold: (1) the backbone cannot effectively capture edge information of defects in solar panels, (2) the neck network suffers from feature misalignment during multi-scale fusion, and (3) the detection head lacks the ability to enhance fine-grained details. I therefore design three corresponding modules to overcome these limitations.

1. Proposed Methodology

1.1 Different-scale Edge Information Select (DEIS) Module

To enhance the extraction of defect edge features in solar panels, I replace the original C3k2 block in the backbone with the DEIS module. As shown in Table 1, DEIS first performs adaptive average pooling to generate four feature sub-maps of different scales: 3×3, 6×6, 9×9, and 12×12. Each sub-map is then processed by an Edge Enhancer (EE) that computes the difference between the original feature and its pooled version, highlighting high-frequency edge information. The enhanced features are concatenated and fed into a Dual Domain Selection Mechanism (DSM), which combines spatial and frequency domain attention to suppress background noise. The mathematical operation of the EE can be expressed as:

$$
Y = X + \sigma (C_{3\times3}(X – \text{AvgPool}(X)))
$$

where \( X \) is the input feature, \( \sigma \) is the sigmoid function, and \( C_{3\times3} \) denotes a 3×3 convolution. The DSM further refines the fused features by weighting the spatial and frequency branches adaptively. Table 1 summarizes the scale comparison experiment. The combination of 3×3, 6×6, 9×9, and 12×12 yields the best precision (87.1%), recall (79.9%), and mAP50 (87.9%), demonstrating the effectiveness of this multi-scale strategy for solar panels.

Table 1: Comparison of different scale combinations in DEIS for solar panels defect detection.
Scale Combination Precision (%) Recall (%) mAP50 (%)
2×2,4×4,8×8,16×16 84.4 78.9 86.3
4×4,8×8,12×12,16×16 83.2 78.0 86.5
5×5,7×7,9×9,11×11 83.1 78.4 86.5
3×3,6×6,9×9,12×12 87.1 79.9 87.9

1.2 Soft Feature Pyramid Network (SFPN)

Multi-scale feature fusion in the neck network is crucial for detecting defects of varying sizes in solar panels. The original PANet uses nearest-neighbor interpolation, which causes feature misalignment, and transposed convolution adds extra parameters. I propose SFPN that employs a Soft Nearest Neighbor Interpolation (SNI) algorithm and a novel GSConvE convolution. SNI introduces a soft factor \(\alpha\) to adaptively adjust the influence of high-level features on low-level ones:

$$
Y = \alpha \cdot \text{Resample}(X), \quad \alpha = \frac{\text{Resolution}_{X}}{\text{Resolution}_{Y}}
$$

For downsampling, I replace the standard convolution with GSConvE, as shown in Table 2. GSConvE removes batch normalization in the depthwise branch to reduce computational overhead while maintaining convergence stability. The comparison of different downsampling convolutions is given in Table 2. Compared to SPDConv, CGD, ADown, and HWD, GSConvE achieves the best trade-off: precision of 86.6%, recall of 80.4%, mAP50 of 88.7%, and only 2.53M parameters. The loss curve comparison in Figure 1 (not shown) confirms that removing BN in the depthwise branch does not affect training stability and leads to slightly faster convergence.

Table 2: Comparison of downsampling convolutions in SFPN for solar panels.
Downsampling Convolution Precision (%) Recall (%) mAP50 (%) Params (M) GFLOPs
SPDConv 78.0 76.5 79.8 2.56 7.0
CGD 86.2 79.3 88.1 2.99 6.8
ADown 82.1 78.5 78.5 2.67 6.1
HWD 77.1 73.4 78.6 2.68 6.2
GSConvE (ours) 86.6 80.4 88.7 2.53 6.3

1.3 Shared Detail-Enhanced Detection Head (SDED)

The detection head in YOLOv11n processes each scale independently, missing cross-scale interactions. I design SDED that shares convolutional layers among scales and incorporates Detail-Enhanced Convolution (DEConv). DEConv integrates five branches: center differential convolution, angle differential convolution, horizontal differential convolution, vertical differential convolution, and standard convolution. The outputs are fused with learnable weights:

$$
\omega_i = \frac{\exp(w_i)}{\sum_{k=1}^{5}\exp(w_k)}, \quad Y = \sum_{i=1}^{5} \omega_i K_i(X)
$$

where \( w_i \) are learnable parameters initialized equally. Additionally, a Scale layer with a dynamic factor \(\lambda\) adapts the output to the target scale range at each detection level. Table 3 compares SDED with other detection heads. SDED achieves the highest mAP50 of 89.0% with only 2.26M parameters and 6.0 GFLOPs, outperforming SEAMHead, EfficientHead, and DyHead.

Table 3: Comparison of detection heads for solar panels.
Detection Head Precision (%) Recall (%) mAP50 (%) Params (M) GFLOPs
SEAMHead 79.4 81.2 87.6 2.49 6.5
EfficientHead 83.6 84.1 88.7 2.31 6.2
DyHead 81.7 80.4 86.5 2.29 6.1
SDED (ours) 84.7 82.5 89.0 2.26 6.0

At this point, I incorporate the image showing an array of solar panels to illustrate the real-world application context. This image represents typical solar panels that require reliable defect inspection.

2. Experiments and Results

2.1 Dataset and Settings

I use the PVEL-AD dataset of solar panels, containing 3,957 electroluminescence images of six common defect types: crack, finger, black_core, thick_line, star_crack, and horizontal_dislocation. The images are split into training (2,769), testing (792), and validation (396) sets. All models are trained for 300 epochs with batch size 16, input size 640×640, initial learning rate 0.01, and momentum 0.937 on an NVIDIA RTX 5060 GPU.

2.2 Ablation Study

I conduct ablation experiments to validate the contribution of each proposed module. Table 4 presents the results. The baseline YOLOv11n achieves 85.4% precision, 79.3% recall, and 87.6% mAP50 with 2.58M parameters. Adding DEIS alone improves all metrics, especially recall (79.9%). SFPN alone boosts mAP50 to 88.7%, while SDED alone increases recall to 82.5%. The full DSS-YOLOv11n reaches 88.1% precision, 83.1% recall, and 90.8% mAP50, with only 2.21M parameters, confirming the synergistic effect of the three modules.

Table 4: Ablation study on solar panels dataset.
Model DEIS SFPN SDED Precision (%) Recall (%) mAP50 (%) Params (M) GFLOPs
YOLOv11n × × × 85.4 79.3 87.6 2.58 6.3
Model1 × × 87.1 79.9 87.9 2.57 6.6
Model2 × × 86.6 80.4 88.7 2.53 6.3
Model3 × × 84.7 82.5 89.0 2.26 6.0
Model4 × 88.1 82.6 88.9 2.55 6.4
Model5 × 87.1 83.4 89.4 2.25 6.3
Model6 × 87.5 82.8 90.3 2.22 6.1
Our 88.1 83.1 90.8 2.21 6.2

2.3 Comparison with Mainstream Algorithms

Table 5 compares DSS-YOLOv11n with several state-of-the-art models, including YOLOv5n, YOLOv8n, YOLOv10n, AE-YOLO, YOLO-PV, YOLO-ACF, and Hyper-YOLOn. My method achieves the highest precision (88.1%), recall (83.1%), and mAP50 (90.8%), while also having the lowest parameter count (2.21M) among all compared methods. This demonstrates that DSS-YOLOv11n is particularly suitable for deployment on edge devices for in-field inspection of solar panels.

Table 5: Comparison with mainstream algorithms on solar panels dataset.
Model Precision (%) Recall (%) mAP50 (%) Params (M)
YOLOv5n 83.7 79.2 83.6 2.23
YOLOv8n 81.3 79.7 85.4 2.68
YOLOv10n 84.1 78.5 82.3 2.73
AE-YOLO 82.9 79.7 85.1 2.32
YOLO-PV 87.6 82.8 87.1 2.52
YOLO-ACF 84.8 81.2 88.5 2.93
Hyper-YOLOn 85.2 82.4 89.3 3.63
YOLOv11n 85.4 79.3 87.6 2.58
DSS-YOLOv11n (ours) 88.1 83.1 90.8 2.21

2.4 Generalization Experiment

To evaluate the generalization capability of my model on different types of solar panels, I test it on an infrared photovoltaic dataset containing 1,430 images with defects such as hotspot, PID effect, diode fault, shading, and glass breakage. As shown in Table 6, DSS-YOLOv11n achieves 79.3% precision, 80.7% recall, and 83.5% mAP50, surpassing the baseline YOLOv11n while having fewer parameters. This indicates that my improvements are not overfitted to a specific dataset and can be applied to various solar panels inspection scenarios.

Table 6: Generalization performance on infrared photovoltaic dataset of solar panels.
Model Precision (%) Recall (%) mAP50 (%) Params (M)
YOLOv11n 78.0 78.4 82.1 2.58
DSS-YOLOv11n (ours) 79.3 80.7 83.5 2.20

3. Visual Analysis

Through visual inspection of detection results, I observe that DSS-YOLOv11n produces more accurate bounding boxes and fewer false negatives compared to the original YOLOv11n. For example, thin cracks and finger interruptions in solar panels that were missed by the baseline are correctly identified by my model. This improvement is attributed to the edge enhancement in DEIS, the feature alignment in SFPN, and the detail-aware mechanism in SDED. The visual results confirm the quantitative superiority of my approach for solar panels defect detection.

4. Conclusion

I propose DSS-YOLOv11n, an enhanced detection algorithm tailored for defect inspection of solar panels. The DEIS module strengthens edge feature extraction through multi-scale pooling and dual-domain selection. The SFPN improves multi-scale fusion using soft nearest neighbor interpolation and an efficient GSConvE convolution. The SDED detection head enhances fine-grained detail capture with shared convolutions and learnable fusion weights. Extensive experiments on the PVEL-AD dataset demonstrate that DSS-YOLOv11n achieves 88.1% precision, 83.1% recall, and 90.8% mAP50, while reducing parameters by 14% relative to YOLOv11n. Furthermore, generalization tests on an infrared photovoltaic dataset confirm the method’s robustness. This work provides a practical solution for real-time, lightweight defect detection in solar panels, contributing to the safe and efficient operation of photovoltaic systems.

Scroll to Top