Driven by the global energy transition and the “dual-carbon” goals, the solar panel industry has experienced rapid growth. According to the International Energy Agency (IEA), the global new installed capacity of solar panels will exceed 500 GW by 2025, with China accounting for nearly 50% of the market share. However, during manufacturing, installation, and operation, solar panels are prone to defects such as scratches, broken grids, and dirt stains, which directly affect power generation efficiency and system lifespan and may even cause safety hazards. Traditional defect detection relies on manual visual inspection or simple image processing techniques, which suffer from low efficiency and high false detection rates, making it difficult to meet the intelligent operation and maintenance requirements of large-scale solar panel power stations. Therefore, research on solar panel surface defect detection is of great practical significance.
In the field of deep learning, object detection models are generally divided into two categories: single-stage and two-stage. The two-stage detection model first generates candidate regions where objects may exist, then performs classification and regression on these regions. Common models include Fast R-CNN, Faster R-CNN, and Mask R-CNN. The single-stage detection model directly performs end-to-end prediction of object category and location, with classic representatives including SSD and the YOLO series of networks. Various deep learning models have been applied to the defect detection task of solar panels, significantly improving detection accuracy and efficiency. For example, one prior study developed an improved defect detection method based on Faster R-CNN, using Faster R-CNN as the basic framework and ResNet50 as the network backbone, integrating FPN and GA-RPN structures, improving the detection capability of surface defects in solar cells to a certain extent. Another study proposed an improved SSD algorithm, replacing the original Conv7 convolutional layer with the Involution operator and using the Focal Loss function, improving defect detection accuracy. Yet another work proposed a solar cell defect detection method based on the SimAM-Ada YOLOv5 algorithm, achieving adaptive learning of feature scales and receptive field sizes, and enhancing feature extraction capability by introducing the SimAM attention mechanism.
In past research on solar panel defect detection based on deep learning, although good results have been achieved in detection tasks, studies on small-object defects on solar panel surfaces are relatively scarce. Moreover, most models suffer from large volume and parameter count, which hinders actual deployment and increases application costs. To address these issues, this study proposes an improved solar panel defect detection model based on YOLO11n, named FEM-YOLO, aimed at improving the detection accuracy of small-target defects under complex backgrounds while achieving model lightweighting. The main contributions of this work are as follows:
First, we propose an improvement scheme based on the FasterBlock and EMA (Efficient Multi-Scale Attention) modules to optimize the feature extraction network. The FasterBlock is integrated into the standard C3k2 architecture, significantly reducing computational complexity while maintaining the receptive field. Meanwhile, the EMA module is introduced to establish a cross-scale feature interaction mechanism, improving model convergence speed and generalization ability.
Second, we fuse the C2PSA and Mona (Multi-Cognitive Visual Adapter) modules. By introducing multiple vision-friendly filters and scaling normalization layers, the ability of the original model to process visual signals is enhanced, thereby improving defect detection accuracy.
Third, we design an MLCA (Mixed Local Channel Attention) module at the end of the backbone network. This attention mechanism combines local and global features as well as channel and spatial feature information, greatly improving defect detection accuracy with only a small increase in parameter count, effectively solving the feature dilution problem in traditional attention mechanisms.
Fourth, we improve the detection head architecture by constructing a hierarchical detection system based on P2 features. A P2 high-resolution feature layer with a 1/4 downsampling rate is introduced, combined with the EfficientHead detection head. This improves the detection efficiency of small-target defects while reducing redundant computations through cross-layer parameter sharing, lowering the original inference cost.
The remainder of this paper is organized as follows. Section 2 details the proposed FEM-YOLO algorithm. Section 3 presents experimental results and analysis. Section 4 concludes this work.
FEM-YOLO Algorithm
The YOLO11 model faces challenges in solar panel surface defect detection due to complex background interference and multi-scale defect variations, resulting in insufficient feature distinguishability. Moreover, the scale of the original model limits actual deployment efficiency. To address these issues, we propose the FEM-YOLO model based on the improved YOLO11n, aiming to improve detection accuracy of solar panel defects and reduce model complexity. The improved detection model introduces a fusion of FasterBlock and EMA modules embedded in C3k2, significantly improving model performance through multi-scale feature extraction and efficient attention mechanisms. The multi-cognitive visual adapter Mona is added to the C2PSA module to enhance the model’s ability to process visual signals. The MLCA attention mechanism is added to improve the representation capability and accuracy of the object detection network. Finally, a P2 detection layer is introduced, combined with the EfficientHead detection head, to solve the problem of small-target feature loss and achieve efficient computation.
Improved C3k2 Module
Solar panel surface defect detection faces two main challenges: defect targets are small in size and easily confused with noise in complex backgrounds; and images collected by drone inspections often suffer from motion blur due to platform jitter. These factors significantly reduce detection accuracy. On the other hand, in deep learning models based on Convolutional Neural Networks (CNNs), as network depth increases, frequent convolution operations not only cause a significant growth in model parameters and computation but also trigger degradation of small-target feature information, causing the model to contain a large amount of repeated and redundant feature information, further increasing model complexity. To address these problems of small-target confusion, image blur, and computational redundancy in deep CNN models, we design the C3k2-Faster-EMA module.
We propose a new Faster-EMA module shown in the next paragraph (Note: we follow the instruction not to refer to figure numbers, so we will describe the structure in plain text). This module is composed of the FasterBlock core component of FasterNet and the EMA attention mechanism, used to replace the original Bottleneck structure in the C3k2 module of YOLO11n. In the specific implementation, the original C3k2 module uses a Boolean parameter C3k to control sub-branch selection between C3k and Bottleneck. After the improvement, when C3k = False, the original branch Bottleneck is replaced by the Faster-EMA module; when C3k = True, the Bottleneck inside the C3k branch is also replaced by the Faster-EMA module.
FasterNet is a neural network architecture designed for inference acceleration. Its core building block, FasterBlock, adopts a collaborative design of partial convolution (PConv) and pointwise convolution. PConv performs a selective convolution mechanism, computing spatial convolution only on a subset of input channels, while the remaining channels maintain identity mapping. In the specific implementation, PConv employs a fixed forward segmentation strategy: the input channels are divided into two parts in order, and only the first 1/4 of the channels undergo a regular convolution operation, while the remaining channels are directly passed through as identity. This design does not require dynamic mask generation; instead, it achieves computation reduction through fixed channel division, significantly lowering memory access frequency and thus improving hardware execution efficiency. The number of floating-point operations of PConv is given by:
$$ N_{FLOPs} = h \times w \times k^2 \times c_p^2 $$
where \( h \) and \( w \) are the height and width of the channels, the filter is a \( k \times k \) convolution kernel, and \( c_p = c / 4 \) represents the number of channels participating in the convolution operation. This optimization reduces computational load while maintaining good feature extraction performance.
The EMA module adopts a multi-path parallel architecture to process input features: first, the features are sent into three branches through channel grouping, performing 1D horizontal global pooling, 1D vertical global pooling, and 3×3 convolution operations respectively. The outputs of the horizontal and vertical branches are concatenated and then fused across channels via a 1×1 convolution, followed by Sigmoid activation and normalization to generate spatial weights. Then, 2D global average pooling is used to compress multi-branch features, and after Softmax fitting linear transformation, cross-dimensional matrix multiplication is performed to model channel-space interaction. Finally, the attention map is generated through Sigmoid modulation to adaptively weight the original features, enhancing representation capability while maintaining computational efficiency.
The C3k2-Faster-EMA module effectively enhances the model’s ability to capture details such as defect edges and textures through the fusion of multi-scale feature extraction and attention mechanisms. The core design of this module is to maintain equivalent receptive field while significantly reducing computational complexity and parameter count. Therefore, C3k2-Faster-EMA improves model feature extraction capability and detection accuracy while effectively reducing computation and storage overhead.
Improved C2PSA Module
The C2PSA module is a new module added at the end of the YOLO11 backbone, composed of convolutional layers and attention modules, integrating the CSP (Cross Stage Partial Network) architecture and the PSA (Positioning System Architecture) mechanism. The input feature map is split into two paths: one path is directly copied to retain shallow information, while the other path passes through a stack of PSABlocks to enhance multi-scale features. The PSABlock contains an attention branch and a residual connection addition, improving gradient flow and key region responses. Finally, the two branches are concatenated to combine shallow detail and deep semantic information.
Although the C2PSA module improves model performance through attention mechanisms, traditional attention mechanisms have difficulty fully exploiting multi-scale feature information, limiting further improvement in model detection performance. Therefore, we introduce the Mona module into the C2PSA module to optimize the feature extraction and representation capabilities of the model. The improved module structure uses multiple depthwise separable convolutions in parallel with kernel sizes of 3×3, 5×5, and 7×7, capturing visual local features at different granularities with very low parameter counts, which is more suitable for spatial correlations in images than traditional linear layers. Four skip connections are introduced before and after the convolution group and 1×1 aggregation layer, preserving original features while fusing multi-scale information, avoiding gradient vanishing and enhancing adaptability. The depthwise convolutions and low-dimensional projections (e.g., 64 dimensions) compress the single-module parameters to less than 5% of the backbone network, balancing efficiency and performance improvement. The complete forward propagation process is as follows:
$$ \text{Mona}(X) = X + W_{up} \times \text{HMCF}(X_{norm}) $$
$$ X_{norm} = \text{ScaledLN}(X) $$
$$ \text{HMCF}(X_{norm}) = \text{Aggregation}( \text{DepthwiseConv}_k ( \text{GeLU}(W_{down} X_{norm}) ) ) $$
MLCA Attention Mechanism
The MLCA module overcomes the spatial representation limitation of traditional attention mechanisms by collaboratively modeling feature correlations in both spatial and channel dimensions. It simultaneously captures feature significance differences and context associations, optimizing multi-scale feature fusion. This dual attention mechanism significantly enhances feature discriminability in complex scenes, improves the robustness of feature extraction for diverse targets, and effectively reduces false detection and missed detection rates in detection tasks.
Based on these advantages, we integrate the MLCA module into the backbone network architecture of FEM-YOLO. Notably, this module adopts a lightweight structural design, using 1D convolution decomposition and parameter sharing strategies to significantly reduce computational complexity while maintaining performance advantages. This design makes the model more suitable for deployment on edge devices with limited computational resources, providing a viable solution for real-time object detection in edge computing environments.
The MLCA module works as follows. The core employs a collaborative mechanism of local spatial information extraction and global feature fusion. First, through a local pooling operation, the input feature map is transformed into a feature vector with dimensions \( 1 \times C \times k_s \times k_s \), where \( k_s \) is the local receptive field size. This step effectively captures fine-grained local spatial features. On this basis, the module adopts a dual-branch parallel processing architecture: the global information branch extracts channel-level statistical features through global average pooling, while the local spatial branch retains the spatial structure information after local pooling. The two branches are transformed through 1D convolution operations separately, and then up-sampled back to the original spatial resolution. Finally, via a feature fusion mechanism, the global channel attention and local spatial attention are weighted and integrated to achieve the mixed attention optimization objective. The kernel size \( k \) of the 1D convolution is related to the number of feature channels \( C \) by:
$$ k = \frac{\log_2 C}{\gamma} + \frac{b}{\gamma} \quad \text{odd} $$
where \( \gamma \) is the scaling factor and \( b \) is the bias constant.
P2-EfficientHead Module
YOLO11 constructs a multi-scale feature fusion architecture (including three feature layers of 20×20, 40×40, and 80×80) to achieve robust detection of objects at different scales. The model adopts a top-down feature fusion strategy: upsampling the 20×20 high-level semantic features and fusing them with the 40×40 mid-level features to enhance medium object detection capability, while upsampling the 40×40 features and fusing them with the 80×80 low-level features to improve small object detection performance. However, in complex solar panel defect detection scenarios, due to the extremely small size of target defects, the existing 80×80 detection layer still suffers from missed and false detections. To address this technical bottleneck, we propose extending the original architecture by adding a P2 branch detection head, introducing a new 160×160 ultra-large-scale detection layer. This improvement significantly enhances the localization accuracy of small-target defects by fully utilizing the fine-grained features of the shallow layer of the network (mainly from the second convolutional stage).
The original detection head of YOLO11 uses a decoupled dual-branch architecture design. The classification branch consists of two depthwise separable convolutional layers, while the localization branch contains two standard convolutional layers. This independently designed dual-branch structure limits feature sharing and collaborative optimization between classification and localization tasks. More critically, the frequent convolution operations in the detection structure significantly increase computational complexity, severely restricting the deployment efficiency of the model in low-computation environments and making it difficult to meet the stringent computing resource requirements of real-time object detection tasks. In view of this, we propose the EfficientHead detection head, which reduces the number of convolution operations significantly by optimizing the original dual parallel 3×3 convolutions into a single convolution operation. This improvement is based on a weight sharing mechanism of convolution kernels, using a sliding window approach to uniformly process input features, thereby reducing redundant computation through compression of the feature channel dimension. In EfficientHead, the input features first pass through two consecutive 3×3 convolutional layers for feature enhancement and dimensionality reduction, and then the processed features are input into two independent 1×1 convolutional layers to generate the bounding box coordinate parameters and class probability distributions required for object detection, ultimately achieving collaborative output of localization and classification tasks.
Experimental Results and Analysis
Experimental Dataset
We use a solar panel defect dataset sourced from the Baidu PaddlePaddle AI Studio platform, containing 600 defect samples. After augmentations including horizontal flipping and random rotation, we expand the dataset to 2,400 images, divided into training, validation, and test sets in a 7:2:1 ratio. Specifically, 1,680 images are used for training, 480 for validation, and 240 for testing. The dataset covers three typical defect types: Crack, Grid (broken grid), and Spot (dirt stains). All defect categories are balanced in sample size. After professional annotation, the augmented data effectively improves model generalization, providing reliable data support for the defect detection task.
Experimental Environment and Parameter Configuration
All experiments are conducted on the Windows 10 operating system with the following hardware and software environment:
| Parameter | Configuration |
|---|---|
| GPU | NVIDIA RTX 4060Ti |
| CPU | Intel i5-12600KF |
| Python Version | 3.9.21 |
| PyTorch Version | 2.5.1 |
| CUDA Version | 11.3 |
| Input Image Size | 640×640 |
| Training Epochs | 300 |
| Batch Size | 32 |
| Number of Workers | 4 |
| Optimizer | SGD |
| Initial Learning Rate | 0.01 |
| Learning Rate Momentum | 0.937 |
| Weight Decay Coefficient | 0.0005 |
To ensure the quality of the algorithm improvement, all experiments are conducted without using any pre-trained weights.
Model Performance Evaluation Metrics
To comprehensively evaluate the overall performance of the proposed algorithm, we adopt three categories of indicators: detection accuracy, computational efficiency, and resource consumption. For detection accuracy, we select Precision \( P \), Recall \( R \), Average Precision \( \eta_{AP} \), and mean Average Precision \( \eta_{mAP} \). For computational efficiency, we use frames per second (FPS). For resource consumption, we consider model parameters (Parameters) and storage size (Size). This multi-dimensional evaluation system fully reflects the algorithm’s comprehensive performance in terms of accuracy and deployment cost. The mathematical expressions for each metric are:
$$ P = \frac{N_{TP}}{N_{TP} + N_{FP}} $$
$$ R = \frac{N_{TP}}{N_{TP} + N_{FN}} $$
$$ \eta_{AP} = \int_0^1 P(R) \, dR $$
$$ \eta_{mAP} = \frac{1}{n} \sum_{i=1}^{n} \eta_{AP}(i) $$
where \( N_{TP} \) (true positive) represents the number of samples correctly identified as positive, \( N_{FP} \) (false positive) represents the number of negative samples incorrectly identified as positive, and \( N_{FN} \) (false negative) represents the number of positive samples incorrectly identified as negative.
Ablation Study
To fully verify the effectiveness of the proposed improvements, we conduct ablation experiments on the same dataset. Each experiment is performed under the same environment and parameter settings. We use Precision, mAP50, mAP50-95, number of parameters, and model size as comparison indicators. The results are shown in the following table, where the improved C3k2 module, improved C2PSA module, MLCA attention mechanism, and P2-EfficientHead module are denoted as A, B, C, and D, respectively, with “√” indicating that the method is added.
| Baseline | A | B | C | D | P / % | mAP50 / % | mAP50-95 / % | Params / 106 | Size / MiB |
|---|---|---|---|---|---|---|---|---|---|
| YOLO11 | 87.7 | 93.7 | 51.1 | 2.6 | 5.2 | ||||
| √ | 90.8 | 94.4 | 51.7 | 2.3 | 4.7 | ||||
| √ | 91.4 | 94.0 | 50.4 | 2.6 | 5.2 | ||||
| √ | 91.8 | 93.7 | 49.2 | 2.6 | 5.2 | ||||
| √ | 88.8 | 95.1 | 52.4 | 2.3 | 4.9 | ||||
| √ | √ | 90.6 | 94.7 | 51.6 | 2.3 | 4.7 | |||
| √ | √ | 89.7 | 94.1 | 52.4 | 2.3 | 4.7 | |||
| √ | √ | 92.3 | 94.6 | 50.9 | 2.1 | 4.4 | |||
| √ | √ | √ | 89.5 | 94.7 | 52.1 | 2.3 | 4.7 | ||
| √ | √ | √ | √ | 88.2 | 95.6 | 53.0 | 2.1 | 4.4 |
From the table, using YOLO11 as the baseline, each improvement alone improves detection precision and mAP50. Methods A and D also reduce parameter count and model size to some extent. After adding A, the network can extract multi-level information, improving mAP50 and mAP50-95 by 0.7 and 0.6 percentage points, respectively. Adding B further increases mAP50. Then adding C raises mAP50 and mAP50-95 by 1.0 percentage points compared to the original model. Finally, adding D results in mAP50 and mAP50-95 reaching 95.6% and 53.0%, respectively, with parameter count dropped to 2.1×106 and model size reduced to 4.4 MiB. Moreover, based on method A, adding any single improvement increases precision and mAP50 to varying degrees. These results show that the synergistic effect of the four improvements significantly enhances the model’s ability to capture and classify target features, making FEM-YOLO suitable for solar panel defect detection tasks that require high detection accuracy, while achieving lightweight design for easy deployment on mobile devices.
Comparative Experiments
Effectiveness Analysis of C3k2-Faster-EMA Module
Our main innovation lies in the fusion of the FasterBlock module and the EMA attention mechanism. To systematically evaluate the effectiveness of this improvement, we conduct ablation experiments on the solar panel defect detection task while keeping other improvement modules unchanged. We sequentially test the baseline module C3k2, the C3k2-Faster module with integrated FasterBlock, and the C3k2-EMA module with integrated EMA, and compare them horizontally with the FEM-YOLO model. The results show that our fusion strategy significantly improves detection accuracy and model efficiency.
| Module | mAP50 / % | mAP50-95 / % | Params / 106 | Size / MiB |
|---|---|---|---|---|
| C3k2 | 94.3 | 48.2 | 2.3 | 4.9 |
| C3k2-Faster | 95.3 | 49.8 | 2.1 | 4.4 |
| C3k2-EMA | 95.2 | 51.2 | 2.3 | 5.0 |
| C3k2-Faster-EMA | 95.6 | 53.0 | 2.1 | 4.4 |
Comparison of Different Attention Mechanisms
To verify the effectiveness of the attention mechanism in the improved model, we integrate classic attention modules such as DAttention, MPCA, CPCA, CAFM, and SimAM into the improved model under the same experimental conditions, and compare them horizontally with the proposed MLCA mechanism (where “None” indicates that no attention mechanism is introduced in the baseline model). The experimental results show that after embedding the attention mechanism into the backbone network, except for CPCA, all others improve mAP50 to some extent compared to the baseline. The proposed MLCA achieves the best results among all indicators.
| Attention | mAP50 / % | mAP50-95 / % | Params / 106 | Size / MiB | FPS / (frame·s-1) |
|---|---|---|---|---|---|
| None | 94.5 | 49.6 | 2.1 | 4.4 | 124.5 |
| DAttention | 95.2 | 52.9 | 2.3 | 5.0 | 127.4 |
| MPCA | 94.2 | 50.8 | 2.4 | 5.1 | 119.1 |
| CPCA | 92.4 | 49.0 | 2.2 | 4.7 | 114.0 |
| CAFM | 94.0 | 49.6 | 2.4 | 5.1 | 102.1 |
| SimAM | 94.0 | 49.3 | 2.1 | 4.4 | 121.0 |
| MLCA | 95.6 | 53.0 | 2.1 | 4.4 | 145.2 |
AP50 Comparison for Different Defect Types
To verify the detection effect of our algorithm on different defect targets, we conduct the following experiments. Our algorithm achieves the best detection results for solar panel defects, with AP(Crack) and AP(Grid) reaching 96.6% and 95.7%, surpassing other models. However, for dirt stain (Spot) detection, the improved model is slightly weaker than the YOLO12n model.
| Model | AP(Crack) | AP(Grid) | AP(Spot) |
|---|---|---|---|
| YOLOv3-tiny | 95.2 | 92.7 | 90.8 |
| YOLOv5n | 92.7 | 94.7 | 88.0 |
| YOLOv6s | 90.4 | 91.2 | 89.9 |
| YOLOv10n | 93.1 | 93.7 | 91.2 |
| YOLO11n | 92.9 | 94.2 | 94.2 |
| YOLO12n | 88.2 | 93.0 | 95.3 |
| Our Model | 96.6 | 95.7 | 94.5 |
Model Comparison with Other Object Detection Models
To highlight the performance of our improved algorithm, we compare it with other object detection algorithms of similar scale to YOLO11n under the same experimental environment. The improved model achieves the highest detection accuracy of 95.6% mAP50 and 53.0% mAP50-95 with low parameter count and small model size. Although the accuracy of YOLO11s is very close, its computational resource consumption is much larger, with parameter count and storage size of 9.4×106 and 18.3 MiB, far exceeding our 2.1×106 and 4.4 MiB. Although the inference speed FPS is slightly lower than the optimal RTDETR-R18, it still meets computational efficiency requirements. This indicates that the improved model, while maintaining lightweight, can effectively improve performance and has certain advantages in computational efficiency, making it suitable for deployment in resource-constrained environments.
| Model | mAP50 / % | mAP50-95 / % | Params / 106 | Size / MiB | FPS / (frame·s-1) |
|---|---|---|---|---|---|
| Ref [11] | 89.5 | 49.8 | 2.7 | — | — |
| SSD | 89.2 | 48.6 | 26.5 | 95.3 | 45.0 |
| RTDETR-L | 92.6 | 51.4 | 31.4 | 120.0 | 123.9 |
| RTDETR-R18 | 92.1 | 48.0 | 19.8 | 81.2 | 200.1 |
| YOLOv3-tiny | 92.9 | 49.1 | 9.5 | 18.3 | 170.1 |
| YOLOv5n | 91.8 | 48.1 | 2.2 | 4.5 | 191.6 |
| YOLOv6s | 90.5 | 45.5 | 16.0 | 30.8 | 131.9 |
| YOLOv10n | 92.7 | 47.8 | 2.3 | 5.5 | 198.4 |
| YOLO11n | 93.7 | 51.1 | 2.6 | 5.2 | 175.5 |
| YOLO11s | 95.6 | 51.7 | 9.4 | 18.3 | 127.1 |
| YOLO12n | 92.1 | 46.1 | 2.5 | 5.2 | 134.1 |
| Our Model | 95.6 | 53.0 | 2.1 | 4.4 | 145.2 |
Visualization Analysis
Detection Results Visualization
To more intuitively demonstrate the differences between our algorithm and the original algorithm, we present comparative detection results. Our model produces detection outcomes that are closer to the ground truth labels, with significantly improved detection accuracy, effectively reducing the probability of false detections and missed detections to some extent. Overall, the improved algorithm exhibits superior performance in detection effectiveness.
CAM Visualization Analysis
To verify the effectiveness of the proposed FEM-YOLO model in the solar panel defect detection task, we conduct visualization heatmap experiments using GradCAM++. This improved class-specific interpretation method introduces higher-order gradient calculations (second and third derivatives) based on classic GradCAM, enabling more precise localization of the key regions the model focuses on, significantly improving the accuracy and credibility of interpretation. The GradCAM++ heatmap analysis based on different target pixel datasets shows that the improved FEM-YOLO model exhibits three significant advantages: first, in terms of target localization, the model can accurately focus on key defect areas such as scratches, broken grids, and dirt stains; second, in terms of scale adaptability, it shows stronger focusing ability for small-pixel defects captured from long distances; third, in terms of scene processing, it effectively distinguishes detection targets from background interference. These visualization results collectively validate the model’s breakthrough in small-target capture and complex background robustness.

Conclusion
In this paper, we propose a lightweight solar panel defect detection algorithm named FEM-YOLO, which mainly addresses the problems of missed detections, false detections, and oversized model parameters when detecting small-target defects on solar panels in complex scenes. First, we introduce a cross-stage parameter sharing mechanism of Faster-EMA into the C3k2 module, reducing redundant convolution operations by 30%, bringing the backbone network parameter count down to 2.4×106, while enhancing response intensity for tiny crack defects through feature reuse, thus avoiding missed detections. Second, we improve the C2PSA-Mona module, which integrates spatial attention and high-frequency noise suppression modules, stabilizing texture feature representation and balancing detection accuracy fluctuations in blurry complex scenes. Third, the MLCA channel-spatial dual attention strengthens feature responses of defect regions through channel reweighting (e.g., for dirt stains that are difficult to distinguish from complex environments), reducing false detection rates under challenging lighting conditions to some extent. Finally, we add a 160×160 high-resolution detection layer combined with shallow feature fusion strategies to improve the IoU of small-target localization. By replacing the standard convolutions in the detection head with the EfficientHead using depthwise separable convolutions, computational load is greatly reduced. The MLCA module adds a small number of parameters, but through overall lightweight design, net compression is achieved: the full model has 2.1×106 parameters (a 19.2% reduction) and achieves 95.6% mAP50.
Compared to prior work, our method significantly outperforms existing results. Notably, our model achieves extreme compression while improving accuracy. The experimental results show that the proposed algorithm effectively improves the detection accuracy of solar panel defects, reduces model size and parameter count, facilitates deployment on mobile devices, and provides an efficient edge computing solution for solar panel inspection scenarios.
