A photovoltaic panel crack detection method based on dual-channel multi-scale attention mechanism

By building a dual-channel backbone network, combining a multi-scale attention mechanism and a hollow fusion module, the problems of noise impact and information loss in crack detection of photovoltaic panels are solved, and high-precision crack detection effect is achieved.

CN116402761BActive Publication Date: 2025-08-26CHANGZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310234191.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2025-08-26
Estimated Expiration
2043-03-09

AI Technical Summary

Technical Problem

The existing photovoltaic panel crack detection methods are easily affected by noise and light, with poor accuracy, and the loss of feature information of the intermediate layer leads to blurred image edge lines, breakpoints and excessive thickness.

Method used

A dual-channel backbone network is built, a multi-scale attention mechanism and a hollow fusion module are used to predict through the feature weight reallocation and complementary fusion of semantic branching and spatial detail branching channels, combining the binary cross entropy and the loss function of Dice loss.

Benefits of technology

The smooth continuity and richness of image crack detection are achieved, detection accuracy and noise interference suppression ability are improved, and the performance is better than RCF, HED and FCN networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116402761B_ABST
    Figure CN116402761B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a photovoltaic panel crack detection method based on a dual-channel multi-scale attention mechanism. The method comprises the following steps: collecting EL image data; constructing a dual-channel neural network model; fusing semantic branch channels using a multi-scale attention mechanism module and a multi-channel dilated convolution fusion module; fusing spatial detail branch channels using a multi-scale attention mechanism module; and fusing the fused semantic branch channels with the fused spatial detail branch channels again; and predicting whether a photovoltaic panel has defects by jointly constructing a loss function using binary cross entropy and Dice loss. The method solves the problem that as convolution features become increasingly coarse, much useful information in the intermediate layer is lost during the convolution process, resulting in insufficient extraction of detailed features in the image, which can lead to blurred edges, breakpoints, and excessive thickness in the output image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a photovoltaic panel crack detection method based on a dual-channel multi-scale attention mechanism. Background Art

[0002] The concept of PERC was first introduced by Blakers et al. in 1989. After years of development, PERC solar cells have adopted technologies such as atomic layer deposition for backside passivation, improving passivation quality and achieving high open-circuit voltage. It is well known that when long-wavelength sunlight passes through thin silicon wafers, it is not well utilized in traditional solar cells. However, the higher backside reflectivity of PERC solar cells effectively utilizes long-wavelength light, improving long-wavelength absorption and generating higher short-circuit current density. EL imaging can quickly identify defects by observing brightness differences between different areas.

[0003] Classic edge detection methods use the first-order or second-order gradient information of an image to extract edges. This type of method has good real-time performance, but is easily affected by factors such as noise and lighting, and has poor accuracy.

[0004] The RCF (Richer convolutional features for edge detection) method, based on the Holistically-Nested Edge Detection (HED) model, utilizes richer convolutional features for processing, resulting in more accurate edge output and a robust loss function. However, while convolutional layers in a network can capture useful information, intermediate layers, which contain high-level features, possess richer semantics than the underlying layers. As convolutional features become increasingly coarse, much of the useful information in these layers is lost during the convolution process, resulting in insufficient extraction of detailed image features and the resulting blurred, discontinuous, and overly thick edges in the output image. Summary of the Invention

[0005] To address the shortcomings of existing methods, this paper first constructs a dual-channel backbone network consisting of a semantic branch channel and a spatial detail branch channel. Secondly, a multi-scale attention mechanism is integrated into the backbone network. By transforming the channel, height, and width dimensions, feature weights are redistributed and complementary fusion is achieved for multi-level utilization. Finally, a dilation fusion module is integrated into the semantic branch channel, and the side outputs of the last two convolutional blocks of the semantic branch are fused using the dilation method. This results in smoother, more continuous, and richer detected image crack details.

[0006] The technical solution adopted by the present invention is: a photovoltaic panel crack detection method based on a dual-channel multi-scale attention mechanism includes the following steps:

[0007] Step 1: Collect solar cell EL image data and construct defect and normal image datasets;

[0008] Step 2: Construct a dual-channel neural network model of semantic branch channel and spatial detail branch channel; fuse the semantic branch channel using the multi-scale attention mechanism module and the multi-channel dilated convolution fusion module; fuse the spatial detail branch channel using the multi-scale attention mechanism module; and fuse the fused semantic branch channel and the fused spatial detail branch channel again;

[0009] Step 3: Use binary cross entropy and Dice loss to jointly construct a loss function to predict whether the photovoltaic panel has defects.

[0010] Furthermore, the semantic branch channel consists of five depthwise convolution blocks. The first branch of the input image passes through the first, second, and third depthwise convolution blocks in sequence. The second and third convolution blocks are input into the multi-scale attention mechanism module as the second branch. The first and second branches are fused and then input into the fourth and fifth depthwise convolution blocks. The fourth and fifth depthwise convolution blocks are respectively input into the convolution layer and then into the multi-channel dilated convolution fusion module. The convolution kernel of the convolution layer is set to 3×3.

[0011] The structure of the five depthwise convolutional blocks is:

[0012]

[0013]

[0014] Among them, k is the convolution kernel, c is the number of channels, s is the step size, r is the number of repetitions, and each depth convolution block is operated twice.

[0015] Furthermore, the spatial detail branch channel consists of three residual convolution blocks. The first branch of the input image passes through the first, second and third residual convolution blocks in sequence; the second and third convolution blocks are input into the multi-scale attention mechanism module as the second branch, and the first and second branches are fused.

[0016] The structures of the three residual convolution blocks are:

[0017]

[0018] Among them, k is the convolution kernel, c is the number of channels, s is the step size, and r is the number of repetitions.

[0019] Furthermore, the residual convolution block consists of three convolutional layers and a residual path, with convolution kernels of 1×1, 3×3, and 1×1 respectively. Each layer after the convolution layer is batch normalized and activated by ReLu after fusion.

[0020] Furthermore, the main path of the depthwise convolutional block consists of four convolutional layers with kernels of 3×3, 3×3, 3×3, and 1×1 respectively; the residual path consists of two convolutional layers with kernels of 3×3 and 1×1 respectively; each layer after the convolutional layer is batch normalized and activated by ReLu after fusion.

[0021] Furthermore, the multi-scale attention mechanism module inputs the image into a 3×3 convolution block to obtain a feature map F1=C×H×W; the input feature F1=C×H×W is subjected to maximum pooling and average pooling to obtain F 1max =1×H×W and F 1avg =1×H×W; then F 1max With F 1avg Based on the channel splicing, we get F 1max+avg =2×H×W feature map; perform convolution compression on the feature map to a feature map with a channel number of 1, and then obtain the spatial weight value after BN normalization and Sigmoid function activation operation, and weight the spatial weight value to the channel feature F1 to obtain the spatial weight feature map M s1 =1×H×W;

[0022] And transform F1 into feature maps F2 = H × C × W and F3 = W × H × C by transposition, and then undergo maximum pooling, average pooling, convolution, BN normalization, Sigmoid function activation operation, and transpose with the feature maps F2 and F3 weighted to obtain the spatial weight feature map M s2 =1×H×W and M s3 =1×H×W;

[0023] M s2 、M s3 With M s1 After concat connection and convolution operation, the multi-scale spatial weight feature map M is obtained s ;M s The calculation formula is shown in formula (1):

[0024]

[0025] Among them, σ represents the activation function Sigmoid, Represents the concatenation operation, and conv represents the convolution operation.

[0026] Furthermore, the multi-channel dilated convolution fusion module has two layers, which use dilated convolutions with dilation rates of 1 and 2 and global pooling operations to extract multi-scale features respectively; by connecting four feature information of different channels and scales, multi-scale feature output is achieved, and the obtained features are fused through channels.

[0027] Furthermore, the formula for constructing the loss function by combining binary cross entropy and Dice loss is:

[0028] L=L BCE +L DL (2)

[0029]

[0030]

[0031] Among them, N is the total number of samples, r i Indicates the label value of the i-th pixel, p i Represented as the predicted value of the i-th pixel.

[0032] Beneficial effects of the present invention:

[0033] 1. Make full use of the multi-layer information of the image and perform comprehensive image-to-image prediction to achieve low-level edges, boundaries and target contours.

[0034] 2. Design a multi-scale attention mechanism module and add it to the network. By transforming the channel, height, and width dimensions, it can redistribute feature weights and achieve complementary fusion, thus achieving multi-level utilization.

[0035] 3. Utilize the multi-channel void fusion module to maximize the transmission and use of feature information between network layers, greatly improving the feature extraction capability, while enhancing network performance and reducing the interference of network noise;

[0036] 4. The present invention is experimentally compared with RCF, HED, and FCN networks. The precision P reaches 69.1%, the recall R reaches 84.9%, and the highest F1 reaches 76.18%, indicating that the present invention has high ability to extract crack features, good ability to suppress noise interference, and good network performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is the logic diagram of the photovoltaic panel crack detection method based on the dual-channel multi-scale attention mechanism of the present invention;

[0038] Figure 2 (a) and Figure 2 (b) is the structure diagram of the residual convolution block and the depth convolution block;

[0039] Figure 3 is a multi-scale learning structure diagram of the present invention;

[0040] Figure 4 is the multi-scale attention mechanism module of the present invention;

[0041] Figure 5 It is a multi-channel dilated convolution fusion module;

[0042] Figure 6 PR curves comparing the present invention, HED, FCN, and RCF methods;

[0043] Figure 7 (a), (b), and (c) are the comparison results of the original image, Experiment 2, and Experiment 3, respectively. DETAILED DESCRIPTION

[0044] The present invention will be further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore only shows the components related to the present invention.

[0045] This data was compiled using Python and the Tensorflow 2.0 deep learning framework, running on an Ubuntu 16.4 operating system with an Intel Core i9-6700HQ CPU and an NVIDIA GeForce GTX 2080Ti graphics card. PyCharm was used as the compiler, using Python version 3.8. The experimental results were visualized using the matplotlib module.

[0046] This experiment uses a dataset from the solar cell EL image dataset published online by Buerhop-Lutzc et al., consisting of 2,624 300×300 pixel electroluminescence (EL) images. This dataset includes images with varying degrees of defects, all of which have been standardized. 600 EL images were selected and randomly divided into training, test, and validation sets.

[0047] like Figure 1 A photovoltaic panel crack detection method based on a dual-channel multi-scale attention mechanism is a network model, which includes the following steps:

[0048] The network backbone consists of two channels: a semantic branch channel and a spatial detail branch channel. Different channels correspond to different functions. The spatial detail branch channel consists of three convolutional blocks, capturing low-level features and shallow spatial details. The semantic branch channel consists of five deep convolutional blocks. Through a fast downsampling strategy, the receptive field is expanded, the channel captures high-level semantics, and improves feature representation. A multi-scale attention mechanism module is embedded in both the spatial detail branch and the semantic branch, and the side outputs of the last two convolutional blocks of the semantic branch are fused using a dilation method. This enhances network performance while reducing noise interference.

[0049] The spatial detail branch consists of three convolutional blocks, while the semantic branch consists of five deep convolutional blocks. The deep convolutional blocks use two downsampling methods to reduce features. The output features of the two branches are then concatenated as the output. This structure has high computational efficiency and high feature expression capabilities.

[0050] Table 1. Structural composition of spatial detail branches and semantic branches

[0051]

[0052]

[0053] Among them, ConV is the convolution block, Deep ConV is the depth convolution block, k is the convolution kernel, c is the number of channels, s is the step size, and r is the number of repetitions.

[0054] In theory, during the feature extraction process, increasing the depth or width of the neural network can improve the details and abstraction capabilities of the extracted features. However, if only a simple layer addition operation is performed, there will be problems with gradient explosion or gradient diffusion. Traditional methods, such as normalized initialization and batch normalization, can solve the gradient problem, but will lead to decreased network performance. Researchers have proposed a residual network to overcome the shortcomings of neural networks that suffer from decreased performance due to increased depth. Its main idea is the same as that of the Highway network: by establishing a short-circuit connection "skip connection" between the front and back layers, it helps the gradient to effectively backpropagate during training, thereby training a deeper convolutional neural network. Therefore, the backbone network uses a residual convolution block.

[19] , and then updated to the depth convolution block on this basis. The depth convolution block continues the idea of ​​the residual convolution block, adding convolution layers on the residual path, making full use of the residual path and improving the convolution depth of the network.

[0055] like Figure 2 (a) The residual convolution block consists of three convolutional layers and a residual path, where the convolution kernels are 1×1, 3×3, and 1×1 respectively. Each layer after the convolution layer is batch normalized and activated by ReLu after fusion.

[0056] like Figure 2 (b) The depthwise convolution block is composed of two paths, where the main path consists of four convolutional layers with kernels of 3×3, 3×3, 3×3, and 1×1, respectively. The residual path consists of two convolutional layers with kernels of 3×3 and 1×1, respectively. Each layer after the convolutional layer is batch normalized and activated by ReLu after fusion.

[0057] In order to further extract the deep features of the network and improve the depth of the network and the recognition accuracy of the model, the attention mechanism module (Coordinate Attention) is improved and a multi-scale attention mechanism module (Multi-Coordinate Attention) is proposed. Figure 3 、 4 As shown, the attention mechanism module helps capture cross-channel, direction-aware, and position-aware information, thereby improving the model's accuracy in localizing and identifying objects of interest. Furthermore, the CA module is flexible and lightweight, easily pluggable into classic modules to enhance features by strengthening the representation of feature information. As a pre-trained model, the CA module can significantly improve the performance of downstream tasks based on lightweight networks, especially those requiring dense predictions (such as semantic segmentation). Figure 3 This is a multi-scale learning algorithm, meaning that in parallel networks, each network achieves multi-scale results with different parameters and receptive field sizes. The input image is processed simultaneously by multiple networks, and the features generated by these networks directly reflect information at different scales. Considering the attention mechanism from a channel and spatial perspective, the direct dependency between the degree of correlation between channels and spatial pixels is constructed, allowing the network to focus more on detailed features.

[0058] MCA greatly improves the depth of the attention mechanism by transforming the three dimensions of the image C×H×W in pairs while keeping the dimensions unchanged.

[0059] The multi-scale attention mechanism transforms the input feature dimension. First, the input image is input into a 3×3 convolution block to obtain a feature map F1=C×H×W, and F1 is transformed into feature maps F2=H×C×W and F3=W×H×C by transposition. Secondly, the input feature F1=C×H×W is subjected to maximum pooling and average pooling to obtain F 1max =1×H×W and F 1avg =1×H×W; then F 1max With F 1avg Based on the channel splicing, we get F 1max+avg =2×H×W feature map; perform convolution compression on the feature map to a feature map with a channel number of 1, and then obtain the spatial weight value after BN normalization and Sigmoid function activation operation, and weight the spatial weight value to the channel feature F1 to obtain the spatial weight feature map M s1 =1×H×W.

[0060] At the same time, the spatial weight feature map M is obtained through the same transformation s2 With M s3 , the two spatial weight feature maps M s2 With M s3 Transpose and M s1The multi-scale spatial weight feature map M is obtained by splicing, fusion and convolution operations. s ;M s The calculation formula is shown in formula (1):

[0061]

[0062] Among them, σ represents the activation function Sigmoid, Represents the concatenation operation, and conv represents the convolution operation.

[0063] Neural networks are usually inseparable from downsampling operations. Continuous downsampling will cause the spatial resolution of feature maps to drop significantly, and if the compression level is high, it will also make it more difficult to restore the original image size by upsampling or deconvolution. Dilated convolution optimizes this problem very well. Without pooling and under the same computing conditions, it increases the receptive field and improves the network's expressive power. Since the sampling points of dilated convolution in the input feature layer are relatively sparsely distributed, the network easily loses a large number of local detail features, resulting in poor performance in the segmentation of small-scale targets and local boundaries. In view of the advantages and disadvantages of dilated convolution, the present invention utilizes a multi-channel dilated convolution fusion module (HAC). The feature maps of different convolutional layers contain a large number of different semantic features. The feature maps of the high and low layers are simultaneously subjected to convolution kernels with different dilation rates. By using dilated convolutions with different expansion rates, receptive fields of different sizes can be obtained. These feature maps are fused to effectively extract detail information distributed in different ranges. In this way, the dimension of the output feature map can be increased, thereby improving the depth and accuracy of the network, effectively capturing local details, and further improving model performance.

[0064] like Figure 5 As shown in the figure, the multi-channel atrous convolution fusion module has two layers, using atrous convolutions with dilation rates of 1 and 2, respectively, and global pooling to extract multi-scale features. This extracts detailed information within different ranges. By concatenating four features from different channels and scales, multi-scale feature output is achieved, and the resulting features are then fused across channels.

[0065] Since photovoltaic panel crack detection only has two categories, crack and background, the crack area occupies a small area compared to the entire background. The imbalanced sample problem with a large background proportion and a small object proportion is a binary classification problem. Therefore, binary cross entropy (Binary Cross Entropy) and Dice loss are combined as the loss function. Dice loss can alleviate the negative impact of the imbalance between foreground and background (area) in the sample, but it focuses more on mining the foreground area, which will lead to loss saturation. Therefore, combining binary cross entropy as the loss function of the present invention can effectively alleviate this problem.

[0066] L=LBCE +L DL (2)

[0067]

[0068]

[0069] Among them, N is the total number of samples, r i Indicates the label value of the i-th pixel, p i Represented as the predicted value of the i-th pixel.

[0070] Evaluation indicators

[0071] In order to conduct an objective quantitative analysis of the experimental results, precision (P), recall (R), and balanced mean (F1) are selected as evaluation indicators that comprehensively consider precision and recall. Precision represents the ratio of the number of correctly detected crack pixels to the total number of detected pixels; recall represents the ratio of the number of correctly detected crack pixels to the total number of actual crack pixels. Precision and recall are important indicators for evaluating the quality of the model. The F value calculated based on precision and recall is used as the overall indicator for performance evaluation. The higher the balanced mean, the better the model quality. The formulas for P, R, and F1 are shown in Equations (5)-(7):

[0072]

[0073]

[0074]

[0075] TP (true positive) represents the true value, that is, the model detects real cracks as cracks; FP (false positive) represents the false positive value, that is, the model mistakenly detects the background as cracks; FN (false negative) represents the false negative value, that is, the model mistakenly detects cracks as background.

[0076] Comparative experiment

[0077] In order to fully compare the performance of the method of the present invention and other models in crack detection, the experimental results of the multi-scale attention mechanism network model of the present invention are compared with the experimental results of classic segmentation algorithms such as HED, FCN, and RCF to verify the effectiveness of the algorithm.

[0078] On the electroluminescence dataset, the PR curves of different models are shown in Figure 6In the PR curve, the horizontal axis represents precision (P) and the vertical axis represents recall (R). The overall performance of this curve provides a more comprehensive assessment of model performance. The larger the area covered by the curve, the better the performance. The results of each model on the electroluminescence dataset show that the HED and RCF networks achieved precision (P) of 66.51% and 67.80%, recall (R) of 76.96% and 87.73%, and F1 scores of 72.35% and 75.81%, respectively. The HED network is an improvement on the VGG16 network, adding side output layers for multi-scale and multi-layer learning. The last pooling layer and fully connected layer are removed to save memory and time. Leveraging the feature extraction capabilities of the VGG network, it operates directly on the entire image and, through deep supervision, fuses the side outputs at different scales to achieve superior edge detection results. However, as the network depth increases, the resolution of deep features decreases, resulting in information loss and affecting edge refinement. The RCF network is a deep learning model that further improves the HED network. To improve model accuracy, the RCF network removes the last pooling layer and fully connected layer of the HED network, forming a fully convolutional network. Furthermore, the RCF network employs upsampling techniques, connecting all upsampling layers and fusing features from each stage to better extract edge information from the image. Furthermore, the RCF network creatively proposes a loss function tailored to the training sample, further improving model performance. Consequently, the RCF network outperforms the HED network. The FCN network achieves a precision (P) of 62.22%, a recall (R) of 81.68%, and an F1 score of 74.64%. The FCN network can handle input images of arbitrary size. Deconvolution layers upsample the feature maps of the last convolutional layer to restore them to the same size as the input image, enabling pixel-by-pixel predictions while preserving the spatial information in the original input image. However, due to a lack of spatial consistency, the FCN network ignores the relationships between pixels during pixel classification, failing to consider the spatial regularization step commonly used in pixel-based segmentation methods. The multi-scale attention mechanism network model proposed in this invention takes into account the characteristics of the coordinate space. The PR curve of the multi-scale attention mechanism network model is generally at the top of the image, with a precision rate P of 69.1%, a recall rate R of 84.9%, and a maximum F1 of 76.18%. This shows that the dual-channel multi-scale attention mechanism network model has a high ability to extract crack features, a good ability to suppress noise interference, and good network performance.

[0079] Ablation experiment:

[0080] To verify the performance improvement of the multi-scale attention mechanism module designed in this paper, we conducted ablation experiments between these modules. A comparative experiment was conducted on an electroluminescence dataset, with all parameter settings, learning rates, and loss functions kept consistent. The ablation experiments were divided into two groups: the first group used a dual-channel network with a multi-channel dilation fusion module but without the multi-scale attention mechanism module; the second group included the multi-scale attention mechanism module in addition to the first group.

[0081] from Figure 7 (a) Figure 7 (b) Figure 7 As can be seen in (c), the cracks detected in Experiment 1 are discontinuous, some cracks cannot be detected, and some background is mistakenly detected as cracks; the cracks detected in Experiment 2 are continuous and relatively complete, and the background and cracks are better separated.

[0082] In summary, the multi-scale attention mechanism module and the multi-channel void fusion module proposed in this invention improve the performance of the network. At the same time, the combination experiment of the two modules can achieve the optimal detection performance.

[0083] With the above-described preferred embodiments of the present invention as a guide, and with reference to the above description, relevant personnel are fully capable of making various changes and modifications without departing from the technical scope of this invention. The technical scope of this invention is not limited to the contents of the specification and must be determined according to the scope of the claims.

Claims

1. A photovoltaic panel crack detection method based on a dual-channel multi-scale attention mechanism, characterized in that: The following steps are involved: Step 1: Collect solar cell EL image data and construct defect and normal image datasets; Step 2: Construct a dual-channel neural network model of semantic branch channel and spatial detail branch channel; fuse the semantic branch channel using the multi-scale attention mechanism module and the multi-channel dilated convolution fusion module; fuse the spatial detail branch channel using the multi-scale attention mechanism module; and fuse the fused semantic branch channel and the fused spatial detail branch channel again; The semantic branch channel consists of five depthwise convolution blocks. The first branch of the input image passes through the first, second, and third depthwise convolution blocks in sequence. The second and third convolution blocks are input into the multi-scale attention mechanism module as the second branch. The first and second branches are fused and input into the fourth and fifth depthwise convolution blocks. The fourth and fifth depthwise convolution blocks are respectively input into the convolution layer and then into the multi-channel dilated convolution fusion module. The structure of the five depthwise convolutional blocks is: Among them, k is the convolution kernel, c is the number of channels, s is the step size, and r is the number of repetitions; The spatial detail branch channel consists of three residual convolution blocks. The first branch of the input image passes through the first, second, and third residual convolution blocks in sequence. The second and third convolution blocks are input into the multi-scale attention mechanism module as the second branch, and the first and second branches are fused. The structures of the three residual convolution blocks are: Among them, k is the convolution kernel, c is the number of channels, s is the step size, and r is the number of repetitions; The multi-scale attention mechanism module inputs the image into a 3×3 convolution block to obtain a feature map F1=C×H×W; F1=C×H×W is subjected to maximum pooling and average pooling to obtain F 1max =1×H×W and F 1avg =1×H×W; then F 1max With F 1avg Based on the channel splicing, we get F 1max+avg =2×H×W feature map; perform convolution compression on the feature map to a feature map with a channel number of 1, and then obtain the spatial weight value after BN normalization and Sigmoid function activation operation, and weight the spatial weight value to the feature F1 of the channel to obtain the spatial weight feature map M s1 =1×H×W; F1 is transformed into feature maps F2 = H × C × W and F3 = W × H × C by transposition, and then subjected to maximum pooling, average pooling, convolution, BN normalization, and Sigmoid function activation operations, and then weighted with feature maps F2 and F3 and transposed to obtain spatial weight feature maps M s2 =1×H×W and M s3 =1×H×W; Will M s2 、 M s3 and M s1 After concat connection and convolution operation, a multi-scale spatial weight feature map is obtained M s ; M s The calculation formula is shown in formula (1): (1) in, represents the activation function Sigmoid, Represents the concatenation operation, and conv represents the convolution operation; Step 3: Use binary cross entropy and Dice loss to jointly construct a loss function to predict whether the photovoltaic panel has defects.

2. The photovoltaic panel crack detection method based on the dual-channel multi-scale attention mechanism according to claim 1 is characterized by: The residual convolution block consists of three convolutional layers and a residual path. The convolution kernels are 1×1, 3×3, and 1×1 respectively. Each layer after the convolution layer is batch normalized and activated by ReLu after fusion.

3. The photovoltaic panel crack detection method based on the dual-channel multi-scale attention mechanism according to claim 1 is characterized by: The main path of the depthwise convolutional block consists of four convolutional layers with kernels of 3×3, 3×3, 3×3, and 1×1, respectively. The residual path consists of two convolutional layers with kernels of 3×3 and 1×1, respectively. Batch normalization is performed after each convolutional layer, and ReLu activation layer operation is performed after fusion.

4. The photovoltaic panel crack detection method based on dual-channel multi-scale attention mechanism according to claim 1 is characterized in that: The multi-channel dilated convolution fusion module has two layers, which use dilated convolution with dilated rates of 1 and 2 and global pooling operations to extract multi-scale features. By connecting four feature information of different channels and scales, multi-scale feature output is achieved, and the obtained features are fused through channels.

5. The photovoltaic panel crack detection method based on dual-channel multi-scale attention mechanism according to claim 1 is characterized in that: The formula for constructing the loss function by combining binary cross entropy and Dice loss is: (2) (3) (4) in, is the total sample size, Represents the label value of the i-th pixel, Expressed as i The predicted value of each pixel.

Citation Information

Patent Citations

  • Multi-scale image restoration method, storage medium and terminal

    CN115018727A

  • Remote sensing image road extraction method based on multi-dimensional and multi-scale U-net network

    CN115471754A