A photovoltaic panel cleanliness detection method based on attention mechanism fusion

CN122929274APending Publication Date: 2026-10-16FUYANG NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611068201.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0006]本发明的目的在于提供一种基于注意力机制融合的光伏板清洁度检测方法,以解决现有技术中光伏板图像受反光、阴影、角度变化和背景干扰影响较大,单一卷积特征难以充分表征积灰状态,以及模型边缘部署适应性不足的问题

Benefits of technology

[0066] Beneficial effects: First, the preprocessing sequence of "detection and cropping—geometric correction—noise suppression—highlight restoration—scale standardization" reduces the impact of non-PV panel background, shooting angle, noise, and specular reflection on subsequent recognition. Second, this invention utilizes low-level visual contamination features, mid-level semantic contamination features, and deep cleanliness pattern features simultaneously, enabling a more comprehensive description of the dust accumulation state of PV panels. Third, this invention enhances the contamination-related response stepwise through channel attention, spatial attention, and grouped spatial attention, helping to distinguish between real dust, reflections, and shadows, and improving detection robustness under complex lighting conditions. Fourth, this invention reduces the number of parameters through global average pooling, residual convolutional blocks, and a lightweight classifier, making it suitable for deployment on edge devices for real-time detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122929274A_ABST
    Figure CN122929274A_ABST
Patent Text Reader

Abstract

The application discloses a photovoltaic panel cleanliness detection method based on attention mechanism fusion, comprising: obtaining a photovoltaic panel image to be detected and preprocessing the same to obtain a standardized target region image; inputting the standardized target region image into a multi-layer pollution feature extraction network to extract three types of pollution features respectively; performing channel attention enhancement and spatial attention enhancement on the three types of pollution features respectively, and performing channel splicing, grouped spatial attention processing, channel shuffling and residual fusion on the enhanced features to obtain reinforced fusion pollution features; constructing a joint feature vector based on the reinforced fusion pollution features, and outputting a cleanliness probability distribution through a classifier and a Softmax function to determine a dust category of the photovoltaic panel. The application can reduce the influence of reflection, shadow, shooting angle change and background interference on the recognition result, and improve the accuracy, robustness and edge deployment adaptability of the photovoltaic panel cleanliness detection in a complex scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent operation and maintenance technology for photovoltaic power plants, specifically to a method for detecting the cleanliness of photovoltaic panels based on attention mechanism fusion. Background Technology

[0002] Photovoltaic modules, exposed to the outdoor environment for extended periods, are susceptible to contaminants such as sand, bird droppings, fallen leaves, rain streaks, and industrial dust. Dust accumulation on the photovoltaic panel surface reduces incident light transmittance, causing a decrease in module output power and potentially leading to localized hot spots and accelerated module aging. For large-scale photovoltaic power plants, accurately assessing the cleanliness of photovoltaic panels in different areas and scheduling cleaning operations accordingly is crucial for improving power generation efficiency and reducing operation and maintenance costs.

[0003] In existing technologies, manual inspection methods suffer from low efficiency, high subjectivity, and high safety risks. While fixed dust sensors can reflect localized dust accumulation, they are costly to deploy, have limited coverage, and are difficult to maintain after long-term exposure to outdoor environments. Drone inspections can quickly acquire large-area images, but due to the strong reflective properties of photovoltaic panels, the acquired images are often affected by specular reflection, shadows, changes in shooting angle, background interference, and local overexposure. When directly using traditional image thresholding or ordinary convolutional neural networks for classification, problems such as misclassifying reflections as dust accumulation, misclassifying shadows as stains, and insensitivity to small dust accumulations on edges and seams can easily occur.

[0004] Furthermore, existing deep learning-based dust accumulation recognition schemes typically use only a single deep feature for classification, neglecting the complementary relationship between low-level texture, mid-level local contamination areas, and deep cleanliness patterns. Some models also have a large number of parameters, making them unsuitable for deployment on resource-constrained devices such as drones, edge computing boxes, or on-site local servers. Therefore, there is a need for an image preprocessing and contamination feature fusion detection method specifically designed for photovoltaic panel dust accumulation scenarios, which can improve the accuracy of recognition in complex scenes while also ensuring lightweight models and real-time deployment capabilities at the edge. Summary of the Invention

[0005] The present invention aims to at least partially solve one of the technical problems existing in the related art.

[0006] The purpose of this invention is to provide a photovoltaic panel cleanliness detection method based on attention mechanism fusion, so as to solve the problems in the prior art where photovoltaic panel images are greatly affected by reflection, shadow, angle change and background interference, single convolution features are difficult to fully represent the dust accumulation state, and the model edge deployment is not adaptable enough.

[0007] To achieve the above objectives, the present invention provides a photovoltaic panel cleanliness detection method based on attention mechanism fusion, comprising the following steps:

[0008] S1. Acquire the image of the photovoltaic panel to be inspected, preprocess it, and output a standardized target area image;

[0009] S2. Based on the output standardized target region image, three semantic levels of contamination features are extracted through a multi-layer contamination feature extraction network; the multi-layer contamination feature extraction network includes an initial convolutional layer and three residual convolutional blocks;

[0010] S3. Introduce channel and spatial attention enhancement mechanisms to enhance the pollution features at the three semantic levels respectively;

[0011] S4. Based on the enhanced three semantic-level pollution features, a reinforced fusion pollution feature is generated through a grouped spatial attention fusion mechanism.

[0012] S5. Construct a joint feature vector based on the generated enhanced fusion pollution features, and output the cleanliness probability distribution and photovoltaic panel dust classification results through a classifier and Softmax function.

[0013] Preferably, the preprocessing in step S1 includes photovoltaic panel area positioning, boundary refinement, area trimming, geometric correction, noise suppression, highlight restoration, and scale standardization.

[0014] As a preferred option, step S2 specifically involves:

[0015] S21. Input the standardized target region image into the initial convolutional layer, and perform convolution, batch normalization, ReLU activation and max pooling on it to obtain preliminary texture features;

[0016] S22. Based on the obtained primary texture features, low-level visual contamination features are extracted sequentially through three residual convolutional blocks. Intermediate semantic pollution features and deep cleanliness mode characteristics The output of the residual convolution block is represented as:

[0017]

[0018] in, Indicates the first The input features of each convolutional block, Indicates the main path transformation. Indicates the main path parameter. Indicates a shortcut path change. This represents a non-linear activation function.

[0019] As a preferred option, the specific steps for channel attention enhancement in step S3 are as follows:

[0020] First, based on the extracted contamination features, spatial information is compressed through global average pooling to obtain the channel description vector:

[0021]

[0022] in, To extract the pollution characteristics, ; H and W are channel indices, while H and W are spatial location indices.

[0023] Then The input is a shared multilayer perceptron, and the channel weights are obtained through the sigmoid function:

[0024]

[0025] in, and These represent the weight matrices for dimensionality reduction and dimensionality increase, respectively. Represents the ReLU activation function. Represents the Sigmoid function;

[0026] Channel enhancement features are represented as follows:

[0027]

[0028] in, This indicates element-wise multiplication.

[0029] As a preferred option, the specific steps for enhancing spatial attention in step S3 are as follows:

[0030] First, along the channel dimension... Perform average pooling and max pooling respectively:

[0031]

[0032] ;

[0033] Then and After concatenation, the weights are input into a convolutional layer and a sigmoid function to obtain spatial weights.

[0034]

[0035] in, Indicates the kernel size as Convolution operation, Indicates a splicing operation;

[0036] The final enhanced features are:

[0037]

[0038] in, This is for the final enhanced features.

[0039] As a preferred option, step S4 specifically involves:

[0040] S41. Three types of enhanced features , and By stitching along the channel dimension, preliminary fusion features are obtained:

[0041]

[0042] in, ;

[0043] S42, will Divided along the channel dimension There are 3 feature groups, and spatial attention weights are independently calculated for each feature group to obtain the grouped enhanced features. The specific formula is expressed as follows:

[0044]

[0045]

[0046] in, For feature groups Inter-attention weights; For feature groups Enhanced features;

[0047] S43. Reassemble the enhanced features from each group to obtain... Then perform residual fusion with the initial fusion features:

[0048]

[0049] S44, to The combined washing process in the channel resulted in enhanced contamination characteristics:

[0050]

[0051] in, This is the channel shuffling function.

[0052] Preferably, step S5 constructs a joint feature vector based on the generated enhanced fusion pollution features, and outputs the cleanliness probability distribution and photovoltaic panel dust classification results through a classifier and a softmax function, specifically:

[0053] S51. Perform global max pooling and global average pooling on the enhanced fusion contamination characteristics respectively:

[0054]

[0055] ;

[0056] S52, will and The joint feature vector is obtained by concatenation:

[0057]

[0058] in, For joint feature vectors, This is a concatenation function;

[0059] S53. Input the joint feature vector into the classifier to obtain the classification vector corresponding to the joint feature vector:

[0060]

[0061]

[0062] in, , Represents the weight matrix. , Indicates the bias term. Represents features of the low-dimensional latent space. express The classification scores for each cleanliness category;

[0063] S54. Based on the obtained classification vector, the cleanliness probability distribution is obtained through the Softmax function:

[0064]

[0065] in, Dust from photovoltaic panels belongs to The predicted probability of a class.

[0066] Beneficial effects: First, the preprocessing sequence of "detection and cropping—geometric correction—noise suppression—highlight restoration—scale standardization" reduces the impact of non-PV panel background, shooting angle, noise, and specular reflection on subsequent recognition. Second, this invention utilizes low-level visual contamination features, mid-level semantic contamination features, and deep cleanliness pattern features simultaneously, enabling a more comprehensive description of the dust accumulation state of PV panels. Third, this invention enhances the contamination-related response stepwise through channel attention, spatial attention, and grouped spatial attention, helping to distinguish between real dust, reflections, and shadows, and improving detection robustness under complex lighting conditions. Fourth, this invention reduces the number of parameters through global average pooling, residual convolutional blocks, and a lightweight classifier, making it suitable for deployment on edge devices for real-time detection. Attached Figure Description

[0067] Figure 1 A flowchart of a photovoltaic panel cleanliness detection method based on attention mechanism fusion provided in an embodiment of the present invention;

[0068] Figure 2 This is a flowchart of image preprocessing provided in an embodiment of the present invention;

[0069] Figure 3 This is a diagram of a multi-layer pollution feature extraction and fusion network structure provided in an embodiment of the present invention;

[0070] Figure 4 This is a schematic diagram of the attention fusion mechanism provided in an embodiment of the present invention. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, embodiments of this invention, and should not be construed as limiting the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention. In the description of this invention, it should be understood that the terminology used is for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0072] The following is combined with Figures 1-4 This invention describes a photovoltaic panel cleanliness detection method based on attention mechanism fusion.

[0073] Example 1: This example provides a photovoltaic panel cleanliness detection method based on attention mechanism fusion, such as... Figure 1-4 As shown, it includes the following steps:

[0074] S1. Acquire the image of the photovoltaic panel to be inspected, preprocess it, and output a standardized target area image;

[0075] In this embodiment, images of the photovoltaic panel to be inspected are acquired using a drone, inspection robot, or fixed camera equipment. The image of the photovoltaic panel to be inspected can be an RGB image or a visible light image after camera calibration. To improve the stability of subsequent recognition, this embodiment first performs preprocessing on the image of the photovoltaic panel to be inspected.

[0076] like Figure 2As shown, firstly, the candidate regions for the photovoltaic panel are located using a Faster R-CNN model or an object detection model with equivalent region candidate generation capabilities. The object detection model can be trained through transfer learning using photovoltaic panel image samples containing different lighting conditions, shooting heights, dust accumulation levels, and background conditions. After the object detection model outputs photovoltaic panel candidate boxes, edge detection is performed within the candidate boxes using the Canny operator to refine the photovoltaic panel boundaries. The Canny operator includes gradient calculation, non-maximum suppression, and double thresholding steps. Based on the candidate boxes and edge contours, the effective region of the photovoltaic panel is determined, and the photovoltaic panel region image is cropped.

[0077] Secondly, geometric correction is performed on the cropped photovoltaic panel area image. Since the photovoltaic panel area image may experience rotation, tilt, scale changes, and shearing distortion when captured by drones or inspection equipment at different angles, this embodiment employs an affine transformation matrix. Geometric alignment is performed on the photovoltaic panel area image. The affine transformation matrix... Represented as:

[0078]

[0079] in, and They represent along direction and The scaling coefficient of the direction. and This represents the rotational or shearing coupling coefficient caused by the shooting angle deviation. and They represent along direction and The amount of translation in direction. The corresponding coordinate transformation relationship is:

[0080]

[0081] in, Represents the pixel coordinates before the transformation. This represents the coordinates of the corresponding pixel after geometric correction.

[0082] Next, noise suppression is performed on the geometrically corrected image of the photovoltaic panel area. Gaussian filtering is used to suppress high-frequency noise caused by the camera sensor, compression, and long-distance shooting; its Gaussian kernel is:

[0083]

[0084] in, Indicates coordinate offset Gaussian weights at the location, This represents the Gaussian kernel standard deviation. Median filtering is used to remove isolated salt-and-pepper noise, and its calculation method is as follows:

[0085]

[0086] in, This represents the pixel value after median filtering. Represents the neighboring pixel values ​​in the original image. Indicated by The filter window is centered on [the element]. Bilateral filtering is used to smooth noise while preserving the edges of the photovoltaic panel and the boundaries of dust accumulation; its calculation method is as follows:

[0087]

[0088]

[0089] in, Represents the pixels after bilateral filtering pixel values, Indicated by The neighborhood centered on, Represents the normalization coefficient. Represents the standard deviation of the spatial domain. This represents the standard deviation of the value range.

[0090] Finally, highlight restoration and scale normalization are performed on the image. Specifically, the image is converted to the HSV or Lab color space, and the luminance channel is extracted. or An adaptive threshold is constructed based on brightness statistics. For example, it can be made ,in Indicates the average value of the brightness channel. Indicates the standard deviation of the luminance channel. This represents the threshold adjustment coefficient. Specular mask. Defined as:

[0091]

[0092] when When, it represents a pixel. Belongs to the highlight area; when When, it represents a pixel. This area belongs to a non-highlight region. For highlight regions, image inpainting methods based on neighborhood texture propagation, such as the Telea or Navier-Stokes inpainting algorithms, can be used to recover the surface details of the overexposed photovoltaic panel by utilizing surrounding non-highlight pixels. After inpainting, the image is scaled to a preset size, for example... This yields a standardized target region image.

[0093] S2. Based on the output standardized target region image, three semantic levels of contamination features are extracted through a multi-layer contamination feature extraction network; the multi-layer contamination feature extraction network includes an initial convolutional layer and three residual convolutional blocks;

[0094] Input standardized target region image ,in The batch size is represented by the initial convolutional layer, which performs convolution, batch normalization, ReLU activation, and max pooling on the input image to obtain preliminary texture features. The convolutional layer calculation formula is:

[0095]

[0096] in, This indicates the output feature map in the output channel. and spatial location The value at that location, Indicates the input tensor. Indicates the convolution kernel weights. Indicates the bias term. Indicates the kernel size. Indicates the fill size.

[0097] The formula for calculating max pooling is:

[0098] ;

[0099] in, This represents the pooling step size. The ReLU activation function is:

[0100] ;

[0101] Multiple residual convolutional blocks are used to extract contamination features at different semantic levels layer by layer. Specifically, shallow residual convolutional blocks output low-level visual contamination features. It is used to describe edges, corners, color gradients, and reflective areas; the middle layer residual convolutional block outputs intermediate semantic contamination features. It is used to describe localized ash accumulation areas, contamination boundaries, and reflective anomalies; deep residual convolutional blocks output deep cleanliness pattern features. This is used to describe the overall cleanliness pattern and the distribution of contaminated areas. The dimensions of the above features can all be represented as... .

[0102] In this embodiment, the number of output channels for the three residual convolutional blocks are 64, 64, 128, 256, 512, and 512, respectively. Each residual convolutional block includes a main path and a shortcut path. The main path includes convolution, batch normalization, and nonlinear activation operations, while the shortcut path is used to preserve input features. When the number of channels or spatial dimensions of the main path output and the shortcut path output are inconsistent, [the following is omitted as it is not directly related to the previous sentence]. Convolution adjusts the shortcut path. The output of a residual convolution block can be represented as:

[0103]

[0104] in, Indicates the first The input features of each convolutional block, Indicates the main path change. Indicates the main path parameter. Indicates a shortcut path change. This represents a non-linear activation function.

[0105] S3. Introduce channel and spatial attention enhancement mechanisms to enhance the pollution features at the three semantic levels respectively;

[0106] For any pollution characteristic ,in First, channel attention enhancement is performed. Channel attention compresses spatial information through global average pooling to obtain channel description vectors:

[0107]

[0108] in, H and W are channel indices, while H and W are spatial location indices.

[0109] Then The input is a shared multilayer perceptron, and the channel weights are obtained through the sigmoid function:

[0110]

[0111] in, and These represent the weight matrices for dimensionality reduction and dimensionality increase, respectively. Represents the ReLU activation function. This represents the Sigmoid function. Channel enhancement features are:

[0112]

[0113] in, This indicates element-wise multiplication. Channel attention can enhance feature channels related to variations in gray color, texture, and brightness, while suppressing interfering channels such as overexposure and reflections.

[0114] After channel attention enhancement, spatial attention enhancement is performed. First, spatial attention is enhanced along the channel dimension. Perform average pooling and max pooling respectively:

[0115]

[0116] ;

[0117] Then and After concatenation, the weights are input into a convolutional layer and a sigmoid function to obtain spatial weights.

[0118]

[0119] in, Indicates the kernel size as Convolution operation, This indicates a splicing operation. The final enhanced feature is:

[0120] ;

[0121] Spatial attention can improve the network's response to key regions such as borders, seams, localized dust bands, and contamination patches, while reducing the impact of background and non-key regions on classification results.

[0122] S4. Based on the enhanced three semantic-level pollution features, a reinforced fusion pollution feature is generated through a grouped spatial attention fusion mechanism.

[0123] Three types of enhancement features , and By stitching along the channel dimension, preliminary fusion features are obtained:

[0124]

[0125] in, ;

[0126] To further enhance the pollution details in different semantic groups, this embodiment will Divided along the channel dimension Feature groups:

[0127] ;

[0128] For each feature group Independent computation of spatial attention weights And the grouped enhanced features are obtained:

[0129] ;

[0130] Grouped spatial attention enables different feature groups to focus on different types of contamination-related patterns, such as dust accumulation textures, border dust accumulation, seam dust accumulation, and reflective anomaly suppression features. The enhanced features from each group are then re-stitched together to obtain... Then perform residual fusion with the initial fusion features:

[0131] ;

[0132] To facilitate information exchange between different groups, Perform channel shuffling. If The number of channels is The number of groups is Then it can be transformed into After swapping the grouping dimension and the intra-group channel dimension, restore it to its original state. This results in enhanced fusion pollution characteristics:

[0133] ;

[0134] Through the aforementioned grouped spatial attention, residual fusion, and channel shuffling, the network can both retain the original fine-grained contamination information and enhance information interaction across levels and semantic groups, thereby reducing the probability of misjudging reflections or shadows as dust.

[0135] S5. Construct a joint feature vector based on the generated enhanced fusion pollution features, and output the cleanliness probability distribution and photovoltaic panel dust classification results through a classifier and Softmax function.

[0136] Based on the characteristics of enhanced fusion pollution Construct a joint feature vector for classification. Specifically, for Perform global max pooling and global average pooling respectively:

[0137]

[0138]

[0139] in, Used to capture localized significant dust accumulation response. This is used to characterize overall cleanliness statistics. The two are concatenated to obtain a joint feature vector:

[0140]

[0141] Joint feature vectors Input classifier. The classifier consists of a first fully connected layer, a batch normalization layer, a random deactivation layer, a ReLU activation function, and a second fully connected layer. Classification score vector. It can be represented as:

[0142]

[0143]

[0144] in, , Represents the weight matrix. , Indicates the bias term. Represents features of the low-dimensional latent space. express The classification scores for each cleanliness category are used. The cleanliness probability distribution is obtained through the Softmax function.

[0145]

[0146] Ultimately, The corresponding category was determined as the classification and identification result of photovoltaic panel dust.

[0147] In one embodiment, The categories are classified into four types: clean, light dust accumulation, moderate dust accumulation, and heavy dust accumulation. In other embodiments, the categories can also be set to no cleaning required, observation recommended, cleaning recommended, and priority cleaning based on the operation and maintenance strategy.

[0148] During the model training phase, a dataset of photovoltaic panel images can be constructed, encompassing different regions, seasons, lighting conditions, shooting angles, and levels of dust accumulation. Each image can be labeled with a cleanliness category. The cross-entropy loss function can be used during training.

[0149]

[0150] in, The one-hot encoded label represents the true class of the sample. To improve the model's generalization ability, data augmentation techniques such as random brightness perturbation, random rotation, random cropping, slight blurring, and reflection simulation can be used during the training phase.

[0151] During the edge deployment phase, the trained model can be deployed to drones, edge computing boxes, or local servers in photovoltaic power plants. After receiving inspection images, the edge device performs the preprocessing, feature extraction, attention fusion, and classification steps of this invention, and outputs cleanliness category, confidence level, and cleaning recommendations. When the network connection is normal, the edge device can upload key detection results and low-frequency sampled images to the cloud for global statistical analysis and model retraining; when the network connection is abnormal, the edge device can cache the results locally and synchronize them after the network is restored.

[0152] The above embodiments demonstrate that this invention is not a simple superposition of conventional image processing and neural network classification steps. Instead, it addresses the issues of reflection, shadow, angle changes, and local contamination detail recognition in photovoltaic panel dust accumulation identification by constructing a dedicated detection process with a clear preprocessing sequence, complementary multi-layer contamination features, and progressively enhanced spatial attention across channels, spaces, and groups. This process can improve the accuracy and stability of photovoltaic panel cleanliness classification in complex scenarios and is suitable for real-time deployment at the field edge.

[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting the cleanliness of photovoltaic panels based on attention mechanism fusion, characterized in that, Includes the following steps: S1. Acquire the image of the photovoltaic panel to be inspected, preprocess it, and output a standardized target area image; S2. Based on the output standardized target region image, three semantic levels of contamination features are extracted through a multi-layer contamination feature extraction network; the multi-layer contamination feature extraction network includes an initial convolutional layer and three residual convolutional blocks; S3. Introduce channel and spatial attention enhancement mechanisms to enhance the pollution features at the three semantic levels respectively; S4. Based on the enhanced three semantic-level pollution features, a reinforced fusion pollution feature is generated through a grouped spatial attention fusion mechanism. S5. Construct a joint feature vector based on the generated enhanced fusion pollution features, and output the cleanliness probability distribution and photovoltaic panel dust classification results through a classifier and Softmax function.

2. The photovoltaic panel cleanliness detection method based on attention mechanism fusion according to claim 1, characterized in that, The preprocessing described in step S1 includes photovoltaic panel area positioning, boundary refinement, area trimming, geometric correction, noise suppression, highlight restoration, and scale standardization.

3. The photovoltaic panel cleanliness detection method based on attention mechanism fusion according to claim 2, characterized in that, Step S2 is as follows: S21. Input the standardized target region image into the initial convolutional layer, and perform convolution, batch normalization, ReLU activation and max pooling on it to obtain preliminary texture features; S22. Based on the obtained primary texture features, low-level visual contamination features are extracted sequentially through three residual convolutional blocks. Intermediate semantic pollution features and deep cleanliness mode characteristics The output of the residual convolution block is represented as: in, Indicates the first The input features of each convolutional block, Indicates the main path transformation. Indicates the main path parameter. Indicates a shortcut path change. This represents a non-linear activation function.

4. The photovoltaic panel cleanliness detection method based on attention mechanism fusion according to claim 3, characterized in that, The specific steps for enhancing channel attention in step S3 are as follows: First, based on the extracted contamination features, spatial information is compressed through global average pooling to obtain the channel description vector: in, To extract the pollution characteristics, ; H and W are channel indices, while H and W are spatial location indices. Then, The input is a shared multilayer perceptron, and the channel weights are obtained through the sigmoid function: in, and These represent the weight matrices for dimensionality reduction and dimensionality increase, respectively. Represents the ReLU activation function. Represents the Sigmoid function; Channel enhancement features are represented as follows: in, This indicates element-wise multiplication.

5. The photovoltaic panel cleanliness detection method based on attention mechanism fusion according to claim 4, characterized in that, The specific steps for enhancing spatial attention in step S3 are as follows: First, along the channel dimension... Perform average pooling and max pooling respectively: ; Then and After concatenation, the weights are input into a convolutional layer and a sigmoid function to obtain spatial weights. in, Indicates the kernel size as Convolution operation, Indicates a splicing operation; The final enhanced features are: in, This is for the final enhanced features.

6. The photovoltaic panel cleanliness detection method based on attention mechanism fusion according to claim 5, characterized in that, Step S4 is as follows: S41. Three types of enhanced features , and By stitching along the channel dimension, preliminary fusion features are obtained: in, ; S42, will Divided along the channel dimension There are 3 feature groups, and spatial attention weights are independently calculated for each feature group to obtain the grouped enhanced features. The specific formula is expressed as follows: in, For feature groups Inter-attention weights; For feature groups Enhanced features; S43. Reassemble the enhanced features from each group to obtain... Then perform residual fusion with the initial fusion features: S44, to The combined washing process in the channel resulted in enhanced contamination characteristics: in, This is the channel shuffling function.

7. The photovoltaic panel cleanliness detection method based on attention mechanism fusion according to claim 6, characterized in that, Step S5 constructs a joint feature vector based on the generated enhanced fusion pollution features, and outputs the cleanliness probability distribution and photovoltaic panel dust classification results through a classifier and a softmax function, specifically: S51. Perform global max pooling and global average pooling on the enhanced fusion contamination characteristics respectively: ; S52, will and The joint feature vector is obtained by concatenation: in, For joint feature vectors, This is a concatenation function; S53. Input the joint feature vector into the classifier to obtain the classification vector corresponding to the joint feature vector: in, , Represents the weight matrix. , Indicates the bias term. Represents features of the low-dimensional latent space. express The classification score for each cleanliness category; S54. Based on the obtained classification vector, the cleanliness probability distribution is obtained through the Softmax function: in, Dust from photovoltaic panels belongs to The predicted probability of a class.