In the context of the global energy transition, solar energy has become a dominant renewable resource, with solar panels serving as the core component in photovoltaic systems. However, during manufacturing, transportation, and long-term outdoor operation, solar panels inevitably develop defects such as micro-cracks, black cores, broken grids, and short circuits. These defects severely degrade power conversion efficiency and pose significant safety risks. Traditional manual inspection methods, which rely on electrical characteristic analysis, fail to locate defects quickly and accurately while incurring high labor costs. Therefore, developing a high-precision, real-time defect detection algorithm for solar panels has become an urgent industrial need.

In this work, I propose a novel end-to-end defect detection algorithm named DBCI-DETR (Deformable Boundary-refined and Cycle-wavelet Integrated DETR), specifically designed to address three major challenges in solar panel electroluminescence (EL) imaging: complex background texture interference, irregular defect morphology, and the loss of tiny defect features. The algorithm builds upon the RT-DETR baseline and introduces four key innovations. First, a Deformable Triple Attention Module (DTAM) is designed to adaptively extract irregular defect features through deformable convolution and resolve semantic misalignment via cross-dimensional interaction with triple attention. Second, a Cycle Wavelet Convolution module (CycleWT) is constructed to establish a joint spatial-frequency perception mechanism, leveraging wavelet transform to expand receptive fields and suppress background noise. Third, a Bidirectional Cross-Scale Pyramid Fusion architecture (BiCCFM) is developed to optimize feature transmission through bidirectional weighted paths, explicitly incorporating high-resolution shallow features to preserve small defect information. Fourth, the CARAFE upsampling operator and Inner-IoU loss function are introduced to enhance multi-scale feature reconstruction and accelerate model convergence. Extensive experiments on the PVEL-AD public dataset demonstrate that DBCI-DETR achieves 93.2% mAP50 and 67.4% mAP50-95, outperforming the baseline RT-DETR by 6.0 and 6.4 percentage points respectively, while maintaining a real-time inference speed of 56.8 FPS.
Introduction and Problem Analysis
The detection of defects in solar panels is fundamentally challenged by three intrinsic characteristics of EL images. First, the background of EL images contains strong periodic textures from solar cell grid lines and crystalline grain structures, which create severe interference patterns that mask subtle defect signatures. Second, defects on solar panels exhibit highly irregular geometries, ranging from linear micro-cracks with irregular propagation paths to star-shaped cracks with radial branching patterns and black core defects with amorphous boundaries. Third, the size of defects spans a large dynamic range, with micro-cracks occupying only a few pixels while large-area shunts cover substantial regions, making multi-scale feature representation critical. These challenges collectively render conventional detection methods inadequate for industrial-grade inspection.
Traditional two-stage detectors like Faster R-CNN first generate region proposals and then perform classification and regression. While achieving reasonable accuracy, they suffer from prohibitive computational overhead due to dense proposal generation and cannot meet real-time requirements. Single-stage detectors such as the YOLO series significantly improve inference speed by performing direct regression, but they heavily rely on threshold filtering and non-maximum suppression (NMS), which degrades robustness and creates redundant predictions. Transformer-based end-to-end detectors like DETR eliminate the need for NMS through bipartite matching, but their high computational cost limits practical deployment. The RT-DETR model represents a significant advancement in real-time transformer detection, yet its architecture remains suboptimal for solar panel defect detection, particularly in handling irregular morphologies and complex textures.
Methodology of DBCI-DETR
The proposed DBCI-DETR algorithm comprises four main components: a backbone network enhanced with DTAM, a heterogeneous encoder incorporating CycleWT, a BiCCFM-based neck architecture, and a decoder with auxiliary prediction heads. Each module addresses specific limitations of the baseline architecture. The overall framework processes input images through progressive feature extraction, multi-scale fusion with bidirectional pathways, and end-to-end prediction via transformer decoding with auxiliary heads.
Deformable Triple Attention Module
The standard BasicBlock in the backbone network lacks adaptive perception capability for irregular defect features. To address this, I propose the DTAM, which synergistically combines deformable convolution with triple attention for cross-dimensional recalibration. The module first applies a 1×1 convolution for dimensionality reduction, significantly lowering computational cost while preserving core semantic information. A parallel branch architecture is then employed: one branch uses standard 3×3 convolution to extract regular region features, while the other branch employs deformable convolution to adaptively adjust sampling positions for capturing irregular defect geometries. Deformable convolution introduces learnable offsets for each sampling point, enabling the convolution kernel to focus on defect regions with arbitrary shapes rather than being constrained to fixed rectangular grids.
The deformable convolution operation is defined as:
$$ y(\mathbf{p}_0) = \sum_{\mathbf{p}_n \in \mathcal{R}} \omega(\mathbf{p}_n) \cdot x(\mathbf{p}_0 + \mathbf{p}_n + \Delta \mathbf{p}_n) $$
where $\mathbf{p}_0$ represents an arbitrary point on the input feature map, $\mathbf{p}_n$ enumerates each position relative to the kernel center within the local receptive field $\mathcal{R}$, $\omega(\mathbf{p}_n)$ denotes the learnable kernel weight at position $\mathbf{p}_n$, and $\Delta \mathbf{p}_n$ is the learned offset that adaptively shifts the sampling location. This mechanism allows the convolution to precisely target irregular defect boundaries and internal structures.
After concatenating the outputs from both parallel branches, residual connections are introduced to facilitate gradient flow. However, features from standard and deformable convolutions exhibit spatial misalignment due to their fundamentally different sampling strategies, leading to semantic inconsistency. To resolve this, triple attention is applied for feature reorganization. Unlike conventional attention mechanisms that operate on a single dimension, triple attention constructs three parallel branches through rotation operations to capture cross-dimensional dependencies among (C, H), (C, W), and (H, W) dimensions. This multi-dimensional interaction enables pixel-level recalibration, assigning higher weights to semantically valuable defect features while suppressing misaligned background features introduced by sampling deviations.
The triple attention mechanism incorporates a Z-Pool strategy that concatenates max pooling and average pooling along the channel dimension, compressing high-dimensional features into a two-channel representation. Compared to traditional global average pooling, Z-Pool preserves informative details while substantially reducing computational overhead. The integration of deformable convolution and triple attention achieves complementary advantages: deformable convolution provides spatial adaptive capability for complex defect morphologies, while triple attention resolves spatial misalignment through semantic recalibration.
Cycle Wavelet Convolution Module
The complex background texture in solar panel EL images, combined with low contrast and indistinct edge information in micro-crack defects, poses severe challenges for feature extraction. To enhance the model sensitivity to subtle defect features, I develop the CycleWT module, which leverages wavelet convolution as its core computational primitive. This module expands the effective receptive field through cascaded wavelet decomposition while preserving spatial domain feature information through joint spatial-frequency domain analysis.
In the CycleWT module, the input feature map is first processed through 1×1 and 3×3 convolutional branches for multi-scale spatial feature extraction. The 1×1 convolution regularizes channel information, while the 3×3 convolution captures local spatial details. Simultaneously, wavelet convolution is applied to the 1×1 convolution output. The discrete wavelet transform (DWT) maps the feature map from the spatial domain to the frequency domain, decomposing it into multiple subbands at different frequency levels. Convolution is then performed in the wavelet domain, followed by inverse wavelet transform (IWT) to reconstruct the output feature map back to the spatial domain, ensuring dimensional consistency. This process is formalized as:
$$ \mathbf{Y} = \text{IWT}(\text{Conv}(\mathbf{W}, \text{WT}(\mathbf{X}))) $$
where $\mathbf{X}$ is the input tensor, $\mathbf{W}$ represents the depthwise convolution kernel with dimensions $K \times K$ and four times the input channels of $\mathbf{X}$, and $\mathbf{Y}$ is the output tensor. This operation enables convolution to operate on separated frequency components, forming the foundation for recursive receptive field expansion.
To overcome the receptive field limitation of a single convolution kernel, the module employs cascaded recursion to achieve progressive expansion. The recursive process is defined as:
$$ \mathbf{X}^{(i)}_{LL}, \mathbf{X}^{(i)}_{H} = \text{WT}(\mathbf{X}^{(i-1)}_{LL}) $$
$$ \mathbf{Y}^{(i)}_{LL}, \mathbf{Y}^{(i)}_{H} = \text{Conv}(\mathbf{W}^{(i)}, (\mathbf{X}^{(i)}_{LL}, \mathbf{X}^{(i)}_{H})) $$
where $\mathbf{X}^{(0)}_{LL}$ is the input to the module, $\mathbf{X}^{(i)}_{H}$ represents high-frequency information at level $i$, and $\mathbf{Y}^{(i)}_{LL}$, $\mathbf{Y}^{(i)}_{H}$ denote the feature tensors after convolution on low-frequency and high-frequency components respectively. The cumulative output combines contributions from multiple levels through summation:
$$ \mathbf{Z}^{(i)} = \mathbf{Z}^{(i-1)} + \text{IWT}(\mathbf{Y}^{(i)}_{LL}, \mathbf{Y}^{(i)}_{H}) $$
Since both DWT and IWT are linear operations satisfying $\text{IWT}(\mathbf{X} + \mathbf{Y}) = \text{IWT}(\mathbf{X}) + \text{IWT}(\mathbf{Y})$, the cumulative output $\mathbf{Z}^{(i)}$ represents the pixel-wise sum of convolutions at different levels, effectively combining multi-scale receptive field responses. Through three cascaded cycles, the module progressively expands the receptive field while comprehensively capturing contextual information around defect regions. The wavelet decomposition naturally separates high-frequency noise from defect edge information, enabling effective suppression of background texture interference. The spatial-frequency joint analysis provides complementary information: spatial features capture local edge details, while frequency features capture global shape information through cascaded wavelet decomposition, enhancing the model discrimination between complex backgrounds and actual defects.
Bidirectional Cross-Scale Pyramid Fusion Architecture
Feature maps at different network depths contain complementary information for defect detection. Shallow feature maps preserve high-resolution structural details crucial for small defect localization, while deep feature maps encode rich semantic information beneficial for large defect identification. However, the encoder-decoder structure in RT-DETR, while enhancing deep network capacity, inherently suffers from spatial resolution degradation through successive downsampling operations. This leads to dilution or even loss of high-resolution shallow information, significantly reducing sensitivity to micro-defects and edge details.
To address feature information loss during transmission, the feature fusion architecture plays a deterministic role. The conventional Feature Pyramid Network (FPN) achieves multi-scale fusion through top-down pathways and lateral connections, but its unidirectional information flow path limits interaction efficiency between low-level and high-level features. In contrast, the Bidirectional Feature Pyramid Network (BiFPN) introduces bidirectional cross-scale connections with learnable weight fusion mechanisms. This architecture breaks the unidirectional transmission limitation, enabling efficient bidirectional flow and complementarity among features at different levels.
I construct a novel BiCCFM architecture by integrating BiFPN into the baseline CCFM framework. Unlike the original CCFM that only utilizes deep features, BiCCFM explicitly introduces 160×160 pixel high-resolution shallow feature maps from the backbone network. These shallow feature maps contain critical defect location and edge texture information, effectively compensating for spatial detail loss caused by deep network architecture. Through multi-scale bidirectional fusion between high-resolution and deep semantic features, BiCCFM significantly enriches the representational capacity of the feature pyramid. The bidirectional fusion allows shallow features to provide precise localization cues for deep features, while deep features provide semantic context for shallow features, creating a mutually reinforcing feedback loop. The learnable weight mechanism adaptively balances contributions from different feature levels based on their relevance to the detection task.
CARAFE Upsampling and Inner-IoU Loss
The standard bilinear interpolation used in RT-DETR for upsampling operates with a fixed kernel, lacking the ability to adapt to the large size variation of solar panel defects, which range from micro-cracks spanning a few pixels to large-area black cores covering substantial regions. I replace the original upsampling operator with CARAFE (Content-Aware ReAssembly of FEatures), which possesses a large receptive field for aggregating contextual information and generates adaptive kernels based on specific target content.
The CARAFE module consists of two submodules: content prediction and feature reassembly. In the content prediction submodule, given an input feature map of size $C \times H \times W$, channel compression is first applied to reduce computational cost, producing a feature map of size $C_m \times H_\sigma \times W_\sigma$. An encoder convolution layer with kernel size $k_{encoder} \times k_{encoder}$ then predicts upsampling kernels, generating a kernel map with output channels $\sigma^2 K_{up}^2$, where $\sigma$ is the upsampling rate and $K_{up}$ is the reassembly kernel size. The resulting kernel layer has dimensions $\sigma H \times \sigma W \times K_{up}^2$. Each $K_{up} \times K_{up}$ reassembly kernel is normalized to ensure the sum of kernel weights equals 1, enabling soft selection of local regions while avoiding mean shift in feature mapping. The upsampling kernel $\omega_{\mathbf{l}’}$ for each target position $\mathbf{l}’$ is predicted by the kernel prediction function $\psi$ based on the neighborhood of $\mathbf{l}$:
$$ \omega_{\mathbf{l}’} = \psi(\mathcal{N}(\chi_{\mathbf{l}}, k_{encoder})) $$
For each target position on the output feature map, it is mapped back to the input feature map, and a $K_{up} \times K_{up}$ sub-region $\mathcal{N}(\chi_{\mathbf{l}}, k_{up})$ is extracted centered at that position. This sub-region is combined with the dynamically generated reassembly kernel $\omega_{\mathbf{l}’}$ through dot product operation to produce the output:
$$ \chi_{\mathbf{l}’} = \varphi(\mathcal{N}(\chi_{\mathbf{l}}, k_{up}), \omega_{\mathbf{l}’}) $$
The content-aware nature of CARAFE allows it to adaptively capture information for targets at different scales, enhancing multi-scale feature representation during the fusion process.
For bounding box regression, the original RT-DETR employs GIoU loss, which degrades to IoU loss when prediction and ground truth boxes do not overlap or have limited overlap, leading to slow convergence. I replace this with Inner-IoU loss, which introduces scale factor control to generate auxiliary bounding boxes at different scales. For high IoU samples, smaller auxiliary boxes are used to accelerate convergence, while for low IoU samples, larger auxiliary boxes provide more stable gradient signals. The Inner-IoU computation involves calculating inner bounding boxes for both ground truth and predicted boxes using the scale factor ratio. The center coordinates of the ground truth box are denoted as $(x_c^{gt}, y_c^{gt})$, and the anchor box center as $(x_c, y_c)$. The widths and heights are $w^{gt}$, $h^{gt}$ for ground truth and $w$, $h$ for anchor boxes. The auxiliary boundaries are computed as:
$$ b_l^{gt} = x_c^{gt} – \frac{w^{gt} \times ratio}{2}, \quad b_r^{gt} = x_c^{gt} + \frac{w^{gt} \times ratio}{2} $$
$$ b_t^{gt} = y_c^{gt} – \frac{h^{gt} \times ratio}{2}, \quad b_b^{gt} = y_c^{gt} + \frac{h^{gt} \times ratio}{2} $$
$$ b_l = x_c – \frac{w \times ratio}{2}, \quad b_r = x_c + \frac{w \times ratio}{2} $$
$$ b_t = y_c – \frac{h \times ratio}{2}, \quad b_b = y_c + \frac{h \times ratio}{2} $$
The intersection and union areas are then computed as:
$$ inter = (\min(b_r^{gt}, b_r) – \max(b_l^{gt}, b_l)) \times (\min(b_b^{gt}, b_b) – \max(b_t^{gt}, b_t)) $$
$$ union = (w^{gt} \cdot h^{gt}) + (w \cdot h) \times ratio^2 – inter $$
$$ IoU_{inner} = \frac{inter}{union} $$
The Inner-IoU loss is defined as:
$$ L_{Inner-IoU} = 1 – IoU_{inner} $$
This mechanism accelerates model convergence speed and improves robustness, particularly for challenging defect detection scenarios.
Experimental Settings and Datasets
All experiments are conducted on an Ubuntu 20.04 system with PyTorch 1.13.1, Python 3.9.8, and CUDA 12.2. The SGD optimizer is used with an input image size of 640×640, initial learning rate of 0.001, 300 training epochs, and batch size of 16. The PVEL-AD public dataset is used for primary evaluation, containing 4,500 EL images with 7,764 defect annotation boxes across eight defect types: linear cracks, broken grid lines, black cores, thick lines, star-shaped cracks, horizontal dislocation, vertical dislocation, and short circuits. The dataset is randomly split into training and validation sets at an 8:2 ratio, yielding 3,600 training images and 900 validation images. For generalization evaluation, the PV-Multi-Defect dataset is additionally employed, containing 4,500 images with five defect types: broken, no_electricity, black_border, scratch, and hot_spot, also split at an 8:2 ratio.
Evaluation metrics include Precision (P), Recall (R), Average Precision (AP), mean Average Precision (mAP@50 and mAP@50-95), computational complexity (GFLOPs), and inference speed (FPS). Precision measures the proportion of correctly detected defects among all detected instances, recall measures the proportion of detected defects among all ground truth defects, and mAP provides a comprehensive assessment across different IoU thresholds.
Comparative Analysis
To validate the performance of DBCI-DETR for solar panel defect detection, I conduct comprehensive comparisons against mainstream two-stage and single-stage algorithms, as well as recently proposed solar panel specific detection methods. The results are summarized in the following table.
| Method | mAP50 (%) | mAP50-95 (%) | GFLOPs | FPS |
|---|---|---|---|---|
| Faster R-CNN | 68.6 | 40.2 | 343.7 | 12.9 |
| YOLOv8s | 79.3 | 53.8 | 28.6 | 77.3 |
| YOLOv10s | 78.1 | 53.6 | 21.6 | 71.6 |
| YOLOv11s | 79.2 | 54.2 | 21.3 | 78.5 |
| YOLOv12s | 78.9 | 54.0 | 21.2 | 78.2 |
| Baseline RT-DETR | 87.2 | 61.0 | 57.0 | 59.0 |
| DBCI-DETR (Ours) | 93.2 | 67.4 | 68.5 | 56.8 |
The results demonstrate that DBCI-DETR significantly outperforms all comparison methods. Compared to the baseline RT-DETR, mAP50 improves by 6.0 percentage points and mAP50-95 improves by 6.4 percentage points. Against YOLOv8s, YOLOv10s, YOLOv11s, and YOLOv12s, mAP50 improvements are 13.9, 15.1, 14.0, and 14.3 percentage points respectively. Even compared to specialized improved YOLOv5 solar panel detection methods, DBCI-DETR achieves 7.0 and 8.9 percentage points higher mAP50. In terms of inference speed, DBCI-DETR achieves 56.8 FPS, which while lower than YOLO series methods due to increased parameter count, still satisfies real-time industrial inspection requirements of 30 FPS. The algorithm demonstrates an excellent balance between detection accuracy and speed, making it highly suitable for solar panel defect detection in industrial environments.
Ablation Study
To evaluate the contribution of each proposed module, I conduct systematic ablation experiments by progressively adding components to the baseline RT-DETR. The results are presented in the following table.
| BiCCFM | DTAM | CycleWT | CARAFE | Inner-IoU | P (%) | R (%) | mAP50 (%) | mAP50-95 (%) | GFLOPs | FPS |
|---|---|---|---|---|---|---|---|---|---|---|
| – | – | – | – | – | 85.8 | 81.9 | 87.2 | 61.0 | 57.0 | 59.0 |
| ✓ | – | – | – | – | 88.5 | 87.6 | 91.1 | 64.7 | 66.3 | 57.8 |
| ✓ | ✓ | – | – | – | 91.2 | 88.6 | 91.9 | 65.6 | 74.5 | 56.4 |
| ✓ | ✓ | ✓ | – | – | 92.4 | 88.1 | 92.2 | 65.7 | 68.8 | 57.1 |
| ✓ | ✓ | ✓ | ✓ | – | 92.0 | 89.2 | 92.8 | 65.5 | 68.5 | 56.8 |
| ✓ | ✓ | ✓ | ✓ | ✓ | 90.7 | 91.0 | 93.2 | 67.4 | 68.5 | 56.8 |
The ablation study reveals several important insights. Introducing BiCCFM alone yields substantial improvements of 3.9 and 3.7 percentage points in mAP50 and mAP50-95 respectively, demonstrating the critical role of bidirectional multi-scale fusion with shallow feature incorporation. Adding DTAM further improves both metrics by 0.8 and 0.9 percentage points, validating the effectiveness of adaptive irregular feature extraction combined with cross-dimensional semantic recalibration. The CycleWT module contributes an additional 0.3 and 0.1 percentage points improvement while reducing GFLOPs by replacing the original RepC3 module, demonstrating the efficiency of wavelet-based frequency domain analysis. CARAFE upsampling increases mAP50 by 0.6 percentage points, confirming the advantage of content-aware feature reassembly for multi-scale target representation. Finally, Inner-IoU loss, while slightly reducing precision, substantially boosts recall from 89.2% to 91.0% and improves mAP50-95 by 1.9 percentage points, indicating faster convergence and better boundary regression quality.
Attention Mechanism Comparison
To evaluate the impact of different attention mechanisms within the DTAM framework, I conduct comparative experiments by replacing the triple attention with coordinate attention (CA), squeeze-and-excitation (SE), and convolutional block attention module (CBAM). The results are summarized below.
| Attention Method | mAP50 (%) | mAP50-95 (%) | FPS |
|---|---|---|---|
| No Attention | 87.6 | 59.8 | 58.8 |
| CA | 88.3 | 60.8 | 58.5 |
| SE | 88.9 | 62.3 | 58.6 |
| CBAM | 89.0 | 62.2 | 58.5 |
| Triple Attention (TA) | 89.2 | 62.6 | 58.4 |
All attention mechanisms improve detection performance compared to the baseline without attention, but triple attention achieves the highest mAP50 and mAP50-95 values. The cross-dimensional interaction strategy of triple attention effectively resolves semantic misalignment between features extracted from standard and deformable convolutional branches, enabling more precise feature recalibration. The slight FPS reduction is negligible compared to the significant accuracy gains.
Confusion Matrix Analysis
To analyze the impact of sample distribution imbalance on detection performance, I compare the normalized confusion matrices of baseline RT-DETR and DBCI-DETR. The baseline algorithm exhibits limited performance for star-shaped cracks and vertical dislocations due to insufficient sample representation, with star-shaped crack recall only reaching 74% and 23% of targets being misclassified as background. Vertical dislocation recall is 82%, still insufficient for industrial requirements. In contrast, DBCI-DETR significantly alleviates sample distribution bias effects. Star-shaped crack recall substantially improves from 74% to 86%, with the miss rate decreasing from 23% to 14%. Vertical dislocation recall also shows substantial improvement. This demonstrates that the DTAM module effectively adaptively extracts irregular defect features while resolving semantic misalignment issues, achieving performance optimization and improved robustness when handling imbalanced solar panel defect data.
Generalization Evaluation
To assess the generalization capability of DBCI-DETR, I conduct additional experiments on the PV-Multi-Defect dataset, which contains different defect types and imaging conditions compared to PVEL-AD. The results are presented below.
| Method | P (%) | R (%) | mAP50 (%) | mAP50-95 (%) |
|---|---|---|---|---|
| Baseline RT-DETR | 81.5 | 68.9 | 74.3 | 51.0 |
| DBCI-DETR (Ours) | 82.1 | 76.8 | 78.1 | 52.4 |
On the PV-Multi-Defect dataset, DBCI-DETR achieves improvements of 0.6, 7.9, 3.8, and 1.4 percentage points in Precision, Recall, mAP50, and mAP50-95 respectively compared to the baseline. The substantial recall improvement of 7.9 percentage points is particularly notable, indicating that the proposed modules enhance the algorithm ability to detect a wider range of defect instances across different imaging conditions. These results validate that DBCI-DETR possesses strong generalization capability for solar panel defect detection across diverse datasets.
Computational Analysis
The computational complexity of DBCI-DETR is analyzed through parameter count and GFLOPs. Compared to the baseline RT-DETR, the proposed algorithm increases GFLOPs from 57.0 to 68.5, representing a 20.2% increase. This additional computational cost primarily stems from the BiCCFM architecture, which introduces additional high-resolution feature paths and bidirectional fusion operations, and the DTAM module, which incorporates parallel deformable convolution branches. However, the CycleWT module partially offsets this increase by replacing the original RepC3 module with a more efficient wavelet-based alternative. The inference speed decreases from 59.0 FPS to 56.8 FPS, a 3.7% reduction, which is acceptable for industrial real-time requirements. The significant accuracy improvements justify the moderate increase in computational cost.
Visualization and Qualitative Analysis
Qualitative visualization results on real solar panel EL images demonstrate the effectiveness of DBCI-DETR in handling various challenging scenarios. For multi-target and linear target detection, the baseline RT-DETR achieves detection but with lower confidence scores compared to DBCI-DETR. The proposed algorithm consistently produces higher confidence predictions and more precise bounding box localization, particularly for micro-crack defects with elongated shapes. For densely overlapping targets, RT-DETR occasionally exhibits bounding box misalignment and incorrectly identifies complex background textures as defect types, leading to false positives that fail to meet industrial inspection standards. DBCI-DETR demonstrates stable performance without false positives or missed detections in densely clustered scenarios, attributed to the synergistic effect of DTAM adaptive feature extraction and CycleWT background noise suppression. For small target detection, DBCI-DETR consistently achieves higher confidence scores than the baseline, demonstrating superior feature preservation and reconstruction capabilities.
Robustness evaluation under simulated industrial interference conditions, including low illumination, Gaussian noise, non-uniform lighting, and partial occlusion, further validates the practical applicability of DBCI-DETR. Under occlusion and non-uniform lighting conditions, both methods detect defect targets, but DBCI-DETR achieves superior confidence for small and linear defects. Under noise and low illumination conditions, RT-DETR exhibits missed detections for multi-target and densely overlapping scenarios with degraded confidence scores. In contrast, DBCI-DETR maintains stable detection performance without false positives or missed detections across all interference conditions, demonstrating strong robustness to adverse imaging environments commonly encountered in industrial solar panel inspection.
Mathematical Formulation Summary
To provide a comprehensive mathematical overview of DBCI-DETR, I summarize the core formulations in the following structured presentation.
The deformable convolution operation for adaptive irregular feature extraction:
$$ y(\mathbf{p}_0) = \sum_{\mathbf{p}_n \in \mathcal{R}} \omega(\mathbf{p}_n) \cdot x(\mathbf{p}_0 + \mathbf{p}_n + \Delta \mathbf{p}_n) $$
The wavelet domain convolution with inverse transform:
$$ \mathbf{Y} = \text{IWT}(\text{Conv}(\mathbf{W}, \text{WT}(\mathbf{X}))) $$
The cascaded receptive field expansion through recursive wavelet decomposition:
$$ \mathbf{X}^{(i)}_{LL}, \mathbf{X}^{(i)}_{H} = \text{WT}(\mathbf{X}^{(i-1)}_{LL}), \quad \mathbf{Y}^{(i)}_{LL}, \mathbf{Y}^{(i)}_{H} = \text{Conv}(\mathbf{W}^{(i)}, (\mathbf{X}^{(i)}_{LL}, \mathbf{X}^{(i)}_{H})) $$
The cumulative multi-level output combining frequency subbands:
$$ \mathbf{Z}^{(i)} = \mathbf{Z}^{(i-1)} + \text{IWT}(\mathbf{Y}^{(i)}_{LL}, \mathbf{Y}^{(i)}_{H}) $$
The content-aware upsampling kernel prediction and feature reassembly:
$$ \omega_{\mathbf{l}’} = \psi(\mathcal{N}(\chi_{\mathbf{l}}, k_{encoder})), \quad \chi_{\mathbf{l}’} = \varphi(\mathcal{N}(\chi_{\mathbf{l}}, k_{up}), \omega_{\mathbf{l}’}) $$
The Inner-IoU auxiliary bounding box computation:
$$ b_l^{gt} = x_c^{gt} – \frac{w^{gt} \times ratio}{2}, \quad b_r^{gt} = x_c^{gt} + \frac{w^{gt} \times ratio}{2} $$
$$ b_t^{gt} = y_c^{gt} – \frac{h^{gt} \times ratio}{2}, \quad b_b^{gt} = y_c^{gt} + \frac{h^{gt} \times ratio}{2} $$
$$ b_l = x_c – \frac{w \times ratio}{2}, \quad b_r = x_c + \frac{w \times ratio}{2} $$
$$ b_t = y_c – \frac{h \times ratio}{2}, \quad b_b = y_c + \frac{h \times ratio}{2} $$
The Inner-IoU intersection, union, and loss computation:
$$ inter = (\min(b_r^{gt}, b_r) – \max(b_l^{gt}, b_l)) \times (\min(b_b^{gt}, b_b) – \max(b_t^{gt}, b_t)) $$
$$ union = (w^{gt} \cdot h^{gt}) + (w \cdot h) \times ratio^2 – inter $$
$$ IoU_{inner} = \frac{inter}{union}, \quad L_{Inner-IoU} = 1 – IoU_{inner} $$
The evaluation metrics for Precision, Recall, Average Precision, and mean Average Precision:
$$ P = \frac{TP}{TP + FP}, \quad R = \frac{TP}{TP + FN} $$
$$ AP = \int_0^1 P(R) dR, \quad mAP = \frac{1}{k} \sum_{i=1}^{k} AP_i $$
Key Parameters and Hyperparameter Settings
The key architectural parameters of DBCI-DETR are summarized in the following table.
| Component | Parameter | Value |
|---|---|---|
| DTAM | Deformable convolution kernel size | 3 × 3 |
| DTAM | Standard convolution kernel size | 3 × 3 |
| DTAM | Dimensionality reduction ratio | 1×1 conv, channels / 4 |
| CycleWT | Wavelet decomposition levels | 3 |
| CycleWT | Depthwise convolution kernel size | 3 × 3 |
| CycleWT | Cascade cycles | 3 |
| BiCCFM | Shallow feature resolution | 160 × 160 |
| BiCCFM | Bidirectional fusion levels | 5 |
| CARAFE | Reassembly kernel size $K_{up}$ | 5 |
| CARAFE | Encoder kernel size $k_{encoder}$ | 3 |
| CARAFE | Upsampling rate $\sigma$ | 2 |
| Inner-IoU | Scale factor ratio | 0.7 |
Defect Type Analysis
The PVEL-AD dataset contains eight distinct defect types with varying morphological characteristics and occurrence frequencies. The defect distribution analysis reveals significant class imbalance, with linear cracks and broken grid lines being the most prevalent categories. Star-shaped cracks and vertical dislocations constitute the minority classes with limited sample representation. This imbalance poses additional challenges for detection algorithms, as minority classes are prone to underfitting during training. The proposed DBCI-DETR demonstrates robustness against this imbalance, achieving balanced performance across all defect categories.
The confusion matrix analysis provides detailed category-level performance insights. For linear cracks, DTAM adaptive feature extraction enables precise boundary delineation even when cracks propagate along irregular paths. For black core defects, CycleWT frequency domain analysis effectively separates defect regions from surrounding dark background areas. For star-shaped cracks with radial branching patterns, the combination of deformable convolution and triple attention allows the model to capture complex morphological structures. For dislocation defects, BiCCFM bidirectional fusion preserves both the structural context and precise location information needed for accurate detection.
Discussion on Industrial Applicability
The proposed DBCI-DETR algorithm demonstrates strong potential for industrial deployment in solar panel defect detection systems. With 56.8 FPS inference speed, it satisfies the real-time requirement for production line inspection, typically set at 30 FPS. The 93.2% mAP50 represents a substantial improvement over existing methods, enabling more reliable identification of diverse defect types. The robustness to interference conditions including low illumination, noise, non-uniform lighting, and occlusion makes the algorithm suitable for deployment in challenging field environments where image quality cannot be guaranteed. The generalization capability across different datasets indicates that the learned feature representations are transferable to various solar panel types and imaging systems.
Future work will focus on further optimizing the computational efficiency to increase inference speed while maintaining accuracy. Model compression techniques such as knowledge distillation, channel pruning, and quantization could reduce the parameter count and GFLOPs without significant performance degradation. Additionally, extending the framework to detect novel defect types through few-shot learning or open-world recognition paradigms would enhance practical utility. Integration with edge computing platforms for on-device inference is another promising direction for real-time industrial deployment.
Conclusion
In this work, I have presented DBCI-DETR, a novel end-to-end defect detection algorithm specifically designed for solar panel EL imaging inspection. The algorithm addresses three critical challenges in solar panel defect detection: complex background texture interference through CycleWT spatial-frequency joint analysis, irregular defect morphology through DTAM adaptive deformable convolution with cross-dimensional attention recalibration, and small defect feature loss through BiCCFM bidirectional multi-scale fusion with CARAFE content-aware upsampling. Comparative experiments on the PVEL-AD dataset demonstrate that DBCI-DETR achieves state-of-the-art performance with 93.2% mAP50 and 67.4% mAP50-95, outperforming the baseline RT-DETR by 6.0 and 6.4 percentage points respectively. Systematic ablation studies validate the contribution of each proposed module, and generalization experiments on the PV-Multi-Defect dataset confirm the algorithm robustness and transferability. The confusion matrix analysis demonstrates balanced detection performance across imbalanced defect categories. With 56.8 FPS real-time inference speed and strong robustness to various interference conditions, DBCI-DETR provides an effective and practical solution for industrial solar panel defect detection, contributing to improved quality control and operational safety in photovoltaic power generation systems.
