The growing global demand for electricity and the pressing need to mitigate environmental pollution caused by fossil fuels have propelled renewable energy sources, particularly solar power, into the spotlight. China has witnessed significant development in this sector, with large-scale, centralized grid-connected photovoltaic power stations established in its northwestern regions and extensive distributed generation systems deployed on rooftops in rural areas. The conversion efficiency of these photovoltaic (PV) power generation systems is directly impacted by the operational state of the solar panels. Operating in harsh outdoor environments such as deserts and Gobi regions, solar panels are susceptible to defects like dust accumulation, bird droppings, and physical damage. These issues can lead to more serious faults like micro-cracks and hot spots, which not only degrade energy conversion efficiency but also pose potential safety hazards to the electrical circuit. Therefore, timely and efficient defect diagnosis for solar panels is paramount for extending their service life and maximizing power generation output.
Current methods for solar panel inspection include manual checks, electrical characteristic-based detection, and computer vision techniques. Manual inspection is often inefficient and constrained by site accessibility, making it difficult to promptly identify and address faults. Electrical characteristic-based methods involve installing sensors on the panels to monitor operational parameters like current and voltage. While effective, this approach incurs high installation and maintenance costs and lacks flexibility. In contrast, computer vision detection, leveraging advances in imaging and processing, has emerged as a mainstream solution due to its timeliness, non-contact nature, and relatively low cost.

The advent of Convolutional Neural Networks (CNNs) since 2012 has significantly propelled the field of computer vision. Detection frameworks like the YOLO series and Faster R-CNN have demonstrated strong performance by hierarchically aggregating local image features. However, these methods inherently generate a large number of redundant bounding box proposals, necessitating post-processing steps like confidence thresholding and Non-Maximum Suppression (NMS). This design deviates from the ideal end-to-end learning paradigm. The remarkable success of the Transformer architecture in natural language processing inspired its adaptation to computer vision, leading to Detection Transformer (DETR), which formulates object detection as a direct set prediction problem. DETR eliminates the need for hand-crafted components like anchor generation and NMS, offering a truly end-to-end framework. Despite its advantages, the original DETR suffered from slow training convergence and limited feature spatial resolution, prompting the development of numerous variants. Notable improvements include Deformable DETR, which accelerates convergence by attending to a small set of key sampling points, and RT-DETR, which builds upon the DINO detector to achieve real-time performance with high accuracy through architectural optimizations, removing the need for NMS while requiring fewer training iterations.
However, detecting defects in solar panels presents unique challenges: targets (like cracks or hot spots) can be very small; images are often captured in complex, cluttered backgrounds with variable lighting conditions, leading to reflections and shadows; and there is a need for models that are both accurate and computationally efficient for potential real-time or edge deployment. Existing models, including the standard RT-DETR, can struggle with low precision, high model parameter counts, and issues of missed detections or false positives under these challenging conditions for solar panels.
To address these shortcomings, this paper proposes an enhanced solar panel defect detection algorithm named FCD-DETR, built upon the RT-DETR framework. Our improvements focus on three key aspects to boost performance specifically for the solar panel inspection task. First, we redesign the backbone network. The standard ResNet backbone is replaced with a novel FREBlock, which integrates architectural re-parameterization techniques from RepConv with a streamlined version of FasterNet and incorporates an Efficient Multi-Scale Attention (EMA) mechanism. This combination enhances feature extraction capability for the nuanced defects found on solar panels while simultaneously reducing computational redundancy, leading to a more lightweight and efficient model. Second, we propose a new feature fusion architecture called CRDFP (Contextual Reconstruction and Dynamic Fusion Pyramid) to replace the original Cross-Scale Feature Fusion Module (CCFM). CRDFP leverages components like the Rectangular Self-Calibration Module (RCM) and Pyramid Context Extraction (PCE) to better capture global context and multi-scale semantic information, which is crucial for distinguishing small defects from complex backgrounds common in solar farm imagery. Finally, we enhance the AIFI (Attention-based Intra-scale Feature Interaction) module by integrating a Deformable Attention Transformer (DAT) mechanism. This allows the model to dynamically focus its attention on the most relevant regions of the feature map—such as potential defect areas on the solar panels—rather than processing all locations uniformly, thereby improving accuracy and reducing computational load on irrelevant background parts.
The core contributions of our work are as follows: (1) The design of the FREBlock backbone, which balances strong feature representation for solar panel defects with network efficiency. (2) The proposal of the CRDFP multi-scale feature fusion structure, which significantly improves the model’s ability to integrate contextual information across scales, vital for robust solar panel inspection. (3) The integration of a deformable attention mechanism within the AIFI module, enabling adaptive focus on salient features. Comprehensive experiments on a curated solar panel defect dataset demonstrate that our FCD-DETR model achieves a mean Average Precision (mAP) of 79.2%, which is a 3.6 percentage point improvement over the baseline RT-DETR model. Furthermore, it reduces the number of parameters by 22.6% and computational complexity (GFLOPs) by 25.9%, confirming its effectiveness and efficiency for the targeted application.
1. The Proposed FCD-DETR Model
RT-DETR (Real-Time Detection Transformer) is an efficient, single-stage object detector based on a Transformer architecture. It introduces a real-time, end-to-end object detection paradigm that greatly simplifies the traditional pipeline by eschewing NMS post-processing. The standard RT-DETR model comprises three main components: a backbone (typically ResNet18) for initial feature extraction, an efficient hybrid encoder consisting of AIFI and CCFM modules for feature refinement and fusion, and a Transformer decoder with auxiliary prediction heads. While RT-DETR represents a significant innovation, its performance on specialized tasks like solar panel defect detection can be further optimized.
Our proposed FCD-DETR model specifically targets the challenges inherent to solar panel imagery: small defect targets, background clutter, and light reflections. We introduce modifications across three core components of the original network, as illustrated in the architectural diagram. First, the backbone is enhanced with our novel FREBlock and FREConv modules. Second, the feature fusion path is redesigned with our CRDFP structure. Third, the AIFI module is improved by integrating a deformable attention mechanism. These modifications collectively aim to increase detection precision, especially for small defects on solar panels, while maintaining or even improving inference speed.
1.1 FREBlock Backbone and FREConv
In convolutional neural networks, the BasicBlock is a fundamental building block, widely used in designs like ResNet where skip connections help mitigate the vanishing gradient problem in deep networks. However, for the fine-grained task of solar panel defect detection, the traditional BasicBlock has limitations. Its standard convolution operations are not optimal for capturing subtle local features and spatial information, which is critical for identifying small cracks or localized discolorations on solar panels.
To overcome this, we propose the FREBlock module. This module re-engineers the convolutional design within the BasicBlock to enable more precise capture of fine defect features on solar panels. The FREBlock builds upon the efficient FasterNet architecture. We apply structural re-parameterization (Rep) to fuse partial convolutions and incorporate an Efficient Multi-Scale Attention (EMA) mechanism, resulting in a core component we call FREConv. This design increases the network’s sensitivity to local defect patterns on solar panels while reducing interference from global background noise. Consequently, the FREBlock significantly enhances performance in fine-grained defect detection. Importantly, it achieves this while reducing redundant computations and effectively compressing model parameters, leading to higher computational efficiency—a key consideration for deploying inspection systems in the field for solar panels.
1.1.1 The RPConv Module. Solar panel images, often captured in varied environments, can lead to significant redundant computation during feature extraction, resulting in inefficient processing and high FLOPs. Traditional CNNs with fixed kernels have inherent limitations. While alternatives like group convolution (GConv) or MicroNet reduce FLOPs, they often introduce increased memory access costs or reduced computational density, ultimately impacting runtime efficiency.
The FasterNet architecture addresses this with a novel operator called Partial Convolution (PConv). PConv applies standard convolution only to a subset of input channels (the first or last consecutive $c_p$ channels), leaving the rest unchanged. For an input feature map of dimensions $h \times w$ with $c$ channels and a kernel size $k$, assuming input and output have the same channel count, the FLOPs for a PConv are:
$$FLOPs = h \times w \times k^2 \times c_p^2$$
With a typical choice of $c_p = \frac{c}{4}$, the FLOPs of a PConv are only $\frac{1}{16}$ of a regular convolution. Its memory access is approximately:
$$h \times w \times 2c_p + k^2 \times c_p^2 \approx h \times w \times 2c_p$$
While efficient, PConv can be limited in handling complex natural scene classification. To enhance its capability, we employ structural re-parameterization (Rep), creating the RPConv module. Reparametrization merges the operations and parameters of a multi-branch topology (e.g., 1×1 and 3×3 convolutions each followed by Batch Normalization) into a single convolutional layer during inference. This fusion reduces computational overhead without sacrificing the representational capacity learned during training.
The fusion of a Conv layer with a subsequent Batch Norm (BN) layer is a key step. The BN operation is defined as:
$$\hat{x}_i = \gamma \cdot \frac{x_i – \mu}{\sqrt{\sigma^2 + \epsilon}} + \beta$$
Where $\epsilon$ is a small constant for numerical stability, $\mu$ and $\sigma^2$ are the mean and variance statistics of the input features, and $\gamma$ and $\beta$ are learned scaling and shifting parameters. This can be rewritten in the form $y = w x + b$:
$$\hat{x}_i = \frac{\gamma}{\sqrt{\sigma^2 + \epsilon}} \cdot x_i + \left( \beta – \frac{\gamma \cdot \mu}{\sqrt{\sigma^2 + \epsilon}} \right)$$
Let $w_{BN} = \frac{\gamma}{\sqrt{\sigma^2 + \epsilon}}$ and $b_{BN} = \beta – \frac{\gamma \cdot \mu}{\sqrt{\sigma^2 + \epsilon}}$. The fusion of a Conv layer (with weight $w_{conv}$ and bias $b_{conv}$) with this BN layer is:
$$\hat{x} = w_{BN} \cdot (w_{conv} \cdot x + b_{conv}) + b_{BN} = (w_{BN} \cdot w_{conv}) \cdot x + (w_{BN} \cdot b_{conv} + b_{BN})$$
Thus, the parameters of the merged convolution layer are:
$$
\begin{cases}
w = w_{BN} \cdot w_{conv} \\
b = w_{BN} \cdot b_{conv} + b_{BN}
\end{cases}
$$
Here, $w$ and $b$ are the fused weight and bias. This re-parameterization process allows for a multi-branch training time structure that is collapsed into a single, efficient layer at inference time.
1.1.2 The EMA Module. Defects on solar panels can appear at various scales and levels of detail depending on environmental factors and imaging distance. To handle this multi-scale nature effectively, we incorporate the Efficient Multi-Scale Attention (EMA) mechanism. This module preserves channel information while reducing computational cost. It first employs a cross-space learning approach, applying separate 1D global pooling operations along the horizontal (X Avg Pool) and vertical (Y Avg Pool) axes. The resulting horizontal and vertical global context vectors are then concatenated and fused. A matrix dot product operation aggregates these outputs to generate a spatial attention map that captures pixel-wise pair relationships and emphasizes global context. This process helps the model highlight regions containing potential defects on the solar panels and suppress irrelevant background information.
To further improve efficiency, EMA employs a feature grouping strategy. The input feature map is divided into $G$ sub-feature groups, allowing each group to learn different semantic representations. This grouping reduces the computational complexity of the attention operation from $O(C^2 \times H \times W)$ to $O(C^2/G \times H \times W)$, where $G$ is the number of groups. This not only strengthens feature learning within semantic regions but also helps compress noise. By integrating the EMA module into the RPConv processing pipeline, the model can dynamically allocate its attention based on feature importance rather than uniformly processing all spatial locations. This ensures enhanced performance for solar panel defect detection without a substantial increase in computational load or memory requirements. The multi-branch structure during training learns rich image features (textures, shapes of defects on solar panels), which are fused at inference to improve classification and detection accuracy.
1.2 Improved CCFM: The CRDFP Structure
Solar panel defect images are predominantly captured outdoors, leading to complex and variable backgrounds where factors like lighting and shadows can severely challenge detection algorithms. To improve the model’s adaptability, especially for small defect targets on solar panels, a more efficient encoder module for fusing multi-level features is required. The original CCFM module in RT-DETR fuses three levels of semantic features from the backbone in both top-down and bottom-up manners. While this provides some multi-scale adaptability, it can still suffer from missed detections and misalignment in complex environments due to potential conflicts between the positional details in shallow features and the semantic information in deep features.
We propose an enhanced feature fusion strategy, drawing inspiration from context-guided spatial feature reconstruction networks. Our design, termed CRDFP (Contextual Reconstruction and Dynamic Fusion Pyramid), integrates several novel components. It uses a Rectangular Self-Calibration Module (RCM) which employs horizontal and vertical pooling to model rectangular regions of interest, helping the model focus more on foreground features (i.e., the solar panels and their defects). We further incorporate a Pyramid Context Extraction (PCE) module, which aggregates multi-scale contextual information through parallelized patch-aware attention. Additionally, we employ a Dynamic Interpolation Fusion (DIF) module to adaptively resize and blend feature maps from different scales, and a Multi-Fusion Block (FBM) to iteratively refine and combine features. This structure significantly enhances the model’s ability to perceive context and recognize targets amidst cluttered backgrounds typical of solar farm inspections.
1.2.1 The PCE Component. The Rectangular Self-Calibration Module (RCM) is a core part of PCE, composed of Rectangular Self-Calibration Attention (RCA), Batch Normalization (BN), and a Multi-Layer Perceptron (MLP). The RCA uses horizontal and vertical pooling to capture global context along the two spatial axes, generating two distinct directional feature vectors. Through a broadcast addition operation on these vectors, RCA can effectively model rectangular regions of interest, which often correspond to the shape of solar panels or large defects. Since RCA utilizes large-kernel strip convolutions that can have many parameters and unstable gradients, a BN layer is added to normalize the features and stabilize training. Finally, an MLP refines the features, and a residual connection is employed to facilitate feature reuse. Compared to a standard fully-connected layer, the MLP is more lightweight, aligning with the need for efficient detection. This module enhances the model’s contextual awareness and robustness, enabling it to better handle variations in illumination, angle, and background for solar panels.
The PCE module is formed by integrating the RCM within a Parallelized Patch-Aware Attention (PPA) framework to fuse feature maps at different scales. The RCM, via its RCA, captures global spatial context and models regions of interest, aiming to align features closer to foreground objects (the solar panels). This process decouples the calibration using two strip convolution kernels. A horizontal strip convolution first calibrates the shape along the width, adjusting elements row-wise. After BN and ReLU activation for normalization and non-linearity, a vertical strip convolution calibrates the shape along the height. This decoupled approach allows the module to adaptively handle features of various orientations and shapes, improving detection capability for differently oriented solar panels or elongated defects. The calibrated feature maps are then passed through an MLP for further expressive power enhancement, optimizing the feature representation for complex backgrounds.
1.2.2 Feature Fusion Modules. In solar panel defect detection, different levels of feature maps contain information at varying scales. High-level features carry rich semantic information, while low-level features preserve fine spatial details. To effectively extract and integrate this multi-scale contextual information, the CRDFP structure employs two primary fusion modules: DIF and FBM.
The Dynamic Interpolation Fusion (DIF) module addresses the challenge of cross-scale feature fusion. It dynamically adjusts the channel dimensions and spatial sizes of feature maps from different scales (e.g., $X_1$ and $X_2$). Typically, $X_2$ is resized to match the spatial dimensions of $X_1$ using bilinear interpolation, followed by a convolutional layer to process and fuse the information. This method effectively integrates multi-scale context, enhancing the representation power for defects of varying sizes on solar panels.
The Feature Blending Module (FBM) processes low-frequency and high-frequency feature components separately. Low-frequency features provide global semantic understanding, while high-frequency features capture fine details and local texture—critical for spotting small cracks or hot spots on solar panels. The module uses convolutional layers on each stream, applies an activation function to the high-frequency path for adjustment, and then combines them. Often, the high-frequency features are resized via bilinear interpolation to match the low-frequency features before fusion. This combination boosts both the accuracy and robustness of solar panel defect detection by leveraging complementary information from different feature domains.
Together, these multi-module fusion strategies significantly improve defect detection accuracy under varying lighting and background conditions while maintaining computational efficiency. By working synergistically, they strengthen both the semantic expression and detail-capturing ability of the feature maps, providing a more robust and precise solution for inspecting solar panels.
1.3 Improved AIFI with Deformable Attention
In the original RT-DETR, the AIFI module is based on a standard Transformer encoder. The traditional multi-head self-attention (MHSA) mechanism processes all pixels in the feature map, leading to high computational complexity that is quadratic with respect to spatial size. This can be inefficient, especially when dealing with high-resolution feature maps common in detection tasks for solar panels, where much of the image may be uninformative background.
For MHSA, given an input $x$, the query ($q$), key ($k$), and value ($v$) projections are computed as:
$$q = xW_q, \quad k = xW_k, \quad v = xW_v$$
The output for head $m$ is:
$$z^{(m)} = \sigma\left(\frac{q^{(m)} (k^{(m)})^\top}{\sqrt{d}}\right) v^{(m)}, \quad m = 1, \dots, M$$
And the final output is the concatenation across heads:
$$z = \text{Concat}(z^{(1)}, \dots, z^{(M)}) W_o$$
where $\sigma$ is the softmax function, and $W_q, W_k, W_v, W_o$ are projection matrices.
To overcome the inefficiency of full attention and to better focus on relevant regions (like potential defect areas on the solar panels), we replace the standard attention in AIFI with a Deformable Attention Transformer (DAT) mechanism, resulting in the D-AIFI module. DAT does not attend to all spatial locations. Instead, for each query element, it predicts a small set of offsets to sample key/value pairs from a sparse set of points in the feature map. This allows the model to concentrate its computational resources on the most informative regions.
For a given reference point $p$ (often derived from the query’s location), the network predicts an offset $\Delta p = \theta_{\text{offset}}(q)$, where $\theta_{\text{offset}}$ is a lightweight sub-network (e.g., a depthwise convolution followed by GELU and a 1×1 conv). To stabilize training, the magnitude of $\Delta p$ is scaled by a predefined factor. Features are then sampled at the deformed locations $p + \Delta p$ using a differentiable bilinear interpolation function $\phi$:
$$\tilde{x} = \phi(x; p + \Delta p)$$
The sampled features are used to form the key $\tilde{k}$ and value $\tilde{v}$ embeddings: $\tilde{k} = \tilde{x} W_k, \tilde{v} = \tilde{x} W_v$. The deformable attention for head $m$ then becomes:
$$z^{(m)} = \sigma\left( \frac{q^{(m)} (\tilde{k}^{(m)})^\top}{\sqrt{d}} + \phi(\hat{B}; R) \right) \tilde{v}^{(m)}$$
where $\phi(\hat{B}; R)$ adds relative position bias. The outputs from all heads are concatenated and projected. By dynamically selecting sampling points, D-AIFI significantly reduces computational load compared to global attention while allowing the model to focus on contextually important areas, such as the boundaries of solar panels or localized discolorations, leading to improved accuracy and efficiency for the detection task.
2. Experimental Design and Analysis
2.1 Dataset and Experimental Setup
Given the scarcity of specialized, publicly available datasets for solar panel defect detection, we constructed a comprehensive dataset by aggregating and curating images from multiple sources, including PaddlePaddle datasets, Roboflow, and the PV-HSD-2025 public dataset. This process yielded 8,312 raw images, from which we meticulously selected 4,271 images containing three critical defect categories relevant to real-world solar panel inspection: hot spots, dirt/stains, and physical breakage. The dataset was partitioned into training, validation, and test sets following an 8:1:1 ratio. During training, input images were resized to a resolution of 640×640 pixels. The model was trained for 200 epochs with a batch size of 8 and 4 worker threads for data loading, while other hyperparameters retained their default values. The hardware and software environment for all experiments is detailed below.
| Component | Specification |
|---|---|
| Operating System | Windows 10 |
| GPU | NVIDIA GeForce RTX 4070 Super |
| CPU | Intel(R) Core(TM) i5-13400F |
| Memory | 12 GB |
| Python Version | 3.9 |
| Deep Learning Framework | PyTorch |
2.2 Evaluation Metrics
We employ several standard metrics to evaluate model performance comprehensively:
- Precision (P): The proportion of correctly identified positive predictions among all predictions made by the model. It measures accuracy in terms of false positives.
$$P = \frac{N_{TP}}{N_{TP} + N_{FP}}$$ - Recall (R): The proportion of actual positive instances that were correctly identified by the model. It measures the model’s ability to find all relevant cases (avoid false negatives).
$$R = \frac{N_{TP}}{N_{TP} + N_{FN}}$$ - Parameters (Params): The total number of trainable parameters in the model, indicating its spatial complexity and size.
- GFLOPs: Giga Floating-point Operations Per second, representing the computational complexity of a single forward pass for a given input size, measuring the model’s inference speed potential.
- Average Precision (AP) & mean Average Precision (mAP): AP is the area under the Precision-Recall curve for a single class. mAP is the average of AP across all classes, providing a single-figure measure of detection quality. Higher mAP indicates better overall performance.
$$AP = \int_0^1 P(R) \, dR, \quad mAP = \frac{1}{n} \sum_{j=1}^{n} AP_j$$
2.3 Ablation Study
We conducted a systematic ablation study to validate the contribution of each proposed component in our FCD-DETR model. The baseline is the unmodified RT-DETR model (Exp 1). We then incrementally added our modifications: the FREBlock backbone (Exp 2), the CRDFP feature fusion structure (Exp 3), the D-AIFI module (Exp 4), and their combinations (Exp 5, 6, 7). The results are summarized in the table below.
| Exp | Backbone | FREBlock | CRDFP | D-AIFI | P (%) | R (%) | GFLOPs | Params (M) | mAP@0.5 (%) |
|---|---|---|---|---|---|---|---|---|---|
| 1 | ResNet | 76.6 | 68.3 | 58.3 | 20.8 | 75.6 | |||
| 2 | ✓ | 78.1 | 70.6 | 52.0 | 17.1 | 76.7 | |||
| 3 | ResNet | ✓ | 78.4 | 71.2 | 48.6 | 19.3 | 77.3 | ||
| 4 | ResNet | ✓ | 79.8 | 71.9 | 58.5 | 20.0 | 77.5 | ||
| 5 | ✓ | ✓ | 81.6 | 73.4 | 43.3 | 16.4 | 78.5 | ||
| 6 | ✓ | ✓ | 81.5 | 73.7 | 49.1 | 18.6 | 78.7 | ||
| 7 | ✓ | ✓ | ✓ | 82.3 | 74.2 | 43.2 | 16.1 | 79.2 |
The results clearly demonstrate the effectiveness of each component. Replacing the backbone with FREBlock (Exp 2) alone improves mAP by 1.1 points while reducing parameters by 17.8% and GFLOPs by 10.8%. Independently, CRDFP (Exp 3) and D-AIFI (Exp 4) also provide substantial mAP gains of 1.7 and 1.9 points, respectively. Combining FREBlock with either CRDFP (Exp 5) or D-AIFI (Exp 6) yields even greater improvements (2.9 and 3.1 points). The full integration of all three components in FCD-DETR (Exp 7) achieves the best performance: a mAP of 79.2%, which is a 3.6-point gain over the baseline. Notably, this peak accuracy is achieved with the lowest parameter count (16.1M, a 22.6% reduction) and a significantly lower computational cost (43.2 GFLOPs, a 25.9% reduction). This confirms that our improvements are not only effective in boosting detection accuracy for solar panels but also successful in creating a more efficient and streamlined model suitable for practical deployment.
2.4 Comparative Experiments
To objectively benchmark the performance of our FCD-DETR model, we compared it against several state-of-the-art object detection models, including two-stage detectors, various YOLO versions, and other Transformer-based detectors. The results on our solar panel defect dataset are presented below.
| Model | P (%) | R (%) | Params (M) | GFLOPs | mAP@0.5 (%) |
|---|---|---|---|---|---|
| Faster R-CNN | 63.9 | 58.4 | 137.1 | 303.1 | 63.6 |
| YOLOv5m | 71.9 | 63.1 | 21.3 | 64.1 | 71.2 |
| YOLOv5l | 72.8 | 64.5 | 46.2 | 78.7 | 72.0 |
| YOLOv8m | 74.5 | 67.2 | 25.8 | 59.0 | 74.3 |
| YOLOv8l | 75.2 | 68.9 | 43.4 | 91.6 | 75.2 |
| YOLOv10m | 75.4 | 69.3 | 17.2 | 63.6 | 75.3 |
| Deformable DETR | 74.6 | 68.4 | 39.8 | 196.1 | 75.1 |
| RT-DETR (Baseline) | 75.9 | 69.8 | 20.8 | 58.2 | 75.6 |
| FCD-DETR (Ours) | 82.3 | 74.2 | 16.1 | 43.2 | 79.2 |
The comparative analysis reveals the superior performance of our FCD-DETR model. It achieves the highest Precision (82.3%), Recall (74.2%), and mAP (79.2%) among all compared models. Crucially, it attains this leading accuracy with the fewest parameters (16.1M) and the lowest computational cost (43.2 GFLOPs) among the top-performing models. Traditional models like Faster R-CNN lag significantly in all metrics. While recent YOLO versions and the baseline RT-DETR show respectable mAP scores, they require more computational resources (higher GFLOPs and/or Params). Our model successfully balances the powerful global modeling and set prediction of the Transformer architecture with highly efficient feature extraction and fusion mechanisms tailored for solar panel inspection. This makes FCD-DETR particularly suitable for scenarios where both high accuracy and computational efficiency are demanded for inspecting solar panels, such as in edge computing devices or real-time drone-based inspection systems.
Qualitative results further illustrate the advantages. Our FCD-DETR model demonstrates more accurate localization of defects, fewer missed detections (especially for small or subtle defects on solar panels), and significantly reduced false positives in complex backgrounds compared to other models like YOLOv12m and the original RT-DETR.
2.5 Generalization Experiment
To rigorously assess the generalization capability of our proposed algorithm, we evaluated it on a publicly available and challenging dataset: the PVEL-AD (Photovoltaic Electroluminescence Anomaly Detection) dataset, a joint release from Hebei University of Technology and Beihang University. This dataset contains 36,543 near-infrared electroluminescence images with one normal class and 12 different defect categories. For our experiment, we used a subset of 3,812 images covering seven common defect types: black core, crack, horizontal dislocation, finger interruption, short circuit, star crack, and thick line.
We compared our FCD-DETR against the baseline RT-DETR on this dataset. The results are summarized below.
| Model | P (%) | R (%) | mAP@0.5 (%) | Params (M) |
|---|---|---|---|---|
| RT-DETR | 66.6 | 69.7 | 74.4 | 20.8 |
| FCD-DETR (Ours) | 76.7 | 72.9 | 80.8 | 16.1 |
The results on the PVEL-AD dataset are compelling. Our FCD-DETR model not only maintains its parameter efficiency but also achieves a significant improvement in all accuracy metrics over the baseline RT-DETR. It increases mAP by 6.4 percentage points (from 74.4% to 80.8%), Precision by 10.1 points, and Recall by 3.2 points. This experiment validates the strong generalization ability of our architectural improvements. The model’s enhanced feature extraction (FREBlock), context-aware fusion (CRDFP), and adaptive attention (D-AIFI) translate effectively to a different imaging modality (electroluminescence) and a broader set of defect types, proving its robustness and versatility beyond the specific conditions of our primary visible-light solar panel dataset. Visual comparisons on the PVEL-AD dataset further confirm that FCD-DETR exhibits superior focus on defect regions and significantly reduces both missed detections and false alarms compared to the baseline model.
3. Conclusion
This paper addresses the critical challenges in solar panel defect detection, including interference from complex backgrounds, low precision in small target detection, and the computational inefficiency of traditional models. Building upon the NMS-free RT-DETR framework, we proposed FCD-DETR, an efficient and accurate detection algorithm specifically optimized for inspecting solar panels. The core innovations include: (1) The FREBlock backbone, which integrates RepConv and EMA attention to enhance feature extraction capability for solar panel defects while simplifying network structure; (2) The CRDFP multi-scale feature fusion architecture, designed to strengthen contextual perception and feature representation across scales, crucial for robust performance in cluttered environments; and (3) The integration of a Deformable Attention mechanism (D-AIFI) to enable adaptive focus on salient regions, improving detail capture and computational efficiency.
Extensive experimental results on a curated solar panel defect dataset demonstrate that FCD-DETR achieves a state-of-the-art mAP of 79.2%, representing a 3.6% improvement over the baseline RT-DETR. Remarkably, this performance gain is accompanied by a 22.6% reduction in model parameters and a 25.9% reduction in computational complexity (GFLOPs), highlighting its dual advantage in accuracy and efficiency. Furthermore, generalization experiments on the public PVEL-AD electroluminescence dataset confirm the model’s robustness and adaptability, with a mAP improvement of 6.4% over the baseline. The proposed method provides a reliable and practical technical solution for the automated inspection and efficient maintenance of solar panels, offering significant engineering application value and potential for widespread adoption. Future work will explore further model lightweighting techniques to reduce hardware demands, facilitating deployment on resource-constrained edge devices for real-time, in-field inspection of solar panels.
