Multi-task prediction model and application for concrete crack segmentation and depth prediction

By using a multi-task prediction model, combined with the SAM model and multi-level feature fusion technology, the problem of insufficient segmentation accuracy in concrete crack detection by traditional methods is solved, achieving high-precision crack segmentation and depth prediction, and improving detection efficiency and accuracy.

CN121304680BActive Publication Date: 2026-02-24CHINA JILIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511875266.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-02-24
Estimated Expiration
2045-12-12

AI Technical Summary

Technical Problem

In concrete crack detection, traditional image processing algorithms struggle to effectively distinguish cracks from the background, resulting in insufficient segmentation accuracy. This is especially true under complex backgrounds and uneven lighting conditions, making it difficult to achieve high-precision crack segmentation and depth prediction.

Method used

A multi-task prediction model is adopted, which combines the SAM model and a multi-level feature fusion strategy. Through image preprocessing, encoding and decoding modules, adaptive components and multi-scale feature fusion technology are used to improve the accuracy of crack segmentation and depth prediction.

Benefits of technology

It achieves high-precision crack segmentation and depth prediction under complex backgrounds and uneven lighting conditions, improves the model's generalization ability and detection efficiency, and provides reliable support for the safety assessment of concrete structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121304680B_ABST
    Figure CN121304680B_ABST
Patent Text Reader

Abstract

The scheme provides a multi-task prediction model and application for concrete crack segmentation and depth prediction, which is optimized on the basis of a SAM model, an image encoder with an adaptive component is used in an encoding module, most parameters of a backbone network are frozen and only components are fine-tuned, concrete crack characteristics are accurately captured while reducing the consumption of computing resources, and multi-scale feature outputs of the encoder support the calculation of a segmentation and depth prediction module of a decoding module; the decoding module generates a crack segmentation mask through multi-level encoded feature collaborative decoding, a depth prediction module extracts features and predicts depth through a depth predictor with a residual connection, and finally realizes integrated and efficient processing of crack segmentation and depth prediction, thereby providing reliable technical support for concrete structure health monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of structural safety inspection of concrete cracks, and in particular to a multi-task prediction model and its application for concrete crack segmentation and depth prediction. Background Technology

[0002] Concrete cracks, as a core component of infrastructure such as bridges, buildings, and tunnels, directly impact the structural safety and durability of people's lives and property, as well as the stable development of the social economy. However, during the construction, service, and aging processes of concrete structures, cracks, a typical form of structural damage, are easily generated due to various factors such as load-bearing capacity, environmental erosion (e.g., temperature changes, humidity fluctuations, chemical corrosion), and material fatigue. If cracks are not detected and assessed in a timely and accurate manner, they will continue to expand over time, severely weakening the load-bearing capacity of the concrete structure and even leading to major safety accidents such as structural collapse. Therefore, efficient and accurate detection of concrete cracks, especially the precise segmentation of crack areas and quantitative prediction of crack depth, has become a crucial link in ensuring the safe operation and maintenance of concrete structures.

[0003] With the development of computer vision and image processing technologies, image-based automated crack detection methods have gradually replaced manual crack detection, becoming a research hotspot and mainstream application in this field. Early automated detection technologies were mostly based on traditional image processing algorithms, such as edge detection algorithms (Canny operator, Sobel operator), thresholding algorithms (Otsu thresholding method, adaptive thresholding method), and region growing algorithms. These methods preprocess concrete surface images by converting them to grayscale and filtering for noise reduction, then segment the cracks by utilizing the differences in grayscale values ​​and texture features between the cracks and the background. However, in practical applications, concrete surfaces often have complex background interference (such as surface laitance, repair marks, and environmental debris), and lighting conditions fluctuate greatly (such as reflective areas and shadow areas caused by strong light, and low-contrast images in low-light environments). This significantly reduces the ability of traditional image processing algorithms to distinguish between cracks and the background, easily leading to problems such as incomplete crack edge extraction, misjudging background noise as cracks, or missing minute cracks. The segmentation accuracy is insufficient to meet practical engineering needs. Summary of the Invention

[0004] This application provides a multi-task prediction model and its application for concrete crack segmentation and depth prediction. The SAM model is optimized for the characteristics of concrete crack images to achieve high-precision concrete crack segmentation and depth prediction.

[0005] In a first aspect, embodiments of this application provide a method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction, comprising the following steps:

[0006] S1: Constructing the training dataset: Obtain multiple concrete crack images from different scenes, and label the concrete cracks and their corresponding crack depths in each concrete crack image to obtain the training dataset.

[0007] S2: Constructing a multi-task prediction framework: The multi-task prediction framework includes an image preprocessing module, an encoding module, a decoding module, a depth prediction module, and a result prediction module. The encoding module includes multiple cascaded image encoders, each of which includes connected adaptive components, self-attention components, and normalization components. The decoding module includes multiple image decoders corresponding to the image encoders. The depth prediction module includes depth predictors corresponding to the image decoders, each of which includes multiple convolutional layers and fully connected layers.

[0008] S3: Training the multi-task prediction model: The training dataset is input into the multi-task prediction framework to train the multi-task prediction model. The concrete crack image is processed by the image preprocessing module to obtain an enhanced image. The enhanced image is input into multiple image encoders in the encoding module to obtain multiple encoded images corresponding to different levels. The encoded images of the previous level and the current level image encoder are input into the current level image decoder for decoding to obtain multiple decoded images. The decoded images are processed to obtain crack segmentation results. Each decoded image is input into the depth predictor of the corresponding level to obtain depth prediction results. Multiple depth prediction results and the highest level encoded image are input into the result prediction module to obtain crack depth.

[0009] Secondly, embodiments of this application provide a method for segmenting and predicting the depth of concrete cracks, comprising the following steps:

[0010] The image of the concrete crack to be detected is input into the multi-task prediction model for concrete crack segmentation and depth prediction constructed by the construction method of any one of claims 1 to 8, and the concrete crack segmentation result and crack depth are output.

[0011] Thirdly, embodiments of this application provide a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including a method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction or a method for concrete crack segmentation and depth prediction.

[0012] The main contributions and innovations of this invention are as follows:

[0013] This application provides a multi-task model for concrete crack segmentation and depth prediction. The core architecture is constructed by integrating the advantages of the SAM model with a multi-level feature fusion strategy. In the image preprocessing stage, convolutional layers and MLP layers are used to initially extract low-level features and adapt them to the data dimensions. The image processing layer specifically addresses issues such as uneven image illumination and background interference. Then, the DIP layer completes feature purification, outputting an enhanced image adapted for subsequent tasks. The encoding module employs an image encoder with adaptive components, freezing most parameters of the backbone network and only fine-tuning components. This reduces computational resource consumption while accurately capturing concrete crack features. Furthermore, the encoder outputs multi-scale features to support the segmentation and depth prediction calculations in the decoding and depth prediction modules. The decoding module generates a crack segmentation mask through multi-level coded feature collaborative decoding. The depth prediction module extracts features and predicts depth using a depth predictor with residual connections. It also combines multi-scale feature fusion technology and an MSE loss function with L2 regularization to improve depth prediction accuracy and model generalization ability. Ultimately, this achieves integrated and efficient processing of crack segmentation and depth prediction, providing reliable technical support for concrete structure health monitoring.

[0014] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0016] Figure 1 This is a schematic diagram of the overall framework of a multi-task prediction model for concrete crack segmentation and depth prediction according to an embodiment of this application.

[0017] Figure 2 This is a schematic diagram of the adaptive component in the multi-task prediction model of this scheme.

[0018] Figure 3 This is a schematic diagram of the deep predictor framework in the multi-task prediction model of this scheme;

[0019] Figure 4 This is a comparison chart of the metrics of the different models provided in this solution;

[0020] Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0022] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.

[0023] Example 1

[0024] This solution provides a multi-task prediction model for concrete crack segmentation and depth prediction. By fully leveraging the advantages of the SAM model's backbone network in feature extraction and combining multi-level feature fusion and optimization strategies, this multi-task prediction model achieves an efficient and accurate integrated solution for crack detection and depth assessment, aiming to provide more reliable technical support for the health monitoring of concrete structures.

[0025] Figure 1 This is a schematic diagram of the overall framework of the multi-task prediction model for concrete crack segmentation and depth prediction in this scheme. Specifically, this scheme provides a method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction, including the following steps:

[0026] S1: Constructing the training dataset: Obtain multiple concrete crack images from different scenes, and label the concrete cracks and their corresponding crack depths in each concrete crack image to obtain the training dataset.

[0027] S2: Constructing a multi-task prediction framework: The multi-task prediction framework includes an image preprocessing module, an encoding module, a decoding module, a depth prediction module, and a result prediction module. The encoding module includes multiple cascaded image encoders, each of which includes connected adaptive components, self-attention components, and normalization components. The decoding module includes multiple image decoders corresponding to the image encoders. The depth prediction module includes depth predictors corresponding to the image decoders, each of which includes multiple convolutional layers and fully connected layers.

[0028] S3: Training the multi-task prediction model: The training dataset is input into the multi-task prediction framework to train the multi-task prediction model. The concrete crack image is processed by the image preprocessing module to obtain an enhanced image. The enhanced image is input into multiple image encoders in the encoding module to obtain multiple encoded images corresponding to different levels. The encoded images of the previous level and the current level are input into the current level image decoder to obtain multiple decoded images. Each decoded image contains a crack segmentation mask. Each decoded image is input into the depth predictor of the corresponding level to obtain the depth prediction result. The multiple depth prediction results and the highest level encoded image are input into the result prediction module to obtain the crack depth.

[0029] In step S1, images of concrete cracks with different shapes, sizes, textures, and distribution patterns are acquired. This allows the multi-task prediction model to learn the characteristic patterns of cracks under various conditions, thereby improving its generalization ability for different types of cracks. For example, cracks on bridges may exhibit long, irregular, and multi-directional characteristics due to long-term vehicle and wind loads; while cracks on building walls may have more regular shapes but uneven distribution due to temperature changes and foundation settlement. Through training with diverse data, the multi-task prediction model can better cope with these complex situations and achieve accurate detection of various types of concrete cracks.

[0030] In other words, this approach uses a large amount of crack image data with real depth annotations during training. The crack image data covers different types and depths of cracks, as well as diverse background and lighting conditions, ensuring that the model can learn methods for predicting crack depth under various conditions and improving the robustness of the model in practical applications.

[0031] In step S2, the image preprocessing module of this scheme includes a convolutional layer, a multilayer perceptron layer, an image processing layer, and a DIP layer connected in sequence. The concrete crack image is enhanced after passing through the convolutional layer, the multilayer perceptron layer, the image processing layer, and the DIP layer in sequence.

[0032] Correspondingly, in step S3, the concrete crack image is processed in the image processing layer for white balance, contrast, brightness, sharpness, gamma, hue, and noise reduction before being input into the DIP layer.

[0033] Correspondingly, in step S3, the DIP layer filters and enhances the effective features of the image output by the image processing layer, suppresses residual minor noise or irrelevant background features, and outputs an enhanced image.

[0034] It should be noted that effective features refer to features such as the edge texture of cracks and the gray-level distribution pattern. The processing of the DIP layer can make the crack features more prominent and clearer in the image, avoiding the impact of feature blurring or redundancy on the segmentation accuracy and depth prediction accuracy of subsequent encoding modules.

[0035] The image preprocessing module of this solution transforms the original concrete crack image into a high-quality enhanced image that is more suitable for subsequent SAM model feature extraction, crack segmentation, and depth prediction through multi-stage collaborative processing. This ultimately provides a foundation for the high-precision performance of the entire model. The convolutional layer and multilayer perceptron layer serve as the initial processing units of the image preprocessing module. Their core function is to extract low-level features from the original concrete crack image and adapt the data dimensions. The image processing layer is used to perform targeted optimization for actual acquisition defects in concrete crack images (such as uneven lighting, background interference, and blurred details). The DIP layer then performs higher-dimensional feature purification and quality upgrade on the image processed by the image processing layer.

[0036] The encoding module of this scheme adopts the SAM model image encoder to extract features from the preprocessed concrete crack image. The encoding and decoding modules are built on the Transformer architecture to effectively capture global contextual information in the image, providing rich semantic feature support for subsequent detection tasks.

[0037] It should be noted that in this scheme, an adaptive component is added to each image encoder to enable efficient fine-tuning during training by freezing most of the parameters in the encoding module that do not require training. That is, in step S3, the parameters of the image encoder are frozen, and only the parameters of the adaptive component are adjusted.

[0038] Specifically, the image encoder of this scheme includes an adaptive component, a normalization layer, a self-attention mechanism layer, a normalization layer, and a multilayer perception layer. The features input to the adaptive component and the features output by the adaptive component are added together to obtain the first feature. The first feature is then input sequentially into the normalization layer and the self-attention mechanism layer, and the output features are added together to obtain the second feature. The second feature is then input sequentially into the normalization layer and the multilayer perception layer, and the output features are added together to obtain the output feature of the current image encoder.

[0039] like Figure 2As shown, the adaptive component of this scheme includes multiple downsampling linear layers, GELU activation layers, multiple upsampling linear layers, and GELU activation layers connected in sequence. That is, the features input into the adaptive component are first downsampled by multiple downsampling linear layers and then processed by the GELU activation function of the GELU activation layer. Subsequently, they are upsampled by multiple upsampling linear layers and then processed by the GELU activation function of the GELU activation layer. This design allows only the adaptive component to be fine-tuned during training, while freezing most of the parameters of the backbone network, thereby significantly reducing the computational resources and memory requirements.

[0040] To improve the accuracy of depth prediction, this scheme employs a multi-scale feature fusion technique in its multi-task prediction model. Specifically, the image encoder outputs encoded images at different levels, and the image decoder fuses these encoded images before extracting features. This method enables the model to simultaneously utilize detailed information from low-level features and semantic information from high-level features, thereby gaining a more comprehensive understanding of crack features and improving the accuracy of depth prediction.

[0041] In one specific embodiment, the encoding module of this scheme includes four image encoders, and the decoding module includes three image decoders. The enhanced image input into the encoding module is sequentially processed by the four image encoders to obtain four encoded images of different scales (144*88*88, 288*44*44, 576*22*22, 1152*11*11). The encoded images from the previous level and the current level image encoders are input together to the current level image decoder for decoding to obtain multiple decoded images, and each decoded image contains a crack segmentation mask.

[0042] It should be noted that higher-level encoded images contain low-resolution high-semantic features, while lower-level encoded images contain high-resolution multi-detail features. Therefore, this scheme inputs the encoded images from the previous and current level image encoders into the current level image decoder to obtain multiple decoded images. It is worth mentioning that the highest-level encoded image, after dimensionality reduction and convolution, is input into the image decoder along with the encoded image from the next lower level image encoder.

[0043] The image decoder upsamples the encoded image output by the encoder (e.g., transposed convolution, bilinear interpolation) to restore it to a spatial size matching the input image (e.g., 64×88×88). At the same time, it fuses multi-scale features and performs binary classification prediction (belongs to crack / does not belong to crack) for each pixel. The output is a binary image (black background, white crack area) with the same size as the original image as the decoded image, which contains crack segmentation mask.

[0044] As mentioned earlier, the multi-task prediction model provided by this scheme can simultaneously segment cracks and predict crack depth. Since crack depth is closely related to various crack features (such as width, texture variation, grayscale distribution, etc.), the image encoder of this scheme uses a self-attention mechanism to focus on the correlation between different regions in the image, thereby extracting feature information related to crack depth. Subsequently, the decoded image output from the image decoder is input into the corresponding level of the depth predictor to predict the depth prediction result.

[0045] like Figure 3 As shown, the depth predictor of this scheme includes multiple cascaded convolutional layers and fully connected layers, where the convolutional layers are used to extract global information from the decoded graph, and the fully connected layers are used to integrate the global information and predict the crack depth.

[0046] In some embodiments, residual connections are introduced into multiple convolutional layers of the depth predictor to alleviate the gradient vanishing problem in deep neural networks, ensuring that the network can effectively learn the mapping relationship between crack depth and image features.

[0047] In one specific embodiment, the features input to the depth predictor are sequentially passed through multiple convolutional layers and then residually connected with the original features input to the depth predictor. Subsequently, the residually connected features are passed through the ReLU activation function and then input into a fully connected layer for depth prediction.

[0048] In addition, during the training process in step S3, mean squared error (MSE) is used as the loss function, and an L2 regularization term is introduced into the mean squared error (MSE). The mean squared error is used to measure the difference between the predicted depth and the actual depth, while the L2 regularization term can avoid overfitting. The introduction of the L2 regularization term constrains the model weights to enhance the generalization ability of the model.

[0049] In practical applications, for input concrete crack images, the model first performs preprocessing and crack detection, and then uses a trained depth prediction network to predict crack depth. The prediction results provide important information for the safety assessment of concrete structures, helping engineers to identify potential problems in a timely manner and take corresponding remedial measures.

[0050] Example 2

[0051] Based on the same concept, this embodiment provides a multi-task prediction model for concrete crack segmentation and depth prediction constructed based on Embodiment 1. This multi-task prediction model for concrete crack segmentation and depth prediction can be used to simultaneously segment concrete cracks and predict crack depth.

[0052] The multi-task prediction model for concrete crack segmentation and depth prediction was tested on the publicly available Crack500 dataset. The model was evaluated using Mean Intersection over Union (MIoU), Precision, Recall, and F1 score to comprehensively reflect its performance in accurately detecting crack regions. The comparison results between this multi-task prediction model and other models are shown in Table 1 below. Figure 4 As shown:

[0053] Table 1 Comparison and Evaluation Results

[0054]

[0055] As can be seen, the multi-task prediction model proposed in this scheme achieves a high MIoU value of 84.3%, which is a significant improvement compared to models such as U-Net (62.9%), DeepLabv3+ (52.3%), and ALF-ViT (73.3%). Precision and recall also perform well, reaching 86.3% and 88.9% respectively, with an F1 score of 87.4%. This indicates that the multi-task prediction model proposed in this scheme has advantages in accurately identifying crack pixels and completely detecting crack regions, and can effectively handle crack detection tasks under complex backgrounds and different lighting conditions.

[0056] Figure 4 The visualization results show a comparison of different model metrics. By visualizing the detection results, the performance of the proposed multi-task prediction model can be intuitively observed. On different types of crack images, the proposed multi-task prediction model can clearly delineate crack boundaries and accurately distinguish cracks from the background. Even under conditions of complex crack morphology, significant background interference, and uneven illumination, the model can still generate high-quality segmentation masks that closely match the real masks. This further demonstrates the effectiveness and accuracy of the proposed multi-task prediction model in crack detection tasks.

[0057] Similarly, the results of comparing the multi-task prediction model of this scheme with other deep prediction models (such as edge detection-based methods, region growing-based methods, etc.) and some deep learning models (such as DFCDNet) are shown in Table 2:

[0058] Table 2 Comparison Results

[0059] .

[0060] Experimental results show that the proposed multi-task prediction model achieves a low MSE (Mean Sequence Equation) of 3.6%, a significant improvement over traditional methods. The DFCDNet model achieves 4.2% MSE, and its R² (R-squared) is also slightly higher than other models. This indicates that the model can explain most of the crack depth variations and has high accuracy in predicting crack depth. Analysis of the depth prediction error reveals that in areas with shallower cracks, the model's prediction error is relatively small, and it can accurately predict crack depth. However, in areas with deeper cracks, the error increases slightly. This may be because deeper cracks have relatively weaker feature representation in images, and the number of deep crack samples in the dataset is relatively small, leading to insufficient learning of deep crack features by the model. Overall, however, the proposed multi-task prediction model still demonstrates good predictive ability across the entire crack depth range, providing valuable reference for the safety assessment of concrete structures.

[0061] Example 3:

[0062] This solution provides an application method for a multi-task prediction model for concrete crack segmentation and depth prediction, or a concrete crack segmentation and depth prediction method, including the following steps:

[0063] The image of the concrete crack to be detected is input into the multi-task prediction model for concrete crack segmentation and depth prediction constructed in Example 1, and the crack segmentation mask and crack depth are output.

[0064] In practical application of the multi-task prediction model for concrete crack segmentation and depth prediction, the concrete crack image is input into the multi-task prediction model for concrete crack segmentation and depth prediction constructed in Example 1. The multi-task prediction model for concrete crack segmentation and depth prediction first preprocesses and detects cracks in the concrete crack image, and then uses the trained depth prediction module to predict the crack depth.

[0065] Example 4

[0066] This embodiment also provides an electronic device, see reference. Figure 5 It includes a memory 404 and a processor 402, wherein the memory 404 stores a computer program and the processor 402 is configured to run the computer program to perform the steps in any of the above method embodiments.

[0067] Specifically, the processor 402 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0068] The memory 404 may include a large-capacity memory 404 for data or instructions. For example, and not to limit, the memory 404 may be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.

[0069] The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any of the methods for constructing or applying a multi-task prediction model for concrete crack segmentation and depth prediction in the above embodiments.

[0070] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.

[0071] Transmission device 406 can be used to receive or send data via a network. Input / output device 408 is used to input or output information. In this embodiment, the input information may be a crack image, etc., and the output information may be crack segmentation results or crack depth, etc.

[0072] Optionally, in this embodiment, the processor 402 can be configured to perform the following steps via a computer program:

[0073] S1: Constructing the training dataset: Obtain multiple concrete crack images from different scenes, and label the concrete cracks and their corresponding crack depths in each concrete crack image to obtain the training dataset.

[0074] S2: Constructing a multi-task prediction framework: The multi-task prediction framework includes an image preprocessing module, an encoding module, a decoding module, a depth prediction module, and a result prediction module. The encoding module includes multiple cascaded image encoders, each of which includes connected adaptive components, self-attention components, and normalization components. The decoding module includes multiple image decoders corresponding to the image encoders. The depth prediction module includes depth predictors corresponding to the image decoders, each of which includes multiple convolutional layers and fully connected layers.

[0075] S3: Training the multi-task prediction model: The training dataset is input into the multi-task prediction framework to train the multi-task prediction model. The concrete crack image is processed by the image preprocessing module to obtain an enhanced image. The enhanced image is input into multiple image encoders in the encoding module to obtain multiple encoded images corresponding to different levels. The encoded images of the previous level and the current level are input into the current level image decoder to obtain multiple decoded images. Each decoded image contains a crack segmentation mask. Each decoded image is input into the depth predictor of the corresponding level to obtain the depth prediction result. The multiple depth prediction results and the highest level encoded image are input into the result prediction module to obtain the crack depth.

[0076] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0077] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.

[0078] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products), including software routines, applets, and / or macros, can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer-executable components configured to perform embodiments when the program is run. One or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted that any block in the logical flow of the figures may represent a program step, or interconnected logical circuitry, blocks and functions, or a combination of program steps and logical circuitry, blocks and functions. The software may be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.

[0079] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0080] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction, characterized in that, Includes the following steps: S1: Constructing the training dataset: Obtain multiple concrete crack images from different scenes, and label the concrete cracks and their corresponding crack depths in each concrete crack image to obtain the training dataset. S2: Constructing a multi-task prediction framework: The multi-task prediction framework includes an image preprocessing module, an encoding module, a decoding module, a depth prediction module, and a result prediction module. The encoding module includes multiple cascaded image encoders. Each image encoder includes connected adaptive components, self-attention components, and normalization components. The decoding module includes multiple image decoders corresponding to the image encoders. The depth prediction module includes depth predictors corresponding to the image decoders. Each depth predictor includes multiple convolutional layers and fully connected layers. S3: Training the multi-task prediction model: The training dataset is input into the multi-task prediction framework to train the multi-task prediction model. The concrete crack image is processed by the image preprocessing module to obtain an enhanced image. The enhanced image is input into multiple image encoders in the encoding module to obtain multiple encoded images corresponding to different levels. The encoded images of the previous level and the current level are input into the current level image decoder to obtain multiple decoded images. Each decoded image contains a crack segmentation mask. Each decoded image is input into the depth predictor of the corresponding level to obtain the depth prediction result. The multiple depth prediction results and the highest level encoded image are input into the result prediction module to obtain the crack depth.

2. The method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction according to claim 1, characterized in that, The image preprocessing module includes a convolutional layer, a multilayer perceptron layer, an image processing layer, and a DIP layer connected in sequence. The concrete crack image is enhanced after passing through the convolutional layer, the multilayer perceptron layer, the image processing layer, and the DIP layer in sequence.

3. The method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction according to claim 2, characterized in that, The concrete crack image undergoes white balance processing, contrast processing, brightness processing, sharpness processing, gamma processing, tone processing, and noise reduction in the image processing layer before being input into the DIP layer.

4. The method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction according to claim 1, characterized in that, The encoding module uses an image encoder based on the SAM model, and the encoding and decoding modules are built based on the Transformer architecture.

5. The method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction according to claim 1, characterized in that, Freeze the parameters of the image encoder and adjust only the parameters of the adaptive component.

6. The method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction according to claim 1, characterized in that, The adaptive component consists of multiple downsampling linear layers, GELU activation layers, multiple upsampling linear layers, and GELU activation layers connected in sequence. That is, the features input into the adaptive component are first downsampled by multiple downsampling linear layers and then processed by the GELU activation function of the GELU activation layer. Subsequently, they are upsampled by multiple upsampling linear layers and then processed by the GELU activation function of the GELU activation layer.

7. The method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction according to claim 1, characterized in that, Residual connections are introduced into multiple convolutional layers of the depth predictor.

8. The method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction according to claim 1, characterized in that, Mean squared error is used as the loss function, and an L2 regularization term is introduced into the mean squared error.

9. A method for segmenting and predicting the depth of concrete cracks, characterized in that, Includes the following steps: The image of the concrete crack to be detected is input into the multi-task prediction model for concrete crack segmentation and depth prediction constructed by the construction method of any one of claims 1 to 8, and the crack segmentation mask and crack depth are output.

10. A readable storage medium, characterized in that, The readable storage medium stores a computer program, the computer program including program code for controlling a process to execute the process, the process including the method for constructing a multi-task prediction model for concrete crack segmentation and depth prediction according to any one of claims 1 to 8 or the method for concrete crack segmentation and depth prediction according to claim 9.

Citation Information

Patent Citations

  • Concrete crack depth prediction model and method based on deep learning and application

    CN116993739A

  • Detection method for pixel-level concrete crack based on deep learning

    CN117291902A