A single-model-based concrete dam crack identification method, system and electronic device

CN123016194APending Publication Date: 2026-10-30YANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611094328.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本发明目的在于提供一种基于单模型的混凝土坝裂缝识别方法及系统,其使用实例分割模型同时进行裂缝检测和分割,解决了分步裂缝检测和分割方法步骤较为繁琐的问题,同时对实例分割模型进行了改进,减少了模型的计算量并提高了对裂缝图像类别高度不平衡特性的适应能力

Benefits of technology

[0036]与现有技术相比,本发明的有益效果在于:本发明通过改进YOLOv8-seg模型的主干网络与颈部网络结构,引入的改进特征提取模块显著增强了模型对裂缝复杂特征的提取能力,提高了裂缝检测的精度,尤其在复杂背景和细微裂缝检测方面表现优异;采用复合损失函数,能够有效提升模型对裂缝主体特征的学习能力,提高模型对裂缝正负样本不平衡的适应性,同时考虑裂缝几何特性的约束,保证裂缝全局结构完整性和局部细节精确性,使得模型在不同场景和条件下都能稳定工作;使用轻量化特征融合模块改进颈部网络的特征融合策略,简化了计算过程,降低了模型的参数量与计算量,提升了模型推理速度,能够满足混凝土坝裂缝识别任务的实时性要求;所述目标裂缝识别模型可同时输出最终的裂缝检测和分割结果,大幅降低了检测和分割的流程复杂度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016194A_ABST
    Figure CN123016194A_ABST
Patent Text Reader

Abstract

The application discloses a kind of concrete dam crack identification method and system based on single model, belong to computer vision and hydraulic engineering technical field.The method includes: constructing the concrete dam crack identification model based on RCIS-YOLO, the model includes main network, neck network and head network, main network is equipped with improved feature extraction module, neck network is equipped with light weight feature fusion module;Obtain and label concrete dam crack image formation dataset;Model parameters are optimized and trained based on composite loss function, and the target crack identification model is obtained;Real-time crack image is input into target model, while crack detection and segmentation results are output.The application enhances the extraction ability of complex features of crack by improving feature extraction module, light weight feature fusion module reduces the parameter quantity and calculation amount, composite loss function improves the adaptability of model to positive and negative sample imbalance, realizes high-precision, high-efficiency crack real-time identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and water conservancy engineering technology, and in particular relates to a method and system for identifying cracks in concrete dams. Background Technology

[0002] Concrete dams are crucial water infrastructure, serving vital functions such as irrigation, hydropower generation, flood control, navigation, and water supply. However, dam failure can lead to significant casualties and property damage downstream. Cracks are one of the most common hazards to concrete dams. As cracks continue to propagate, deep and penetrating cracks weaken the dam's rigidity, affecting its overall integrity, worsening its stress state, and severely impacting its safe operation. Therefore, timely detection and assessment of crack severity are essential for ensuring the safe operation of dams.

[0003] In the field of dam structural health monitoring, although traditional crack monitoring methods have some effect, their application scope is limited, making it difficult to obtain complete information on the dynamic evolution and expansion patterns of cracks in real time. Taking sensors as an example, as the dam ages and the environment changes, new cracks will continuously appear in the dam body. However, the coverage of sensors has inherent limitations, making it impossible to capture subsequent cracks, resulting in low detection efficiency. Manual inspection is constrained by environmental conditions, safety concerns, and personnel limitations, leading to low efficiency.

[0004] In recent years, computer vision technology has developed rapidly, providing a highly efficient new technology for crack monitoring. Using computer vision technology, cracks in captured images can be quickly detected and segmented, significantly improving the processing efficiency of crack images compared to manual review. Currently, crack detection and segmentation are generally performed in two steps: first, a detection model is used to locate the crack, and then a semantic segmentation model is used to segment the detected crack. This requires building two separate models, which not only significantly increases the cost of model construction and training but also increases the complexity of the crack image processing flow and reduces the real-time performance of crack image processing. Furthermore, some current deep learning models still have high complexity and require a large amount of computation for image processing, making them unsuitable for real-time applications. Additionally, the highly imbalanced positive and negative samples in crack images can lead to a decline in model performance. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for identifying cracks in concrete dams based on a single model. It uses an instance segmentation model to perform crack detection and segmentation simultaneously, which solves the problem of the cumbersome steps in the step-by-step crack detection and segmentation method. At the same time, the instance segmentation model has been improved to reduce the computational load of the model and improve its adaptability to the highly unbalanced characteristics of crack image categories.

[0006] Therefore, the present invention provides a method for identifying cracks in concrete dams, comprising the following steps:

[0007] S101. Construct a concrete dam crack identification model based on RCIS-YOLO. The concrete dam crack identification model consists of three parts: a backbone network, a neck network, and a head network. The backbone network includes an improved feature extraction module and a 3x3 convolution module. The neck network includes a lightweight feature fusion module, a nearest neighbor upsampling layer, a 1x1 convolution module, and a 3x3 convolution module. The head network includes a prototype masking module and a prediction module.

[0008] S102. Obtain images of concrete dam cracks, and filter and label the obtained concrete dam crack images to obtain a concrete dam crack dataset;

[0009] S103. Input the concrete dam crack dataset into the concrete dam crack identification model, optimize the model parameters of the concrete dam crack identification model based on the composite loss function, train and generate the weights of the concrete dam crack identification model, and obtain the target crack identification model;

[0010] S104. Input the real-time concrete dam crack image into the target crack recognition model, and the target crack recognition model simultaneously outputs the final crack detection and segmentation results.

[0011] Furthermore, the improved feature extraction module includes:

[0012] A multi-branch feature extraction module, comprising a 1x1 depthwise separable convolutional module, a 3x3 depthwise separable convolutional module, and residual connections; and a crack feature enhancement module, comprising a feature learning capability enhancement module, a 1x1 convolutional module, and residual connections; the output features of the multi-branch feature extraction module are input to the crack feature enhancement module for processing to generate the final output features of the improved feature extraction module; wherein, the feature learning capability enhancement module first performs global average pooling on the input feature X in the spatial dimension, compressing the spatial information of each channel into a single scalar to obtain the channel description vector z; then, it learns the nonlinear interaction between channels through a two-layer fully connected network with a bottleneck structure, outputting the attention weights s of each channel; finally, it multiplies the learned channel attention weights s back into the original feature map X channel by channel to obtain the recalibrated feature map output. The expression is:

[0013] ,

[0014] ,

[0015] ,

[0016] ,

[0017] ,

[0018] ,

[0019] In the formula, Represents the set of real numbers, where H, W, and C are the height, width, and number of channels of the feature map, respectively, and z c F represents the global characteristic response of the c-th channel. sq For the global average pooling operator, X c (i, j) represents the feature value of the c-th channel at spatial location (i, j), F ex A channel attention generator representing a fully connected network. Represents the Sigmoid activation function. Represents the ReLU activation function, W1 is the weight matrix of the first fully connected layer, W2 is the weight matrix of the second fully connected layer, and r is the compression ratio. This is a channel-by-channel multiplication.

[0020] Furthermore, the feature learning capability enhancement module generates the recalibrated feature map in the following way: global average pooling is performed on the input feature X in the spatial dimension to obtain the channel description vector z; the nonlinear interaction between channels is learned through a two-layer fully connected network with a bottleneck structure, and the attention weights s of each channel are output; the attention weights s are multiplied back into the original feature map X channel by channel to obtain the recalibrated feature map output.

[0021] Furthermore, the lightweight feature fusion module includes a 3x3 GS convolution module and a 1x1 convolution module; the input features of the 1x1 convolution module are composed of the input features of the lightweight feature fusion module; the input features of the 3x3 GS convolution module are composed of the output features of the 1x1 convolution module; the output features of the 3x3 GS convolution module and the 1x1 convolution module are fused to generate a fused feature; the fused feature is then channel-adjusted through another 1x1 convolution module to generate the output feature of the lightweight feature fusion module.

[0022] Furthermore, the neck network includes a bottom-up upsampling fusion portion and a top-down downsampling fusion portion. The upsampling fusion portion processes the deep feature map through the adjacent upsampling layer to the same size as the feature map of the previous stage, and then superimposes it with the feature map of the previous stage before inputting it into the lightweight feature fusion module to generate an upsampling fusion feature map. The downsampling fusion portion processes the feature map through the 3x3 convolution module to the same size as the feature map of the next stage, and then superimposes it with the feature map of the next stage of the upsampling fusion portion before inputting it into the lightweight feature fusion module to generate a downsampling fusion feature map.

[0023] The composite loss function includes a detection loss subfunction and a segmentation loss subfunction; the detection loss subfunction includes Binary Cross-Entropy Loss and Distribution Focal Loss; the segmentation loss function includes Dice Loss and Focal Loss;

[0024] The composite loss function achieves adaptive balance among different loss terms by adjusting the weight coefficients of each loss term.

[0025] The expression for the composite loss function is:

[0026] ;

[0027] ;

[0028] ;

[0029] In the formula L det For the detection loss function L seg For the segmentation loss function, λ box , λ cls , λ dice and λ focal These are the weighting coefficients.

[0030] Further, in step S102, the acquired concrete dam crack image is subjected to image enhancement processing, which includes histogram equalization, gamma correction or contrast adjustment.

[0031] This invention also discloses a single-model-based concrete dam crack identification system, comprising: a construction module configured to construct an RCIS-YOLO-based concrete dam crack identification model, wherein the concrete dam crack identification model comprises a backbone network, a neck network, and a head network; the backbone network comprises an improved feature extraction module and a 3x3 convolution module; the neck network comprises a lightweight feature fusion module, a nearest neighbor upsampling layer, a 1x1 convolution module, and a 3x3 convolution module; and the head network comprises a prototype mask module and a prediction module.

[0032] Acquisition module: configured to acquire images of concrete dam cracks, and to annotate and preprocess the concrete dam crack images to obtain a concrete dam crack dataset;

[0033] Optimization module: configured to input the concrete dam crack dataset into the concrete dam crack identification model, optimize the model parameters of the concrete dam crack identification model based on the composite loss function, train and generate the weights of the concrete dam crack identification model, and obtain the target crack identification model;

[0034] Recognition module: configured to input real-time concrete dam crack images into the target crack recognition model to obtain the final recognition result.

[0035] The present invention further discloses an electronic device, characterized in that it includes: at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the concrete dam crack identification method described above.

[0036] Compared with existing technologies, the beneficial effects of this invention are as follows: By improving the backbone and neck network structure of the YOLOv8-seg model, the improved feature extraction module significantly enhances the model's ability to extract complex crack features and improves crack detection accuracy, especially in detecting complex backgrounds and subtle cracks. The use of a composite loss function effectively improves the model's learning ability for the main crack features and enhances its adaptability to imbalanced positive and negative crack samples. Simultaneously, considering the constraints of crack geometry, it ensures the integrity of the global crack structure and the accuracy of local details, enabling the model to work stably under different scenarios and conditions. The use of a lightweight feature fusion module improves the feature fusion strategy of the neck network, simplifying the calculation process, reducing the number of model parameters and computational load, and improving the model's inference speed, thus meeting the real-time requirements of concrete dam crack identification tasks. The target crack identification model can simultaneously output the final crack detection and segmentation results, significantly reducing the complexity of the detection and segmentation process. Attached Figure Description

[0037] Figure 1 This is a flowchart of a method for identifying cracks in a concrete dam, provided as an embodiment of the present invention.

[0038] Figure 2 This is a structural block diagram of a concrete dam crack identification system provided in an embodiment of the present invention.

[0039] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0040] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0041] Please see Figure 1 The diagram shows a flowchart of a method for identifying cracks in a concrete dam according to this application.

[0042] Step S101: Construct a concrete dam crack identification model based on RCIS-YOLO. The concrete dam crack identification model includes three parts: a backbone network, a neck network, and a head network. The backbone network includes an improved feature extraction module and a 3×3 convolution module. The neck network includes a lightweight feature fusion module, a proximity upsampling layer, a 1×1 convolution module, and a 3×3 convolution module. The head network includes a prototype mask module and a prediction module.

[0043] In this step, the feature extraction module includes:

[0044] A multi-branch feature extraction module, comprising a 1×1 depthwise separable convolution module, a 3×3 depthwise separable convolution module, and residual connections;

[0045] The input features of a 1×1 depthwise separable convolutional module are composed of the input features of a multi-branch feature extraction module;

[0046] The input features of the 3×3 depthwise separable convolution module are composed of the input features of the multi-branch feature extraction module;

[0047] The input features of the residual connection consist of the input features of the multi-branch feature extraction module;

[0048] The output features of the 1×1 depthwise separable convolutional module, the 3×3 depthwise separable convolutional module, and the residual connection are fused to obtain the output features of the multi-branch feature extraction module;

[0049] The crack feature enhancement module includes a feature learning capability enhancement module, a 1×1 convolution module, and residual connections. Specifically, the feature learning capability enhancement module first performs global average pooling on the input feature X in the spatial dimension, compressing the spatial information of each channel into a single scalar to obtain the channel description vector z. Then, it learns the nonlinear interactions between channels through a two-layer fully connected network with a bottleneck structure, outputting the attention weights s for each channel. Finally, it multiplies the learned channel attention weights s back into the original feature map X channel by channel to obtain the recalibrated feature map output. The expression is:

[0050] ,

[0051] ,

[0052] ,

[0053] ,

[0054] ,

[0055] ,

[0056] In the formula, Represents the set of real numbers, where H, W, and C are the height, width, and number of channels of the feature map, respectively, and z c F represents the global characteristic response of the c-th channel. sq For the global average pooling operator, X c (i, j) represents the feature value of the c-th channel at spatial location (i, j), F ex A channel attention generator representing a fully connected network. Represents the Sigmoid activation function. Represents the ReLU activation function, W1 is the weight matrix of the first fully connected layer, W2 is the weight matrix of the second fully connected layer, and r is the compression ratio. This is channel-by-channel multiplication;

[0057] The input features of the feature learning capability enhancement module are composed of the input features of the crack feature enhancement module;

[0058] The input features of the 1×1 convolutional module are composed of the output features of the feature learning enhancement module;

[0059] The input features of the residual connection consist of the output features of the feature learning capability enhancement module;

[0060] The output features of the crack feature enhancement module are obtained by fusing the output features of the 1×1 convolution module and the residual connection.

[0061] The output features of the multi-branch feature extraction module are input into the crack feature enhancement module for processing, and then the final output features of the improved feature extraction module are generated.

[0062] In the RCIS-YOLO concrete dam crack recognition model, the backbone network consists of multiple 3×3 convolutional modules and an improved feature extraction module connected in series. The features output by the backbone network are mainly used for feature fusion with the input neck network to improve the ability to capture crack edge information and local texture details. These features are generated by the feature extraction module of the backbone network, with the resolution gradually decreasing and the number of channels gradually increasing, as detailed below:

[0063] First, the first layer feature map has a size of 1 / 4H × 1 / 4W and 48 channels, originating from the improved feature extraction module in the first stage. After the image is downsampled by a 3×3 convolution module, the resolution of the feature map is reduced to half that of the original image, and the number of channels is 32. Then, through the improved feature extraction module in the first stage, the resolution is further reduced to 1 / 4, and the number of channels increases to 48. Because this feature has limited semantic information, it will not be used for subsequent feature fusion; it will only serve as input to the next stage feature extraction module.

[0064] Then, the second layer feature is 1 / 8H×1 / 8W in size and has 96 channels, derived from the improved feature extraction module in the second stage. The feature map from the first stage is input into the improved feature extraction module in the second stage to extract shallow features, further reducing the resolution to 1 / 8 and increasing the number of channels to 96. This feature mainly captures the basic edge information and local details of the crack, preserving a high spatial resolution;

[0065] Secondly, the third layer feature has a size of 1 / 16H × 1 / 16 W and 192 channels, derived from the improved feature extraction module in the third stage. The feature map from the second stage is input into the improved feature extraction module in the third stage to extract the mid-layer features, further reducing the resolution to 1 / 16 and increasing the number of channels to 192. This feature introduces more overall crack morphology information on top of edge and texture information, enabling it to capture more details in the crack area;

[0066] Finally, the fourth layer feature has a size of 1 / 32H × 1 / 32W and 384 channels, derived from the improved feature extraction module in the fourth stage. The feature map from the third stage is input into the improved feature extraction module in the fourth stage to extract deep features, further reducing the resolution to 1 / 32 and increasing the number of channels to 384. This feature contains less edge and texture information and is mainly used to provide scale structure information of cracks, supporting subsequent deep feature fusion.

[0067] In this step, the lightweight feature fusion module includes a 3×3GS convolution module and a 1×1 convolution module;

[0068] The input features of the 1×1 convolution module are composed of the input features of the lightweight feature fusion module;

[0069] The input features of a 3×3GS convolutional module are composed of the output features of a 1×1 convolutional module;

[0070] The output features of the 3×3GS convolutional module and the 1×1 convolutional module are fused to generate fused features;

[0071] The fused features are channel-adjusted through another 1×1 convolutional module to generate the output features of the lightweight feature fusion module.

[0072] In the RCIS-YOLO concrete dam crack identification model, the neck network receives feature maps generated in the last three stages of the backbone network, which are divided into a bottom-up upsampling fusion part and a top-down downsampling fusion part.

[0073] The upsampling fusion section processes the deep feature map through adjacent upsampling layers to achieve the same size as the feature map from the previous stage. The upsampled feature map is then superimposed with the feature map from the previous stage and input into the lightweight feature fusion module to generate the upsampled fused feature map, as detailed below:

[0074] First, the feature map from the fourth stage of the backbone network has a size of 1 / 32H × 1 / 32W and 384 channels. After processing by the adjacent upsampling layer, its size is 1 / 16H × 1 / 16W with 384 channels. The feature map from the third stage of the backbone network has a size of 1 / 16H × 1 / 16W and 192 channels. The upsampled feature map and the feature map from the third stage of the backbone network are superimposed and input into the lightweight feature fusion module to generate the third-stage fused feature map, which has a size of 1 / 16H × 1 / 16W and 192 channels.

[0075] First, the feature map from the fourth stage of the backbone network has a size of 1 / 32H × 1 / 32W and 384 channels. After processing by the adjacent upsampling layer, it becomes an upsampled feature map with a size of 1 / 16H × 1 / 16W and 384 channels. The feature map from the third stage of the backbone network has a size of 1 / 16H × 1 / 16W and 192 channels. The upsampled feature map and the feature map from the third stage of the backbone network are superimposed and input into the lightweight feature fusion module to generate an upsampled first-stage fused feature map with a size of 1 / 16H × 1 / 16W and 192 channels.

[0076] Then, the feature map from the third stage of the backbone network has a size of 1 / 16H × 1 / 16W and 192 channels. After processing by the adjacent upsampling layer, it becomes an upsampled feature map with a size of 1 / 8H × 1 / 8W and 192 channels. The feature map from the second stage of the backbone network has a size of 1 / 8H × 1 / 8W and 96 channels. The upsampled feature map and the feature map from the second stage of the backbone network are superimposed and input into the lightweight feature fusion module to generate an upsampled second-stage fused feature map with a size of 1 / 8H × 1 / 8W and 96 channels.

[0077] The output of the upsampling fusion part is the feature map of the fourth stage of the backbone network and the fused feature map of the first and second stages of upsampling.

[0078] The downsampling fusion part is processed by a 3×3 convolution module to be the same size as the feature map of the next stage. The downsampled feature map is then superimposed with the feature map of the next stage of the upsampling fusion part and input into the lightweight feature fusion module to generate the downsampled fused feature map, as follows:

[0079] First, the upsampled second-stage fusion feature map has a size of 1 / 8H × 1 / 8W and 96 channels. After processing by a 3×3 convolution module, it becomes a downsampled feature map with a size of 1 / 16H × 1 / 16W and 192 channels. The upsampled first-stage fusion feature map has a size of 1 / 16H × 1 / 16W and 192 channels. The downsampled feature map and the upsampled first-stage fusion feature map are then superimposed and input into a lightweight feature fusion module to generate a downsampled first-stage fusion feature map with a size of 1 / 16H × 1 / 16W and 192 channels.

[0080] Then, the upsampled first-stage fused feature map has a size of 1 / 16H × 1 / 16W and 192 channels. After processing by a 3×3 convolution module, it becomes a downsampled feature map with a size of 1 / 32H × 1 / 32W and 384 channels. The backbone network's fourth-stage feature map has a size of 1 / 32H × 1 / 32W and 384 channels. The downsampled feature map and the backbone network's fourth-stage feature map are then superimposed and input into a lightweight feature fusion module to generate a downsampled second-stage fused feature map with a size of 1 / 32H × 1 / 32W and 384 channels.

[0081] The output of the downsampling fusion part is the fusion feature map of the second stage of upsampling and the fusion feature map of the first and second stages of downsampling.

[0082] In this step, the prototype mask module includes a 3×3 convolution module and a transposed convolution module. The input to the prototype mask module is the upsampled second-stage fused feature map. The feature map is first adjusted to 64 channels by the 3×3 convolution module, then upsampled by the transposed convolution module, and finally passed through the 3×3 convolution module to eliminate upsampling artifacts and output the prototype mask. The prototype mask has 32 channels and a size of 1 / 4H×1 / 4W.

[0083] In this step, the prediction module includes three branches, each consisting of a 3×3 convolutional module and a 1×1 convolutional module. The input to the prediction module is the upsampled second-stage fused feature map and the downsampled first-stage and second-stage fused feature map. After the feature map undergoes final feature extraction by the 3×3 convolutional module, it is input into the 1×1 convolutional module to obtain the detection box prediction information, category prediction information, and prototype mask coefficient information.

[0084] In the RCIS-YOLO concrete dam crack recognition model, the output information of the prediction module in the head network is subjected to nonmaximum suppression. The prototype mask coefficient information and the prototype mask are linearly combined and then upsampled to obtain the instance mask. The instance mask is then cropped and binarized by combining the detection box prediction information and the category prediction information to obtain the final detection and segmentation results.

[0085] Step S102: Obtain images of concrete dam cracks, and annotate and preprocess the images to obtain a concrete dam crack dataset.

[0086] In this step, the collected concrete dam crack images are enhanced by histogram equalization, gamma correction or contrast adjustment to enhance the contrast of the crack area, and corresponding segmentation label maps are added. The enhanced images and labels are integrated into an image dataset, and the image dataset is divided into training set, validation set and test set.

[0087] Step S103: Input the concrete dam crack dataset into the concrete dam crack identification model, optimize the model parameters of the concrete dam crack identification model based on the composite loss function, train and generate the weights of the concrete dam crack identification model, and obtain the target crack identification model.

[0088] In this step, the preprocessed crack dataset is input into the crack recognition model. The model's predicted output is calculated through forward propagation, and a loss function is calculated based on the ground truth labels and the predicted output. This composite loss function consists of both detection loss and segmentation loss. Simultaneously, to adapt to the geometric features of the cracks, the composite loss function dynamically adjusts the weight allocation during the calculation process, making the model more accurate in identifying the crack trunk and edge regions. Finally, the model parameters are optimized through backpropagation and gradient updates, and iterative training continues until convergence, generating the final weights of the target crack recognition model.

[0089] The composite loss function includes the detection loss sub-functions Binary Cross-Entropy Loss and Distribution Focal Loss, and the segmentation loss sub-functions consist of Dice Loss and Focal Loss;

[0090] The expression for the composite loss function is:

[0091] ;

[0092] ;

[0093] ;

[0094] In the formula L det For the detection loss function L seg For the segmentation loss function, λ box , λ cls , λ dice and λ focal These are the weighting coefficients.

[0095] The composite loss function can achieve adaptive balance among different loss terms by adjusting the values ​​of the weight coefficients, thereby improving the accuracy and robustness of crack detection.

[0096] Step S104: Input the real-time concrete dam crack image into the crack recognition model. The target crack recognition model can simultaneously output the final crack detection and segmentation results.

[0097] In summary, the method in this application significantly enhances the model's ability to extract multi-scale features and improves the accuracy of crack detection through the improved feature extraction module introduced by the backbone and neck structure of the YOLOv8-seg model, especially in the detection of complex backgrounds and fine cracks. The lightweight feature fusion module simplifies the calculation process and greatly improves the model's inference speed. The use of a composite loss function effectively improves the model's ability to perceive crack edges, while considering the constraints of crack geometric characteristics, enhancing its adaptability to diverse crack morphologies, enabling the model to work stably under different scenarios and conditions. The integrated detection and segmentation head structure can output detection and segmentation results simultaneously, greatly reducing the complexity of the crack identification process and meeting the real-time requirements of dam crack identification tasks.

[0098] In one specific embodiment, the experiment was conducted using PyTORCH, with an NVIDIA(R) RTX 5080 GPU used for both training and testing. 200 epochs were performed on a constructed concrete dam crack dataset with a batch size of 8. During training, the image size was uniformly scaled to 512×512, and Adam was used as the optimizer with a learning rate of 0.001.

[0099] To verify the superiority of RCIS-YOLO, it was compared with four instance segmentation models: Mask R-CNN, YOLOv5s-seg (YOLOv5), YOLOv8s-seg (YOLOv8), and YOLOv10s-seg (YOLOv10). Detection and segmentation accuracy were measured using precision (P), recall (R), and the model's mean average precision (mAP) when the IoU threshold was 0.5. 50 The three key evaluation metrics are: parameters (the total number of trainable parameters in the model), computational cost (floats per second, floating-point operations per second, and so on). The experimental results on the dataset in this embodiment are shown in Table 1, with the best results highlighted in bold.

[0100] Table 1: Comparison of Experimental Results for Self-Built Datasets

[0101]

[0102] As can be seen from the indicators in Table 1, among the eight indicators, RCIS-YOLO is only slightly lower than YOLOv8 and YOLOv10 in detection accuracy and segmentation accuracy, respectively. The other six indicators are the best, with the highest overall accuracy and the lowest number of parameters and computational cost. This shows that the model method not only has significant advantages in recognition accuracy and robustness, but also has high efficiency, which can meet the dual requirements of real-time and accuracy in actual dam crack detection.

[0103] Please see Figure 2 The diagram shows a structural block diagram of a concrete dam crack identification system according to this application.

[0104] like Figure 2 As shown, the concrete dam crack identification system 200 includes a construction module 210, an acquisition module 220, an optimization module 230, and an identification module 240.

[0105] The system includes a construction module 210, configured to construct a concrete dam crack recognition model based on RCIS-YOLO. This model comprises a backbone network, a neck network, and a head network. The backbone network includes an improved feature extraction module and a 3×3 convolution module. The neck network includes a lightweight feature fusion module, a nearest-neighbor upsampling layer, a 1×1 convolution module, and a 3×3 convolution module. The head network includes a prototype masking module and a prediction module. An acquisition module 220 is configured to acquire concrete dam crack images and annotate and preprocess them to obtain a concrete dam crack dataset. An optimization module 230 is configured to input the concrete dam crack dataset into the concrete dam crack recognition model, optimize the model parameters based on a composite loss function, train and generate the weights of the concrete dam crack recognition model, and obtain a target crack recognition model. An identification module 240 is configured to input real-time concrete dam crack images into the target crack recognition model to obtain the final identification result.

[0106] It should be understood that Figure 2 The modules and references described in the document Figure 1 The steps described in the text correspond to those in the method described above. Therefore, the operations, features, and corresponding technical effects described above also apply to the method described in the text. Figure 2 The various modules in the document will not be described in detail here.

[0107] In other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the concrete dam crack identification method in any of the above method embodiments.

[0108] In one embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions, which are configured as follows:

[0109] A concrete dam crack identification model based on RCIS-YOLO is constructed. The concrete dam crack identification model consists of three parts: a backbone network, a neck network, and a head network. The backbone network includes an improved feature extraction module and a 3×3 convolution module. The neck network includes a lightweight feature fusion module, a nearest neighbor upsampling layer, a 1×1 convolution module, and a 3×3 convolution module. The head network includes a prototype mask module and a prediction module.

[0110] Images of cracks in concrete dams are acquired, and these images are annotated and preprocessed to obtain a dataset of cracks in concrete dams.

[0111] The concrete dam crack dataset is input into the concrete dam crack identification model. The model parameters of the concrete dam crack identification model are optimized based on the composite loss function. The weights of the concrete dam crack identification model are trained and generated to obtain the target crack identification model.

[0112] The real-time concrete dam crack image is input into the target crack recognition model to obtain the final recognition result.

[0113] Computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of the concrete dam crack identification system, etc. Furthermore, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include memory remotely configured relative to a processor, which can be connected to the concrete dam crack identification system via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0114] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 3 As shown, the device includes a processor 310 and a memory 320. The electronic device may also include an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 3Taking a bus connection as an example, the memory 320 is the computer-readable storage medium described above. The processor 310 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in the memory 320, thereby implementing the concrete dam crack identification method described in the above embodiment. The input device 330 can receive input digital or character information and generate key signal inputs related to user settings and function control of the concrete dam crack identification system. The output device 340 may include a display screen or other display device.

[0115] The aforementioned electronic device can execute the method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in the embodiments of the present invention.

[0116] In one implementation, the aforementioned electronic device is applied to a concrete dam crack identification system for a client application, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0117] A concrete dam crack identification model based on RCIS-YOLO is constructed. The concrete dam crack identification model consists of three parts: a backbone network, a neck network, and a head network. The backbone network includes an improved feature extraction module and a 3×3 convolution module. The neck network includes a lightweight feature fusion module, a nearest neighbor upsampling layer, a 1×1 convolution module, and a 3×3 convolution module. The head network includes a prototype mask module and a prediction module.

[0118] Images of cracks in concrete dams are acquired, and these images are annotated and preprocessed to obtain a dataset of cracks in concrete dams.

[0119] The concrete dam crack dataset is input into the concrete dam crack identification model. The model parameters of the concrete dam crack identification model are optimized based on the composite loss function. The weights of the concrete dam crack identification model are trained and generated to obtain the target crack identification model.

[0120] The real-time concrete dam crack image is input into the target crack recognition model to obtain the final recognition result.

[0121] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0122] This invention is not limited to the above embodiments. Based on the technical solutions disclosed in this invention, those skilled in the art can make some substitutions and modifications to some of the technical features without creative effort, and all such substitutions and modifications are within the protection scope of this invention.

Claims

1. A method for identifying cracks in concrete dams based on a single model, characterized in that, Includes the following steps: S101. Construct a concrete dam crack identification model based on RCIS-YOLO. The concrete dam crack identification model consists of three parts: a backbone network, a neck network, and a head network. The backbone network includes an improved feature extraction module and a 3x3 convolution module. The neck network includes a lightweight feature fusion module, a nearest neighbor upsampling layer, a 1x1 convolution module, and a 3x3 convolution module. The head network includes a prototype masking module and a prediction module. S102. Obtain images of concrete dam cracks, and filter and label the obtained concrete dam crack images to obtain a concrete dam crack dataset; S103. Input the concrete dam crack dataset into the concrete dam crack identification model, optimize the model parameters of the concrete dam crack identification model based on the composite loss function, train and generate the weights of the concrete dam crack identification model, and obtain the target crack identification model; S104. Input the real-time concrete dam crack image into the target crack recognition model, and the target crack recognition model simultaneously outputs the final crack detection and segmentation results.

2. The method for identifying cracks in concrete dams based on a single model according to claim 1, characterized in that, The improved feature extraction module includes: A multi-branch feature extraction module, comprising a 1x1 depthwise separable convolution module, a 3x3 depthwise separable convolution module, and residual connections; A crack feature enhancement module, which includes a feature learning ability enhancement module, a 1x1 convolution module, and residual connections; The output features of the multi-branch feature extraction module are input into the crack feature enhancement module for processing, and then the final output features of the improved feature extraction module are generated. The feature learning enhancement module first performs global average pooling on the input feature X in the spatial dimension, compressing the spatial information of each channel into a single scalar to obtain the channel description vector z. Then, it learns the nonlinear interaction between channels through a two-layer fully connected network with a bottleneck structure, outputting the attention weights s of each channel. Finally, it multiplies the learned channel attention weights s back into the original feature map X channel by channel to obtain the recalibrated feature map output. The expression is: , , , , , , In the formula, Represents the set of real numbers, where H, W, and C are the height, width, and number of channels of the feature map, respectively, and z c F represents the global characteristic response of the c-th channel. sq For the global average pooling operator, X c (i, j) represents the feature value of the c-th channel at spatial location (i, j), F ex A channel attention generator representing a fully connected network. Represents the Sigmoid activation function. Represents the ReLU activation function, W1 is the weight matrix of the first fully connected layer, W2 is the weight matrix of the second fully connected layer, and r is the compression ratio. This is a channel-by-channel multiplication.

3. The method for identifying cracks in concrete dams based on a single model according to claim 2, characterized in that, The feature learning capability enhancement module generates the recalibrated feature map in the following way: global average pooling is performed on the input feature X in the spatial dimension to obtain the channel description vector z; the nonlinear interaction between channels is learned through a two-layer fully connected network with a bottleneck structure, and the attention weights s of each channel are output. The attention weights s are multiplied back into the original feature map X channel by channel to obtain the recalibrated feature map output.

4. The method for identifying cracks in concrete dams based on a single model according to claim 1, characterized in that, The lightweight feature fusion module includes a 3x3 GS convolution module and a 1x1 convolution module; The input features of the 1x1 convolution module are composed of the input features of the lightweight feature fusion module; the input features of the 3x3 GS convolution module are composed of the output features of the 1x1 convolution module; the output features of the 3x3 GS convolution module and the 1x1 convolution module are fused to generate fused features; the fused features are channel-adjusted through another 1x1 convolution module to generate the output features of the lightweight feature fusion module.

5. The method for identifying cracks in concrete dams based on a single model according to claim 1, characterized in that, The neck network includes a bottom-up upsampling fusion part and a top-down downsampling fusion part. The upsampling fusion part processes the deep feature map through the adjacent upsampling layer to the same size as the feature map of the previous stage, and then superimposes it with the feature map of the previous stage before inputting it into the lightweight feature fusion module to generate an upsampling fusion feature map. The downsampling fusion part processes the feature map through the 3x3 convolution module to the same size as the feature map of the next stage, and then superimposes it with the feature map of the next stage of the upsampling fusion part before inputting it into the lightweight feature fusion module to generate a downsampling fusion feature map.

6. The method for identifying cracks in concrete dams based on a single model according to claim 1, characterized in that, The composite loss function includes a detection loss sub-function and a segmentation loss sub-function; The detection loss function includes Binary Cross-Entropy Loss and Distribution Focal Loss; The segmentation loss function includes Dice Loss and Focal Loss; The composite loss function achieves adaptive balance among different loss terms by adjusting the weight coefficients of each loss term. The expression for the composite loss function is: ; ; ; In the formula L det For the detection loss function L seg For the segmentation loss function, λ box , λ cls , λ dice and λ focal These are the weighting coefficients.

7. The method for identifying cracks in concrete dams based on a single model according to claim 1, characterized in that, In step S102, the collected concrete dam crack images are subjected to image enhancement processing, which includes histogram equalization, gamma correction, or contrast adjustment.

8. A method for identifying cracks in concrete dams based on a single model, characterized in that, Includes: a construction module configured to build a concrete dam crack identification model based on RCIS-YOLO. This model comprises a backbone network, a neck network, and a head network. The backbone network includes an improved feature extraction module and a 3x3 convolution module. The neck network includes a lightweight feature fusion module, a nearest-neighbor upsampling layer, a 1x1 convolution module, and a 3x3 convolution module. The head network includes a prototype masking module and a prediction module. Acquisition module: configured to acquire images of concrete dam cracks, and to annotate and preprocess the concrete dam crack images to obtain a concrete dam crack dataset; Optimization module: configured to input the concrete dam crack dataset into the concrete dam crack identification model, optimize the model parameters of the concrete dam crack identification model based on the composite loss function, train and generate the weights of the concrete dam crack identification model, and obtain the target crack identification model; Recognition module: configured to input real-time concrete dam crack images into the target crack recognition model to obtain the final recognition result.

9. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the concrete dam crack identification method according to any one of claims 1 to 7.