Crack detection method based on weakly supervised semantic segmentation network and hybrid label strategy
By using a weakly supervised semantic segmentation network and a hybrid labeling strategy, pseudo-labels are generated using a pre-defined classification network and combined with an adaptive Gaussian segmentation algorithm. This solves the problems of low efficiency and insufficient accuracy in traditional crack detection, and achieves efficient and accurate crack detection.
Patent Information
- Application Number
- CN202311742518.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-12-18
AI Technical Summary
Traditional crack detection methods rely on manual inspection, which is inefficient and easily affected by subjective factors. Semantic segmentation methods based on deep learning require a large number of manually labeled pixels, resulting in excessive time and resource consumption and low segmentation accuracy.
We employ a weakly supervised semantic segmentation network and a hybrid labeling strategy. Pseudo-labels are generated through a pre-defined classification network model, and combined with an adaptive Gaussian segmentation algorithm and a bilateral filter, which reduces the amount of manual labeling and improves segmentation accuracy.
It saves time on manual labeling, improves crack segmentation accuracy, and achieves efficient crack detection.
Smart Images

Figure CN117710335B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of crack detection technology, and more specifically, to a crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy. Background Technology
[0002] As the most basic and widespread transportation infrastructure, highways provide vital support for regional and even national economic development, playing an irreplaceable role in the entire transportation system. Due to the influence of various factors such as vehicle traffic, paving materials, and weather, highway pavements can suffer different types of damage, with cracks being one of the most common. Maintaining and managing highway pavement cracks can not only extend the service life of highways but also reduce the occurrence of safety accidents. Therefore, crack detection is a crucial aspect of highway maintenance.
[0003] Traditional crack detection relies primarily on manual methods for detecting cracks in highway pavements. This requires experienced professionals, is inefficient, and is easily affected by subjective factors. In the past, some image processing-based crack detection methods have been widely used, but their effectiveness has often been unsatisfactory.
[0004] In recent years, deep learning-based semantic segmentation methods have demonstrated state-of-the-art performance on multiple tasks. Among them, crack detection methods based on semantic segmentation have attracted considerable attention. However, training semantic segmentation models using neural networks often requires a large amount of manually labeled pixel-level data, which is extremely time-consuming and severely restricts the practical application of semantic segmentation methods in crack detection. Therefore, it is particularly important to find a method that can both reduce the time required for crack labeling and improve crack segmentation accuracy.
[0005] It should be noted that many scholars recommend various image processing techniques for crack detection. For example, the OTSU algorithm is the most widely used thresholding segmentation technique for crack detection; however, this strategy tends to segment background noise while extracting cracks, and since the target and background have similar gray levels, the segmentation results may be unsatisfactory. In the field of crack extraction, the Sobel and Canny operators are the most popular edge detection methods; the Sobel operator performs better in both horizontal and vertical directions, while the Canny operator is more effective in identifying weak edges in images. However, because the Sobel operator looks for areas of brightness or color change to determine the object's boundary when detecting edges, it may cause internal cavity problems during crack extraction. Based on the above analysis, it is clear that traditional edge detection algorithms often encounter problems when extracting small cracks.
[0006] In order to solve the above problems, people have been seeking an ideal technological solution. Summary of the Invention
[0007] The purpose of this invention is to address the shortcomings of existing technologies by providing a crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy. To solve the problem that manually labeling pixel-level images requires a lot of time and manpower, a pre-defined classification network model and thresholding algorithm are used to preprocess the original crack images to generate pseudo-labels, saving some of the manual labeling workload. Then, a hybrid labeling training strategy is used to train the crack detection model, which solves the problem of low crack segmentation accuracy of weakly supervised methods.
[0008] To achieve the above objectives, the first aspect of the present invention provides a crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy. The method includes a pseudo-label generation step for highway crack images, a hybrid annotation step for highway crack images, and a crack segmentation model training step. The pseudo-label generation step for highway crack images includes: Obtain the original highway crack image, segment it into image blocks of a preset size, and manually label each block as either "crack" or "no crack" based on whether it contains a crack region. Use these manually labeled image blocks to train a pre-configured highway crack image classification model. Input the original highway crack image into the trained model to obtain the classification activation response feature map F. C The original highway crack image is cropped to obtain image patches of a preset size. The cropped image patches are then input into a trained highway crack image classification model to obtain an image patch classification probability map F. p ; for the classification activation response feature map F C and the image patch classification probability map F p The images are fused to obtain the crack image segmentation result S. C The boundaries in the original highway crack image are extracted using a bilateral filter to obtain boundary map I. E The boundary map I is processed using an adaptive Gaussian segmentation algorithm. E The crack region in the image is segmented to obtain the adaptive crack segmentation result S. A The crack image segmentation result S C and the adaptive crack segmentation result S A The images are fused to obtain pseudo-labels S for the original highway crack images. P .
[0009] To achieve the above objectives, a second aspect of the present invention provides a crack detection device based on a weakly supervised semantic segmentation network and a hybrid labeling strategy, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The memory is used to store computer programs; the processor is used to execute the programs stored in the memory, thereby implementing the crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy as described above.
[0010] To achieve the above objectives, a third aspect of the present invention provides a readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy as described above.
[0011] The beneficial effects of this invention are as follows: This invention provides a crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy. It utilizes a pre-defined classification network model and an adaptive Gaussian segmentation algorithm to analyze and process the original crack image, generating pseudo-labels needed to train the segmentation network. This eliminates the need for pixel-by-pixel annotation of the entire image, significantly saving time. Furthermore, this invention mixes pseudo-labels with real labels to train the segmentation network, using the trained network as the crack detection model. This not only saves time on manual pixel-by-pixel annotation of crack images but also improves segmentation accuracy, compensating for the shortcomings of weakly supervised methods. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of the highway crack image pseudo-label generation steps of the present invention; Figure 2 This is a schematic diagram of the structure of the highway crack image classification model of the present invention; Figure 3 This is a flowchart illustrating the crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy of the present invention. Figure 4 This is a schematic diagram of the crack segmentation results of the highway crack image according to the present invention. Detailed Implementation
[0013] The technical solution of the present invention will be further described in detail below through specific embodiments.
[0014] To facilitate understanding, the interactive parties and / or terms and / or custom terms involved in this invention will first be explained in conjunction with the technical solution of this invention: Original highway crack images: First, road conditions are photographed using a mobile phone and camera. Considering the impact of environmental factors such as weather and lighting on the data processing algorithm, this invention collects data on highways with various degrees of damage and under different weather and lighting conditions, which can effectively improve the robustness and generalization performance of the algorithm. The image sizes are 544×384, 648×848, and 640×360. It should be noted that in the process of generating pseudo-labels, the original image is divided into many overlapping image patches, such as cutting it into image patches of size 32×32. These patches need to be small enough to find as many crack-related areas as possible, but also need to ensure that each patch retains enough information so that the classifier can identify whether cracks exist.
[0015] Highway crack image classification model (classification network model): This invention uses ResNet50_CBAM, as shown in the attached document. Figure 2 As shown, ResNet50_CBAM uses ResNet50 as the backbone network, removes the fully connected layers, adds a global flat pooling layer and two fully connected layers, and inserts the Convolutional Block Attention Module (CBAM) after ResNet50 Block 4. The model uses the cross-entropy loss function during training. It should be noted that this invention utilizes a global average pooling layer to compress the output feature map of the ResNet50_CBAM model into a global feature vector. This vector is then multiplied by the weight matrix of the convolutional layer to obtain the weights for each channel. These weights are then multiplied by the feature map to obtain the class activation map for each channel. Finally, the class activation maps of all channels are superimposed to obtain the CAM. The advantage of this approach is that CBAM can improve the performance of the classification network and enhance the localization capability of the class activation map (CAM). It should also be noted that the classification network model can effectively suppress noise from the background region.
[0016] Adaptive Gaussian segmentation algorithm: This is an adaptive thresholding algorithm used to segment target objects or specific regions in an image. Unlike fixed thresholding, adaptive thresholding algorithms consider the local characteristics of different regions of the image, thus better handling image segmentation problems under different lighting conditions.
[0017] Pseudo-labels: Automatically labeled crack segmentation labels refer to the crack image segmentation results S C and adaptive crack segmentation results S A The fusion result; here the pseudo-labels are relative to the manually labeled crack segmentation labels.
[0018] The original crack images' true labels: manually annotated crack labels, meaning each pixel is manually labeled, categorized into foreground (cracks) and background (non-cracks). For example, manually annotating 5% of the highway crack images in the dataset yields labeled data S. M (x,y)∈{0,1}, where “0” indicates that there is no crack in the road crack image pixel I(x,y) and “1” indicates that there is a crack in the road crack image pixel I(x,y). This label is also used as training data for the crack segmentation model.
[0019] Hybrid labeling strategy: The crack segmentation model is trained by mixing pseudo-labels and real labels. It should be noted that by using a small number of manually labeled labels and a large number of pseudo-labels (such as pseudo-label:real label = 4:1) to train the crack segmentation model, the present invention saves more than 65% of the manual labeling workload and achieves an accuracy almost comparable to supervised crack segmentation methods.
[0020] The pre-configured crack segmentation model is a semantic segmentation network, typically a fully convolutional neural network (FCN). It extracts and fuses multi-scale and hierarchical features of the image through convolutional kernels and deconvolution operations, performing semantic classification on each pixel to obtain the semantic segmentation result. It should be noted that to improve crack segmentation accuracy, after obtaining the pseudo-labels, both the pseudo-labels and the original crack image need to be fed into a standard semantic segmentation network for training.
[0021] Example 1 Combined with appendix Figure 1 and attached Figure 3 This embodiment provides a specific implementation of a crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy. The crack detection method includes a pseudo-label generation step for highway crack images, a hybrid annotation step for highway crack images, and a crack segmentation model training step. The steps for generating pseudo-labels for highway crack images include: Obtain the original highway crack image, divide the original highway crack image into image blocks of a preset size, and manually label the image blocks as "crack" and "no crack" according to whether the image blocks contain crack areas; use the manually labeled image blocks to train a pre-configured highway crack image classification model; The original highway crack image is input into the trained highway crack image classification model to obtain the classification activation response feature map F. C The original highway crack image is cropped to obtain image patches of a preset size. The cropped image patches are then input into a trained highway crack image classification model to obtain an image patch classification probability map F.p ; for the classification activation response feature map F C and the image patch classification probability map F p The images are fused to obtain the crack image segmentation result S. C ; The boundaries in the original highway crack image are extracted using a bilateral filter to obtain boundary map I. E The boundary map I is processed using an adaptive Gaussian segmentation algorithm. E The crack region in the image is segmented to obtain the adaptive crack segmentation result S. A ; The crack image segmentation result S C and the adaptive crack segmentation result S A The images are fused to obtain pseudo-labels S for the original highway crack images. P .
[0022] It should be noted that in this embodiment, the original crack image is processed using a bilateral filter to maintain the integrity of the image edge information. In order to improve the noise removal effect, median filtering can be used in other embodiments to remove noise, thereby effectively removing different types of noise, including Gaussian noise, salt-and-pepper noise, speckle noise, etc.
[0023] In some embodiments, the preset size refers to 32×32. Before manual annotation, the original highway crack image is divided into image blocks of the preset size, including: using a random image cropping algorithm to divide the original highway crack image into image blocks of size 32×32. Then, based on whether the image blocks contain crack areas, they are manually divided into category 0 (no crack) and category 1 (crack).
[0024] In some embodiments, the highway crack image classification model is a ResNet50_CBAM model, as shown in the attached figure. Figure 2 As shown; this embodiment uses manually annotated image patches to train the ResNet50_CBAM model.
[0025] In some embodiments, the original highway crack image is input into a trained highway crack image classification model to obtain a classification activation response feature map F. C At that time, execute: The original road crack image is input into the trained ResNet50_CBAM model to obtain the classification activation response feature map F. C The classification activation response feature map contains each pixel value F. C(x,y)∈[0,1] represents the probability that pixel I(x,y) in the road crack image belongs to a crack, where "0" means there is no crack and "1" means there is a crack.
[0026] In some embodiments, the original highway crack image is cropped to obtain image blocks of a preset size, and the cropped image blocks are input into a trained highway crack image classification model to obtain an image block classification probability map F. p At that time, execute: The original highway crack image is cropped into an image block of size 32×32 centered at image position I(x,y) using the sliding window method; These 32×32 image patches are input into the trained ResNet50_CBAM model to obtain the image patch classification probability map F. P (x,y), where F is the pixel value of each pixel in the image patch classification probability map. P (x,y)∈[0,1] represents the probability value that the image patch located at pixel I(x,y) of the highway crack image belongs to the crack category. "0" means that there is no crack and "1" means that there is a crack.
[0027] It should be noted that this embodiment uses the patch classification results to automatically and efficiently pseudo-label the cracks. By utilizing the idea of image classification, it is only necessary to label whether a patch has cracks or not, without having to label each pixel of the entire image, which greatly saves the time used to generate pseudo-labels.
[0028] It should also be noted that, in order to more accurately locate the crack region and reduce errors, this embodiment sets the step size of the extracted image patch to 16 in this step, making it smaller than the size of the image patch, because overlapping areas can be averaged; if the image patch is located in the boundary region, it can be filled by mirroring; finally, the output of the overlapping patches is averaged and upsampled to the original image size. However, the disadvantage of this step is that these patches may contain noise and therefore be misclassified as cracks. To solve this problem, this embodiment uses CAM technology for approximate crack localization. CAM (Class Activation Mapping) can show the contribution of each pixel to the classification result and is often used to locate the position of the target object in the image and improve the performance and effect of weakly supervised image segmentation. In this embodiment, CAM is used to roughly locate the shape and location information of the crack to reduce the probability of misclassification.
[0029] In some embodiments, the classification activation response feature map F C and the image patch classification probability map F pThe images are fused to obtain the crack image segmentation result S. C At that time, execute: Using point addition operations to classify the probability map F of image patches P (x,y) and classification activation response feature map F C The images are fused and a thresholding method is used to obtain the crack image segmentation result S from the classification model. C (x,y)∈{0,1}, as shown below:
[0030] Where T C The threshold value is set to 0.5 in this embodiment.
[0031] It should be noted that the classification activation response feature map F C The image patch classification probability map F is a class activation map. p The crack image segmentation result S is obtained by fusing the image patch classification map and the patch classification map. C This is a rough crack localization map; at this point, only areas with a confidence level greater than 50% are retained, crack areas are extracted, and interference information that does not belong to cracks is filtered out to improve the accuracy of pseudo-labels.
[0032] In some embodiments, a bilateral filter is used to extract the boundaries in the original highway crack image to obtain boundary map I. E The boundary map I is processed using an adaptive Gaussian segmentation algorithm. E The crack region in the image is segmented to obtain the adaptive crack segmentation result S. A At that time, execute: The boundaries in the original highway crack image are extracted using a bilateral filter, and the boundary information I of the image is obtained by convolution. E The formula is shown below:
[0033] Among them, I E (I(x,y)) represents the boundary in the original highway crack image, w represents the filter weights, d is the size of the filter convolution kernel, and δ d δ represents the standard deviation of the convolution kernel distance. r Indicates the standard deviation of image pixels; Boundary map I is segmented using an adaptive Gaussian segmentation algorithm. E In the crack region, the adaptive crack segmentation result S is obtained. A(x,y)∈{0,1}, where “0” indicates that there is no crack at image position I(x,y) and “1” indicates that there is a crack at image position I(x,y).
[0034] In some embodiments, the crack image segmentation result S C and the adaptive crack segmentation result S A The images are fused to obtain pseudo-labels S for the original highway crack images. P At that time, execute: Using a logical AND operation, the crack image segmentation result S is... C (x,y) and adaptive crack segmentation result S A Information fusion is performed on (x,y) to obtain pseudo-label S. P (x,y), as shown below:
[0035] Where & represents the logical AND operation, S C (x,y) represents the crack image segmentation result of the classification model, S A (x,y) represents the adaptive crack segmentation result, S P (x,y) represents the segmentation pseudo-label of the original highway crack image I(x,y); S P (x,y) ∈{0,1}, where “0” indicates that the original highway crack image pixel I(x,y) does not have a crack, and “1” indicates that the original highway crack image pixel I(x,y) has a crack. This label can be used as training data for the crack segmentation model.
[0036] It should be noted that in generating the adaptive crack segmentation result S A When (x, y), the adaptive thresholding algorithm directly detects (or segments) cracks in the original image, but its detection results have a certain number of false positives. To improve the accuracy of the pseudo-labels, this embodiment modifies the crack image segmentation result S. C and the adaptive crack segmentation result S A The data is then fused, and the fused result is used as the pseudo-labels needed to train the segmentation network.
[0037] Example 2 It should be noted that, although the pseudo-label S of the original highway crack image was used... P While saving time and improving annotation efficiency, the pseudo-label generation step for highway crack images in Example 1 can automatically generate a large number of crack segmentation pseudo-labels. However, because the algorithm is easily affected by noise and lighting conditions, some labels have poor accuracy, thus affecting the robustness of the segmentation model. Therefore, compared to manually annotating real labels, using pseudo-labels S... PA second problem may arise: training the crack segmentation model with pseudo-labels may lead to a decrease in the accuracy of the crack segmentation model. Therefore, based on Example 1, this example provides a specific implementation of another crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy.
[0038] For the reasons mentioned above, this embodiment replaces the pseudo-labels obtained by using this invention with a small number of real labels, i.e., the hybrid labeling concept, while giving the real labels a greater weight, in order to improve the accuracy of training the crack segmentation model. This not only saves the time required for crack image annotation, but also improves the segmentation accuracy and makes up for the shortcomings of weak supervision methods.
[0039] In some embodiments, the highway crack image hybrid annotation step includes: Obtain pseudo-labels S from partial original highway crack images P ; Obtain the true labels S of some original highway crack images M For pseudo-label S P Original images of road cracks and S with real labels M The original highway crack images are randomly mixed to generate a hybrid labeled dataset; wherein, the hybrid labeled dataset includes the original highway crack images and the corresponding labels (real labels S) of the original highway crack images. M Or pseudo-label S P ) and the loss weights of the original highway crack image.
[0040] It should be noted that in this embodiment, the actual label S of the highway crack image is used. M and pseudo-tag S P Random mixing is performed to obtain a hybrid labeled dataset; in the hybrid labeled dataset, a loss weight λ is assigned to each training image (original road crack image). 𝑖 If the training image is 𝐼 𝑖 The label is a genuine label that was manually labeled. M Then 𝛼 𝑖 =1.5, otherwise 𝛼 𝑖 =1.0. This increases the proportion of loss from manually labeled data during training, making the model focus more on segmenting manually labeled data.
[0041] In some embodiments, the crack segmentation model training step includes: Obtain a hybrid labeled dataset; train a pre-configured crack segmentation model using the hybrid labeled dataset; wherein the pre-configured crack segmentation model is the U-Net crack segmentation model.
[0042] It should be noted that this embodiment uses U-Net to segment crack regions in highway images. This model has three modules: an encoder, a decoder, and a pixel classifier. The encoder contains four feature extraction modules, each consisting of two 3×3 convolutional layers (using ReLU activation) and one 2×2 pooling layer (downsampling). The decoder consists of four feature upsampling modules, each containing one 2×2 deconvolutional layer, two 3×3 convolutional layers (using ReLU activation), and one channel connection layer. The pixel classifier consists of two 3×3 convolutional layers and a SoftMax classifier. The loss function of this model is shown below:
[0043] Where W represents the trainable parameters of the model, 𝛼 𝑖 Ω represents the loss weight for each training sample (its value can be calculated using the inverse frequency algorithm to mitigate training problems caused by class imbalance), N represents the spatial domain of the image, and N is the number of training data. log() represents the logarithmic function. λ represents the probability that the segmentation network model correctly predicts the category of pixel I(x,y); λ is the weight value of the second term. This represents a sparse constraint term, used to reduce the probability of overfitting; This invention utilizes stochastic gradient descent to optimize the U-Net crack segmentation model. The training parameters are as follows: 100 iterations, 16 batch operations, and a learning rate of 0.001.
[0044] In some embodiments, when performing crack detection on acquired highway images, the following steps are performed: the acquired highway images are directly input into a trained U-Net network model to obtain crack segmentation results, as shown in the attached figure. Figure 4 As shown; It is understandable that since the U-Net network model can be computed on a GPU, it can achieve parallel acceleration, thereby enabling real-time segmentation of road cracks and acquisition of road surface damage.
[0045] It should be noted that, in order to improve the accuracy of crack image segmentation, this embodiment adopts a semantic segmentation network (U-Net network model). However, this segmentation network requires a large number of pixel-level labels so that the neural network can learn the features of the crack and perform accurate segmentation. However, manually labeling pixel-level images consumes a lot of time and manpower, which limits the popularization of this method in practical applications. To overcome this drawback, this invention adopts a weakly supervised method. However, while reducing the time for pixel-level labeling of cracks, the pseudo-labels generated by the weakly supervised method are often not accurate enough, which degrades the performance of the segmentation network and leads to poor crack segmentation results. There is still room for improvement. To solve this problem, this invention uses a pre-set classification network model to preprocess the original crack image to generate pseudo-labels, and trains a pre-configured crack segmentation model through a hybrid label strategy, so that the trained crack segmentation model can segment cracks quickly and accurately.
[0046] Example 3 Based on the above embodiments, this embodiment provides a crack detection device based on a weakly supervised semantic segmentation network and a hybrid labeling strategy, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When the processor executes a program stored in memory, it implements a crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy, as in Example 1 or 2.
[0047] Based on the above embodiments, this embodiment provides a readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform a crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy as described in Embodiment 1 or 2.
[0048] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-non-transitory readable storage media (including, but not limited to, disk storage, v3D-ROM, optical storage, etc.) containing computer program code.
[0049] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0050] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0051] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0052] 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 preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of the present invention or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of the present invention, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in the present invention.
Claims
1. A crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy, characterized in that, This includes steps for generating pseudo-labels for highway crack images, mixing and annotating highway crack images, and training a crack segmentation model. The steps for generating pseudo-labels for highway crack images include: Obtain the original highway crack image, divide the original highway crack image into image blocks of a preset size, and manually label the image blocks as "crack" and "no crack" according to whether the image blocks contain crack areas; use the manually labeled image blocks to train a pre-configured highway crack image classification model; The original highway crack image is input into the trained highway crack image classification model to obtain the classification activation response feature map F. C The original highway crack image is cropped to obtain image patches of a preset size. The cropped image patches are then input into a trained highway crack image classification model to obtain an image patch classification probability map F. p ; for the classification activation response feature map F C and the image patch classification probability map F p The images are fused to obtain the crack image segmentation result S. C ; The boundaries in the original highway crack image are extracted using a bilateral filter to obtain boundary map I. E The boundary map I is processed using an adaptive Gaussian segmentation algorithm. E The crack region in the image is segmented to obtain the adaptive crack segmentation result S. A ; The crack image segmentation result S C and the adaptive crack segmentation result S A The images are fused to obtain pseudo-labels S for the original highway crack images. P ; The highway crack image hybrid annotation step includes: Obtain pseudo-labels S from partial original highway crack images P ; Obtain the true labels S of some original highway crack images M For pseudo-label S P Original images of road cracks and S with real labels M The original highway crack images were randomly mixed to generate a mixed labeled dataset; The hybrid labeled dataset includes the original highway crack image, the label corresponding to the original highway crack image, and the loss weight of the original highway crack image. The training steps for the crack segmentation model include: Obtain a hybrid labeled dataset; A pre-configured crack segmentation model was trained using a hybrid labeled dataset; the pre-configured crack segmentation model was the U-Net crack segmentation model.
2. The crack detection method based on weakly supervised semantic segmentation network and hybrid labeling strategy according to claim 1, characterized in that, The highway crack image classification model is the ResNet50_CBAM model.
3. A crack detection device based on a weakly supervised semantic segmentation network and a hybrid labeling strategy, characterized in that: It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy as described in any one of claims 1 to 2.
4. A readable storage medium, characterized in that: It stores instructions that, when executed by one or more processors, cause the processors to perform the crack detection method based on a weakly supervised semantic segmentation network and a hybrid labeling strategy as described in any one of claims 1 to 2.
