An unmanned aerial vehicle photovoltaic module defect detection method based on improved YOLO11

CN122989701APending Publication Date: 2026-10-27ANHUI UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611317389.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0007]本发明的目的在于针对无人机光伏组件红外图像中缺陷尺度差异明显、微小缺陷在逐级下采样过程中易发生细节衰减、复杂阵列背景与缺陷响应相互干扰以及现有检测网络难以兼顾精度和轻量化的问题,提供一种基于改进YOLO11的无人机光伏组件缺陷检测方法,以提高遮挡、玻璃破损、热斑等光伏组件缺陷的特征提取、分类和定位能力

Benefits of technology

[0017]与现有技术相比,本发明至少具有以下有益效果:第一,通过PoolingFormer与卷积门控线性单元结合,在较低计算开销下增强局部上下文差分和空间门控能力;第二,通过CPD双分支下采样减少弱小缺陷在分辨率降低过程中的信息损失;第三,通过MSLA的多感受野深度卷积与线性注意力兼顾微小遮挡、热斑和大面积玻璃破损;第四,通过Detect_SEAM增强遮挡和模糊区域的特征一致性,并提高分类与定位性能;第五,模型参数量和计算量较低,适合无人机或其他边缘计算设备实时部署。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989701A_ABST
    Figure CN122989701A_ABST
Patent Text Reader

Abstract

The application discloses an unmanned aerial vehicle photovoltaic module defect detection method based on improved YOLO11, and belongs to the technical field of photovoltaic module intelligent inspection and target detection. The method acquires an infrared image of a photovoltaic module collected by an unmanned aerial vehicle and constructs a defect data set; an MPSA-YOLO11 detection model is built based on YOLO11, a C3k2-PFCG feature extraction unit and a CPD down-sampling module are arranged in a backbone network, a C2PSA-MSLA multi-scale linear attention module is arranged after an SPPF module, and a Detect_SEAM detection head embedded with an SEAM module is adopted; the model is trained by using the data set, an infrared image to be detected is input into the trained model, and a defect category, a position and a confidence are output. The application can enhance multi-scale defect feature extraction and positioning capability, reduce model parameter quantity and calculation quantity, and improve detection precision and real-time performance of unmanned aerial vehicle photovoltaic inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of image processing and deep learning target detection technology, specifically to a method for detecting defects in UAV photovoltaic modules based on an improved YOLO11. Background Technology

[0002] Photovoltaic modules are exposed to the outdoor environment for extended periods, making them susceptible to damage from dust, bird droppings, fallen leaves, mechanical impacts, thermal stress, aging, and extreme weather, leading to defects such as shading, glass breakage, and hot spots. These defects reduce the power generation efficiency of photovoltaic modules and, in severe cases, may induce localized overheating, module burnout, or even fire risks. Therefore, periodic inspections of large-scale photovoltaic power plants are necessary.

[0003] Traditional manual inspections typically rely on workers carrying infrared or visible light imaging equipment to inspect each row, which suffers from low efficiency, high cost, strong subjectivity, and significant risks associated with operations in high temperatures, high altitudes, or complex terrain. Drones, on the other hand, offer advantages such as wide coverage, high mobility, and high data acquisition efficiency. Combined with deep learning target detection models, they can achieve automatic identification of defects in photovoltaic modules.

[0004] However, infrared images of photovoltaic modules captured by drones typically contain regularly repeating module arrays, ground vegetation, roads, shadows, and environmental thermal noise; there are also significant scale differences between different defects, for example, minor occlusions or early hot spots occupy only a few pixels, while glass breakage or severe hot spots may cover a large area. The fixed receptive field of conventional convolutional networks is difficult to simultaneously capture both fine-grained local textures and large-scale structures.

[0005] Existing lightweight object detection networks are prone to loss of detail in small-scale defects during the stepwise downsampling process. Conventional convolutional structures have limited ability to adapt the receptive field to targets of different scales. Traditional self-attention mechanisms require large computational overhead on high-resolution feature maps, and conventional detection heads may still miss detections or have localization errors under conditions of occlusion, blurred edges, and low contrast.

[0006] Therefore, it is necessary to provide a UAV photovoltaic module defect detection scheme that can enhance the global context, preserve the details of weak defects, adapt to extreme scale changes, and improve positioning accuracy under occlusion conditions with a low number of parameters and computational cost. Summary of the Invention

[0007] The purpose of this invention is to address the problems of significant differences in defect scale in infrared images of photovoltaic modules from drones, easy attenuation of details in small defects during stepwise downsampling, mutual interference between complex array background and defect response, and the difficulty of existing detection networks in balancing accuracy and lightweight design. This invention provides a defect detection method for photovoltaic modules from drones based on an improved YOLO11, which improves the feature extraction, classification, and localization capabilities of photovoltaic module defects such as shading, glass breakage, and hot spots.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: acquiring infrared images of photovoltaic modules collected by an infrared imaging device mounted on a UAV; preprocessing and labeling the infrared images of the photovoltaic modules to construct a photovoltaic module defect dataset; building an MPSA-YOLO11 photovoltaic module defect detection model on the YOLO11 architecture; training the model using the photovoltaic module defect dataset; inputting the infrared image of the photovoltaic module to be detected into the trained MPSA-YOLO11 model, and outputting the category, location, and confidence level of the photovoltaic module defect.

[0009] The preprocessing includes one or more of the following: image quality screening, distortion correction, target region cropping, size unification, pixel normalization, and data augmentation. Bounding boxes are used to label defective areas of the photovoltaic modules, and the labeled data is divided into training, validation, and test sets according to a preset ratio. The specific source of the dataset, the number of images, and the division ratio can be adjusted according to the actual inspection task and do not constitute a limitation on the technical solution of this invention.

[0010] The backbone network consists of a convolutional downsampling unit, a C3k2-PFCG feature extraction unit, a content-preserving downsampling (CPD) module, an SPPF module, and a C2PSA-MSLA multi-scale linear attention module. The C2PSA-MSLA module is positioned after SPPF and before the first upsampling unit of the feature fusion network, serving as a multi-scale feature enhancement part at the end of the backbone network.

[0011] The feature fusion network generates fused features at three scales: P3 / 8, P4 / 16, and P5 / 32 through two-level top-down upsampling fusion and two-level bottom-up downsampling fusion; the bottom-up downsampling adopts a CPD dual-branch structure.

[0012] The multi-scale detection head receives fused features from three scales: P3 / 8, P4 / 16, and P5 / 32. Each Detect_SEAM detection head includes a bounding box regression branch and a defect classification branch, and embeds a SEAM feature enhancement module in each of the two branches.

[0013] Furthermore, the C3k2-PFCG feature extraction unit sets up a PFCG feature enhancement unit in the feature enhancement branch of C3k2; the PFCG feature enhancement unit adopts the MetaFormer structure to organize the Pooling Token Mixer and the Convolutional Gated Linear Unit CGLU, establishes local context difference through pooling token mixing, forms local spatial gating through CGLU, and uses a nested residual structure to transfer features.

[0014] Furthermore, the CPD module retains significant responses through max pooling branches, extracts downsampled semantic features through convolutional branches, and concatenates the outputs of the two branches along the channel dimension.

[0015] Furthermore, the MSLA multi-scale linear attention submodule divides the input features into four channel subgroups, extracts different receptive field features using 3×3, 5×5, 7×7 and 9×9 depth convolutions respectively, and uses linear attention to calculate the global context.

[0016] Furthermore, the SEAM feature enhancement module performs feature transformation through deep convolution and point convolution with residual connections, generates channel weights through adaptive average pooling and two fully connected layers, and performs exponential enhancement on the Sigmoid output before multiplying it element-wise with the original input features.

[0017] Compared with existing technologies, this invention has at least the following advantages: First, by combining PoolingFormer with convolutional gated linear units, it enhances local contextual difference and spatial gating capabilities with lower computational overhead; Second, by using CPD dual-branch downsampling, it reduces information loss of small defects during resolution reduction; Third, by using MSLA multi-receptive field deep convolution and linear attention, it addresses both small occlusions, hot spots, and large-area glass breakage; Fourth, by using Detect_SEAM, it enhances feature consistency of occluded and blurred regions and improves classification and localization performance; Fifth, the model has low parameter count and computational cost, making it suitable for real-time deployment on UAVs or other edge computing devices. Attached Figure Description

[0018] Figure 1 This is a flowchart of the UAV photovoltaic module defect detection method of the present invention.

[0019] Figure 2 This is a schematic diagram of the overall structure of the photovoltaic module defect detection model of the present invention.

[0020] Figure 3 This is a schematic diagram of the C3k2-PFCG feature extraction unit of the present invention.

[0021] Figure 4 This is a schematic diagram of the CPD dual-branch downsampling module of the present invention.

[0022] Figure 5 This is a schematic diagram of the C2PSA-MSLA module of the present invention.

[0023] Figure 6 This is a schematic diagram of the Detect_SEAM detection head module of the present invention.

[0024] Figure 7 A visualization of the test results. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0026] Combination Figure 1 This embodiment provides a defect detection method for UAV photovoltaic modules based on an improved YOLO11. The method proceeds in the following order: data acquisition and processing, detection model construction, model training, model inference, and detection result output. Specifically, it includes the following steps:

[0027] Step S1: Obtain infrared images of photovoltaic modules collected by drones, filter, correct distortion, crop target areas, unify size and process pixels in the infrared images, label defective areas of photovoltaic modules, and divide the labeled images into training set, validation set and test set to construct photovoltaic module defect dataset.

[0028] Step S2: Based on YOLO11, build an MPSA-YOLO11 photovoltaic module defect detection model. Set up a C3k2-PFCG feature extraction unit and a content-preserving downsampling CPD module in the backbone network. Set up a C2PSA-MSLA multi-scale linear attention module after the SPPF module and use the Detect_SEAM detection head.

[0029] Step S3: Iteratively train the MPSA-YOLO11 photovoltaic module defect detection model using the training set, and select and adjust the model parameters using the validation set to obtain the trained MPSA-YOLO11 photovoltaic module defect detection model.

[0030] Step S4: Input the infrared image of the photovoltaic module to be detected into the trained MPSA-YOLO11 photovoltaic module defect detection model, and sequentially complete the main feature extraction, multi-scale feature enhancement, feature fusion, bounding box regression and defect classification.

[0031] Step S5: Obtain the type, location, and confidence level of photovoltaic module defects based on the output of the detection head, and form the drone photovoltaic module defect detection result.

[0032] The following provides further explanation of the above steps. In step S1, during the inspection of the photovoltaic power station, a drone equipped with an infrared imaging device is used to acquire infrared images containing the photovoltaic module array, so that the photovoltaic module to be inspected is within the imaging field of view and forms an image sequence covering the inspection area; the images used for model training can be selected from public data sources or actual inspection data that meet the imaging requirements.

[0033] The acquired infrared images undergo data quality checks, discarding severely out-of-focus, severely overexposed, or severely underexposed images where the target area cannot be identified. For infrared images with imaging distortion, a pixel coordinate mapping relationship is established based on the camera intrinsic parameters and distortion coefficients obtained from the pre-calibrated infrared imaging equipment, and the original infrared image is remapped to correct radial and tangential distortion. After distortion correction, the region of interest is determined based on the effective imaging range of the photovoltaic module array in the image. The target region of the image is cropped using a preset rectangular region or a rectangle containing the photovoltaic module array to remove irrelevant background outside the effective module area. Subsequently, the cropped image is resized and pixel normalized according to the model input requirements. During the training phase, one or more data augmentation methods can be used, such as random flipping, scaling, translation, or brightness perturbation, and the corresponding defect annotation boxes are adjusted simultaneously.

[0034] Defects are labeled on the preprocessed images. The defect categories include occlusion, glass breakage, and hot spots. The labeling information includes at least the defect category and the coordinates of the defect bounding box. The labeled images are divided into training set, validation set, and test set. The training set is used for model parameter updates, the validation set is used for model selection and parameter tuning, and the test set is used for model performance verification.

[0035] In step S2, combined Figure 2 An MPSA-YOLO11 photovoltaic module defect detection model was constructed. The input image of the model was sequentially passed through two convolutional layers with a stride of 2 to form shallow features. Subsequently, C3k2-PFCG feature extraction units and CPD modules were alternately set in the backbone network to obtain P3 / 8, P4 / 16, and P5 / 32 scale features step by step. The deep features were passed through the SPPF module and then input into the C2PSA-MSLA module. The output of the C2PSA-MSLA module was used as the deepest input for subsequent feature fusion.

[0036] In a specific network configuration of this embodiment, the hierarchical relationship of the backbone network is as follows: convolutional layer, convolutional layer, first C3k2-PFCG, first CPD, second C3k2-PFCG, second CPD, third C3k2-PFCG, third CPD, fourth C3k2-PFCG, SPPF, and C2PSA-MSLA. The feature enhancement branches of the two shallow C3k2-PFCG stages directly adopt PFCG feature enhancement units, while the two deep stages adopt a nested C3k-PFCG structure. The PFCG feature enhancement unit uses a MetaFormer structure to organize Pooling Token Mixer and Convolutional Gated Linear Unit (CGLU) to form a basic feature enhancement block; for ease of description, this basic feature enhancement block is referred to as the MetaFormerCGLU block below.

[0037] The deep features output by C2PSA-MSLA are first upsampled by 2x, and then concatenated with the intermediate features at the corresponding P4 scale of the backbone network along the channel dimension before being processed by C3k2. The resulting fused features are upsampled by 2x again, concatenated with the intermediate features at the corresponding P3 scale, and processed by C3k2 to obtain the P3 / 8 fused features.

[0038] The P3 / 8 fused features are downsampled by the CPD module, concatenated with the P4-scale fused features from the top-down path, and processed by C3k2 to obtain the P4 / 16 fused features. The P4 / 16 fused features are then downsampled by the CPD module, concatenated with the deep features output from C2PSA-MSLA, and processed by C3k2 to obtain the P5 / 32 fused features. The fused features from these three scales (P3 / 8, P4 / 16, and P5 / 32) are then input into the Detect_SEAM detection head.

[0039] Combination Figure 3 The C3k2-PFCG feature extraction unit adopts the C3k2 cross-stage local connectivity framework. Its input is processed by convolution and channel splitting to form bypass features and enhanced features. The enhanced features are then concatenated with the bypass features after passing through one or more PFCG feature enhancement units, and feature fusion is completed through output convolution. The PFCG feature enhancement unit uses PoolingToken Mixer and CGLU as its core computational structures and is implemented in the form of MetaFormer.

[0040] Specifically, let X be the input of the MetaFormerCGLU basic block in the PFCG feature enhancement unit, and N1 be obtained after the first normalization. The Pooling Token Mixer uses 3×3 average pooling with a stride of 1 and a padding of 1, and the padding region is not included in the average value; its differential token mixing result is expressed as:

[0041] The first stage involves adding the residuals of the block input X and the differential token features:

[0042] X1 is normalized a second time and restored to its channel-pre-form format to obtain N2. A convolutionally gated linear unit maps N2 to two equal-channel branches U and V through a 1×1 convolution, where the number of hidden channels is approximately two-thirds of the number of input channels.

[0043] After performing a 3×3 depthwise convolution and GELU activation on U, it is multiplied element-wise with V to form gated features, where V is not activated by Sigmoid:

[0044] After the gated features are mapped by a 1×1 convolution, a residual sum is performed once inside the CGLU, and another residual sum is performed outside the PFCG basic feature enhancement block where the gated features are located, thus forming a nested residual structure. In this embodiment, the Dropout parameter is set to 0, which can be represented as:

[0045] Through the above processing, Pooling Token Mixer completes the differential token mixing between the local average response and the current position response. CGLU uses the content branch and gating branch after deep convolution to perform element-wise interaction to achieve local context feature modulation.

[0046] Combination Figure 4 The CPD module includes parallel max-pooling and convolution branches. Let the input feature be X, and the target output channel number be Cout. The two branches each output Cout / 2 channels. The max-pooling branch is calculated as follows:

[0047] The convolution branch first performs channel adjustment using a 1×1 convolution, and then performs spatial downsampling using a 3×3 convolution with a stride of 2.

[0048] The outputs of the two branches are concatenated along the channel dimension to obtain the CPD module output:

[0049] Each of the above convolutions is followed by batch normalization and SiLU activation. The max pooling branch preserves local salient responses, while the convolutional branch learns semantic features during the downsampling process. The two branches are concatenated along the channel dimension to obtain the downsampling features.

[0050] Combination Figure 5 The C2PSA-MSLA module includes a C2PSA outer layer splitting and fusion structure and an MSLA multi-scale linear attention unit set in the PSA block. C2PSA-MSLA first uses a 1×1 convolution to map the input into 2c channels and divides them equally into bypass features a and enhancement features b. Enhancement features b pass through one or more PSA blocks, are then concatenated with bypass features a, and finally output by a 1×1 convolution. Each PSA block first performs MSLA and residual summation, then executes a feedforward network consisting of two 1×1 convolutions and residual summation.

[0051] Let the MSLA input feature be X∈R^(B×C×H×W), where B represents the batch size, C represents the number of channels, and H and W represent the feature map height and width, respectively. X is divided into four sub-features Xᵢ along the channel dimension. The four branches are constructed using 3×3, 5×5, 7×7, and 9×9 depthwise convolutions, respectively. The depthwise convolution output is summed with the residual of the corresponding branch input and then activated using ReLU.

[0052] Each branch feature is flattened into N = H × W spatial tokens, and a query matrix Q, a key matrix K, and a value matrix V are generated through linear mapping. In this embodiment, the number of attention heads is set to 4, and the four scale branches share the same linear attention mapping parameters. The key matrix is ​​processed along the feature dimension, and the query matrix is ​​processed along the spatial token dimension.

[0053]

[0054] Linear attention first calculates the key-value context, and then reads the context from the query matrix. The calculation process is as follows:

[0055]

[0056] Through the above calculations, there is no need to explicitly construct an N×N attention matrix. The attention outputs of the four scale branches are multiplied by learnable scalars w1, w2, w3, and w4, respectively, and the initial value of each learnable scalar is 1; in this embodiment, the learnable scalars are not subjected to Softmax normalization. The four branches are weighted and concatenated along the channel dimension, and then the MSLA output is obtained through a 1×1 convolution.

[0057] Among them, the 3×3 and 5×5 branches are used to extract finer-grained local features, the 7×7 and 9×9 branches are used to expand the effective receptive field, and the four scale branches are processed by linear attention to form multi-scale enhanced features.

[0058] Combination Figure 6 The Detect_SEAM detection head adopts a decoupled structure. At each detection scale, the bounding box regression branch sequentially includes a 3×3 standard convolution, a SEAM enhancement module, and a 1×1 regression output convolution; the defect classification branch sequentially includes a 3×3 depthwise convolution, a 1×1 convolution, a SEAM enhancement module, and a 1×1 classification output convolution.

[0059] In this embodiment, the discrete regression parameter of the bounding box regression branch is set to 16, and the number of regression output channels is 4×16; the number of output channels of the classification branch is the number of defect categories. The detection outputs at the three scales of P3 / 8, P4 / 16, and P5 / 32 are used to characterize defect targets at different spatial scales.

[0060] The SEAM enhancement module includes a deep convolutional enhancement unit, an adaptive global average pooling layer, and a channel weight generation unit. In this embodiment, the number of deep convolutional enhancement units n in SEAM is set to 1, and the channel compression ratio r is set to 16. The deep convolutional enhancement unit includes a 3×3 deep convolution with residual connections, followed by a 1×1 point convolution, GELU activation, and batch normalization.

[0061] Let F be the feature enhanced by depthwise convolution. Adaptive global average pooling is applied to F to obtain the channel description vector z, where the c-th channel is represented as:

[0062] The channel description vector is sequentially passed through a channel-compressed fully connected layer, a ReLU activation layer, a channel-recovery fully connected layer, and a Sigmoid activation layer to obtain the channel weights s:

[0063] The channel weights are then subjected to an exponential mapping, extended to the spatial dimension, and multiplied element-wise with the original SEAM input X:

[0064] Since the Sigmoid output is between 0 and 1, and the weights after exponential mapping are between 1 and e, different channels receive varying degrees of enhancement. This embodiment employs a single-path depthwise convolutional enhancement structure and does not use multi-scale patch parallel branches.

[0065] In step S3, the MPSA-YOLO11 photovoltaic module defect detection model is iteratively trained using the training set. Model parameters are updated via backpropagation, and the validation set is used for model selection and parameter adjustment. After model training is complete, the detection performance is evaluated using the test set. Parameters such as training input size, training epochs, batch size, optimizer, and learning rate are set according to the training data and computing platform.

[0066] In step S4, the infrared image of the photovoltaic module to be detected is input into the trained MPSA-YOLO11 model. The bounding box regression output and classification output at the three scales are flattened and combined respectively; the bounding box regression output obtains the distance distribution through the DFL module, and is decoded into bounding box coordinates by combining the anchor points and stride of the corresponding scale; the classification output obtains the category confidence through the Sigmoid function, forming the defect category, bounding box location, and confidence.

[0067] In step S5, the defect category, bounding box location, and confidence level are output as the detection result. When visualization is required, the defect bounding box, category label, and confidence level can be overlaid onto the corresponding photovoltaic module infrared image to form a defect detection visualization result. The test visualization result is shown below. Figure 7 .

[0068] To verify the feasibility and detection performance of the above method, a set of specific experiments was conducted using 1468 infrared images of photovoltaic modules from the Roboflow public dataset. The images had a resolution of 640×640 pixels. Three types of defects—shading, glass breakage, and hot spots—were labeled, and the training, validation, and test sets were divided in a 7:2:1 ratio. The data sources, data scale, and division ratios described above are only used to illustrate the verification process of this embodiment and do not constitute a limitation on the data sources and data scale in actual applications.

[0069] The experimental environment consisted of a Windows 10 64-bit operating system, Python 3.10, and PyTorch 2.3.0. Hardware specifications included an Intel Core i7-14700HX processor, an NVIDIA GeForce RTX 4070 laptop graphics card, and 16GB of RAM. During model training using the training set, the input image size was 640×640, the initial learning rate was 0.01, the training epochs were 300, the batch size was 32, the number of threads was 4, and the stochastic gradient descent optimizer (SGD) was used. The remaining hyperparameters were configured according to the default values ​​provided by the official YOLOv11n model documentation.

[0070] After model training, the precision, mAP@0.5, number of parameters, model size, inference speed, and FLOPs were statistically analyzed on the test set. The MPSA-YOLO11 model had a precision of 82.5%, an mAP@0.5 of 85.7%, 1.94M parameters, a model size of 4.05MB, an inference speed of 86.3FPS, and a computational cost of 4.8GFLOPs.

[0071] To verify the impact of each improved module on the defect detection performance of photovoltaic modules, ablation experiments were conducted under the same dataset and training parameters. YOLO11n was used as the baseline model, where A represents the introduction of the CPD module, B represents the introduction of the C3k2-PFCG feature extraction unit, C represents the introduction of the C2PSA-MSLA multi-scale linear attention module, and D represents the use of the Detect_SEAM detection head. The performance of individual modules and the model after progressively combining the modules were tested, and the results are shown in Table 1.

[0072] Table 1 Comparison of ablation test results 1 79.1 82.8 6.4 2.59 5.25 139.3 2 √ 81.2 84.4 5.7 2.23 4.61 139.2 3 √ 82.3 84.8 6.0 2.40 4.93 122.4 4 √ 80.8 83.9 5.9 2.49 5.10 117.5 5 √ 80.6 83.0 6.4 2.56 5.23 123.9 6 √ √ 81.7 85.0 5.4 2.05 4.25 104.7 7 √ √ √ 81.9 84.9 4.9 1.96 4.10 95.2 8 √ √ √ √ 82.5 85.7 4.8 1.94 4.05 86.3

[0073] Table 1 shows that the mAP@0.5 of the YOLO11n baseline model is 82.8%. Introducing the CPD module alone improves the mAP@0.5 to 84.4%, and introducing C3k2-PFCG alone improves it to 84.8%. Introducing C2PSA-MSLA and Detect_SEAM alone results in mAP@0.5 of 83.9% and 83.0%, respectively. When progressively combining modules, the A+B combination achieves 85.0% mAP@0.5, the A+B+C combination achieves 84.9%, and after fully introducing A, B, C, and D, MPSA-YOLO11 achieves a precision of 82.5%, mAP@0.5 of 85.7%, reduces the number of parameters to 1.94M, and reduces the computational cost to 4.8 GFLOPs. These ablation results indicate that each improved module has a different impact on model performance, and the complete model achieves a better overall performance in terms of detection accuracy and model complexity.

[0074] To compare the performance of different object detection models on the same task, MPSA-YOLO11 was compared with YOLOv3-tiny, YOLOv5n, YOLOv6n, YOLOv8n, YOLOv9-tiny, YOLOv10n, YOLO11n, YOLOv12n, YOLOv13n, DETR, and RT-DETR. The results are shown in Table 2.

[0075] Table 2 Comparison of experimental results of various object detection algorithms YOLOv3-tiny 69.8 77.0 9.52 18.3 379.6 14.5 YOLOv5n 80.7 81.4 2.18 4.5 142.0 5.9 YOLOv6n 78.4 81.5 4.16 8.2 129.5 11.6 YOLOv8n 79.8 84.0 3.01 6.0 134.9 8.2 YOLOv9-tiny 76.5 80.5 1.73 4.1 56.4 6.6 YOLOv10n 74.9 80.7 2.27 5.6 36.7 6.7 YOLO11n 79.1 82.8 2.59 5.25 139.3 6.4 YOLOv12n 80.0 82.7 2.52 5.22 104.8 6.0 YOLOv13n 71.2 79.7 2.44 5.2 89.3 6.2 DETR 79.1 81.8 19.87 40.5 61.2 56.9 RT-DETR 73.0 78.1 32.8 66.2 30.1 108 MPSA-YOLO11 82.5 85.7 1.94 4.05 86.3 4.8

[0076] Table 2 shows that MPSA-YOLO11 achieves an mAP@0.5 of 85.7%, a 2.9 percentage point improvement compared to the YOLO11n baseline of 82.8%. The number of parameters decreased from 2.59M to 1.94M, and FLOPs decreased from 6.4G to 4.8G. Furthermore, compared with other mainstream models, its overall performance is superior. These results demonstrate that the combination of C3k2-PFCG, CPD, C2PSA-MSLA, and Detect_SEAM can improve the defect detection performance of photovoltaic modules while controlling model complexity.

[0077] This invention is not limited to the aforementioned defect categories, training parameters, and specific network channel configurations. For other photovoltaic module defects with similar infrared or visible light characteristics, model training can be performed by adjusting the defect category labels and training data. For different computing platforms, the network channel width, repetition count, or input resolution can be adjusted according to computing power and storage resources without changing the technical concept of this invention, which is based on the joint improvement of C3k2-PFCG, CPD, C2PSA-MSLA, and Detect_SEAM.

[0078] The above are merely specific embodiments of the present invention. Equivalent substitutions or conventional adjustments made by those skilled in the art based on the disclosure of this invention, as long as they do not depart from the technical concept of this invention, should fall within the protection scope of this invention.

Claims

1. A method for defect detection of photovoltaic modules using unmanned aerial vehicles (UAVs) based on an improved YOLO11, characterized in that, include: Infrared images of photovoltaic modules collected by drones are acquired, the infrared images of photovoltaic modules are preprocessed, and defects are annotated in the preprocessed infrared images of photovoltaic modules to construct a photovoltaic module defect dataset. An MPSA-YOLO11 photovoltaic module defect detection model was constructed. This model, based on the YOLO11 architecture, includes a backbone network, a feature fusion network, and a multi-scale detection head. The backbone network incorporates a C3k2-PFCG feature extraction unit and a content-preserving downsampling (CPD) module. The C3k2-PFCG feature extraction unit uses Pooling Tokens... The Mixer incorporates a C3k2 structure with a Convolutional Gated Linear Unit (CGLU) for feature extraction. The CPD module performs feature downsampling through parallel pooling and convolutional paths. A C2PSA-MSLA multi-scale linear attention module is placed after the SPPF module in the backbone network to enhance the deep features output by the backbone network through multi-scale deep convolution and linear attention. The feature fusion network receives the deep features output by the C2PSA-MSLA multi-scale linear attention module and intermediate features at different scales output by the backbone network. Through top-down upsampling, feature concatenation, and C3k2 feature processing, and bottom-up CPD downsampling, feature concatenation, and C3k2 feature processing, it obtains fused features at multiple scales. The multi-scale detection head uses a Detect_SEAM detection head to receive the fused features at multiple scales. SEAM modules are placed in the bounding box regression branch and the defect classification branch to perform defect localization and classification on the fused features. The MPSA-YOLO11 photovoltaic module defect detection model is trained using the training set of the photovoltaic module defect dataset, and the model parameters are adjusted using the validation set to obtain the trained MPSA-YOLO11 photovoltaic module defect detection model. The infrared image of the photovoltaic module to be detected is input into the trained MPSA-YOLO11 photovoltaic module defect detection model, and the model outputs the category, location, and confidence level of the photovoltaic module defect.

2. The method for detecting defects in photovoltaic modules using unmanned aerial vehicles according to claim 1, characterized in that, Acquiring the infrared images of the photovoltaic modules includes: using a drone equipped with an infrared imaging device to collect inspection images of the photovoltaic modules along a preset route; performing one or more of the following processing on the inspection images: quality screening, distortion correction, target area cropping, size unification, and pixel normalization; using bounding boxes to annotate occlusions, glass breakage, and hot spot defects, and dividing the annotated images into training sets, validation sets, and test sets.

3. The method for detecting defects in UAV photovoltaic modules based on the improved YOLO11 according to claim 1, characterized in that, The C3k2-PFCG feature extraction unit adopts a cross-stage local connectivity structure, including input convolution, feature splitting structure, bypass branch, feature enhancement branch, feature concatenation structure, and output convolution; the features output by the input convolution are divided along the channel dimension and then input to the bypass branch and the feature enhancement branch respectively. The feature enhancement branch includes at least one PFCG feature enhancement unit, which uses a MetaFormer structure to organize a Pooling Token Mixer and a Convolutional Gated Linear Unit (CGLU). The features output by the bypass branch and the features output by the feature enhancement branch are concatenated along the channel dimension and then convolved by the output to generate enhanced features.

4. The method for detecting defects in UAV photovoltaic modules based on the improved YOLO11 according to claim 3, characterized in that, The PFCG feature enhancement unit includes a first normalization unit, a Pooling Token Mixer, a first residual connection, a second normalization unit, and a Convolutionally Gated Linear Unit (CGLU). The Pooling Token Mixer performs average pooling with a kernel size of 3×3 and a stride of 1 on the normalized input features, and calculates the difference between the average pooled features and the normalized input features. The difference features are then residually fused with the input features of the PFCG feature enhancement unit. The Convolutionally Gated Linear Unit (CGLU) first generates two feature branches through a 1×1 convolution. One feature branch is multiplied element-wise with the other feature branch after a 3×3 depthwise convolution and GELU activation. The resulting gated features are channel-mapped through a 1×1 convolution and then fused with the input features through a residual connection.

5. The method for detecting defects in photovoltaic modules using unmanned aerial vehicles according to claim 1, characterized in that, The CPD module includes parallel max pooling branches and convolutional branches; the max pooling branch includes a max pooling layer with a kernel size of 2×2 and a stride of 2 and a 1×1 convolutional layer in sequence; the convolutional branch includes a 1×1 convolutional layer and a convolutional layer with a kernel size of 3×3 and a stride of 2 in sequence; the two branches output half of the target output channel number respectively, and are concatenated along the channel dimension to form downsampled features.

6. The method for detecting defects in UAV photovoltaic modules based on the improved YOLO11 according to claim 1, characterized in that, The C2PSA-MSLA multi-scale linear attention module includes an input convolution, a feature splitting structure, a bypass branch, an enhancement branch including at least one PSA feature enhancement block, a feature concatenation structure, and an output convolution. The PSA feature enhancement block includes an MSLA multi-scale linear attention unit and a feedforward network, with residual connections set respectively. The MSLA multi-scale linear attention unit divides the input features into four groups of sub-features along the channel dimension, extracts features using depthwise convolutions with kernel sizes of 3×3, 5×5, 7×7, and 9×9, and performs residual fusion with the corresponding input sub-features. After linear attention calculation on the four groups of sub-features, they are multiplied by the corresponding learnable scale weights, concatenated along the channel dimension, and output features are obtained through 1×1 convolution. The linear attention calculation generates a query matrix Q, a key matrix K, and a value matrix V through linear mapping. K is processed with softmax along the feature dimension, and Q is processed with softmax along the spatial token dimension. The product of the transpose of K and V is calculated first, and then the result is multiplied by Q.

7. The method for detecting defects in UAV photovoltaic modules based on the improved YOLO11 according to claim 1, characterized in that, The feature fusion network is set after the C2PSA-MSLA multi-scale linear attention module and includes a top-down feature fusion path and a bottom-up feature fusion path. The top-down feature fusion path upsamples deep features, concatenates the upsampled features with the corresponding scale intermediate features output by the backbone network along the channel dimension, and generates fused features through the C3k2 feature processing unit. The bottom-up feature fusion path uses the CPD module to downsample the features generated by the top-down feature fusion path, concatenates the downsampled features with the corresponding deeper fusion features along the channel dimension, and generates detection features of different scales through the C3k2 feature processing unit.

8. The method for detecting defects in UAV photovoltaic modules based on the improved YOLO11 according to claim 1, characterized in that, The Detect_SEAM head receives fused features from at least three scales and sets bounding box regression branches and defect classification branches for each scale of fused features. The bounding box regression branch includes a convolutional feature extraction unit, a SEAM module, and a bounding box regression output convolution in sequence. The defect classification branch includes a depthwise convolution, a convolutional feature processing unit, a SEAM module, and a classification output convolution in sequence. The SEAM module includes at least one depthwise convolution enhancement unit, an adaptive average pooling unit, and a channel weight generation unit. The depthwise convolution enhancement unit enhances features through 3×3 depthwise convolutions with residual connections and 1×1 pointwise convolutions. The channel weight generation unit generates channel weights through two fully connected layers and a sigmoid activation function, and performs exponential mapping on the channel weights before multiplying them element-wise with the input features.

9. The method for detecting defects in UAV photovoltaic modules based on the improved YOLO11 according to claim 8, characterized in that, The Detect_SEAM head receives detection features at three scales with step sizes of 8, 16, and 32, and combines the detection results at each scale. The bounding box regression branch generates a bounding box distance distribution using a distributed focus regression method, and decodes the defect target bounding box based on the bounding box distance distribution and the anchor point positions at the corresponding scale. The defect classification branch outputs the classification response for each defect category. After activation processing, the defect category confidence score is obtained. The defect target bounding box is then combined with the defect category confidence score to form the detection result.