A GELAN-based method for detecting defects in solar panels

By using the LiteScale-GELAN network, combined with depthwise separable convolution and multi-scale feature aggregation mechanism, feature extraction and upsampling are optimized, solving the problems of high computational resources and low multi-scale detection accuracy in existing technologies, and realizing efficient and low-cost solar panel defect detection.

CN120147259BActive Publication Date: 2025-11-14CHINA THREE GORGES UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510218828.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-11-14
Estimated Expiration
2045-02-26

AI Technical Summary

Technical Problem

While existing methods for detecting defects in solar panels can guarantee high detection accuracy, they typically rely on complex network structures, resulting in high computational resource requirements. This makes it difficult to achieve low-cost and efficient deployment in industrial production environments, and it is also difficult to balance accuracy and robustness when detecting defects at multiple scales.

Method used

A lightweight solar panel defect detection model is constructed by using the LiteScale-GELAN network, combining depthwise separable convolution and multi-scale feature aggregation mechanism through the LiteRepLAN module, optimizing feature extraction with the SpdConv module, optimizing upsampling with the DySample module, and optimizing computational overhead with the Enhanced_DDetect detection head.

Benefits of technology

It significantly reduces computational overhead, improves the capability and accuracy of multi-scale defect detection, is suitable for environments with limited computing resources, and achieves efficient and high-precision solar panel defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147259B_ABST
    Figure CN120147259B_ABST
Patent Text Reader

Abstract

This invention presents a GELAN-based method for solar panel defect detection, addressing the bottlenecks of existing methods in multi-scale defect detection and computationally limited scenarios. The proposed solution utilizes an improved LiteScale-GELAN model. This model employs a lightweight, reusable convolutional module, combining depthwise separable convolution and a multi-scale feature aggregation mechanism to significantly reduce computational cost while optimizing feature extraction and fusion performance. A space-to-depth transformation strategy enhances the extraction capability for small targets and multi-scale defects, and a dynamic upsampling mechanism is introduced. An improved sampling point generation method further strengthens the detection accuracy and network robustness for small targets. Furthermore, the reconstructed detection head maintains high detection efficiency while reducing parameter count and computational resource consumption. Experimental results show that LiteScale-GELAN achieves an accuracy of 89.1% on the PVEL-AD dataset, a 4.1% improvement over the GELAN model, with parameter count and computational cost reduced by 65% ​​and 59%, respectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more particularly to target detection technology, specifically to a method for detecting and identifying defects in solar panels based on a GELAN network, and especially to an efficient and high-precision method for detecting defects in solar panels suitable for environments with limited computing resources. Background Technology

[0002] The importance of solar panel defect detection stems from the widespread application of photovoltaic power generation systems and their direct impact on power generation efficiency and operating costs. In particular, the unavoidable defects and problems during the production process make efficient detection a critical requirement.

[0003] While existing methods for detecting defects in solar panels have achieved some success, they still face the following challenges:

[0004] (1) Relying on complex network structures, although the detection accuracy is guaranteed, the computational resource requirements are high, especially in industrial production environments, where computational efficiency and low-cost deployment become problems.

[0005] (2) Solar panels have a wide variety of defects, ranging from small defects such as tiny cracks and fingerprints to large-scale defects such as short circuits. Coupled with complex background interference, existing models have difficulty balancing accuracy and robustness when dealing with multi-scale and morphological defects.

[0006] To improve the detection of defects in solar panels, researchers have conducted extensive studies. For example, patent application CN202410622641.4 discloses a solar panel defect detection method based on an improved YOLOv7-tiny. This method improves detection accuracy by replacing convolutional layers, introducing a Conv-ATT module, modifying the detection head convolution and loss function, and fusing multi-level features and multi-scale detection. The trained model is then used for solar panel defect detection. Another example is patent application CN202410344938.9, which discloses a solar panel defect detection method based on an improved YOLOv5. This method involves collecting sample data to construct a dataset, performing data augmentation, building and training a PV-YOLO network model, and finally using the trained model for defect detection. The PV-YOLO network includes feature extraction, feature fusion, and multi-scale detection branches, improving detection accuracy and helping companies achieve automated and efficient defect detection in solar panels.

[0007] However, these existing technologies still have technical problems such as missed detection of multi-scale defects, poor detection performance under imbalanced sample conditions, and computational resource bottlenecks.

[0008] Therefore, this invention addresses the challenge of multi-scale defect identification in solar panel defect detection, especially given the limited computational resources, by proposing a solar panel defect detection method based on the GELAN model: LiteScale-GELAN. Summary of the Invention

[0009] The purpose of this invention is to address the technical problem that existing deep learning-based solar panel defect detection methods, while ensuring high detection accuracy, typically rely on complex network structures, resulting in high computational resource requirements. This makes it particularly difficult to achieve low-cost and efficient deployment, especially in industrial production environments. Therefore, this invention provides an efficient and highly accurate solar panel defect detection method suitable for environments with limited computing resources.

[0010] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0011] A GELAN-based method for detecting defects in solar panels includes the following steps:

[0012] Step 1: Collect sample images of solar panel defect types to build a dataset. Label samples with fewer defect types to supplement the dataset and generate more training samples. Distribute the dataset into training and testing sets according to a certain ratio for model training and evaluation, respectively.

[0013] Step 2: Perform preliminary data processing on the dataset;

[0014] Step 3: Build an optimized LiteScale-GELAN network;

[0015] Step 4: Train the optimized LiteScale-GELAN network to identify various defect types on the solar panel;

[0016] Step 5: Using the trained model, perform detection and evaluation on the test set to analyze the model's performance;

[0017] Step 6: Optimize the model by adjusting the network structure and training parameters;

[0018] The above steps are used to detect various types of defects on solar panels.

[0019] In step 1, sample images containing defect types such as linear cracks, star-shaped cracks, broken grids, black cores, scratches, fragments, and fingerprints were collected to construct a dataset. Samples with fewer defect types (such as corner defects and fragments) were labeled using annotation software to supplement the dataset and generate more training samples. The dataset was randomly allocated into training and testing sets in an 8:2 ratio for model training and evaluation, respectively.

[0020] In step 2, data augmentation is performed on the dataset, including basic operations such as rotation, flipping, scaling, and cropping, to further increase the sample diversity of the training set and improve the generalization ability of the model.

[0021] In step 3, the optimized LiteScale-GELAN network improves feature extraction, fusion, and detection efficiency through several innovative modules. First, the LiteRepLAN module enhances the network's feature extraction and fusion capabilities, improving the capture of fine-grained information. Second, SpdConv replaces traditional convolutional layers, effectively preserving more detailed information while maintaining lightweight design, especially for small-scale defect detection. To optimize the neck network, a Dysample upsampling mechanism is employed to ensure effective preservation of features at different scales. Finally, the reconstructed Enhanced_DDetect detection head significantly reduces the computational overhead in multi-scale defect detection while maintaining detection accuracy and efficiency.

[0022] In step 4, the defect types include cracks, short circuits, burnt plates, fingerprints, etc.

[0023] In step 5, the accuracy of the model under different defect types and scales is evaluated;

[0024] In step 6, the optimization is aimed at further improving detection accuracy and efficiency, and ensuring the feasibility of the model in actual industrial production.

[0025] It also includes step 7, which involves thorough testing on camera equipment or embedded devices to ensure the accuracy and stability of the solar panel defect detection method in industrial production scenarios.

[0026] The optimized LiteScale-GELAN network obtained is as follows:

[0027] The original image is input to the first convolutional layer (Conv) of the backbone, which outputs feature map F1. Feature map F1 is then input to the second convolutional layer to obtain feature map F2. Next, feature map F2 is input to the third ELAN1 module, which outputs feature map F3. Then, feature map F3 is input to the fourth spatial depth convolutional module (SpdConv), which outputs feature map F4. Next, feature map F4 is input to the fifth lightweight feature aggregation module (LiteRepLAN), which aggregates features through a 3×3 convolution operation, outputting feature map F5. Feature map F5 is input to the sixth spatial depth convolutional module (SpdConv), which outputs feature map F6. Then, feature map F6 is input to the seventh LiteRepLAN layer for further optimization of feature fusion, outputting feature map F7. Feature map F7 is input to the eighth SpdConv layer, which outputs feature map F8. Finally, feature map F8 is input to the ninth LiteRepLAN layer for further aggregation and feature extraction, outputting the final feature map F9. The output F9 of the ninth layer is used as the input of the tenth layer Spatial Pyramid Pooling Module (SPPELAN) to further enhance the multi-scale feature representation capability.

[0028] The output feature map F10 of the tenth layer is used as the input of the first layer dynamic sampling module (DySample) of the neck module, and the adjusted feature map F11 is output. The feature map F7 of the seventh layer of the backbone and the feature map F11 after dynamic sampling of the first layer of the neck are input into the second layer concatenation operation of the neck, and the concatenated feature map F12 is output. The concatenated feature map F12 is input into the third layer LiteRepLAN of the neck to obtain the fused feature map F13.

[0029] The fourth layer of the neck module is the dynamic sampling module (DySample), which takes the feature map F13 output from the third layer as input and outputs the dynamically sampled feature map F14. The feature map F5 from the fifth layer of the backbone and the dynamically sampled feature map F14 from the fourth layer of the neck are input into the fifth layer of the neck for concatenation, and the concatenated feature map F15 is output. The concatenated feature map is input into the sixth layer of the neck, LiteRepLAN, to obtain the fused feature map F16.

[0030] Next, input the feature map F16 output from the sixth layer of the neck to the seventh layer SpdConv to obtain feature map F17; input the feature map F13 from the third layer of the neck and the feature map F17 output from the seventh layer of the neck to the eighth layer of the neck for concatenation (Concat), then input the concatenated feature map F18 to the ninth layer of the neck LiteRepLAN to output the fused feature map F19; input the feature map F19 output from the ninth layer of the neck to the tenth layer SpdConv to obtain feature map F20.

[0031] The feature map F20 output from the tenth layer of the neck and the feature map F10 output from the tenth layer of the backbone are input into the concat operation of the eleventh layer of the neck. Then, the concatenated feature map F21 is input into the LiteRepLAN of the twelfth layer of the neck, and the fused feature map F22 is output.

[0032] Finally, the outputs of layer 6 F16, layer 9 F19, and layer 12 F22 of the neck module are merged and input into the detection head (Enhanced_DDetect) module, ultimately outputting multi-scale detection results.

[0033] The LiteRepLAN module is specifically as follows:

[0034] The original feature map is input to the first-layer LiteRepCSP module. This module first performs preliminary processing on the input feature map using depthwise separable convolution (DSC) to extract compact features and reduce channel redundancy, outputting feature map P1. Next, feature map P1 is split into two paths and fed into two RepBottleneck modules. Each path performs deep feature extraction through multiple convolutional layers. The upper branch uses a multi-layer stacked RepBottleneck module for feature extraction, maintaining the same number of channels in each layer to further capture deeper feature information and output feature map P1. Feature map P2 is generated; the lower branch retains the original feature information through a 1×1 depthwise separable convolution and performs channel fusion through pointwise convolution, outputting feature map P3; then, the two feature maps P2 and P3 are fused through a Concat operation to obtain a feature map P4 with more multi-scale information; finally, the output feature map P4 enters the next layer of depthwise separable convolution for fine-grained feature processing, generating the final feature map P5; this module effectively achieves efficient feature extraction and cross-channel information fusion by combining the RepBottleneck module with depthwise separable convolution.

[0035] The detection head module is the Enhanced_DDetect module, which specifically comprises:

[0036] The input feature map undergoes initial processing using Depthwise Separable Convolution (DSC). DSC decomposes traditional convolution operations into two steps: first, spatial feature extraction is performed using depthwise convolution, and then channel fusion is performed using pointwise convolution. The output feature map P1 is split into two paths, entering the cv2 and cv3 branches for further feature extraction. In the cv2 branch, the input feature map undergoes two DSCs to extract spatial features. Then, an additional convolutional layer further fuses channel information, generating feature map P2. Unlike the cv2 branch, the cv3 branch incorporates a channel attention mechanism in addition to the two DSCs. This mechanism captures global information for each channel through adaptive average pooling and dynamically adjusts the response of each channel using two 1x1 convolutions and a sigmoid activation function, thereby enhancing the model's sensitivity to key channel features. This mechanism helps improve the accuracy of target classification. The processed feature map P3 is further refined using 1x1 convolutions (Conv2d) to obtain the final feature map P4. Finally, the output feature maps P2 and P4 from the cv2 and cv3 branches are merged through a concatenation operation to form a joint feature map P5. This concatenation operation ensures the effective fusion of regression (bounding box) and classification task features. After regression and classification processing, the output results of object detection are generated, including bounding box regression (BBox) and object class prediction (Cls).

[0037] Compared with the prior art, the present invention has the following technical effects:

[0038] 1) This invention introduces the LiteRepLAN module: This module combines depthwise separable convolution and multi-scale feature aggregation mechanisms, adopts a lightweight structure design, significantly reduces computational overhead, and enhances the network's ability in multi-scale defect detection. It can achieve efficient and accurate identification of both large target defects (such as short-circuit burnt boards) and small target defects (such as cracks, fingerprints, etc.).

[0039] 2) This invention employs the Enhanced_DDetect detection head: This invention reconstructs the structure of the detection head and proposes the Enhanced_DDetect detection head. By combining depthwise separable convolution and channel attention mechanisms, this detection head reduces the computational overhead in multi-scale defect detection while maintaining high-efficiency detection capabilities, ensuring a balance between accuracy and efficiency.

[0040] 3) This invention introduces the SpdConv module, which employs a space-to-depth transformation strategy to optimize the feature extraction process while retaining more fine-grained feature information during the downsampling stage. This design not only improves the detection accuracy of minute defects but also ensures the lightweight nature of the network, facilitating deployment and promotion in computationally limited real-world application environments.

[0041] 4) This invention introduces the DySample module: This module retains detailed information in the feature map by employing an optimized upsampling mechanism. Its dynamic sampling point generation strategy further improves the detection accuracy of small target defects, significantly enhancing the overall detection effect, and ensuring efficient detection even in environments with limited computing resources.

[0042] Experimental results show that LiteScale-GELAN achieves a detection accuracy of 89.1% on the PVEL-AD dataset, which is 4.1% higher than the GELAN model, while reducing the number of parameters and computational cost by 65% ​​and 59%, respectively. Furthermore, experimental results on the PVMD dataset further validate its effectiveness and adaptability in different environments.

[0043] The LiteScale-GELAN network proposed in this invention provides a high-efficiency solar panel defect detection solution with low computational resource consumption and adaptability to multi-scale characteristics, thanks to its efficient utilization of computing resources and accurate detection capabilities. It has significant industrial application value. Attached Figure Description

[0044] The present invention will be further described below with reference to the accompanying drawings and embodiments:

[0045] Figure 1 This is a flowchart of the solar panel defect detection process of the present invention;

[0046] Figure 2 This is a diagram of the GELAN network structure in the existing technology;

[0047] Figure 3 This is a diagram of the LiteScale-GELAN network architecture proposed in this invention;

[0048] Figure 4 A schematic diagram of the LiteRepLAN module;

[0049] Figure 5 A schematic diagram of the SpdConv module;

[0050] Figure 6 A schematic diagram of the dysample module;

[0051] Figure 7 This is a schematic diagram illustrating two methods for generating sampling points in dysample;

[0052] Figure 8 This is a schematic diagram of the Enhanced_DDetect detection head;

[0053] Figure 9 This is a schematic diagram of the channel attention mechanism;

[0054] Figure 10 This is a partial image showing the test results. Detailed Implementation

[0055] A method for detecting defects in solar panels based on a LiteScale-GELAN network is proposed. This method first introduces a lightweight feature aggregation module, combining depthwise separable convolution and a multi-scale feature aggregation mechanism to significantly reduce computational overhead and improve the detection capability for multi-scale defects. Then, a space-to-depth transformation strategy is employed to optimize the feature extraction process, improving adaptability to small targets and complex scenes while preserving more fine-grained feature information. Next, a dynamic sampling optimization module optimizes the upsampling process through a dynamic sampling point generation strategy. Finally, an optimized detection head module combines depthwise separable convolution and channel attention mechanisms to optimize the traditional detection head and reduce computational overhead. This method significantly improves detection efficiency while ensuring high accuracy and is suitable for detecting defects in solar panels of different scales.

[0056] This invention includes the following steps:

[0057] Step 1: Collect sample images containing various defect types, including linear cracks, star-shaped cracks, broken grids, black cores, scratches, fragments, and fingerprints, to construct a dataset. Annotation software was used to label samples with fewer defect types (such as corner defects and fragments) to supplement the dataset and generate more training samples. The dataset was randomly allocated into training and testing sets in an 8:2 ratio for model training and evaluation, respectively.

[0058] Step 2: Perform data augmentation on the dataset, including basic operations such as rotation, flipping, scaling, and cropping, to further increase the sample diversity of the training set and improve the model's generalization ability.

[0059] Step 3: This invention constructs an optimized LiteScale-GELAN network, which improves feature extraction, fusion, and detection efficiency through several innovative modules. First, the LiteRepLAN module enhances the network's feature extraction and fusion capabilities, improving the capture of fine-grained information. Second, SpdConv replaces traditional convolutional layers, effectively preserving more detailed information while maintaining lightweight design, especially for small-scale defect detection. To optimize the neck network, a Dysample upsampling mechanism is employed to ensure effective preservation of features at different scales. Finally, the reconstructed Enhanced_DDetect detection head significantly reduces the computational overhead in multi-scale defect detection, while improving detection accuracy and efficiency.

[0060] Step 4: Train the optimized LiteScale-GELAN network to identify various defect types on the solar panel, including cracks, short circuits, burnt panels, fingerprints, etc.

[0061] Step 5: Using the trained model, perform detection and evaluation on the test set, analyze the model's performance, and evaluate its accuracy under different defect types and scales.

[0062] Step 6: Optimize the model by adjusting the network structure and training parameters to further improve detection accuracy and efficiency, and ensure the feasibility of the model in actual industrial production.

[0063] Step 7: Conduct thorough testing on camera equipment or embedded devices to ensure the accuracy and stability of the solar panel defect detection method in industrial production scenarios.

[0064] Through the above steps, this invention can efficiently and accurately detect various defect types on solar panels and adapt to different defect scales, making it suitable for applications in actual production.

[0065] like Figure 2 The diagram shows the network structure of the existing GELAN model.

[0066] like Figure 3 As shown, the LiteScale-GELAN network constructed in step 4 is as follows:

[0067] The original image is input to the first convolutional layer (Conv) of the backbone, which outputs feature map F1. Feature map F1 is then input to the second convolutional layer to obtain feature map F2. Next, feature map F2 is input to the third ELAN1 module, which outputs feature map F3. Then, feature map F3 is input to the fourth spatial depth convolutional module (SpdConv), which outputs feature map F4. Next, feature map F4 is input to the fifth lightweight feature aggregation module (LiteRepLAN), which aggregates features through a 3×3 convolution operation, outputting feature map F5. Feature map F5 is input to the sixth spatial depth convolutional module (SpdConv), which outputs feature map F6. Then, feature map F6 is input to the seventh LiteRepLAN layer for further optimization of feature fusion, outputting feature map F7. Feature map F7 is input to the eighth SpdConv layer, which outputs feature map F8. Finally, feature map F8 is input to the ninth LiteRepLAN layer for further aggregation and feature extraction, outputting the final feature map F9. The output F9 of the ninth layer is used as the input of the tenth layer Spatial Pyramid Pooling Module (SPPELAN) to further enhance the multi-scale feature representation capability.

[0068] The output feature map F10 of the tenth layer is used as the input of the first layer dynamic sampling module (DySample) of the neck module, and the adjusted feature map F11 is output. The feature map F7 of the seventh layer of the backbone and the feature map F11 after dynamic sampling of the first layer of the neck are input into the second layer concatenation operation of the neck, and the concatenated feature map F12 is output. The concatenated feature map F12 is input into the third layer LiteRepLAN of the neck to obtain the fused feature map F13.

[0069] The fourth layer of the neck module is the dynamic sampling module (DySample), which takes the feature map F13 output from the third layer as input and outputs the dynamically sampled feature map F14. The feature map F5 from the fifth layer of the backbone and the dynamically sampled feature map F14 from the fourth layer of the neck are input into the fifth layer of the neck for concatenation, and the concatenated feature map F15 is output. The concatenated feature map is input into the sixth layer of the neck, LiteRepLAN, to obtain the fused feature map F16.

[0070] Next, input the feature map F16 output from the sixth layer of the neck to the seventh layer SpdConv to obtain feature map F17; input the feature map F13 from the third layer of the neck and the feature map F17 output from the seventh layer of the neck to the eighth layer of the neck for concatenation (Concat), then input the concatenated feature map F18 to the ninth layer of the neck LiteRepLAN to output the fused feature map F19; input the feature map F19 output from the ninth layer of the neck to the tenth layer SpdConv to obtain feature map F20.

[0071] The feature map F20 output from the tenth layer of the neck and the feature map F10 output from the tenth layer of the backbone are input into the concat operation of the eleventh layer of the neck. Then, the concatenated feature map F21 is input into the LiteRepLAN of the twelfth layer of the neck, and the fused feature map F22 is output.

[0072] Finally, the outputs of layer 6 F16, layer 9 F19, and layer 12 F22 of the neck module are merged and input into the detection head (Enhanced_DDetect) module, ultimately outputting multi-scale detection results.

[0073] like Figure 4 As shown, the LiteRepLAN module is as follows:

[0074] The original feature map is input to the first-layer LiteRepCSP module. This module first performs preliminary processing on the input feature map using depthwise separable convolution (DSC), extracting compact features and reducing channel redundancy, outputting feature map P1. Next, feature map P1 is split into two paths and fed into two RepBottleneck modules. Each path performs depth feature extraction through multiple convolutional layers. The upper branch uses multiple stacked RepBottleneck modules for feature extraction, maintaining the same number of channels in each layer to further capture deeper feature information, outputting feature map P2. The lower branch uses a 1×1 depthwise separable convolution to retain the original feature information and performs channel fusion through pointwise convolution, outputting feature map P3. Then, feature maps P2 and P3 are fused using a Concat operation to obtain a feature map P4 with more multi-scale information. Finally, the output feature map P4 enters the next depthwise separable convolution layer for fine-grained feature processing, generating the final feature map P5. This module effectively achieves efficient feature extraction and cross-channel information fusion by combining the RepBottleneck module with depthwise separable convolution.

[0075] like Figure 8 As shown, the Enhanced_DDetect detection header is as follows:

[0076] The Enhanced_DDetect module efficiently processes and fuses features through an innovative dual-branch structure (cv2 and cv3), combining Depthwise Separable Convolution (DSC), Channel Attention, and feature concatenation techniques. Specifically:

[0077] The output feature map P1 is split into two paths, which enter the cv2 and cv3 branches respectively for deeper feature extraction. In the cv2 branch, the input feature map undergoes two depthwise separable convolutions to extract spatial features. Then, an additional convolutional layer further fuses channel information to generate feature map P2. Unlike the cv2 branch, the cv3 branch adds a channel attention mechanism on top of the two depthwise separable convolutions. The channel attention mechanism captures global information for each channel through adaptive average pooling and dynamically adjusts the response of each channel using two 1x1 convolutions and a sigmoid activation function, thereby enhancing the model's sensitivity to key channel features. This mechanism helps improve the accuracy of target classification. The processed feature map P3 is further refined by 1x1 convolutions (Conv2d) to obtain the final feature map P4. Finally, the output feature maps P2 and P4 from the cv2 and cv3 branches are merged through a concatenation operation to form a joint feature map P5. This concatenation operation ensures the effective fusion of regression (bounding box) and classification task features. After regression and classification processing, the output results of object detection are generated, including bounding box regression (BBox) and object category prediction (Cls).

[0078] Once the network is built, training begins, and the trained model is saved;

[0079] The trained model is tested on the test set, and the main evaluation metrics include mAP (mean precision), recall, and precision. mAP represents the mean precision (AP) of each defective target, which measures the overall performance of the model across different categories; precision represents the proportion of actual positive samples among those predicted as positive by the model, measuring the model's detection accuracy; and recall represents the proportion of actual positive samples that are correctly detected as positive by the model, reflecting the model's detection recall capability.

[0080] The specific formula for calculating Precision is as follows:

[0081] Precision = TP / (TP + FP)

[0082] Where TP represents the number of correctly detected positive samples, and FP represents the number of negative samples that were mistakenly detected as positive samples.

[0083] The specific formula for calculating Recall is as follows:

[0084] Recall = TP / (TP + FN)

[0085] Where FN represents the number of positive samples that were missed.

[0086] AP (Average Precision) is the area under the integral of precision at different recall rates, ranging from 0 to 1, reflecting the overall detection performance of the model at different detection thresholds. The specific calculation formula is as follows:

[0087] Furthermore, the number of model parameters and the computational cost (GFLOPs) are particularly critical in solar panel defect detection, as they directly impact the computational resources required for inspection. Efficient model design should minimize the number of parameters and computational cost while ensuring high accuracy, thereby improving inspection speed and deployment feasibility.

[0088] Example:

[0089] This invention utilizes the PVEL-AD dataset, which covers various defects such as linear cracks, star-shaped cracks, broken grids, black cores, scratches, and fragments. Due to the limited number of samples for some defect categories (such as corner defects and fragments), this invention employs annotation software to additionally annotate them to improve data balance and enhance model generalization ability, thereby increasing the data volume and detection accuracy. Simultaneously, data augmentation strategies such as rotation, flipping, scaling, and cropping are used to further increase the number of defect category samples. Ultimately, the processed dataset contains 4600 images, randomly divided into training and testing sets in an 8:2 ratio to ensure training stability and evaluation reliability.

[0090] The experiment was conducted on an NVIDIA GeForce RTX 3090 GPU (24GB VRAM), using Linux as the operating system, Python version 3.10.14, PyTorch 2.3.1 as the deep learning framework, and CUDA version 12.1. To ensure fairness, uniform parameter configurations were used during the training phase: input image size of 640×640 pixels, SGD as the optimizer, learning rate of 0.01, momentum of 0.937, weight decay coefficient of 0.0005, number of iterations of 600, and batch size of 16.

[0091] The results of the ablation experiment are shown in Table 1. The "√" in the experiment indicates that the corresponding module was introduced.

[0092] Table 1 Ablation Experiment

[0093]

[0094] The results show that while adding LiteRepLAN slightly reduced detection accuracy, it reduced the number of parameters by approximately 35% and GFLOPs to 5.1G, indicating that LiteRepLAN effectively reduced the model's parameter count and hardware resource consumption by optimizing the network structure. Introducing SpdConv improved detection accuracy to 88.1%, reduced the number of parameters to 1.732M, and reduced GFLOPs to 6.7G, demonstrating that SpdConv improved detection accuracy while further reducing hardware resource requirements and improving overall efficiency. Adding Enhanced_DDetect reduced the number of parameters to 1.483M and GFLOPs to 5.3G, indicating that this detection head reduced computational resource consumption and enhanced the model's advantage in low-computational-resource environments. Adding DySample improved detection accuracy to 88.4%, while computational overhead and parameter count remained stable, indicating that DySample further improved the detection accuracy of small targets by optimizing the upsampling mechanism while maintaining lightweight computational requirements.

[0095] Compared to the baseline model, LiteScale-GELAN improves detection accuracy by 4.1%, while reducing the number of parameters and computation by 65% ​​and 59% respectively, demonstrating its potential for efficient and low-cost application in industrial production.

[0096] In addition, the results of the comparative experiment are shown in Table 2.

[0097] Table 2 Comparative Experiments

[0098]

[0099] This invention conducted eight sets of comparative experiments and compared it with mainstream target detection models such as YOLOv5n, YOLOv8n, YOLOv10n, YOLOv11n, and DETR. The experimental results are shown in Table 2. The experimental results show that LiteScale-GELAN achieves a detection accuracy of 89.1%, which is superior to YOLOv5n (84.4%), YOLOv8n (87.2%), and YOLOv11n (86.7%), and improves accuracy by more than 5% compared to YOLOv10n and DETR. This model not only has excellent accuracy but also performs well in low-resource environments. LiteScale-GELAN's recall rate is 97%, significantly better than YOLOv5n and YOLOv8n, demonstrating a stronger ability to reduce missed detections. In terms of model size, LiteScale-GELAN is only 1.9MB, significantly smaller than YOLOv8 (5.98MB), DETR (63.15MB), and YOLOv11n (5.25MB), effectively reducing storage requirements and making it suitable for deployment on embedded and edge computing devices. Although YOLOv11s has an accuracy of 89.9%, slightly higher than LiteScale-GELAN, LiteScale-GELAN's parameter count (0.682M) and GFLOPs (2.9G) are approximately 92.75% and 86.32% smaller than YOLOv11s's 9.41M and 21.2G, respectively, demonstrating its advantage in terms of computational resource consumption.

[0100] To verify the generalization ability of the LiteScale-GELAN model, this invention uses the PVMD dataset for experiments. This dataset contains five defect types: hot_spot, black_border, no_electricity, broken, and scratch, totaling 1105 samples. The dataset is randomly divided into training and test sets in an 8:2 ratio. Except for the experimental settings, other parameters are consistent with the previous experiments. The experimental results are shown in Table 3.

[0101] Table 3 Results of the PVMD dataset

[0102]

[0103]

[0104] On this dataset, the LiteScale-GELAN model performs exceptionally well, achieving a detection accuracy of 89.1%, which is very close to the baseline model's 89.4%, indicating that the improved model performs comparably to the baseline model in routine defect detection tasks. Furthermore, LiteScale-GELAN's recall rate of 97% is a significant improvement over the baseline model's 93%, demonstrating its advantage in reducing false negatives.

Claims

1. A method for detecting defects in solar panels based on GELAN, characterized in that, Includes the following steps: Step 1: Collect sample images of solar panel defect types to build a dataset. Label samples with fewer defect types to supplement the dataset and generate more training samples. Distribute the dataset into training and testing sets according to a certain ratio for model training and evaluation, respectively. Step 2: Perform preliminary data processing on the dataset; Step 3: Build an optimized LiteScale-GELAN network; Step 4: Train the optimized LiteScale-GELAN network to identify various defect types on the solar panel; Step 5: Using the trained model, perform detection and evaluation on the test set to analyze the model's performance; Step 6: Optimize the model by adjusting the network structure and training parameters; The above steps are used to detect various types of defects on solar panels; In step 3, the optimized LiteScale-GELAN network improves the efficiency of feature extraction, fusion, and detection through several innovative modules. First, the LiteRepLAN module is used to enhance the network's feature extraction and fusion capabilities. Second, SpdConv is used to replace the traditional convolutional layer. To optimize the neck network, the Dysample upsampling mechanism is adopted. Finally, the computational overhead in multi-scale defect detection is reduced through the reconstructed Enhanced_DDetect. The LiteRepLAN module is specifically as follows: The original feature map is input to the first-layer LiteRepCSP module. This module first performs preliminary processing on the input feature map using depthwise separable convolution (DSC) to extract compact features and reduce channel redundancy, outputting feature map P1. Then, feature map P1 is split into two paths and fed into two RepBottleneck modules. Each path performs depth feature extraction through multiple convolutional layers. The upper branch performs feature extraction through multiple stacked RepBottleneck modules, keeping the number of channels constant in each layer, to further capture deeper feature information, outputting feature map P2. The lower branch retains the original feature information through 1×1 depthwise separable convolution and performs channel fusion through pointwise convolution, outputting feature map P3. Then, the two feature maps P2 and P3 are fused through the Concat operation to obtain a feature map P4 with more multi-scale information. Finally, the output feature map P4 is fed into the next layer of depthwise separable convolution for fine-grained feature processing to generate the final feature map P5. This module achieves efficient feature extraction and cross-channel information fusion by combining the RepBottleneck module with depthwise separable convolution. The detection head module is the Enhanced_DDetect module, which specifically comprises: The output feature map P1 is split into two paths, which enter the cv2 and cv3 branches respectively for deeper feature extraction. In the cv2 branch, the input feature map undergoes two depthwise separable convolutions to extract spatial features. Then, an additional convolutional layer further fuses channel information to generate the feature map P2. Unlike the cv2 branch, the cv3 branch adds a channel attention mechanism on top of the two depthwise separable convolutions. The channel attention mechanism captures the global information of each channel through adaptive average pooling and dynamically adjusts the response of each channel using two 1x1 convolutions and a sigmoid activation function, thereby enhancing the model's sensitivity to key channel features. This mechanism helps improve the accuracy of target classification; the processed feature map P3 is further refined by 1x1 convolution to obtain the final feature map P4; finally, the output feature maps P2 and P4 of the two branches cv2 and cv3 are merged through a concatenation operation to form a joint feature map P5; this concatenation operation ensures the effective fusion of bounding box and classification task features, and after regression and classification processing, the output results of target detection are generated, including bounding box regression BBox and target category prediction Cls.

2. The method according to claim 1, characterized in that, In step 1, sample images containing defect types such as linear cracks, star cracks, broken grids, black cores, scratches, and fragments are collected to construct a dataset. Samples with fewer defect types are labeled using annotation software to supplement the dataset and generate more training samples. The dataset is then randomly allocated into training and testing sets in an 8:2 ratio for model training and evaluation, respectively.

3. The method according to claim 1, characterized in that, In step 2, data augmentation is performed on the dataset, including operations such as rotation, flipping, scaling, and cropping, to further increase the sample diversity of the training set and improve the generalization ability of the model.

4. The method according to claim 1, characterized in that, In step 4, the defect types include cracks, short circuits, burnt plates, and fingerprints.

5. The method according to claim 1, characterized in that, In step 5, the accuracy of the model under different defect types and scales is evaluated; In step 6, the optimization is aimed at further improving detection accuracy and efficiency, and ensuring the feasibility of the model in actual industrial production.

6. The method according to claim 1, characterized in that, It also includes step 7, which involves thorough testing on camera equipment or embedded devices to ensure the accuracy and stability of the solar panel defect detection method in industrial production scenarios.

7. The method according to claim 1, characterized in that, The optimized LiteScale-GELAN network obtained is as follows: The original image is input to the first convolutional layer Conv of the backbone, which outputs feature map F1. Feature map F1 is then input to the second convolutional layer to obtain feature map F2. Next, feature map F2 is input to the third ELAN1 module, which outputs feature map F3. Then, feature map F3 is input to the fourth spatial depth convolutional module SpdConv, which outputs feature map F4. Next, feature map F4 is input to the fifth lightweight feature aggregation module LiteRepLAN, which aggregates the features through a 3×3 convolution operation, outputting feature map F5. The input to layer 5 is fed into the sixth spatial depth convolutional module SpdConv, which outputs feature map F6. Then, feature map F6 is fed into the seventh layer LiteRepLAN to further optimize feature fusion, outputting feature map F7. Feature map F7 is fed into the eighth layer SpdConv, which outputs feature map F8. Finally, feature map F8 is fed into the ninth layer LiteRepLAN for further aggregation and feature extraction, outputting the final feature map F9. The output F9 of the ninth layer is used as the input to the tenth layer spatial pyramid pooling module SPPELAN4 to further enhance the multi-scale feature representation capability. The output feature map F10 of the tenth layer is used as the input of the dynamic sampling module DySample of the first layer of the neck module, and the adjusted feature map F11 is output. The feature map F7 of the seventh layer of the backbone and the feature map F11 after dynamic sampling of the first layer of the neck are input into the concatenation operation of the second layer of the neck, and the concatenated feature map F12 is output. The concatenated feature map F12 is input into the third layer LiteRepLAN of the neck to obtain the fused feature map F13. The fourth layer of the neck module is the dynamic sampling module DySample, which takes the feature map F13 output from the third layer as input and outputs the dynamically sampled feature map F14. The feature map F5 from the fifth layer of the backbone and the dynamically sampled feature map F14 from the fourth layer of the neck are input into the fifth layer of the neck for concatenation, and the concatenated feature map F15 is output. The concatenated feature map is input into the sixth layer of the neck, LiteRepLAN, to obtain the fused feature map F16. Next, the feature map F16 output from the sixth layer of the neck is input to the seventh layer SpdConv to obtain feature map F17; the feature map F13 from the third layer of the neck and the feature map F17 output from the seventh layer of the neck are input to the eighth layer of the neck for concatenation, and then the concatenated feature map F18 is input to the ninth layer LiteRepLAN of the neck to output the fused feature map F19; the feature map F19 output from the ninth layer of the neck is input to the tenth layer SpdConv to obtain feature map F20; The feature map F20 output from the tenth layer of the neck and the feature map F10 output from the tenth layer of the backbone are input into the eleventh layer of the neck for concatenation. Then, the concatenated feature map F21 is input into the twelfth layer of the neck LiteRepLAN, and the fused feature map F22 is output. Finally, the feature map F16 output from the sixth layer of the neck module, the feature map F19 output from the ninth layer, and the output from the twelfth layer are merged and input into the Enhanced_DDetect module, ultimately outputting multi-scale detection results.

Citation Information

Patent Citations

  • Solar cell panel defect detection method and device based on improved YOLOv5

    CN118196045A

  • Solar cell panel defect detection method based on improved Yov7-tiny

    CN118505643A

  • Solar cell panel defect detection method based on lightweight reconstruction network

    CN116758033A

  • Photovoltaic panel defect detection system and method based on unmanned aerial vehicle and machine vision

    CN119515799A