Bonding area quantification method based on PSA-UNet network

Through the quantitative method of bond area based on PSA-UNet network, the problem of inaccurate bond area statistics in the semantic segmentation of C-scan layered slices is solved, and the bonding agent for building exterior wall insulation layer is realized The accurate detection improves detection accuracy and efficiency.

CN119251277AInactive Publication Date: 2025-01-03CHONGQING INNOVATION CENTER OF BEIJING INSTITUTE OF TECHNOLOGY +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411121445.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing ground penetrating radar technology has limitations in the detection of the insulation layer of building exterior walls, especially the semantic segmentation of C-scan layered slices, resulting in unclear statistics and inaccurate statistics, and the adhesion effect cannot be accurately evaluated. .

Method used

Using the bond area quantification method based on PSA-UNet network, the depth C-scan slices are obtained through simulation and measured data, the annotation is converted into a mask binary graph, and the binary cross entropy, IOU and focus loss functions are fused, and the Polarized Self is added. -Attention self-attention mechanism, train the network for semantic segmentation, and recognize the adhesive edge of the segmented image through contour detection and binarized filling to count the adhesive area.

Benefits of technology

Accurate semantic segmentation of multiple, dispersed and irregular target characteristics of the insulation board adhesive is achieved, the accuracy of the adhesive area statistics is improved, misjudgment is avoided, and quantitative analysis of the adhesive area is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251277A_ABST
    Figure CN119251277A_ABST
Patent Text Reader

Abstract

The invention provides a bonding area quantification method based on a PSA-UNet network, and the method comprises the steps: obtaining depth C-scan slices in a plurality of scenes based on simulated and actually measured ground penetrating radar data, carrying out the marking of the depth C-scan slices, converting the depth C-scan slices into corresponding mask binary images, and carrying out the construction of a data set; fusing the binary cross entropy loss function, the IOU loss function and the focus loss function to obtain a target loss function; a Polarized Self-Attention self-attention mechanism is added in an up-sampling stage of the U-Net model, a PSA-UNet network is constructed and obtained, and training is carried out through a data set; carrying out semantic segmentation on a to-be-identified image by adopting the trained network, and identifying the edge of an adhesive to carry out binarization filling; and based on the filled image, carrying out statistics to obtain a bonding area. According to the method, the insulation board and a plurality of non-uniform and dispersed adhesive objects can be efficiently and accurately segmented, and the accuracy of counting the bonding area is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ground penetrating radar data processing, and in particular to a bonding area quantification method based on a PSA-UNet network. Background Art

[0002] Ground penetrating radar (GPR) technology is based on the differences in parameters of different underground material media. It emits broadband electromagnetic wave pulses to achieve accurate survey of the internal structure or construction of non-visual objects below the surface.

[0003] The insulation layer of the building's exterior wall often has various defects, which will eventually lead to the loss of the adhesive area of ​​the exterior wall insulation board, which will have a negative impact on its insulation effect and energy consumption, and cause safety hazards. In the field of construction engineering quality monitoring, the detection of building exterior wall insulation layer defects has always been a key and complex challenge. Due to the above-mentioned advantages, ground penetrating radar has more advantages than other methods in the detection of insulation layer defects. In the detection of the building's exterior wall insulation layer by ground penetrating radar, by scanning the building's exterior wall, information such as the thickness and internal structure of the insulation layer can be obtained, and then the area ratio of its adhesive can be determined. The technical standard for exterior wall insulation engineering stipulates that the minimum bonding area of ​​XPS insulation board is 50%. Therefore, it is necessary to accurately detect the bonding area of ​​the building's exterior wall insulation layer to determine whether the bonding area meets the engineering standards.

[0004] At present, there are many research results on the semantic segmentation of ground penetrating radar echo B-scan images, especially the segmentation of hyperbolas, at home and abroad, such as: deep convolutional neural network (DCNN), Deeplabv3+ semantic segmentation algorithm, Mask R-CNN and pixel-level generative adversarial network (Pixel to Pixel Image Translation with GAN, Pix2pix GAN) method. However, the above methods are more effective for B-scan slices, but have certain limitations for C-scan layered slices. Therefore, there are problems of unclear and inaccurate statistics on the effective bonding area of ​​the insulation layer adhesive, which makes it impossible to accurately evaluate its bonding effect. In the current field of C-scan layered deep slice analysis, no algorithm specifically for semantic segmentation has been implemented, especially when faced with multiple, scattered and irregular target features presented by insulation board adhesives, the difficulty of the segmentation task is significantly increased. This complexity is not only due to the diversity of target morphology, but also due to their irregular distribution in the slices and possible overlap, which brings great challenges to automatic recognition and segmentation.

[0005] Therefore, there is an urgent need for a semantic segmentation method that can efficiently and accurately handle the multi-target, uneven and scattered targets of insulation board adhesives, so as to accurately segment the insulation boards and adhesives, and at the same time improve the accuracy of subsequent adhesive area statistics. Summary of the invention

[0006] Based on this, it is necessary to provide a bonding area quantification method based on the PSA-UNet network to address the above technical problems.

[0007] A bonding area quantification method based on a PSA-UNet network comprises the following steps: based on simulated and measured ground penetrating radar data, obtaining deep C-scan slices in various scenes, and converting the deep C-scan slice annotations into corresponding mask binary images to construct a data set; fusing a binary cross entropy loss function, an IOU loss function and a focal loss function as a target loss function; adding a Polarized Self-Attention mechanism in the upsampling stage of a U-Net model to construct a PSA-UNet network, and training the network with the data set; using the trained PSA-UNet network to perform semantic segmentation on an image to be identified, and identifying the adhesive edge of the segmented image by contour detection, and performing binary filling; and obtaining the bonding area of ​​the adhesive based on the binary filled image by statistics.

[0008] In one embodiment, the ground penetrating radar data based on simulation and measurement are used to obtain deep C-scan slices in various scenarios, and the deep C-scan slices are annotated and converted into corresponding mask binary images to construct a data set, including: obtaining simulated and measured ground penetrating radar data, and obtaining deep C-scan slices in various scenarios according to the ground penetrating radar data, wherein the deep C-scan slices contain texture features for distinguishing insulation boards and adhesives; using an annotation tool to convert the deep C-scan slices into corresponding mask binary images, wherein the insulation board background is annotated as white and the adhesive is annotated as black; constructing a data set based on the depth C-scan slices and the corresponding mask binary images, wherein the data set is used for PSA-UNet network training.

[0009] In one of the embodiments, the method further includes: enhancing the data set using an offline data enhancement method.

[0010] In one embodiment, the objective loss function is:

[0011] l=l1l BCE +l2l Iou +l3l Focal

[0012] In the formula, lBCE is the binary cross entropy loss function, l Iou is the Iou loss function, l Focal is the focal loss function, and λ1,λ2,λ3 are the hyperparameters of each loss function.

[0013] In one of the embodiments, the trained PSA-UNet network is used to perform semantic segmentation on the image to be identified, and the adhesive edge of the segmented image is identified through contour detection to perform binary filling, including: using the trained PSA-UNet network to perform semantic segmentation on the image to be identified to obtain a segmented image that divides the insulation board and the adhesive area; using a contour detection function, the outermost contour of the adhesive on the segmented image is detected to obtain contour information; based on the contour information, the corresponding area inside the contour in the segmented image is binarized and filled.

[0014] In one of the embodiments, the bonding area of ​​the adhesive is obtained based on the binary filled image, including: based on the binary filled image, area pixel statistics are performed to obtain the total area, and black pixel points corresponding to the adhesive are counted to obtain the effective bonding area; based on the effective adhesive and the total area, the proportion of the adhesive area in the entire insulation board is calculated.

[0015] Compared with the prior art, the advantages and beneficial effects of the present invention are as follows: based on simulated and measured ground penetrating radar data, deep C-scan slices in various scenarios are obtained, and the deep C-scan slice annotations are converted into corresponding mask binary images to construct a data set; the binary cross entropy loss function, IOU loss function and focal loss function are fused as the target loss function, and the segmentation performance of the U-Net model is improved by improving the loss function; Polarized The Self-Attention mechanism is used to construct the PSA-UNet network, which is then trained using a data set. The trained PSA-UNet network is used to perform semantic segmentation on the insulation board and adhesive in the image to be identified, and the adhesive edge is identified through contour detection of the segmented image, which is then binarized and filled to avoid misjudgment. Based on the binary-filled image, the bonding area of ​​the adhesive is statistically obtained to achieve quantitative analysis of the bonding area of ​​the adhesive, thereby achieving accurate and efficient semantic segmentation of the C-scan layered deep slices of multiple, scattered and irregular target features presented by the insulation board adhesive, thereby improving the accuracy of the bonding area of ​​the insulation layer adhesive. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 The figure is a flow chart of a bonding area quantification method based on the PSA-UNet network in one embodiment.

[0017] Figure 2 It is a comparison diagram of different numbers of adhesives before and after data enhancement in an embodiment.

[0018] Figure 3(a) is a schematic diagram of the structure of the Polarized Self-Attention mechanism in one embodiment; Figure 3(b) is a structural diagram of the improved PSA-UNet network model.

[0019] FIG4( a ) is a graph of the training loss during the training process using the improved PSA-UNet network model in one embodiment; FIG4( b ) is a graph of the accuracy change during the training process using the improved PSA-UNet network model.

[0020] Figure 5(a) is a diagram of the insulation board set up in the experimental scene in one embodiment; Figure 5(b) is a diagram of the C-scan slice imaging result selected by the ground penetrating radar; Figure 5(c) is a diagram of the segmentation result of U-Net before the improved loss function; Figure 5(d) is a diagram of the segmentation result of the model after the improved loss function; Figure 5(e) is a diagram of the segmentation result of the proposed improved model PSA-UNet; Figure 5(f) is a diagram of the proposed contour detection binary adhesive edge filling result.

[0021] FIG6(a) is a schematic diagram of the recognition results of the number and position of adhesives; FIG6(b) is a diagram of the statistical results of the position and area of ​​adhesives. DETAILED DESCRIPTION

[0022] Before describing the specific embodiments of the present invention, the overall concept of the present invention is described as follows:

[0023] The present invention is mainly developed based on ground penetrating radar data processing and semantic segmentation process. At present, there is a problem of difficulty in semantic segmentation of C-scan layered depth slices of multiple, scattered and irregular target features presented by the insulation board adhesive, as well as unclear and inaccurate statistics of the effective bonding area of ​​the insulation layer adhesive.

[0024] Therefore, the present invention proposes a bonding area quantification method based on the PSA-UNet network. Based on simulated and measured ground penetrating radar data, the deep C-scan slices in various scenes are obtained, and the deep C-scan slice annotations are converted into corresponding mask binary images to construct a data set; the binary cross entropy loss function, IOU loss function and focal loss function are fused as the target loss function, and the segmentation performance of the U-Net model is improved by improving the loss function; Polarized The Self-Attention mechanism is used to construct the PSA-UNet network, which is then trained using a data set. The trained PSA-UNet network is used to perform semantic segmentation on the insulation board and adhesive in the image to be identified, and the adhesive edge is identified through contour detection of the segmented image, which is then binarized and filled to avoid misjudgment. Based on the binary-filled image, the bonding area of ​​the adhesive is statistically obtained to achieve quantitative analysis of the bonding area of ​​the adhesive, thereby achieving accurate and efficient semantic segmentation of the C-scan layered deep slices of multiple, scattered and irregular target features presented by the insulation board adhesive, thereby improving the accuracy of the bonding area of ​​the insulation layer adhesive.

[0025] After introducing the overall concept of the present invention, in order to make the purpose, technical solution and advantages of the present invention more clear, the present invention is further described in detail by specific implementation methods in combination with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0026] In one embodiment, Figure 1 As shown, a bonding area quantification method based on a PSA-UNet network is provided, comprising the following steps:

[0027] Step S101, based on simulated and measured ground penetrating radar data, obtain depth C-scan slices in various scenes, and convert the depth C-scan slice annotations into corresponding mask binary images to construct a data set.

[0028] Specifically, when processing simulated and measured ground penetrating radar data, slices of the depth C-scan (three-dimensional image) in the depth direction under different scenarios are obtained, and the depth C-scan slices are used as the data basis for further processing and annotation to convert them into corresponding mask binary images. When annotating, the insulation board background can be marked as white and the adhesive can be marked as black, so that the information extracted from the original ground penetrating radar data can be accurately and efficiently converted into a recognizable binary image; based on the obtained depth C-scan slices and the corresponding mask binary images, a data set for U-Net network training is constructed.

[0029] Among them, step S101 includes: obtaining simulated and measured ground penetrating radar data, and obtaining deep C-scan slices in various scenarios according to the ground penetrating radar data, wherein the deep C-scan slices contain texture features for distinguishing insulation boards and adhesives; using a labeling tool to convert the deep C-scan slices into corresponding mask binary images, wherein the insulation board background is marked as white and the adhesive is marked as black; constructing a data set based on the deep C-scan slices and the corresponding mask binary images, and the data set is used for PSA-UNet network training.

[0030] Specifically, simulated and measured ground penetrating radar data in various scenarios are obtained, and multiple two-dimensional profiles are simultaneously collected based on the ground penetrating radar data to achieve three-dimensional data acquisition, and deep C-scan slices are obtained, and the slices contain texture features for distinguishing between insulation boards and adhesives; based on the different texture features of insulation boards and adhesives, the deep C-scan slice annotations are converted into corresponding mask binary images through annotation tools such as labelimg. When annotating, the insulation board as the background can be marked as white, and the adhesive as the identification target can be marked as black, so as to distinguish between the two; a data set is constructed based on the deep C-scan slices and the corresponding mask binary images, which is used for subsequent training of the PSA-UNet network to achieve quantification of the bonding area of ​​the adhesive.

[0031] In addition, since the image size used for U-Net network training has certain restrictions, if the image size difference is too large, the network will deviate when processing images of different sizes, which will affect the training results. Therefore, when training the U-Net network, all input images need to be adjusted to the same size. At the same time, since the U-Net network needs to splice the feature maps after multiple downsampling, the size of the input image must be an integer power of 2, otherwise it will cause the size to not match when the feature maps are spliced. In order to ensure the accuracy and stability of the training, the image size can be adjusted to a uniform pixel, such as 512×512 pixels, through the dataset batch processing program to adapt it to the input requirements of the U-Net network.

[0032] This also includes: using offline data enhancement methods to enhance the data set.

[0033] like Figure 2 As shown in the figure, since the ground penetrating radar data collected by simulation and measurement are limited, the offline data enhancement method can be used to enhance the data set to improve the richness of the data set. Before data enhancement, the radar map and the mask map are relatively regular. After data enhancement, the radar map and the mask binary map will be distorted synchronously.

[0034] In order to improve the diversity and richness of the data set, the technical strategy of offline data enhancement is adopted. By transforming, expanding and combining the existing data, the scale of the data set is effectively expanded, thereby improving the accuracy and reliability of model training. The final data set includes simulation data, measured data and data enhancement, and the pixels are all 512×512, which makes the training more stable, and the training set and validation set can be randomly divided according to the proportion.

[0035] Step S102, the binary cross entropy loss function, the IOU loss function and the focal loss function are fused as the target loss function.

[0036] Specifically, in order to improve the segmentation performance of the U-Net model, the loss function is improved, and the binary cross entropy loss function, IOU loss function and focal loss function are fused to obtain the target loss function.

[0037] Among them, the objective loss function is:

[0038] l=l1l BCE +l2l Iou +l3l Focal

[0039] In the formula, l BCE is the binary cross entropy loss function, l Iou is the Iou loss function, l Focal is the focal loss function, λ1,λ2,λ3 are the hyperparameters of each loss function, and the model is set to λ1=0.4; λ2=0.3; λ3=0.3.

[0040] Specifically, the binary cross entropy loss function can check each pixel one by one, distinguish each pixel as an adhesive or insulation board, and finally obtain the target loss by averaging the loss of each pixel, and the calculation result is relatively stable. This loss function combines the Sigmoid activation function and the binary cross entropy loss, and takes the output of the neural network (usually called logits) as input, but the output is not Sigmoid activated. Therefore, during the calculation process, the binary cross entropy loss function automatically applies the Sigmoid activation function to the logits to obtain a probability value between 0 and 1, compares the probability value with the true label value (usually one-hot encoded), and calculates the binary cross entropy loss.

[0041] The formula for the binary cross entropy loss function is:

[0042] BCEWithLogitsLoss=-ω[y n ·log(s(x n ))+(1-y n )·log(1-s(xn ))]

[0043] In the formula, ω is the weight, which is 1 for binary classification, x n is the predicted value, y n is the true value, s(x n ) is normalized to 0-1 through Sigmoid.

[0044] The binary cross entropy loss calculates the logarithmic loss between the predicted segmentation result and the label, reflecting the model's ability to distinguish between positive and negative samples. Compared with other commonly used loss functions, such as the mean square error function and the mean absolute error function, the binary cross entropy loss is more effective in dealing with binary classification problems. The image segmentation task of the U-Net network can actually be regarded as a process of carefully classifying each pixel in the image. Therefore, the binary cross entropy loss function can effectively measure the segmentation performance of the model during training. In addition, by automatically applying the Sigmoid activation function, the data instability problem that may be caused by manually applying the activation function is avoided when calculating the gradient, and the binary cross entropy loss function can also fully consider factors such as sample weights in the calculation process, so that the model can also perform well when dealing with unbalanced data sets.

[0045] In the U-Net model, the IOU loss function is used to evaluate the degree of overlap between the predicted result and the true annotation. IOU, or Intersection over Union, is a calculation indicator of the overlap ratio between the two, and its value range is between 0 and 1. When the predicted result completely overlaps with the true value, the IOU value is 1, indicating that the prediction is completely correct; when the two do not overlap at all, the IOU value is 0, indicating that the prediction is completely wrong. Therefore, the IOU loss is actually the negative of the IOU value or 1 minus the IOU value, which is used for back propagation to optimize model parameters. In the U-Net model, the IOU loss calculates the IOU loss between the predicted result and the true annotation value, and the model can learn how to predict the position and size of the target object more accurately. Compared with other loss functions, the IOU loss function has the advantages of being insensitive to scale changes and being able to directly reflect the degree of overlap between the predicted box and the true box.

[0046] The formula of the IOU loss function is:

[0047]

[0048] In the formula, X is the predicted value and Y is the true value.

[0049] The IOU loss function is integrated into the network's loss function to quantify the difference between the initial segmentation map and the manually labeled map, focusing on the overlap between the true value and the predicted value. The goal of the IOU loss is to maximize the intersection area between the prediction and the true target while minimizing the union area, thereby improving the accuracy of target detection.

[0050] The focal loss function is designed to address the class imbalance problem, especially when dealing with a dataset containing a large number of simple samples and a small number of difficult samples. It aims to strengthen the model's ability to recognize specific areas. This problem is solved by introducing a modulating factor that dynamically adjusts the weight of each sample in the loss calculation. In the U-Net model, the main purpose of introducing the focal loss function is to solve the common class imbalance problem in image segmentation tasks. In the segmentation of adhesive C-scan images, since the adhesive echo area usually occupies only a small part of the image, the model tends to be biased towards the background area during training, resulting in a decrease in the ability to recognize the adhesive area. The focal loss function increases the model's emphasis on difficult-to-classify samples by reducing the weight of easy-to-classify samples, which helps the model to handle complex segmentation areas more accurately.

[0051] Among them, the formula of the focal loss function is:

[0052]

[0053] In the formula, α is the weight coefficient for balancing positive and negative samples, γ is the parameter that controls the difference in weights between difficult and easy samples, is the coefficient that focuses on difficult samples, and y is the model's predicted probability for the sample.

[0054] In the focal loss function, when the sample is easy to classify, that is, when y is close to 1, (1-y) γ The value of will be close to 0, which reduces the weight of the easy-to-classify sample in the loss function; when the sample is a difficult-to-classify sample, that is, y is close to 0, (1-y) γ The value of will be close to 1, increasing the weight of the sample in the loss function. In this way, the focal loss function can effectively guide the model to focus on samples that are difficult to classify during training, thereby improving the model's ability to recognize regions of interest. In addition, the α term in the focal loss function is used to balance samples of different categories. In the ground penetrating radar echo image segmentation task, since the adhesive area usually occupies only a small part of the image, the weight of the adhesive area samples can be increased by setting the value of α, so that the model pays more attention to these minority samples during training.

[0055] The focal loss function can effectively deal with the problem of class imbalance. It enhances the recognition accuracy of the model for key areas by reducing the weight of easy-to-classify samples, increasing the attention to difficult-to-classify samples, and balancing the weights of samples of different categories.

[0056] The target loss function obtained by fusing the above binary cross entropy loss function, IOU loss function and focal loss function can integrate the characteristics of the three loss functions and improve the performance of the U-Net model.

[0057] In one embodiment, in order to verify the segmentation effect of the semantic segmentation model on the adhesive and the insulation board, the performance of the model is comprehensively evaluated using the intersection over union (IOU), precision, recall, accuracy, and F1-score indicators. Each of the above indicators measures the degree of consistency between the model prediction results and the actual labels from different perspectives. By using the above indicators simultaneously in the semantic segmentation task, a comprehensive evaluation of the model performance can be achieved.

[0058] For semantic segmentation, the experimental model learning rate lr = 0.0001, the optimizer is Adam, and the data set is a training set and a validation set divided into 8:2 by simulation data plus measured data (adhesive is black, epochs = 200). U-Net semantic segmentation is performed on the depth slice selected by C-scan. For other different combinations of loss functions, and the results of different hyperparameters of the loss function are compared. The experimental numerical results are shown in Table 1(a) (BL is BCELoss, SDL is SoftDiceLoss, SML is SoftMarginLoss, BWL is BCEWithLogitsLoss, IL is IouLoss, FL is FocalLoss, SIL is SoftIouLoss). Figure 5(c) shows the visual test results before the improved loss function, while Figure 5(d) shows the prediction results after the improved loss function. For easy observation, an additional border line is added. From the quantitative results of the comparative test of different loss functions, we can see that the F1-score of the U-Net semantic segmentation model trained by the improved loss function is higher than that of other loss functions in segmenting adhesive (black) and insulation board (white), reaching 0.8372. For the same test C-scan slice, before the improved loss function, the adhesive detection edge and the surrounding area are connected to each other, and the bonding phenomenon between adhesives is also particularly serious. At the same time, there is also a phenomenon of misjudging the background (insulation board) as adhesive, and the effect is very poor; after changing the loss function, there is no connection between the adhesive and the surrounding area and between adhesives, and the edge detection is good.

[0059] Table 1(a)

[0060]

[0061] Step S103, adding the Polarized Self-Attention mechanism in the upsampling stage of the U-Net model, constructing a PSA-UNet network, and training it using the data set.

[0062] Specifically, the Polarized Self-Attention mechanism is added to the U-Net model to construct the PSA-UNet network, which makes the model pay more attention to the features most relevant to the segmentation task, thereby further improving the segmentation accuracy. The PSA-UNet network is trained using a dataset to improve the network performance.

[0063] Polarized Self-Attention combines polarization and self-attention to capture local and global dependencies, and improves efficiency by introducing a polarization factor to reduce the attention between pairs of positions that need to be calculated; this mechanism can distinguish between important and unimportant parts of the input data and focus more attention on key features; in the U-Net model, this attention mechanism enables the model to better identify and segment important image areas, especially when dealing with scenes with complex textures and shape changes.

[0064] Compared with the downsampling and skip connection stages, adding the attention mechanism in the upsampling stage, that is, redistributing the weights at the end of the convolution block, has a better effect. First of all, the core of the attention mechanism is to make the model focus on the key parts of the input data while ignoring the secondary information. In the U-Net model, the main task of the upsampling part is to restore the spatial information of the image based on the features extracted by the encoder (downsampling part) to generate accurate segmentation results. Therefore, adding the attention mechanism in the upsampling stage can help the model better focus on the features most relevant to the target segmentation task, thereby improving the segmentation accuracy. Secondly, the main function of the downsampling part is to gradually reduce the resolution of the feature map through convolution and pooling operations to achieve high-level feature extraction. At this stage, although the attention mechanism can help the model focus on important features, some spatial information may be lost due to the gradual reduction in the resolution of the feature map. The skip connection part is mainly used to fuse the feature map in the encoder with the feature map in the decoder to retain more spatial information. Therefore, adding the attention mechanism in the upsampling part can more directly and effectively improve the performance of the model.

[0065] In addition, the computational complexity of the upsampling stage is relatively small, and adding an attention mechanism in this part will not significantly increase the computational complexity of the model, ensuring computational efficiency. However, adding an attention mechanism in the downsampling part or the skip connection part may increase the computational burden.

[0066] In summary, combining the attention mechanism in the upsampling stage of the U-Net model can more effectively play the advantages of the attention mechanism for the insulation board adhesive scenario, improve the segmentation performance of the model, and maintain a relatively low computational complexity, which helps the model achieve better performance and efficiency when processing complex image segmentation tasks.

[0067] Figure 3(a) shows the structure of the Polarized Self-Attention mechanism, and Figure 3(b) shows the structure of the improved PSA-UNet network model, which is improved by adding the Polarized Self-Attention mechanism to the sampling part of the U-Net model. The training loss curve during the training process of the improved PSA-UNet network model is shown in Figure 4(a); the accuracy change during the training process of the improved PSA-UNet network model is shown in Figure 4(b). It can be seen that the training loss of the network model continues to decrease during the training process, and the accuracy gradually increases, and finally stabilizes.

[0068] The Polarized Self-Attention mechanism is added to the sampling part of the U-Net model for improvement, as shown in Table 1(b). Among them, SEA-UNet adds SEAttention mechanism to the sampling part of U-Net; TA-UNet adds TripletAttention mechanism to the sampling part of U-Net; GE-UNet adds Gather-Excite attention mechanism to the sampling part of U-Net; PSA-UNet adds PolarizedSelf-Attention mechanism to the sampling part of U-Net.

[0069] Table 1(b)

[0070]

[0071] Among them, the F1-score (F1-score is the harmonic mean of precision and recall, which is used to measure the accuracy of the binary classification model) after the PSA-UNet algorithm is the highest, reaching 0.8954, which is 5.82% higher than the original U-Net model. Figure 5(e) shows the segmentation result of the proposed improved model PSA-UNet. The edge segmentation of the insulation board and adhesive is clear, and the "burr" phenomenon of the adhesive contour is greatly improved. At the same time, the situation of misjudging the adhesive (black) as the insulation board (white) is also improved. In the insulation board and adhesive binary image segmentation task, the model needs to accurately identify the insulation board and adhesive areas in the image and perform binary processing on them. First, the GPR C-scan slice image contains different texture features that distinguish between insulation board and adhesive. For adhesives, which are similar to the insulation board background locally (the edges are blurred and inseparable from the insulation board background) but have significant differences globally, the traditional U-Net model will encounter some challenges. Because traditional convolution operations mainly focus on local information and are difficult to capture global context information. Therefore, for adhesives and insulation boards, capturing global context information is particularly important for accurate segmentation. Adding the Polarized Self-Attention mechanism to the sampling part of the U-Net model can largely meet the above requirements.

[0072] At the same time, the Polarized Self-Attention mechanism also has the advantages of global context capture, polarization filtering and enhancement, and improving model efficiency.

[0073] Among them, the PSA mechanism calculates the correlation between all positions in the input sequence, which can capture global contextual information and focus on local details. Therefore, it can better identify the difference between adhesives and backgrounds and reduce misjudgments. Especially in areas with blurred boundaries, the PSA self-attention mechanism can help the model more accurately determine the ownership of pixels. PSA allows the model to take into account the global context during the decoding stage, rather than relying solely on local convolution operations. In the segmentation of ground penetrating radar C-scan slices, this means that PSA can help the model better understand the global difference between adhesives and backgrounds, thereby reducing the misjudgment of adhesives as backgrounds.

[0074] The planned filtering and enhancement steps in PSA can maintain high resolution in both channel and spatial dimensions, reduce information loss, and are suitable for fine-grained regression tasks, which helps the model to more accurately locate the boundaries and regions of adhesives, making the segmented edges less burred, smoother and more accurate.

[0075] In addition, PSA improves the efficiency of the self-attention model by introducing a polarization factor to reduce the attention between position pairs that need to be calculated, allowing PSA to reduce the amount of calculation while maintaining accuracy, further improving the performance of the model in the GPR C-scan slice image segmentation task.

[0076] The PSA self-attention mechanism is added to the upsampling stage of the U-Net model to construct the PSA-UNet network. The constructed dataset is used to train the PSA-UNet network, which enables the model to better capture the global contextual information in the ground penetrating radar C-scan slice image segmentation task, thereby reducing the situation where the adhesive is misjudged as the background. This not only improves the segmentation accuracy, but also makes the model more robust and reliable when processing complex features.

[0077] Step S104, using the trained PSA-UNet network to perform semantic segmentation on the image to be identified, and identifying the adhesive edge of the segmented image through contour detection, and performing binary filling.

[0078] Specifically, the trained PSA-UNet network is used to perform semantic segmentation on the insulation board and adhesive in the image to be identified. Since the improved PSA-UNet network still slightly misjudges the adhesive as the insulation board background when performing semantic segmentation on the insulation board (background) and adhesive, contour detection is used to identify the edge of the adhesive after the segmentation, and the inside of the adhesive is binary filled to improve the misjudgment phenomenon and ensure the integrity of the adhesive and insulation board areas after segmentation.

[0079] Among them, step S104 includes: using the trained PSA-UNet network to perform semantic segmentation on the image to be identified to obtain a segmented image that divides the insulation board and the adhesive area; using the contour detection function, detecting the outermost contour of the adhesive on the segmented image to obtain contour information; based on the contour information, binarizing and filling the corresponding area inside the contour in the segmented image.

[0080] Specifically, an image to be identified that requires quantification of the adhesive area is obtained, and semantic segmentation is performed on the image to be identified through the trained PSA-UNet network, and the insulation board and adhesive areas in the image to be identified are divided to obtain a segmented image; the contour detection function in OpenCV is used to detect the segmented image to obtain the outermost contour of the adhesive (that is, the outermost contour that is not nested with other contours in the image), that is, the contour information; the contour information obtained by the detection is used to binarize and fill the corresponding area inside the contour in the segmented image (that is, the adhesive part), so that all the inner areas of the contour in the image are filled, while the areas outside the contour remain unchanged.

[0081] The contour detection binarization method has high adaptability and does not require adjustment of parameter values ​​each time. It can directly detect the outer contour for different situations, such as different shapes and sizes and different numbers of adhesives, and perform binary filling on the inside of the adhesive outer contour to prevent the adhesive contour from expanding outward, making the area statistics after continuous segmentation more accurate.

[0082] Step S105 , based on the binary filled image, the bonding area of ​​the adhesive is statistically obtained.

[0083] Specifically, in the binary filled image, since the adhesive is marked in black and the insulation board is marked in white, the pixel count of the binary filled image can be performed to obtain the bonding area of ​​the adhesive.

[0084] Among them, step S105 includes: based on the binary filled image, performing area pixel statistics to obtain the total area, and counting the black pixel points corresponding to the adhesive to obtain the effective bonding area; based on the effective bonding area and the total area, calculating the proportion of the adhesive area in the entire insulation board.

[0085] Specifically, after obtaining the binary filled image, the area pixel count of the image is performed to obtain the total area of ​​the insulation board. At the same time, the black pixel points corresponding to the adhesive are counted to obtain the effective bonding area, which is the difference between the total adhesive area and the adhesive void area. The effective bonding ratio can also be calculated using the effective bonding area and the total area to obtain the ratio of the effective bonding area to the entire insulation board.

[0086] The recognition results of the number and position of adhesives obtained by the output of the PSA-UNet network model are shown in Figure 6(a), and the statistical results of the adhesive position and area are shown in Figure 6(b). In terms of area pixel statistics, the detected area is 33.02%, the actual adhesive area is 33.25%, the absolute error is 0.23%, and the relative error is 0.70%. There is no adhesion between the adhesives, and the edge detection is good. 8 adhesives can be correctly detected, and the edges and positions of the adhesives are displayed at the same time. Therefore, the quantitative analysis of the bonding area of ​​the adhesive is realized using the binary result image after semantic segmentation.

[0087] In this embodiment, based on simulated and measured ground penetrating radar data, deep C-scan slices in various scenarios are obtained, and the deep C-scan slice annotations are converted into corresponding mask binary images to construct a data set; the binary cross entropy loss function, IOU loss function and focal loss function are fused as the target loss function, and the segmentation performance of the U-Net model is improved by improving the loss function; Polarized The Self-Attention mechanism is used to construct the PSA-UNet network, which is then trained using a data set. The trained PSA-UNet network is used to perform semantic segmentation on the insulation board and adhesive in the image to be identified, and the adhesive edge is identified through contour detection of the segmented image, which is then binarized and filled to avoid misjudgment. Based on the binary-filled image, the bonding area of ​​the adhesive is statistically obtained to achieve quantitative analysis of the bonding area of ​​the adhesive, thereby achieving accurate and efficient semantic segmentation of the C-scan layered deep slices of multiple, scattered and irregular target features presented by the insulation board adhesive, thereby improving the accuracy of the bonding area of ​​the insulation layer adhesive.

[0088] Compared with the prior art, the advantages and beneficial effects of the present invention are:

[0089] (1) Set up simulation and measured ground penetrating radar data of different scenes to obtain deep C-scan slices, and annotate and convert them into corresponding mask binary images. At the same time, due to the limited data collected by simulation and measurement, offline data enhancement is used to improve the richness of the data set. By combining simulation and measured ground penetrating radar data, obtaining deep C-scan slices and converting them into mask binary images, and then using offline data enhancement technology, the diversity and scale of the data set can be significantly improved without increasing the acquisition cost, thereby enhancing the efficiency and effect of model training, ensuring that the model is more accurate and reliable in evaluating the bonding state of the insulation layer, while providing greater flexibility and the possibility of continuous improvement for practical applications.

[0090] (2) The U-Net loss function is improved by fusing the binary cross entropy loss function, IOU loss function and focal loss function as the final target loss function. The target loss function can achieve pixel-level classification accuracy (through binary cross entropy loss), pay attention to the regional overlap of the segmentation results (through IOU loss), and make the model pay more attention to samples that are difficult to classify (through focal loss). The fused target loss function helps to improve the accuracy of insulation board adhesive segmentation, especially when dealing with complex and unbalanced data sets. It can significantly improve the generalization ability and robustness of the model, greatly improve the adhesive detection edge and surrounding adhesion phenomenon, and the phenomenon of misjudging the background (insulation board) as adhesive.

[0091] (3) The Polarized Self-Attention mechanism is added to the sampling part of the U-Net model to improve it, and the PSA-UNet network model is proposed. The improved model can capture global context information and better understand the global difference between adhesive and background, thereby reducing the situation where adhesive is misjudged as background; at the same time, fine-grained regression enables the model to more accurately locate the boundaries and regions of adhesives, and the edge burrs after segmentation are less, smoother and more accurate; and the amount of calculation is reduced while maintaining accuracy.

[0092] (4) The binary image obtained after segmentation by the PSA-UNet model is post-processed. Contour detection is used to identify the edge of the adhesive. At the same time, the inside of the adhesive is binary-filled to improve the misjudgment phenomenon and ensure the integrity of the adhesive and insulation board area after segmentation.

[0093] (5) The PSA-UNet model is segmented, and the binary image obtained after contour detection and binarization filling is post-processed to perform area pixel statistics. The area statistics have a small error and can correctly detect the number of adhesives. At the same time, the edge and position of the adhesive are displayed, realizing the quantitative analysis of the bonding area of ​​the adhesive.

[0094] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0095] Obviously, those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a computer storage medium (ROM / RAM, magnetic disk, optical disk) and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Therefore, the present invention is not limited to any specific combination of hardware and software.

[0096] The above contents are further detailed descriptions of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the scope of protection of the present invention.

Claims

1. A bonding area quantification method based on PSA-UNet network, characterized in that: The following steps are involved: Based on simulated and measured ground penetrating radar data, deep C-scan slices are obtained in various scenarios, and the deep C-scan slice annotations are converted into corresponding mask binary images to construct a data set; The binary cross entropy loss function, IOU loss function and focal loss function are combined as the target loss function; Add the Polarized Self-Attention mechanism to the upsampling stage of the U-Net model to construct the PSA-UNet network, and train it using the dataset. The trained PSA-UNet network is used to perform semantic segmentation on the image to be identified, and the adhesive edge of the segmented image is identified through contour detection and binary filling is performed; Based on the binary filled image, the bonding area of ​​the adhesive is statistically obtained.

2. The bonding area quantification method based on the PSA-UNet network according to claim 1, characterized in that: Based on the simulated and measured ground penetrating radar data, deep C-scan slices in various scenes are obtained, and the deep C-scan slice annotations are converted into corresponding mask binary images to construct a data set, including: Acquire simulated and measured ground penetrating radar data, and obtain deep C-scan slices in various scenarios according to the ground penetrating radar data, wherein the deep C-scan slices include texture features for distinguishing between insulation boards and adhesives; The depth C-scan slice is converted into a corresponding mask binary image using a marking tool, wherein the insulation board background is marked as white and the adhesive is marked as black; A data set is constructed based on the deep C-scan slices and the corresponding mask binary images, and the data set is used for PSA-UNet network training.

3. The bonding area quantification method based on the PSA-UNet network according to claim 1, characterized in that: Also includes: An offline data enhancement method is used to enhance the dataset.

4. The bonding area quantification method based on the PSA-UNet network according to claim 1, characterized in that: The objective loss function is: l=l1l BCE +l2l Iou +l3l Focal In the formula, l BCE is the binary cross entropy loss function, l Iou is the Iou loss function, l Focal is the focal loss function, and λ1,λ2,λ3 are the hyperparameters of each loss function.

5. The bonding area quantification method based on the PSA-UNet network according to claim 1, characterized in that: The method uses the trained PSA-UNet network to perform semantic segmentation on the image to be identified, and identifies the adhesive edge of the segmented image through contour detection, and performs binary filling, including: The trained PSA-UNet network is used to perform semantic segmentation on the image to be identified, and a segmented image is obtained that divides the insulation board and adhesive area. By using a contour detection function, the outermost contour of the adhesive on the segmented image is detected to obtain contour information; According to the contour information, the corresponding area inside the contour in the segmented image is binarized and filled.

6. The bonding area quantification method based on the PSA-UNet network according to claim 2, characterized in that: The method of obtaining the bonding area of ​​the adhesive based on the binary filled image includes: Based on the binary filled image, area pixel statistics are performed to obtain the total area, and the black pixel points corresponding to the adhesive are counted to obtain the effective bonding area; based on the effective adhesive and the total area, the proportion of the adhesive area in the entire insulation board is calculated.