With the rapid expansion of photovoltaic (PV) installations globally, efficient monitoring and maintenance of PV panels have become critical to ensure optimal performance and longevity. Defects such as bird droppings, dust accumulation, glass breakage, electronic damage, and vegetation shading can significantly reduce energy output and lead to potential safety hazards. Traditional inspection methods, including manual checks, are labor-intensive, time-consuming, and often impractical for large-scale PV farms. The integration of unmanned aerial vehicles (UAV drones) with computer vision techniques offers a promising solution for automated aerial inspections. However, detecting defects from a UAV drone perspective poses significant challenges due to the small size, variable shapes, and complex backgrounds of defects, along with environmental factors like lighting variations and occlusions. Existing methods often rely on simplified datasets or complex models that lack stability in real-world scenarios and are unsuitable for deployment on resource-constrained edge devices. To address these issues, we construct a multi-scene dataset captured from UAV drones and propose a lightweight defect detection algorithm, PV-YOLO, based on improvements to YOLOv10s. Our approach enhances feature extraction and fusion for small targets, optimizes the loss function, and incorporates pruning techniques to reduce model complexity, thereby supporting efficient edge deployment for UAV drone-based inspections.

In recent years, numerous studies have focused on PV panel defect detection using various imaging modalities, such as infrared thermography, visible light, and electroluminescence. While infrared-based methods are effective for hotspot detection, they often struggle with classifying specific defect types and require high-resolution thermal cameras, which are costly and sensitive to UAV drone flight conditions. Visible light imaging, though more accessible, faces challenges in handling small and diverse defects under complex backgrounds. Deep learning models, particularly convolutional neural networks (CNNs) and YOLO-series architectures, have been widely adopted for real-time object detection. For instance, some works have enhanced YOLO models with attention mechanisms or multi-scale feature fusion to improve accuracy. However, these approaches often neglect the need for lightweight models suitable for UAV drone deployments, where computational resources are limited. Additionally, many datasets lack diversity in scenes and defect types, leading to poor generalization. Our work aims to bridge these gaps by developing a robust and efficient algorithm tailored for UAV drone applications, leveraging a comprehensive dataset and innovative modifications to YOLOv10s.
PV-YOLO incorporates several key improvements to address the challenges of UAV drone-based defect detection. First, we add a tiny detection head (P2) to the original YOLOv10s architecture to enhance sensitivity to small targets. This addition allows the model to process finer feature maps, capturing subtle details of defects that are often missed in standard detection heads. The mathematical formulation for the output of the P2 head can be represented as follows, where $F_{P2}$ denotes the feature map at the P2 scale, and $f_{detect}$ represents the detection function:
$$ F_{P2} = f_{detect}(C_{backbone}(I)) $$
Here, $I$ is the input image, and $C_{backbone}$ denotes the backbone network processing. The P2 head significantly improves recall and precision for small defects, as evidenced in our ablation studies.
Second, we design a Global Perception Module (GPM) to replace the first C2f module in the backbone network. GPM integrates an Attentive State Space Module (ASSM) and an Adaptive Multi-Scale Convolution (AMSC) branch to achieve global-local modeling capabilities. This enhances the extraction and utilization of small target features while suppressing redundant information. For an input feature map $X \in \mathbb{R}^{C \times H \times W}$, the GPM output $Y$ is computed as:
$$ F_{AMSC} = \text{AMSC}(X) $$
$$ F_{ASSM} = \text{ASSM}(X) $$
$$ Y = \text{LN}(\text{GELU}(\text{LN}(F_{AMSC} + F_{ASSM}))) $$
where LN is layer normalization, and GELU is the Gaussian Error Linear Unit activation. The AMSC branch applies multi-scale convolutions and channel-spatial attention to focus on local dependencies, while the ASSM branch captures long-range interactions through state space modeling. This combination ensures robust feature representation for defects captured by UAV drones in varied environments.
Third, we introduce an Enhanced interlayer Feature Correlation (EFC) fusion strategy to replace traditional feature fusion methods in the neck network. EFC strengthens correlations between features from different layers and reduces redundancy during fusion, which is crucial for small target detection. The EFC module consists of a Grouped Feature Focus Unit (GFF) and a Multilevel Feature Reconstruction Module (MFR). Given two input feature maps $X_i$ and $X_{i-1}$, the fused output $Y$ is derived as:
$$ P = X_i + X_{i-1} $$
$$ F_{GFF} = \text{GFF}(P) $$
$$ F_{MFR} = \text{MFR}(X_i, X_{i-1}) $$
$$ Y = F_{GFF} + F_{MFR} $$
The GFF enhances feature correlations through channel grouping and interaction, while MFR separates strong and weak spatial information to minimize redundancy. This strategy improves the model’s ability to aggregate multi-scale features, essential for detecting defects of varying sizes from UAV drone imagery.
Fourth, to further enhance detection accuracy, we adopt the Focaler-IoU loss function to optimize the original CIoU loss. Focaler-IoU dynamically adjusts the focus on hard and easy samples by using linear interval mapping, which is particularly beneficial for small target samples where foreground-background imbalance is prevalent. The loss is defined as:
$$ L_{FIoU} = \begin{cases}
0, & \text{IoU} < d \\
\frac{\text{IoU} – d}{u – d}, & d \leq \text{IoU} \leq u \\
1, & \text{IoU} > u
\end{cases} $$
where $d$ and $u$ are tunable thresholds for hard and easy samples, respectively. The combined loss $L_{FCIoU}$ integrates this with CIoU:
$$ L_{FCIoU} = L_{CIoU} + \text{IoU} – L_{FIoU} $$
This modification increases the model’s attention to small defects, improving localization and classification performance in UAV drone inspections.
Fifth, to achieve lightweight deployment for UAV drone systems, we apply the Layer-adaptive Magnitude-based Pruning (LAMP) algorithm to reduce model parameters and memory usage. LAMP scores each weight based on its relative importance within a layer and prunes low-scoring weights to achieve sparsity. The score for a weight $u$ in weight matrix $W$ is calculated as:
$$ \text{score}(u; W) = \frac{(W(u))^2}{\sum_{v \geq u} (W(v))^2} $$
By pruning 30% of the weights, we significantly compress the model while maintaining or even enhancing performance, as shown in our experiments. This step is vital for enabling real-time inference on edge devices mounted on UAV drones.
We constructed a diverse dataset comprising 2,250 images after augmentation, captured from UAV drones in various outdoor scenarios. The dataset includes five defect classes: bird droppings, dust coverage, glass breakage, electronic damage, and vegetation shading. Samples were collected using a UAV drone across multiple environments, with additional synthetic defects and web-sourced rare cases to ensure robustness. Data augmentation techniques such as mirroring, rotation, and brightness adjustment were applied to improve generalization. The dataset was split into training, validation, and test sets in an 8:1:1 ratio. This multi-scene dataset supports the development of stable models for real-world UAV drone applications.
| Component | Improvement | Impact on Performance |
|---|---|---|
| Tiny Detection Head (P2) | Added to YOLOv10s | Enhances small target perception; increases recall and precision |
| Global Perception Module (GPM) | Replaces first C2f in backbone | Improves global-local feature extraction; boosts accuracy for small defects |
| EFC Fusion Strategy | Replaces traditional neck fusion | Strengthens interlayer feature correlations; reduces redundancy |
| Focaler-IoU Loss | Optimizes CIoU loss | Focuses on hard samples; improves small target detection |
| LAMP Pruning | Applied post-training | Reduces parameters and memory usage; maintains accuracy |
Experiments were conducted on an AutoDL server with an Ubuntu 20.04 OS, NVIDIA vGPU-32GB, 90 GB RAM, and CUDA 11.8. We used PyTorch with Python 3.10 for implementation. Training parameters included 300 epochs, a batch size of 16, image size of 640×640, AdamW optimizer with a learning rate of 0.01, momentum of 0.937, and weight decay of 0.0005. Evaluation metrics comprised precision (P), recall (R), mean average precision at IoU thresholds of 0.5 (AP50) and 0.5:0.95 (AP50:95), parameter count, and memory footprint. These metrics ensure comprehensive assessment of both accuracy and efficiency for UAV drone deployment.
We performed pruning experiments to determine the optimal strategy for model compression. As shown in Table 1, LAMP pruning at 30% sparsity outperformed Random and L1 methods in terms of AP50 while maintaining low memory usage. Further analysis of different sparsity levels (Table 2) revealed that 30% pruning achieves the best balance, improving AP50 by 0.6% while reducing parameters by 26.4% and memory by 24.1%. This makes PV-YOLO suitable for resource-constrained UAV drone systems.
| Pruning Method | AP50 (%) | Parameters (M) | Memory Usage (MB) |
|---|---|---|---|
| Random | 88.6 | 6.73 | 14.5 |
| L1 | 88.4 | 6.73 | 14.3 |
| LAMP | 89.4 | 6.73 | 14.5 |
| Pruning Ratio (%) | AP50 (%) | Parameters (M) | Memory Usage (MB) |
|---|---|---|---|
| 0 | 88.8 | 9.14 | 19.1 |
| 10 | 89.8 | 8.15 | 17.4 |
| 20 | 89.0 | 7.19 | 15.2 |
| 30 | 89.4 | 6.73 | 14.5 |
| 40 | 87.0 | 5.78 | 12.6 |
| 50 | 84.7 | 5.31 | 11.6 |
We compared various feature fusion strategies to validate the effectiveness of EFC. As presented in Table 3, EFC achieves the highest AP50 of 84.7% among all methods, with only a minor increase in parameters and memory. In contrast, other strategies like SSFF or FreqFusion either compromise accuracy or add excessive complexity. This demonstrates that EFC optimally enhances interlayer feature correlations for UAV drone-based defect detection.
| Method | P (%) | R (%) | AP50 (%) | AP50:95 (%) | Parameters (M) | Memory Usage (MB) |
|---|---|---|---|---|---|---|
| YOLOv10s | 80.7 | 76.7 | 81.9 | 54.3 | 8.04 | 16.6 |
| YOLOv10s + EFC | 84.4 | 80.2 | 84.7 | 54.8 | 8.65 | 17.8 |
| YOLOv10s + SSFF | 87.7 | 59.5 | 72.0 | 47.4 | 9.65 | 19.7 |
| YOLOv10s + FreqFusion | 77.4 | 78.0 | 80.9 | 52.1 | 7.71 | 15.9 |
| YOLOv10s + MFM | 80.5 | 78.2 | 83.2 | 53.9 | 7.83 | 16.9 |
| YOLOv10s + SBA | 82.2 | 77.1 | 82.4 | 52.5 | 8.50 | 17.5 |
Ablation studies were conducted to evaluate the contribution of each component in PV-YOLO. As summarized in Table 4, adding the P2 head alone improves AP50 from 81.9% to 86.8%. Incorporating GPM, EFC, and Focaler-CIoU further boosts performance, with the full model achieving 88.8% AP50. After LAMP pruning, PV-YOLO attains 89.4% AP50 with reduced parameters and memory, showcasing the synergy of our improvements for UAV drone applications.
| Components | P (%) | R (%) | AP50 (%) | AP50:95 (%) | Parameters (M) | Memory Usage (MB) |
|---|---|---|---|---|---|---|
| YOLOv10s | 80.7 | 76.7 | 81.9 | 54.3 | 8.04 | 16.6 |
| + P2 | 85.3 | 81.7 | 86.8 | 57.2 | 8.22 | 17.2 |
| + P2 + GPM | 89.2 | 81.1 | 87.0 | 53.7 | 8.44 | 17.6 |
| + P2 + EFC | 85.6 | 83.7 | 87.9 | 57.3 | 8.92 | 18.6 |
| + P2 + Focaler-CIoU | 83.8 | 84.7 | 87.6 | 55.7 | 8.22 | 17.2 |
| + P2 + GPM + EFC | 84.4 | 82.9 | 88.1 | 57.3 | 9.14 | 19.1 |
| Full Model (All) | 86.0 | 83.8 | 88.8 | 56.4 | 9.14 | 19.1 |
| Full Model + LAMP | 85.0 | 88.5 | 89.4 | 57.1 | 6.73 | 14.5 |
We compared PV-YOLO with state-of-the-art object detection models, including one-stage detectors like YOLOv8s, YOLOv9s, YOLO11s, YOLO12s, YOLOv13s, SSD, and the two-stage Faster R-CNN. As shown in Table 5, PV-YOLO achieves the highest AP50 of 89.4% and competitive AP50:95 of 57.1%, while having the lowest parameter count (6.73M) and memory usage (14.5 MB) among all models. This demonstrates its superiority in both accuracy and efficiency for UAV drone-based defect detection.
| Model | P (%) | R (%) | AP50 (%) | AP50:95 (%) | Parameters (M) | Memory Usage (MB) |
|---|---|---|---|---|---|---|
| SSD | 63.0 | 53.8 | 64.4 | 46.7 | 26.30 | 101.3 |
| Faster R-CNN | 60.7 | 62.8 | 61.5 | 45.7 | 137.10 | 327.1 |
| YOLOv8s | 80.7 | 81.5 | 85.3 | 60.0 | 11.12 | 21.5 |
| YOLOv9s | 82.1 | 81.2 | 84.4 | 56.8 | 7.12 | 15.3 |
| YOLO11s | 82.8 | 80.3 | 83.9 | 56.9 | 9.41 | 19.2 |
| YOLO12s | 79.8 | 77.9 | 80.9 | 53.4 | 9.23 | 18.1 |
| YOLOv13s | 82.2 | 76.6 | 83.5 | 58.9 | 9.00 | 18.6 |
| PV-YOLO (Ours) | 85.0 | 88.5 | 89.4 | 57.1 | 6.73 | 14.5 |
Visual explanations using EigenCAM highlight PV-YOLO’s enhanced focus on defect regions compared to baseline YOLOv10s. For small targets like bird droppings or dust spots, PV-YOLO generates more precise heatmaps that closely align with defect shapes, indicating better feature utilization. This transparency builds trust in the model’s decisions for UAV drone operators. The integration of GPM and EFC allows the model to suppress background noise and emphasize relevant features, leading to fewer false positives and missed detections in complex scenes. These visual results confirm the effectiveness of our modifications in real-world UAV drone inspections.
In conclusion, PV-YOLO is a lightweight and efficient algorithm for photovoltaic panel defect detection from a UAV drone perspective. By incorporating a tiny detection head, a global perception module, an enhanced feature fusion strategy, an optimized loss function, and pruning techniques, we achieve significant improvements in accuracy and reductions in model complexity. Experimental results on a diverse UAV drone dataset show that PV-YOLO outperforms existing models in precision, recall, and average precision, while maintaining low parameters and memory usage. This makes it suitable for deployment on edge devices in UAV drone systems, enabling real-time monitoring and maintenance of PV installations. Future work will focus on further enhancing small target detection and exploring additional lightweight methods for broader UAV drone applications in renewable energy.
