Tunnel crack dynamic identification method and device and storage medium

By using a pre-defined tunnel crack identification model and a feature extraction and fusion network based on depthwise separable convolution and dynamic serpentine convolution, the problems of time-consuming and labor-intensive manual patrols and untimely identification are solved, thus achieving efficient and accurate tunnel crack identification.

CN122156955APending Publication Date: 2026-06-05LIAONING TRAFFIC KEXUE RES YUAN

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LIAONING TRAFFIC KEXUE RES YUAN
Filing Date
2026-01-28
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, identifying tunnel cracks through periodic manual patrols is time-consuming and labor-intensive, and cracks cannot be detected in a timely manner, which is prone to identification errors.

Method used

A pre-defined tunnel crack recognition model is adopted, which extracts image features through depth-separable convolutional layers and dynamic serpentine convolutional attention layers, and combines them with a feature fusion network for tunnel crack recognition. The model includes a backbone feature extraction network, an enhanced feature extraction network, and a target recognition network.

Benefits of technology

It improves the efficiency and accuracy of tunnel crack identification, can adaptively focus on slender and tortuous structures in tunnels, accurately capture minute features, and significantly improve the identification effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156955A_ABST
    Figure CN122156955A_ABST
Patent Text Reader

Abstract

The application discloses a kind of tunnel crack dynamic identification method, device and storage medium, including obtaining the tunnel image to be identified;Obtain preset tunnel crack identification model, preset tunnel crack identification model includes main feature extraction network, enhanced feature extraction network, feature fusion network, target identification network, main feature extraction network includes multiple depth separable convolution layers, enhanced feature extraction network includes attention layer of dynamic snake convolution fusion;The tunnel image to be identified is input to preset tunnel crack identification model, the image features in the tunnel image to be identified are extracted in sequence by each depth separable convolution layer, the image features that corresponding depth separable convolution layer outputs are enhanced in feature by each attention layer of dynamic snake convolution fusion, each enhanced feature is fused in feature by feature fusion network, the output feature of feature fusion network is identified in tunnel crack by target identification network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus and storage medium for dynamic identification of tunnel cracks. Background Technology

[0002] Tunnels are key nodes in transportation networks, and their structural safety is directly related to the safety of vehicles and pedestrians. The presence of cracks indicates a weakening of the tunnel structure. Timely identification and treatment of cracks can effectively prevent serious accidents such as tunnel collapses and protect people's lives and property.

[0003] Currently, tunnel cracks are typically identified through periodic manual patrols. However, manual identification is time-consuming and labor-intensive; periodic patrols cannot detect tunnel cracks in a timely manner; and negligence by staff can lead to incorrect identification of tunnel cracks. Summary of the Invention

[0004] This invention provides a method, device, and storage medium for dynamic identification of tunnel cracks, which mainly improves the identification accuracy and efficiency of tunnel cracks, as well as the timeliness of tunnel crack identification.

[0005] According to a first aspect of the present invention, a method for dynamic identification of tunnel cracks is provided, comprising:

[0006] Acquire the image of the tunnel to be identified; A preset tunnel crack recognition model is obtained, wherein the preset tunnel crack recognition model includes a backbone feature extraction network for image feature extraction, an enhancement feature extraction network for enhancing image features, a feature fusion network for feature fusion, and a target recognition network for crack recognition. The backbone feature extraction network includes multiple depth-separable convolutional layers, and the enhancement feature extraction network includes multiple attention layers incorporating dynamic serpentine convolutions. The tunnel image to be identified is input into the preset tunnel crack identification model. Image features are extracted from the tunnel image to be identified sequentially through each depth-separable convolutional layer. The image features output by the corresponding depth-separable convolutional layer are enhanced through each attention layer incorporating dynamic serpentine convolution. The output features of each attention layer incorporating dynamic serpentine convolution are fused through the feature fusion network. Finally, the tunnel crack is identified through the output features of the feature fusion network by the target recognition network, thus obtaining the tunnel crack identification result.

[0007] Optionally, the attention layer incorporating dynamic serpentine convolution includes a first 3×3 standard convolutional layer, an X-view dynamic serpentine convolutional layer, a Y-view dynamic serpentine convolutional layer, a second 3×3 standard convolutional layer, a third 3×3 standard convolutional layer, a first point convolution + sigmoid (activation function) layer, a first Avg pool (Average Pooling Layer) layer, a second Avg pool layer, a second point convolution + sigmoid layer, and a sigmoid layer. The feature enhancement of the image features output by the corresponding depth separable convolutional layer through each attention layer incorporating dynamic serpentine convolution includes: Each attention layer that incorporates dynamic serpentine convolution is taken as a target attention layer that incorporates dynamic serpentine convolution, and the depth-separable convolutional layer corresponding to the target attention layer that incorporates dynamic serpentine convolution is taken as the target depth-separable convolutional layer. The image features output by the target depth separable convolutional layer are respectively input into the first 3×3 standard convolutional layer, the X-view dynamic serpentine convolutional layer, and the Y-view dynamic serpentine convolutional layer. The output features of the X-view dynamic serpentine convolutional layer and the output features of the Y-view dynamic serpentine convolutional layer are then fused by serpentine convolution. The features after snake-like convolution fusion are respectively input into the second Avg pool layer and the second point convolution + sigmoid layer for feature extraction, and the output features of the first 3×3 standard convolution layer are respectively input into the first point convolution + sigmoid layer and the first Avg pool layer for feature extraction. The output features of the first point convolution + sigmoid layer and the output features of the second Avg pool layer are subjected to a first fusion process, and the output features of the first Avg pool layer and the output features of the second point convolution + sigmoid layer are subjected to a second fusion process. The features after the first fusion process and the features after the second fusion process are subjected to a third fusion process. The features after the third fusion process are then subjected to a fourth fusion process with the image features output by the depth-separable convolutional layer of the target. The features after the fourth fusion process are then input into the sigmoid layer for feature enhancement. The feature enhancement result is used as the output feature of the attention layer of the target integrated into the dynamic serpentine convolution.

[0008] Optionally, the feature fusion network includes multiple independent Conv2d layers (Convolutional 2D Layers), a first fused Conv2d layer, a second fused Conv2d layer, and multiple BI (Bilinear Interpolation) layers; The feature fusion process, which fuses the output features of each attention layer incorporated into the dynamic serpentine convolution through the feature fusion network, includes: The output features of each attention layer integrated with dynamic serpentine convolution are input to the corresponding independent Conv2d layer for feature filtering, and the output features of each attention layer integrated with dynamic serpentine convolution are input to the fused Conv2d layer for feature filtering. The features selected by each independent Conv2d layer are input into the corresponding BI layer for bilinear interpolation. The interpolated features of each BI layer are then fused with the features selected by the fused Conv2d layer. The fused features are then input into the second fused Conv2d layer for feature fusion. The features output by the second fused Conv2d layer are then used as the output features of the feature fusion network.

[0009] Optionally, the backbone feature extraction network further includes multiple HD (High-Definition, wavelet downsampling) layers; The step of sequentially extracting image features from the tunnel image to be identified through each of the depth-separable convolutional layers includes: Image features in the tunnel image to be identified are extracted sequentially by each of the depth-separable convolutional layers. Wavelet downsampling is performed on the output features of the corresponding depth-separable convolutional layer by each HD layer, and the features obtained by wavelet downsampling are used as the corresponding image features.

[0010] Optionally, after identifying tunnel cracks by using the output features of the feature fusion network through the target recognition network to obtain tunnel crack identification results, the method further includes: The attention distribution information of the preset tunnel crack identification model during the crack identification process of the tunnel image to be identified is determined, and the high attention area and low attention area of ​​the preset tunnel crack identification model for the tunnel image to be identified are determined based on the attention distribution information. Based on the high-attention area and the low-attention area, a heat map is generated for the tunnel crack identification process. Based on the heat map, the crack identification effect of the preset tunnel crack identification model is determined.

[0011] Optionally, before obtaining the preset tunnel crack identification model, the method further includes: Construct a pre-defined initial tunnel crack identification model; Obtain a sample dataset, wherein the sample dataset includes sample tunnel images with tunnel crack labels, the tunnel crack labels including crack bounding boxes and crack types; The sample dataset is divided into a training set and a test set. The preset initial tunnel crack identification model is trained using the training set, and the trained preset initial tunnel crack identification model is tested using the test set. Finally, the trained preset initial tunnel crack identification model that meets the test conditions is taken as the preset tunnel crack identification model.

[0012] Optionally, before inputting the tunnel image to be identified into the preset tunnel crack identification model, the method further includes: Determine the grayscale image corresponding to the tunnel image to be identified, determine the probability of occurrence of each grayscale level in the grayscale image, and determine the total number of grayscale levels in the grayscale image. Based on the probability of occurrence of each grayscale level and the total number of grayscale levels, determine the grayscale complexity of the tunnel image to be identified. The horizontal and vertical gradients of each pixel in the grayscale image are determined. Based on the horizontal and vertical gradients, the gradient magnitude of the corresponding pixel is determined. Based on the gradient magnitude of each pixel, the gradient complexity of the tunnel image to be identified is determined. Determine the image overlay box and the box size of the image overlay box, and determine the image size of the tunnel image to be identified. Based on the box size and the image size, determine the analysis scale, determine the total number of image overlay boxes required to completely cover the tunnel image to be identified, and determine the structural complexity of the tunnel image to be identified based on the total number of boxes and the analysis scale. The weight coefficients corresponding to the gray-level complexity, the gradient complexity, and the structural complexity are determined respectively. Based on the weight coefficients, the gray-level complexity, the gradient complexity, and the structural complexity are weighted and summed to obtain the image complexity of the tunnel image to be identified. Determine an image quality enhancement method that is compatible with the image complexity, and use the image quality enhancement method to enhance the image quality of the tunnel image to be identified; The step of inputting the tunnel image to be identified into the preset tunnel crack identification model includes: The enhanced image of the tunnel to be identified is input into the preset tunnel crack identification model.

[0013] According to a second aspect of the present invention, a dynamic identification device for tunnel cracks is provided, comprising: An image acquisition unit is used to acquire images of the tunnel to be identified. The model acquisition unit is used to acquire a preset tunnel crack recognition model, wherein the preset tunnel crack recognition model includes a backbone feature extraction network for image feature extraction, an enhancement feature extraction network for enhancing image features, a feature fusion network for feature fusion, and a target recognition network for crack recognition. The backbone feature extraction network includes multiple depth-separable convolutional layers, and the enhancement feature extraction network includes multiple attention layers incorporating dynamic serpentine convolutions. The crack identification unit is used to input the tunnel image to be identified into the preset tunnel crack identification model, extract image features from the tunnel image to be identified sequentially through each depth-separable convolutional layer, enhance the image features output by the corresponding depth-separable convolutional layer through each attention layer incorporating dynamic serpentine convolution, fuse the output features of each attention layer incorporating dynamic serpentine convolution through the feature fusion network, and identify tunnel cracks through the output features of the feature fusion network through the target identification network to obtain the tunnel crack identification result.

[0014] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method for dynamic identification of tunnel cracks.

[0015] According to a fourth aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described dynamic identification method for tunnel cracks.

[0016] According to the present invention, a method, apparatus, and storage medium for dynamic identification of tunnel cracks are provided. Compared with the current method of identifying tunnel cracks through manual periodic patrols, the present invention inputs the image of the tunnel to be identified into a preset tunnel crack identification model. Image features are extracted from the image of the tunnel to be identified sequentially through each depth-separable convolutional layer. Attention layers incorporating dynamic serpentine convolutions enhance the image features output by the corresponding depth-separable convolutional layers. A feature fusion network fuses the output features of each attention layer incorporating dynamic serpentine convolutions. Finally, a target recognition network identifies the tunnel cracks based on the output features of the feature fusion network, resulting in a tunnel crack identification result. Thus, a crack identification model with dynamic serpentine convolutions is used to identify tunnel cracks. The identification process requires no manual intervention, improving the efficiency and accuracy of tunnel crack identification. Furthermore, the characteristics of tunnel cracks are similar to the deformation characteristics of serpentine curves. The dynamic serpentine convolution operation can adaptively focus on the slender and tortuous local structures in the tunnel, thereby accurately capturing the minute features of tubular structures such as cracks, significantly improving the identification effect of tunnel cracks. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 A flowchart of a method for dynamic identification of tunnel cracks provided by an embodiment of the present invention is shown; Figure 2 A schematic diagram of a DSLKA-1 structure provided by an embodiment of the present invention is shown; Figure 3 A schematic diagram of a DSLKA-2 structure provided by an embodiment of the present invention is shown; Figure 4 A schematic diagram of a DSLKA-3 structure provided by an embodiment of the present invention is shown; Figure 5 A schematic diagram of a DSLKA-4 structure provided by an embodiment of the present invention is shown; Figure 6 A flowchart of another method for dynamic identification of tunnel cracks provided by an embodiment of the present invention is shown; Figure 7 A schematic diagram of a feature fusion network structure provided by an embodiment of the present invention is shown; Figure 8 This diagram shows a partial structural schematic of a preset tunnel crack identification model provided in an embodiment of the present invention. Figure 9 This diagram illustrates the identification results of a five-model network for tunnel cracks provided in an embodiment of the present invention. Figure 10 This diagram illustrates the structure of a dynamic identification device for tunnel cracks provided in an embodiment of the present invention. Figure 11 This invention provides a schematic diagram of the structure of another dynamic tunnel crack identification device according to an embodiment of the present invention. Figure 12 A schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0018] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present application can be combined with each other.

[0019] Currently, the method of identifying tunnel cracks by periodic manual patrols is time-consuming and labor-intensive; periodic patrols cannot detect tunnel cracks in a timely manner; and due to the negligence of the staff, tunnel cracks may be identified incorrectly.

[0020] To address the aforementioned problems, embodiments of the present invention provide a method for dynamic identification of tunnel cracks, such as... Figure 1 As shown, the method includes: 101. Obtain the image of the tunnel to be identified.

[0021] The tunnel images are captured in real time using imaging devices such as cameras, customized components such as linear array industrial cameras and fixed-focus lenses, and these tunnel images can be images of highway tunnels.

[0022] 102. Obtain a preset tunnel crack recognition model, wherein the preset tunnel crack recognition model includes a backbone feature extraction network for image feature extraction, an enhancement feature extraction network for enhancing image features, a feature fusion network for feature fusion, and a target recognition network for crack recognition. The backbone feature extraction network includes multiple depth-separable convolutional layers, and the enhancement feature extraction network includes multiple attention layers incorporating dynamic serpentine convolutions.

[0023] In this embodiment of the invention, to improve the crack recognition accuracy of the preset tunnel crack recognition model, it is first necessary to train and construct the preset tunnel crack recognition model. Based on this, the method includes: constructing a preset initial tunnel crack recognition model; obtaining a sample dataset, wherein the sample dataset includes sample tunnel images with tunnel crack labels, and the tunnel crack labels include crack bounding boxes and crack types; dividing the sample dataset into a training set and a test set, using the training set to train the preset initial tunnel crack recognition model, and using the test set to test the trained preset initial tunnel crack recognition model, and finally using the trained preset initial tunnel crack recognition model that meets the test conditions as the preset tunnel crack recognition model.

[0024] The crack types include transverse cracks, longitudinal cracks, diagonal cracks, and mesh cracks. This dataset includes images from multiple tunnels, primarily showing cracks in the tunnel arch and sidewall lining. The dataset contains images with bounding boxes for various crack types. The structure of the preset initial tunnel crack identification model can be the same as the network structure of the preset tunnel crack identification model.

[0025] Specifically, during model training, a pre-defined initial tunnel crack recognition model is first constructed, followed by the acquisition of a sample dataset. The dataset must contain all necessary files. The data is then converted to a format understandable by the pre-defined initial tunnel crack recognition model. Finally, the model is trained and tested. Specifically, the dataset can be divided first: using random or specific strategies, such as stratified sampling, the sample dataset is divided into training and test sets. The training set is then used to train the model, and the test set is used to test the trained model, evaluating its performance on unseen data. Precision, recall, and other metrics on the test set are calculated and recorded. If the model performance does not meet requirements, it can return to the training phase for further iterations or adjustments. This process yields a pre-defined tunnel crack recognition model that meets the requirements. For example, training can be performed on the network within the model, with all networks trained and validated in the same experimental environment. The experiment can use a Windows 11 operating system PC as the runtime environment to complete the training and testing of the network model. The hardware required for training includes, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), video memory, and system memory. The performance of the model network is evaluated using metrics such as Dice coefficient, cross-union ratio, average cross-union ratio, class pixel accuracy (CPA), average pixel accuracy, pixel accuracy, and number of parameters.

[0026] In another embodiment of the present invention, in order to improve the crack recognition accuracy of the model, during the model training process, the structure of the attention layer (DSLKA, Deformable Large Kernel Attention) in the model can be gradually modified to obtain the DSLKA structure with the best feature enhancement effect. The gradual training modification process of the DSLKA structure is as follows: the depthwise convolution and depth dilation convolution in DSLKA are replaced with dynamic serpentine convolutions with horizontal and vertical viewpoints, and the modified DSLKA structure is called DSLKA-1, such as... Figure 2As shown in the figure, DSConv stands for Depthwise Separable Convolution, DSConv-X is the depthwise separable convolution in the X direction, DSConv-Y is the depthwise separable convolution in the Y direction, and Conv is the convolution kernel. During training, it was found that the result of using dynamic serpentine convolutions in series—that is, extracting tubular features on top of features extracted by one dynamic serpentine convolution—was not ideal in terms of recognition performance; that is, the feature enhancement effect of DSLKA-1 was not ideal. Therefore, the DSLKA-1 structure needs to be further modified by parallelizing the dynamic serpentine convolutions in two directions and then cascading the channels in subsequent processes to simultaneously acquire feature information from two directions in the same dimension. The difference between DSLKA-1 and DSLKA-2 is that DSLKA-1 extracts features in one direction and then extracts features in another direction, resulting in abstract and disordered extracted features. The improved DSLKA-1 is referred to as DSLKA-2, and the structure of DSLKA-2 is as follows. Figure 3 As shown. To further improve the crack recognition performance of the model, a sigmoid activation function needs to be added to the DSLKA-2 structure to better weight the input and optimize the classification of the final result. The improved DSLKA-2, known as DSLKA-3, has the following structure. Figure 4 As shown. To strike a balance between performance and parameter quantity, the performance of DSLKA-3 needs to be extended. Since the attention mechanism is only used in the splicing part of the network, the increased computational complexity of DSLKA-3 will not cause a significant increase in the overall network parameters. Therefore, the standard convolution and dynamic serpentine convolution in DSLKA-3 are combined and designed in parallel to obtain DSLKA-4. The structure of DSLKA-4 is as follows. Figure 5 As shown, the left side of DSLKA-4 uses a double-layer 3×3 convolution, which is then divided into two branches: average pooling and point convolution + sigmoid activation function; the right side uses parallel dual-view dynamic serpentine convolution, which is then concatenated and followed by a 3×3 standard convolution, and then, like the left side, divided into two output branches. The four outputs are multiplied by cross matrices and then concatenated. Finally, matrix multiplication is performed with the original input, and the sigmoid activation function is used to obtain the final output result. Thus, during the training process of the attention layer in the model, by continuously changing the attention layer structure, the DSLKA-4 structure with satisfactory feature enhancement effect is gradually obtained. Finally, the DSLKA-4 structure is used as the attention layer in the preset tunnel crack recognition model that incorporates dynamic serpentine convolution. In this embodiment of the invention, it is simply referred to as the DSLKA layer.

[0027] Furthermore, during the training of the feature fusion network in the model, each fusion branch in the initial feature fusion network of the initial tunnel crack recognition model is equipped with a corresponding loss function, which participates in the calculation of the final loss function of the model, thus directly affecting the training effect of the network. Based on this, different loss functions are combined to optimize the model performance. This invention embodiment can use two loss functions: the cross-entropy loss function and the Dice loss function. Cross-entropy loss function... As shown below:

[0028] Where y represents the real label. The labels are predicted by the initial tunnel crack identification model. Since the target task is the identification of small target areas such as tunnel cracks, the Dice loss function, suitable for small target area identification, is chosen, and its formula is shown below:

[0029] To verify the specific impact of different loss functions on network performance, ablation experiments can be conducted. (Table L) BD The weighted function for the cross-entropy loss function and the Dice loss function is shown in the following formula:

[0030] Five different combinations of loss functions were applied to the five branches of the feature fusion network. The experimental results comparing the different loss functions are shown in Table 1. In the first two rows, the network performance is low when each branch uses only one loss function, with an MIoU (Mean Intersection over Union) of approximately 70.5%. In the third and fourth rows, since the fifth branch (L5) is the final step in feature fusion, using a weighted loss function significantly impacts network performance, improving MIoU by about 0.5%. In the last row, when all branches of the network use the weighted loss function L... BD At that time, network performance was significantly improved, with MIoU reaching 73.6%, an improvement of about 3% compared to using a single loss function. In the table, IoU represents Intersection over Union (IoU), CPA represents class pixel accuracy, MPA represents average pixel accuracy, and Dice represents a set similarity metric.

[0031] Table of experimental comparison results for different loss functions

[0032] The data in the table shows that the model using the weighted loss function (UNet+BD) converges the fastest and has the lowest loss value, while the other four networks converge more slowly. Therefore, a hybrid weighted loss function is used for model training. The model is ultimately trained using this hybrid weighted loss function.

[0033] Furthermore, after training and building the preset tunnel crack identification model, when tunnel crack identification is needed, the preset tunnel crack identification model can be directly obtained.

[0034] 103. Input the tunnel image to be identified into a preset tunnel crack identification model. Extract image features from the tunnel image to be identified sequentially through each depth-separable convolutional layer. Enhance the image features output by the corresponding depth-separable convolutional layer through each attention layer incorporating dynamic serpentine convolution. Fuse the output features of each attention layer incorporating dynamic serpentine convolution through a feature fusion network. Identify tunnel cracks through the output features of the feature fusion network using a target recognition network to obtain the tunnel crack identification result.

[0035] Specifically, when tunnel crack identification is required, image features are sequentially extracted from the tunnel image to be identified through each depth-separable convolutional layer. Attention layers incorporating dynamic serpentine convolutions enhance the output features of the corresponding depth-separable convolutional layers. A feature fusion network fuses the output features of each attention layer incorporating dynamic serpentine convolutions. Finally, a target recognition network identifies the tunnel cracks based on the output features of the feature fusion network, obtaining the crack location and type in the tunnel image. Based on the crack location, bounding boxes can be drawn for the cracks in the tunnel image. This embodiment of the invention uses a crack identification model with dynamic serpentine convolutions to identify tunnel cracks. The identification process requires no manual intervention, improving the efficiency and accuracy of tunnel crack identification. Furthermore, the characteristics of tunnel cracks are similar to the deformation characteristics of serpentine curves; the dynamic serpentine convolution operation can adaptively focus on the slender and tortuous local structures in the tunnel, thereby accurately capturing the minute features of tubular structures such as cracks, significantly improving the identification effect of tunnel cracks.

[0036] According to the present invention, a dynamic tunnel crack identification method, compared with the current method of identifying tunnel cracks through manual periodic patrols, involves inputting the tunnel image to be identified into a preset tunnel crack identification model. Image features are extracted sequentially from the tunnel image through each depth-separable convolutional layer. Attention layers incorporating dynamic serpentine convolutions enhance the image features output by the corresponding depth-separable convolutional layers. A feature fusion network fuses the output features of each attention layer incorporating dynamic serpentine convolutions. Finally, a target recognition network identifies the tunnel cracks based on the output features of the feature fusion network, yielding the tunnel crack identification result. Thus, a crack identification model with dynamic serpentine convolutions is used to identify tunnel cracks, eliminating the need for manual intervention and improving the efficiency and accuracy of tunnel crack identification. Furthermore, the characteristics of tunnel cracks are similar to the deformation characteristics of serpentine curves; the dynamic serpentine convolution operation can adaptively focus on the slender and tortuous local structures in the tunnel, thereby accurately capturing the minute features of tubular structures such as cracks, significantly improving the tunnel crack identification effect.

[0037] Furthermore, to better illustrate the tunnel crack identification process based on dynamic serpentine convolution, as a refinement and extension of the above embodiments, this invention provides another dynamic tunnel crack identification method, such as... Figure 6 As shown, the method includes: 201. Obtain the image of the tunnel to be identified.

[0038] Specifically, images of the tunnel walls are captured in real time using a camera device to obtain images of the tunnel to be identified, and cracks in the images of the tunnel to be identified are identified in real time.

[0039] 202. Obtain a preset tunnel crack recognition model, wherein the preset tunnel crack recognition model includes a backbone feature extraction network for image feature extraction, an enhancement feature extraction network for enhancing image features, a feature fusion network for feature fusion, and a target recognition network for crack recognition. The backbone feature extraction network includes multiple depth-separable convolutional layers, and the enhancement feature extraction network includes multiple attention layers incorporating dynamic serpentine convolutions.

[0040] Specifically, the attention layer incorporating dynamic serpentine convolutions includes a first 3×3 standard convolutional layer (3×3Conv), an X-view dynamic serpentine convolutional layer (DSConv-X), a Y-view dynamic serpentine convolutional layer (DSConv-Y), a second 3×3 standard convolutional layer, a third 3×3 standard convolutional layer, a first point convolution + sigmoid (activation function) layer, a first Avg pooling layer, a second Avg pooling layer, a second point convolution + sigmoid layer, and a sigmoid layer. The feature fusion network includes multiple independent Conv2d layers (Convolutional 2D Layers), a first fused Conv2d layer, a second fused Conv2d layer, and multiple BI (Bilinear Interpolation) layers. The backbone feature extraction network includes multiple depthwise separable convolutional layers and multiple HD (High-Definition, wavelet downsampling) layers.

[0041] 203. Input the tunnel image to be identified into a preset tunnel crack identification model. Extract image features from the tunnel image to be identified sequentially through each depth-separable convolutional layer. Enhance the image features output by the corresponding depth-separable convolutional layer through each attention layer incorporating dynamic serpentine convolution. Fuse the output features of each attention layer incorporating dynamic serpentine convolution through a feature fusion network. Identify tunnel cracks through the output features of the feature fusion network using a target recognition network to obtain the tunnel crack identification result.

[0042] In this embodiment of the invention, to improve the model's recognition performance on images, the image can be pre-enhanced. Based on this, the method includes: determining a grayscale image corresponding to the tunnel image to be recognized, determining the probability of occurrence of each grayscale level in the grayscale image, determining the total number of grayscale levels in the grayscale image, and determining the grayscale complexity of the tunnel image to be recognized based on the probability of occurrence of each grayscale level and the total number of grayscale levels; determining the horizontal and vertical gradients of each pixel in the grayscale image, determining the gradient magnitude of the corresponding pixel based on the horizontal and vertical gradients, and determining the gradient complexity of the tunnel image to be recognized based on the gradient magnitude of each pixel; and determining the image overlay box and the box size of the image overlay box. The process involves determining the image size of the tunnel image to be identified, determining the analysis scale based on the box size and the image size, determining the total number of image coverage boxes required to completely cover the tunnel image to be identified, and determining the structural complexity of the tunnel image to be identified based on the total number of boxes and the analysis scale. Weight coefficients are then determined for the grayscale complexity, gradient complexity, and structural complexity, respectively. Based on these weight coefficients, the grayscale complexity, gradient complexity, and structural complexity are weighted and summed to obtain the image complexity of the tunnel image to be identified. Finally, an image quality enhancement method suitable for the image complexity is determined, and the image quality enhancement method is used to enhance the image quality of the tunnel image to be identified.

[0043] Specifically, the calculation process for grayscale complexity is as follows: First, the grayscale image is divided into grayscale levels, such as black areas being classified as grayscale level 0 and white areas as grayscale level 1. In the grayscale image, the probability p of each grayscale level k is determined. k The total number of gray levels L is determined, and then the gray-level complexity of the tunnel image to be identified is determined according to the following formula. :

[0044] Meanwhile, the gradient complexity calculation process is as follows: For each pixel in the grayscale image, an n×n neighborhood is selected centered on it. The grayscale values ​​of this neighborhood are convolved with the horizontal and vertical convolution kernels respectively to obtain the horizontal and vertical gradients of each pixel. If the horizontal gradient of pixel i is... The vertical gradient is The gradient magnitude of pixel i is then calculated using the following formula. :

[0045] Furthermore, the average gradient magnitude of each pixel in the grayscale image is used as the gradient complexity of the tunnel image to be identified. .

[0046] Meanwhile, the calculation process for structural complexity is as follows: First, based on the box size and image size, determine the ratio of the image covering the box size to the size of the tunnel image to be identified, and use this ratio as the analysis scale r. Then, determine the structural complexity according to the following formula. :

[0047] Where N is the total number of image coverage boxes required to fully cover the image of the tunnel to be identified.

[0048] Further, weighting coefficients for grayscale complexity, gradient complexity, and structural complexity are determined according to actual needs. Based on these weighting coefficients, a weighted sum of each complexity is obtained to obtain the comprehensive complexity as the image complexity of the tunnel image to be identified. Then, a preset image quality enhancement configuration table is obtained. This table stores various image quality enhancement methods corresponding to different image complexities, such as model enhancement and curve enhancement. The appropriate image quality enhancement method for the tunnel image to be identified is obtained from the preset image quality enhancement configuration table, and this method is used to enhance the image quality of the tunnel image to be identified. If the image quality enhancement method is curve enhancement, the image quality enhancement curve corresponding to the tunnel image to be identified is obtained. The method of enhancing the image quality using the image quality enhancement curve includes: determining the pixel value corresponding to each pixel point i in the tunnel image to be identified. Determine the maximum pixel value M in each pixel value; based on the maximum pixel value M, use the image quality enhancement curve to adjust the image quality of each pixel value. Perform pixel mapping to obtain the value of each mapped pixel. ,in, , k is the steepness parameter of the image quality enhancement curve, and c is the midpoint offset parameter of the image quality enhancement curve. Finally, it is determined by the value of each mapped pixel. An enhanced image of the tunnel to be identified is generated. This enhanced image is then input into the preset tunnel crack identification model for crack identification.

[0049] Furthermore, after inputting the enhanced tunnel image to be identified into the preset tunnel crack identification model, the first step is to use the backbone feature extraction network in the model to extract image features. Based on this, the method includes: sequentially extracting image features from the tunnel image to be identified through each depth-separable convolutional layer, performing wavelet downsampling processing on the output features of the corresponding depth-separable convolutional layer through each HD layer, and using the features obtained by wavelet downsampling processing as the corresponding image features.

[0050] Specifically, the depthwise separable convolutional layer includes: the first DDSC layer (Depthwise Dense Separable Convolution), the second DDSC layer, the third DDSC layer, the fourth DDSC layer, and the fifth DDSC layer; the HD layer includes: the first HD layer, the second HD layer, the third HD layer, and the fourth HD layer. First, the tunnel image to be identified is input into the first DDSC layer for two-layer depthwise separable convolution. The output features of the first DDSC layer are then input into the first HD layer for wavelet downsampling. The output features of the first HD layer are then input into the second DDSC layer for two-layer depthwise separable convolution. The output features of the second DDSC layer are then input into the second HD layer for wavelet downsampling. The output features of the second HD layer are then input into the third DDSC layer for two-layer depthwise separable convolution. The output features of the third DDSC layer are then input into the third HD layer for wavelet downsampling. The output features of the third HD layer are then input into the fourth DDSC layer for two-layer depthwise separable convolution. The output features of the fourth DDSC layer are then input into the fifth DDSC layer for two-layer depthwise separable convolution, resulting in the output features of the fifth DDSC layer. The output features of the first HD layer, the second HD layer, the third HD layer, the fourth DDSC layer, and the fifth DDSC layer are then used as the image features extracted sequentially from the tunnel image to be identified by the depthwise separable convolution layers.

[0051] Furthermore, to improve the crack recognition accuracy, it is also necessary to utilize attention layers incorporating dynamic serpentine convolution to enhance the image features extracted sequentially from the depth-separable convolutional layers in the tunnel image to be identified. Based on this, the method includes: taking any attention layer incorporating dynamic serpentine convolution as a target attention layer incorporating dynamic serpentine convolution; taking the depth-separable convolutional layer corresponding to the target attention layer incorporating dynamic serpentine convolution as the target depth-separable convolutional layer; inputting the image features output by the target depth-separable convolutional layer into the first 3×3 standard convolutional layer, the X-view dynamic serpentine convolutional layer, and the Y-view dynamic serpentine convolutional layer respectively; performing serpentine convolution fusion processing on the output features of the X-view dynamic serpentine convolutional layer and the output features of the Y-view dynamic serpentine convolutional layer; and inputting the fused features into the second Avg. Feature extraction is performed on the pooling layer and the second point convolution + sigmoid layer. The output features of the first 3×3 standard convolutional layer are input into the first point convolution + sigmoid layer and the first Avg pooling layer for feature extraction. The output features of the first point convolution + sigmoid layer and the output features of the second Avg pooling layer are subjected to a first fusion process. The output features of the first Avg pooling layer and the output features of the second point convolution + sigmoid layer are subjected to a second fusion process. The features after the first fusion process and the features after the second fusion process are subjected to a third fusion process. The features after the third fusion process are subjected to a fourth fusion process with the image features output by the depth-separable convolutional layer of the target. The features after the fourth fusion process are input into the sigmoid layer for feature enhancement. The feature enhancement result is used as the output feature of the attention layer of the target integrated into the dynamic serpentine convolution.

[0052] Specifically, each attention layer incorporating dynamic snake-shaped convolution includes a first DSLKA (Dynamic Snake-shaped Large Kernel Attention) layer, a second DSLKA layer, a third DSLKA layer, and a fourth DSLKA layer. The output features of the first HD layer are input to the first DSLKA layer for feature enhancement; the output features of the second HD layer are input to the second DSLKA layer for feature enhancement; the output features of the third HD layer are input to the third DSLKA layer for feature enhancement; and the output features of the fourth HD layer are input to the fourth DSLKA layer for feature enhancement, thus obtaining the output features of each DSLKA layer. This embodiment of the invention enhances image features by introducing attention layers with dynamic snake-shaped convolution. During feature enhancement, the meandering path of a snake's movement can be mimicked. The non-linear convolution path enhances the perception of curved structures, such as tunnel outlines and pipe orientations, helping to extract tunnel-specific geometric features and thereby improving the accuracy of subsequent tunnel crack identification.

[0053] Furthermore, it is necessary to perform feature fusion on the output features of each attention layer incorporated into the dynamic serpentine convolution through a feature fusion network. Based on this, the method includes: inputting the output features of each attention layer incorporated into the dynamic serpentine convolution into the corresponding independent Conv2d layer for feature filtering, and inputting the output features of each attention layer incorporated into the dynamic serpentine convolution into the fusion Conv2d layer for feature filtering; inputting the features filtered by each independent Conv2d layer into the corresponding BI layer for bilinear interpolation of features; performing feature fusion processing with the interpolated features of each BI layer and the features filtered by the fusion Conv2d layer; inputting the features after feature fusion processing into the second fusion Conv2d layer for feature fusion; and using the features output by the second fusion Conv2d layer as the output features of the feature fusion network.

[0054] Specifically, such as Figure 7The schematic diagram of the feature fusion network structure shown includes multiple independent Conv2d layers, namely a first Conv2d layer, a second Conv2d layer, a third Conv2d layer, and a fourth Conv2d layer; each BI layer includes a first BI layer, a second BI layer, a third BI layer, and a fourth BI layer. The output features of the first DSLKA layer are input into the first Conv2d layer for feature filtering, and then input into the first BI layer for interpolation. Similarly, the output features of the second DSLKA layer are input into the second Conv2d layer for feature filtering, and then input into the second BI layer for interpolation. The output features of the third DSLKA layer are input into the third Conv2d layer for feature filtering, and then input into the third BI layer for interpolation. Finally, the output features of the fourth DSLKA layer are input into the fourth Conv2d layer for feature filtering, and then input into the fourth BI layer for interpolation. Simultaneously, the output features of the first DSLKA layer, the second DSLKA layer, the third DSLKA layer, and the fourth DSLKA layer are input into the first fusion Conv2d layer for feature fusion. Then, the output features of the first BI layer, the second BI layer, the third BI layer, and the fourth BI layer, along with the output features of the first fusion Conv2d layer, are input into the second fusion Conv2d layer for feature fusion. The output features of the feature fusion network are then output through the second fusion Conv2d layer.

[0055] like Figure 8 This diagram illustrates the structure of a preset tunnel crack identification model provided by an embodiment of the present invention. The output features of the feature fusion network are ultimately input to the target identification network, which outputs the cracks and their categories in the tunnel image. Experiments have shown that this preset tunnel crack identification model outperforms other networks in identifying tunnel cracks. Figure 9 The image shows the identification results of five different model networks for tunnel cracks. The last column shows the identification results of the preset tunnel crack identification model provided in this embodiment of the invention for tunnel images.

[0056] 204. Determine the attention distribution information of the preset tunnel crack recognition model during the crack recognition process of the tunnel image to be recognized, and determine the high attention area and low attention area of ​​the preset tunnel crack recognition model for the tunnel image to be recognized based on the attention distribution information.

[0057] 205. Based on high-attention areas and low-attention areas, generate a heat map of the tunnel crack identification process. Based on the heat map, determine the crack identification effect of the preset tunnel crack identification model.

[0058] Specifically, during the forward propagation of the model, gradient information of crack categories is acquired, and this gradient information flows into the final convolutional layer. For the feature map of the final convolutional layer, the global average pooling value of the gradient for each channel is calculated and used as the weight for that channel. These weights are then weighted and combined with the corresponding feature maps to obtain a weighted feature map combination, thereby determining the model's attention distribution information when identifying cracks in the tunnel image to be identified. This attention distribution information reflects the model's degree of attention to different regions of the image. Based on the attention distribution information, a threshold is set. Image regions with attention values ​​higher than this threshold are identified as high-attention regions, which are the parts that the model focuses on during crack identification and contain crack features or important information related to crack identification. Image regions with attention values ​​lower than this threshold are identified as low-attention regions, which have less impact on the model's crack identification decisions. Based on the division of high-attention and low-attention regions, a heatmap of the tunnel crack identification process is generated. For example, in a heatmap, high-attention areas can be represented by a brighter color, such as red, while low-attention areas can be represented by a darker color, such as blue. This color difference visually demonstrates the model's attention distribution during crack identification. Observing the overlap rate between high-attention areas and actual crack locations in the heatmap is crucial. A high overlap rate indicates good tunnel crack identification; conversely, a low overlap rate, or the presence of many high-attention areas not located at actual crack locations, indicates poor crack identification. In this case, model retraining is necessary.

[0059] According to another method for dynamic identification of tunnel cracks provided by the present invention, compared with the current method of identifying tunnel cracks through manual periodic patrols, the present invention inputs the image of the tunnel to be identified into a preset tunnel crack identification model. Image features are extracted sequentially from the image of the tunnel to be identified through each depth-separable convolutional layer. Feature enhancement is performed on the image features output by the corresponding depth-separable convolutional layer through each attention layer incorporating dynamic serpentine convolution. Feature fusion is performed on the output features of each attention layer incorporating dynamic serpentine convolution through the feature fusion network. Finally, tunnel crack identification is performed on the output features of the feature fusion network through the target recognition network, resulting in a tunnel crack identification result. Thus, tunnel cracks are identified through a crack identification model with dynamic serpentine convolution, eliminating the need for manual intervention and improving the efficiency and accuracy of tunnel crack identification. Furthermore, the characteristics of tunnel cracks are similar to the deformation characteristics of serpentine curves; the dynamic serpentine convolution operation can adaptively focus on the slender and tortuous local structures in the tunnel, thereby accurately capturing the minute features of tubular structures such as cracks, significantly improving the tunnel crack identification effect.

[0060] Furthermore, as Figure 1 In specific implementation, embodiments of the present invention provide a dynamic identification device for tunnel cracks, such as... Figure 10 As shown, the device includes: an image acquisition unit 31, a model acquisition unit 32, and a crack recognition unit 33.

[0061] The image acquisition unit 31 can be used to acquire the tunnel image to be identified.

[0062] The model acquisition unit 32 can be used to acquire a preset tunnel crack recognition model, wherein the preset tunnel crack recognition model includes a backbone feature extraction network for image feature extraction, an enhancement feature extraction network for enhancing image features, a feature fusion network for feature fusion, and a target recognition network for crack recognition. The backbone feature extraction network includes multiple depth-separable convolutional layers, and the enhancement feature extraction network includes multiple attention layers incorporating dynamic serpentine convolutions.

[0063] The crack identification unit 33 can be used to input the tunnel image to be identified into the preset tunnel crack identification model, extract image features from the tunnel image to be identified sequentially through each depth-separable convolutional layer, enhance the image features output by the corresponding depth-separable convolutional layer through each attention layer incorporating dynamic serpentine convolution, fuse the output features of each attention layer incorporating dynamic serpentine convolution through the feature fusion network, and identify tunnel cracks through the output features of the feature fusion network through the target identification network to obtain the tunnel crack identification result.

[0064] In specific application scenarios, the attention layer incorporating dynamic serpentine convolution includes a first 3×3 standard convolutional layer, an X-view dynamic serpentine convolutional layer, a Y-view dynamic serpentine convolutional layer, a second 3×3 standard convolutional layer, a third 3×3 standard convolutional layer, a first point convolution + sigmoid (activation function) layer, a first Avg pooling layer, a second Avg pooling layer, a second point convolution + sigmoid layer, and a sigmoid layer. This is done to enhance the image features output by the depthwise separable convolutional layer, such as... Figure 11 As shown, the crack recognition unit 33 includes a convolutional fusion module 331, a feature extraction module 332, and a feature enhancement module 333.

[0065] The convolutional fusion module 331 can be used to take any attention layer in each attention layer that incorporates dynamic serpentine convolution as a target attention layer that incorporates dynamic serpentine convolution, and take the depth-separable convolutional layer corresponding to the target attention layer as a target depth-separable convolutional layer; input the image features output by the target depth-separable convolutional layer into the first 3×3 standard convolutional layer, the X-view dynamic serpentine convolutional layer, and the Y-view dynamic serpentine convolutional layer respectively, and perform serpentine convolutional fusion processing on the output features of the X-view dynamic serpentine convolutional layer and the output features of the Y-view dynamic serpentine convolutional layer; The feature extraction module 332 can be used to input the features after snake-shaped convolution fusion processing into the second Avg pool layer and the second point convolution + sigmoid layer for feature extraction, and input the output features of the first 3×3 standard convolution layer into the first point convolution + sigmoid layer and the first Avg pool layer for feature extraction.

[0066] The convolutional fusion module 331 can be used to perform a first fusion process on the output features of the first point convolution + sigmoid layer and the output features of the second Avg pool layer, and to perform a second fusion process on the output features of the first Avg pool layer and the output features of the second point convolution + sigmoid layer.

[0067] The feature enhancement module 333 can be used to perform a third fusion process on the features after the first fusion process and the features after the second fusion process, perform a fourth fusion process on the features after the third fusion process and the image features output by the depth-separable convolutional layer of the target, input the features after the fourth fusion process into the sigmoid layer for feature enhancement, and use the feature enhancement result as the output feature of the attention layer of the target integrated into the dynamic serpentine convolution.

[0068] In specific application scenarios, the feature fusion network includes multiple independent Conv2d layers (Convolutional2D Layers), a first fused Conv2d layer, a second fused Conv2d layer, and multiple BI (Bilinear Interpolation) layers. In order to perform feature fusion on the output features of each attention layer that incorporates dynamic serpentine convolution, the crack recognition unit 33 also includes a feature filtering module 334 and a linear interpolation module 335.

[0069] The feature filtering module 334 can be used to input the output features of each attention layer integrated with dynamic serpentine convolution to the corresponding independent Conv2d layer for feature filtering, and to input the output features of each attention layer integrated with dynamic serpentine convolution to the fused Conv2d layer for feature filtering.

[0070] The linear interpolation module 335 can be used to input the features selected by each independent Conv2d layer into the corresponding BI layer for bilinear interpolation of the features, perform feature fusion processing with the features selected by the fusion Conv2d layer after interpolation of each BI layer, input the features after feature fusion processing into the second fusion Conv2d layer for feature fusion, and use the features output by the second fusion Conv2d layer as the output features of the feature fusion network.

[0071] In specific application scenarios, the backbone feature extraction network also includes multiple HD (High-Definition, wavelet downsampling) layers; in order to extract image features from the tunnel image to be identified sequentially through each depth-separable convolutional layer, the crack identification unit 33 also includes a downsampling module 336.

[0072] The downsampling module 336 can be used to extract image features from the tunnel image to be identified sequentially through each of the depth-separable convolutional layers, perform wavelet downsampling processing on the output features of the corresponding depth-separable convolutional layer through each HD layer, and use the features obtained by wavelet downsampling processing as the corresponding image features.

[0073] In specific application scenarios, in order to determine the crack recognition effect, the device also includes a recognition effect determination unit 34.

[0074] The recognition effect determination unit 34 can be used to determine the attention distribution information of the preset tunnel crack recognition model during the crack recognition process of the tunnel image to be recognized, and based on the attention distribution information, determine the high attention area and low attention area of ​​the preset tunnel crack recognition model for the tunnel image to be recognized; based on the high attention area and the low attention area, generate a heat map of the tunnel crack recognition process, and based on the heat map, determine the crack recognition effect of the preset tunnel crack recognition model.

[0075] In specific application scenarios, in order to construct a preset tunnel crack identification model, the device also includes a construction unit 35.

[0076] The construction unit 35 can be used to construct a preset initial tunnel crack recognition model; obtain a sample dataset, wherein the sample dataset includes sample tunnel images with tunnel crack labels, the tunnel crack labels include crack bounding boxes and crack types; divide the sample dataset into a training set and a test set, use the training set to train the preset initial tunnel crack recognition model, and use the test set to test the trained preset initial tunnel crack recognition model, and finally use the trained preset initial tunnel crack recognition model that meets the test conditions as the preset tunnel crack recognition model.

[0077] In specific application scenarios, in order to enhance the image quality of the tunnel image to be identified, the device further includes an image quality enhancement unit 36.

[0078] The image quality enhancement unit 36 ​​can be used to determine the grayscale image corresponding to the tunnel image to be identified, determine the probability of occurrence of each grayscale level in the grayscale image, determine the total number of grayscale levels in the grayscale image, and determine the grayscale complexity of the tunnel image to be identified based on the probability of occurrence of each grayscale level and the total number of grayscale levels; determine the horizontal and vertical gradients of each pixel in the grayscale image, determine the gradient magnitude of the corresponding pixel based on the horizontal and vertical gradients, and determine the gradient complexity of the tunnel image to be identified based on the gradient magnitude of each pixel; determine the image overlay box and the box size of the image overlay box, and determine the image size of the tunnel image to be identified. Based on the box size and the image size, an analysis scale is determined, and the total number of image coverage boxes required to completely cover the tunnel image to be identified is determined. Based on the total number of boxes and the analysis scale, the structural complexity of the tunnel image to be identified is determined. Weight coefficients corresponding to the grayscale complexity, the gradient complexity, and the structural complexity are determined respectively. Based on the weight coefficients, the grayscale complexity, the gradient complexity, and the structural complexity are weighted and summed to obtain the image complexity of the tunnel image to be identified. An image quality enhancement method suitable for the image complexity is determined, and the image quality enhancement method is used to enhance the image quality of the tunnel image to be identified.

[0079] In specific application scenarios, in order to perform crack recognition, the crack recognition unit 33 can be used to input the enhanced image of the tunnel to be recognized into the preset tunnel crack recognition model.

[0080] It should be noted that other corresponding descriptions of the functional modules involved in the tunnel crack dynamic identification device provided in this embodiment of the invention can be found in the following references. Figure 1 The corresponding descriptions of the methods shown will not be repeated here.

[0081] Based on the above, Figure 1 Correspondingly, this embodiment of the invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the following steps: acquiring a tunnel image to be identified; acquiring a preset tunnel crack identification model, wherein the preset tunnel crack identification model includes a backbone feature extraction network for image feature extraction, an enhancement feature extraction network for enhancing image features, a feature fusion network for feature fusion, and a target identification network for crack identification; the backbone feature extraction network includes multiple depthwise separable convolutional layers, and the enhancement feature extraction network includes multiple attention layers incorporating dynamic serpentine convolutions; inputting the tunnel image to be identified into the preset tunnel crack identification model; sequentially extracting image features from the tunnel image to be identified through each depthwise separable convolutional layer; enhancing the image features output by each depthwise separable convolutional layer through each attention layer incorporating dynamic serpentine convolutions; fusing the output features of each attention layer incorporating dynamic serpentine convolutions through the feature fusion network; and identifying tunnel cracks through the output features of the feature fusion network using the target identification network to obtain a tunnel crack identification result.

[0082] Based on the above, Figure 1 The method shown and as Figure 10 The embodiment of the device shown in the invention also provides a physical structure diagram of a computer device, such as... Figure 12 As shown, the computer device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor. Both the memory 42 and the processor 41 are mounted on a bus 43. When the processor 41 executes the program, it performs the following steps: acquiring an image of a tunnel to be identified; acquiring a preset tunnel crack identification model, wherein the preset tunnel crack identification model includes a backbone feature extraction network for image feature extraction, an enhancement feature extraction network for enhancing image features, a feature fusion network for feature fusion, and a target identification network for crack identification. The backbone feature extraction network includes multiple depth-dependent... The separable convolutional layer and the enhanced feature extraction network include multiple attention layers incorporating dynamic serpentine convolutions. The tunnel image to be identified is input into the preset tunnel crack identification model. Image features in the tunnel image to be identified are extracted sequentially through each depth-separable convolutional layer. Feature enhancement is performed on the image features output by the corresponding depth-separable convolutional layer through each attention layer incorporating dynamic serpentine convolutions. Feature fusion is performed on the output features of each attention layer incorporating dynamic serpentine convolutions through the feature fusion network. Tunnel crack identification is performed on the output features of the feature fusion network through the target recognition network to obtain the tunnel crack identification result.

[0083] The present invention, through its technical solution, inputs an image of a tunnel to be identified into a preset tunnel crack identification model. Image features are extracted sequentially from the tunnel image through each depth-separable convolutional layer. Attention layers incorporating dynamic serpentine convolutions enhance the image features output by the corresponding depth-separable convolutional layers. A feature fusion network fuses the output features of each attention layer incorporating dynamic serpentine convolutions. Finally, a target recognition network identifies tunnel cracks based on the output features of the feature fusion network, yielding the tunnel crack identification result. This method uses a crack identification model with dynamic serpentine convolutions to identify tunnel cracks without human intervention, improving identification efficiency and accuracy. Furthermore, the characteristics of tunnel cracks are similar to the deformation characteristics of serpentine curves; the dynamic serpentine convolution operation can adaptively focus on the slender and tortuous local structures within the tunnel, accurately capturing the minute features of tubular structures such as cracks, thus significantly improving the tunnel crack identification effect.

[0084] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0085] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for dynamic identification of tunnel cracks, characterized in that, include: Acquire the image of the tunnel to be identified; A preset tunnel crack recognition model is obtained, wherein the preset tunnel crack recognition model includes a backbone feature extraction network for image feature extraction, an enhancement feature extraction network for enhancing image features, a feature fusion network for feature fusion, and a target recognition network for crack recognition. The backbone feature extraction network includes multiple depth-separable convolutional layers, and the enhancement feature extraction network includes multiple attention layers incorporating dynamic serpentine convolutions. The tunnel image to be identified is input into the preset tunnel crack identification model. Image features are extracted from the tunnel image to be identified sequentially through each depth-separable convolutional layer. The image features output by the corresponding depth-separable convolutional layer are enhanced through each attention layer incorporating dynamic serpentine convolution. The output features of each attention layer incorporating dynamic serpentine convolution are fused through the feature fusion network. Finally, the tunnel crack is identified through the output features of the feature fusion network by the target recognition network, thus obtaining the tunnel crack identification result.

2. The method according to claim 1, characterized in that, The attention layer incorporating dynamic serpentine convolution includes a first 3×3 standard convolutional layer, an X-view dynamic serpentine convolutional layer, a Y-view dynamic serpentine convolutional layer, a second 3×3 standard convolutional layer, a third 3×3 standard convolutional layer, a first point convolution + sigmoid (activation function) layer, a first Avg pool (Average Pooling Layer) layer, a second Avg pool layer, a second point convolution + sigmoid layer, and a sigmoid layer. The feature enhancement of the image features output by the corresponding depth separable convolutional layer through each attention layer incorporating dynamic serpentine convolution includes: Each attention layer that incorporates dynamic serpentine convolution is taken as a target attention layer that incorporates dynamic serpentine convolution, and the depth-separable convolutional layer corresponding to the target attention layer that incorporates dynamic serpentine convolution is taken as the target depth-separable convolutional layer. The image features output by the target depth separable convolutional layer are respectively input into the first 3×3 standard convolutional layer, the X-view dynamic serpentine convolutional layer, and the Y-view dynamic serpentine convolutional layer. The output features of the X-view dynamic serpentine convolutional layer and the output features of the Y-view dynamic serpentine convolutional layer are then fused by serpentine convolution. The features after snake-like convolution fusion are respectively input into the second Avg pool layer and the second point convolution + sigmoid layer for feature extraction, and the output features of the first 3×3 standard convolution layer are respectively input into the first point convolution + sigmoid layer and the first Avg pool layer for feature extraction. The output features of the first point convolution + sigmoid layer and the output features of the second Avg pool layer are subjected to a first fusion process, and the output features of the first Avg pool layer and the output features of the second point convolution + sigmoid layer are subjected to a second fusion process. The features after the first fusion process and the features after the second fusion process are subjected to a third fusion process. The features after the third fusion process are then subjected to a fourth fusion process with the image features output by the depth-separable convolutional layer of the target. The features after the fourth fusion process are then input into the sigmoid layer for feature enhancement. The feature enhancement result is used as the output feature of the attention layer of the target integrated into the dynamic serpentine convolution.

3. The method according to claim 1, characterized in that, The feature fusion network includes multiple independent Conv2d layers (Convolutional 2D Layers), a first fused Conv2d layer, a second fused Conv2d layer, and multiple BI (Bilinear Interpolation) layers; The feature fusion process, which fuses the output features of each attention layer incorporated into the dynamic serpentine convolution through the feature fusion network, includes: The output features of each attention layer integrated with dynamic serpentine convolution are input to the corresponding independent Conv2d layer for feature filtering, and the output features of each attention layer integrated with dynamic serpentine convolution are input to the fused Conv2d layer for feature filtering. The features selected by each independent Conv2d layer are input into the corresponding BI layer for bilinear interpolation. The interpolated features of each BI layer are then fused with the features selected by the fused Conv2d layer. The fused features are then input into the second fused Conv2d layer for feature fusion. The features output by the second fused Conv2d layer are then used as the output features of the feature fusion network.

4. The method according to claim 1, characterized in that, The backbone feature extraction network also includes multiple HD (High-Definition, wavelet downsampling) layers; The step of sequentially extracting image features from the tunnel image to be identified through each of the depth-separable convolutional layers includes: Image features are extracted sequentially from the tunnel image to be identified by each of the depth-separable convolutional layers. Wavelet downsampling is performed on the output features of the corresponding depth-separable convolutional layer by each HD layer, and the features obtained by wavelet downsampling are used as the corresponding image features.

5. The method according to claim 1, characterized in that, After identifying tunnel cracks by using the output features of the feature fusion network through the target recognition network to obtain tunnel crack identification results, the method further includes: The attention distribution information of the preset tunnel crack identification model during the crack identification process of the tunnel image to be identified is determined, and the high attention area and low attention area of ​​the preset tunnel crack identification model for the tunnel image to be identified are determined based on the attention distribution information. Based on the high-attention area and the low-attention area, a heat map is generated for the tunnel crack identification process. Based on the heat map, the crack identification effect of the preset tunnel crack identification model is determined.

6. The method according to claim 1, characterized in that, Before obtaining the preset tunnel crack identification model, the method further includes: Construct a pre-defined initial tunnel crack identification model; Obtain a sample dataset, wherein the sample dataset includes sample tunnel images with tunnel crack labels, the tunnel crack labels including crack bounding boxes and crack types; The sample dataset is divided into a training set and a test set. The preset initial tunnel crack identification model is trained using the training set, and the trained preset initial tunnel crack identification model is tested using the test set. Finally, the trained preset initial tunnel crack identification model that meets the test conditions is taken as the preset tunnel crack identification model.

7. The method according to claim 1, characterized in that, Before inputting the image of the tunnel to be identified into the preset tunnel crack identification model, the method further includes: Determine the grayscale image corresponding to the tunnel image to be identified, determine the probability of occurrence of each grayscale level in the grayscale image, and determine the total number of grayscale levels in the grayscale image. Based on the probability of occurrence of each grayscale level and the total number of grayscale levels, determine the grayscale complexity of the tunnel image to be identified. The horizontal and vertical gradients of each pixel in the grayscale image are determined. Based on the horizontal and vertical gradients, the gradient magnitude of the corresponding pixel is determined. Based on the gradient magnitude of each pixel, the gradient complexity of the tunnel image to be identified is determined. Determine the image overlay box and the box size of the image overlay box, and determine the image size of the tunnel image to be identified. Based on the box size and the image size, determine the analysis scale, determine the total number of image overlay boxes required to completely cover the tunnel image to be identified, and determine the structural complexity of the tunnel image to be identified based on the total number of boxes and the analysis scale. The weight coefficients corresponding to the gray-level complexity, the gradient complexity, and the structural complexity are determined respectively. Based on the weight coefficients, the gray-level complexity, the gradient complexity, and the structural complexity are weighted and summed to obtain the image complexity of the tunnel image to be identified. Determine an image quality enhancement method that is compatible with the image complexity, and use the image quality enhancement method to enhance the image quality of the tunnel image to be identified; The step of inputting the tunnel image to be identified into the preset tunnel crack identification model includes: The enhanced image of the tunnel to be identified is input into the preset tunnel crack identification model.

8. A dynamic identification device for tunnel cracks, characterized in that, include: An image acquisition unit is used to acquire images of the tunnel to be identified. The model acquisition unit is used to acquire a preset tunnel crack recognition model, wherein the preset tunnel crack recognition model includes a backbone feature extraction network for image feature extraction, an enhancement feature extraction network for enhancing image features, a feature fusion network for feature fusion, and a target recognition network for crack recognition. The backbone feature extraction network includes multiple depth-separable convolutional layers, and the enhancement feature extraction network includes multiple attention layers incorporating dynamic serpentine convolutions. The crack identification unit is used to input the tunnel image to be identified into the preset tunnel crack identification model, extract image features from the tunnel image to be identified sequentially through each depth-separable convolutional layer, enhance the image features output by the corresponding depth-separable convolutional layer through each attention layer incorporating dynamic serpentine convolution, fuse the output features of each attention layer incorporating dynamic serpentine convolution through the feature fusion network, and identify tunnel cracks through the output features of the feature fusion network through the target identification network to obtain the tunnel crack identification result.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.