Tunnel apparent water seepage detection method and system and medium

By using the MobileViT network structure and attention mechanism for feature extraction and fusion in tunnel seepage detection, the problem of high misjudgment rate of apparent water seepage detection in tunnel is solved, and higher detection accuracy and segmentation performance are achieved.

CN119693360AActive Publication Date: 2025-03-25中铁科学研究院集团有限公司 +1

Patent Information

Application Number
CN202510199728.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-03-25
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

When detecting tunnel seepage by image processing, the misjudgment rate of apparent water seepage detection in tunnel is high due to the confusing light and complex background in the tunnel.

Method used

The MobileViT network structure is used to build a detection network and a segmentation network, and the first coordinate attention mechanism is introduced into the detection network for global feature extraction, and the initial features, local features and global features are integrated in the feature fusion part; the second coordinate attention mechanism is integrated into the segmentation network for semantic segmentation, suppressing unimportant features and highlighting important information.

Benefits of technology

It effectively improves detection accuracy and segmentation performance, reduces the misjudgment rate, enhances the generalization ability of the model, and can more effectively capture key features at different locations, and overcomes complex image data of light and background.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693360A_ABST
    Figure CN119693360A_ABST
Patent Text Reader

Abstract

The invention discloses a tunnel apparent water seepage detection method and system and a medium. Relates to the technical field of image recognition. Inputting the preprocessed basic data into the constructed water seepage detection model for detection; outputting a water seepage image and a water seepage area; improving a model structure and a fusion strategy of a MobileViT recognition model in the detection network, introducing a first coordinate attention mechanism into the global feature extraction part to obtain global features, and performing feature fusion on the preliminary features, the local features and the global features in the feature fusion part to detect a water seepage image; the network can capture key features of different positions more effectively, so that the problem of complex light and background of an original image is solved, and the detection accuracy is improved; a second coordinate attention mechanism is fused into the segmentation network to segment the water seepage area of the water seepage image, unimportant features are inhibited to highlight important information in the feature map, and the segmentation performance and generalization ability of the segmentation network are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a method, system and medium for detecting apparent water seepage in a tunnel. Background Art

[0002] Tunnels are buildings built in the ground. Whether they are mountain tunnels, underwater tunnels or underground tunnels, they all play an extremely important role in transportation. Therefore, the safety issues of tunnels are particularly prominent. Among all kinds of tunnel diseases, tunnel seepage has become a key factor affecting the strength of tunnel structures. Tunnel seepage has a direct or indirect impact on other tunnel diseases and is one of the most widely involved tunnel diseases. Defects in tunnel structures can easily lead to the occurrence of seepage diseases, and the long-term effect of seepage will aggravate the damage to the tunnel structure. Tunnel seepage is actually a comprehensive reflection of various tunnel diseases. Therefore, strengthening the research on tunnel lining seepage detection methods is a necessary way to effectively prevent the potential hazards of tunnel diseases and predict possible safety hazards.

[0003] At present, most people use manual inspection to detect whether there is water seepage in the tunnel, which is tedious and inefficient, and poses a great challenge to tunnel safety. With the introduction of the concept of intelligent equipment, more and more intelligent inspection robots are replacing staff for inspection. The robots can operate autonomously in the tunnel through the rail hanging technology, and pause at the set inspection points to conduct water seepage detection and analysis on the tunnel wall area. Infrared thermal imaging is currently the most widely used automatic water seepage detection method. It realizes water seepage detection based on the different infrared thermal radiation of objects at different temperatures. Another laser scanning non-destructive testing method is also developing rapidly. It can perform all-round scanning and detection of the tunnel, thereby recording the size and location of the water seepage area. It has the characteristics of fast scanning speed and high measurement accuracy, but the above methods all have the disadvantage of high cost. Using image processing to detect tunnel water seepage is a better choice, but due to the messy light and complex background in the tunnel, the misjudgment rate of tunnel apparent water seepage detection is relatively high. Summary of the invention

[0004] The technical problem to be solved by the present invention is: when detecting tunnel water seepage based on the image processing method, the misjudgment rate of tunnel apparent water seepage detection is high due to the reasons such as the cluttered light in the tunnel and the complex background; the purpose of the present invention is to provide a method, system and medium for detecting tunnel apparent water seepage, and to improve the method on the basis of the existing tunnel water seepage detection based on image processing technology; the detection network and the segmentation network are constructed with the help of the MobileViT network structure, and at the same time, the model structure and fusion strategy of the MobileViT recognition model are improved in the detection network, the first coordinate attention mechanism is introduced in the global feature extraction part to obtain the global feature, and the preliminary feature, local feature and global feature are fused in the feature fusion part to detect the water seepage image, so that the network can more effectively capture the key features of different positions, so as to overcome the image data with complex light and background, and improve the detection accuracy; the second coordinate attention mechanism is integrated into the segmentation network to segment the water seepage area of ​​the water seepage image, and the second coordinate attention mechanism is used to suppress unimportant features to highlight the important information in the feature map, which effectively improves the segmentation performance and generalization ability of the segmentation network.

[0005] The present invention is achieved through the following technical solutions: This solution provides a method for detecting apparent water seepage in a tunnel, including: Collecting basic data of the target tunnel and preprocessing the basic data; the basic data includes image data and environmental data; The preprocessed basic data is input into the constructed water seepage detection model for detection; the water seepage detection model includes a detection network and a segmentation network; the detection network uses the MobileViT network structure as the basic network, introduces the first coordinate attention mechanism in the global feature extraction part to obtain the global feature, and performs feature fusion on the preliminary features, local features and global features in the feature fusion part to detect the water seepage image; the segmentation network uses the MobileViT network structure as the basic network, and integrates the second coordinate attention mechanism to perform semantic segmentation on the water seepage image to obtain the water seepage area; Output water seepage image and water seepage area.

[0006] For tunnel seepage, it is not enough to only accurately and quickly identify whether there is seepage in a certain area. In order to further obtain a more comprehensive and accurate distribution of tunnel seepage locations and seepage areas, it is necessary to classify and identify the seepage images at the pixel level, that is, to perform semantic segmentation on the seepage areas in the seepage images, so as to prepare for targeted maintenance strategies. The MobileViT network structure is a hybrid architecture model of the CNN model architecture and the Transformer model architecture. It has a good classification effect on the data set. However, when identifying apparent water seepage, due to the complex light and background in the tunnel, the target of the seepage part is small, and generally has similar performance to the surrounding complex background, which makes it difficult to detect the apparent water seepage in the tunnel and extract features. Therefore, this scheme uses the MobileViT network structure to build a detection network and a segmentation network. At the same time, the MobileViT recognition model is improved in the detection network in terms of model structure and fusion strategy. The first coordinate attention mechanism is introduced in the global feature extraction part to obtain global features. In the feature fusion part, the preliminary features, local features and global features are fused to detect the seepage image; so that the network can more effectively capture the key features of different positions, overcome the image data with complex light and background, and improve the detection accuracy; the second coordinate attention mechanism is integrated into the segmentation network to segment the seepage area of ​​the seepage image, and the second coordinate attention mechanism is used to suppress unimportant features to highlight the important information in the feature map, which effectively improves the segmentation performance and generalization ability of the segmentation network.

[0007] A further optimization scheme is that the basic data is preprocessed, including the following method: Acquire environmental data, and calculate an image adjustment factor based on the environmental data; The image data is enhanced, and the degree of data enhancement is determined according to the image adjustment factor during the data enhancement process: A first threshold interval is set, and when the adjustment factor is in the first threshold interval, the image data and data are enhanced so that the image contrast parameter is D1; ​​a second threshold interval is set, and when the adjustment factor is in the second threshold interval, the image data and data are enhanced so that the image contrast parameter is D2; wherein the first threshold interval is greater than the second threshold interval; D1>D2.

[0008] A further optimization scheme is that the method for obtaining the image adjustment factor includes: Obtain the basic data of the target tunnel and match each image data with the environmental data; the environmental data includes soil moisture Z, air humidity I and the accumulated rainfall in the recent time period T B ; Calculate the image adjustment factor for each image data based on the environmental data: ;

[0009] A further optimization scheme is that the detection network also introduces a PConv layer in the local feature extraction part to implement convolution operations on some channels.

[0010] Specifically, in the MobileViT recognition model, the standard convolution layer of the local feature extraction part is replaced by the PConv layer; in order to reduce the computational complexity of the detection task and ensure the continuity and regularity of memory access during the task, some channels of the input features are used as specific channels to represent the entire feature map for convolution operations. The number of floating-point operations per second and memory access times of the PConv layer are much smaller than those of the standard convolution layer. Therefore, this solution replaces the original standard convolution layer of the local feature extraction part with the PConv layer to effectively reduce the computational complexity of the network and make the network more lightweight.

[0011] A further optimization scheme is that the first coordinate attention mechanism is a permutation coordinate attention mechanism; the permutation coordinate attention mechanism includes a grouping feature part, a fusion attention part and an aggregation feature part; The grouping feature part converts the input feature map X∈R C×H×W It is divided into G groups of sub-features along the channel dimension, expressed as X=[X1,..., X k , ..., X G ], X k ∈R C / G×H×W , where the sub-feature layer X k After capturing the accurate semantic feedback after training, X k Divide into sub-feature maps X along the height and width dimensions k1 , X k2 ∈R C / 2G×H×W The fusion attention part generates a channel attention map based on the relationship between channels, and uses global average pooling to generate s to embed global information, by obtaining a shrink sub-feature map X on the height dimension and width dimension H×W k1,s : ; in, F gp represents the embedding of global information; H represents the total height of the feature map; W represents the total width of the feature map; C represents the total number of channels; R represents a real number; i represents the height, and j represents the width; Then the Sigmoid activation function is used to create compact features and channel attention of the high-dimensional output for: ; Channel attention of width dimension output for: ; Among them, b1 represents the compact parameter of the height dimension; b2 represents the compact parameter of the width dimension; GN (X k2 ) represents the pair feature X k2 The number of groups; W1 represents the coefficient parameter of the height dimension; W2 represents the coefficient parameter of the width dimension; Aggregate feature parts to aggregate the overall output have: .

[0012] A further optimization scheme is that the detection network uses the MobileViT recognition model as the basic network, and introduces the first coordinate attention mechanism in the global feature extraction part to obtain global features, including the following methods: The first coordinate attention mechanism is embedded between the second and third convolutional layers of the global feature extraction part, and between the third and fourth convolutional layers; The first coordinate attention mechanism performs a first self-attention calculation on the height dimension and the width dimension respectively, calculates the attention weight and applies it to the output feature map to enhance or suppress the features at the corresponding position of the output feature map.

[0013] A further optimization scheme is that the fusion feature Z obtained by fusing the preliminary features, local features and global features in the feature fusion part is: ; Among them, M1 represents the fusion weight of the preliminary feature X, the local feature Y and the global feature Z, and its value is a real number between 0 and 1; It represents the element-by-element summation of the feature map; Indicates the element phase corresponding to the characteristic diagram.

[0014] The further optimization scheme is that the construction method of the segmentation network includes: Constructing a segmentation network based on the MobileViT network structure; the segmentation network includes a global branch structure and a local branch structure; the global branch structure includes a first encoder and a first decoder; the local branch structure includes a second encoder and a second decoder; the first encoder and the second encoder are used to extract feature maps from image data, and the first decoder and the second decoder are used to parse the encoded data into the original image data form; A second coordinate attention mechanism is embedded between the first convolution layer and the second convolution layer of the first decoder and the second decoder; the second coordinate attention mechanism is a self-attention mechanism with position encoding, and the second coordinate attention mechanism performs second self-attention calculations on the height dimension and the width dimension respectively.

[0015] A further optimization scheme is that the second coordinate attention mechanism performs the second self-attention calculation in the height dimension and the width dimension respectively, and the method includes: The self-attention calculation of the second coordinate attention mechanism in the width dimension is:

[0016] The self-attention calculation of the second coordinate attention mechanism in the height dimension is:

[0017] in, y ij Represents the self-attention weight of the feature in the i-th row and j-th column; q ij , k ij , v ij are the query vector, key vector and value vector of the feature of the i-th row and j-th column respectively; W is the total width of the feature map; w represents the width of the feature of the i-th row and j-th column; H is the total height of the feature map; w represents the height of the feature of the i-th row and j-th column; T represents the transpose of the vector; G Q , G K , G V1 , G V2 ∈R, respectively represent the control parameters of the query vector relative position information, key vector relative position information, value vector relative position information and value vector offset position information; Represents the position offset of the feature query vector in the width and height dimensions of the i-th row and j-th column; Represents the position offset of the feature key vector in the width and height dimensions of the i-th row and j-th column; Represents the position offset of the feature in the i-th row and j-th column in the width and height dimensions; Represents the position offset of the query vector from the feature of the i-th row and j-th column to the feature of the h-th row and w-th column in the width dimension; Represents the position offset of the feature in the i-th row and j-th column to the feature key vector in the h-th row and w-th column in the width dimension; Represents the position offset of the feature value vector of the i-th row and j-th column to the feature value vector of the h-th row and w-th column in the width dimension; Represents the position offset of the query vector from the feature of the i-th row and j-th column to the feature of the h-th row and w-th column in the height dimension; Represents the position offset of the feature in the i-th row and j-th column to the feature key vector in the h-th row and w-th column in the height dimension; Represents the position offset of the feature value vector of the i-th row and j-th column to the h-th row and w-th column in the height dimension; Softmax w represents the activation function in the width dimension; Softmax h Represents the activation function in the height dimension.

[0018] This solution also provides a tunnel apparent water seepage detection system, including: A collection module, used to collect basic data of the target tunnel; A preprocessing module, used for preprocessing the basic data; the basic data includes image data and environmental data; The detection module is used to input the pre-processed basic data into the constructed water seepage detection model for detection; the water seepage detection model includes a detection network and a segmentation network; the detection network uses the MobileViT network structure as the basic network, introduces the first coordinate attention mechanism in the global feature extraction part to obtain the global feature, and performs feature fusion on the preliminary features, local features and global features in the feature fusion part to detect the water seepage image; the segmentation network uses the MobileViT network structure as the basic network, and integrates the second coordinate attention mechanism to perform semantic segmentation on the water seepage image to obtain the water seepage area; The output module is used to output water seepage images and water seepage areas.

[0019] The present solution also provides a computer-readable medium on which a computer program is stored. The computer program is executed by a processor to implement a tunnel apparent water seepage detection method as described above.

[0020] Compared with the prior art, the present invention has the following advantages and beneficial effects: 1. A method, system and medium for detecting apparent water seepage in a tunnel provided by the present invention; a detection network and a segmentation network are constructed by means of the MobileViT network structure, and at the same time, the MobileViT recognition model is improved in terms of model structure and fusion strategy in the detection network, and the first coordinate attention mechanism is introduced in the global feature extraction part to obtain global features, and the preliminary features, local features and global features are fused in the feature fusion part to detect water seepage images; so that the network can more effectively capture key features at different positions, so as to solve the problem of complex light and background of the original image and improve the detection accuracy; the second coordinate attention mechanism is integrated into the segmentation network to segment the water seepage area of ​​the water seepage image, and the second coordinate attention mechanism is used to suppress unimportant features to highlight the important information in the feature map, thereby effectively improving the segmentation performance and generalization ability of the segmentation network; 2. A method, system and medium for detecting apparent water seepage in a tunnel provided by the present invention; in the process of preprocessing image data, this solution performs data enhancement on each image based on environmental data, and performs deeper data enhancement for areas with high actual environmental humidity and precipitation. By directly adjusting the contrast parameter, or adjusting the black point parameter and the shadow parameter, the contrast of the image can be enhanced to highlight the data features in which the water seepage traces in the image are not obvious; 3. The present invention provides a method, system and medium for detecting apparent water seepage in a tunnel; pixel-level classification and identification of water seepage images are performed, i.e., semantic segmentation of water seepage areas in the water seepage images is performed, so as to further obtain a more comprehensive and accurate distribution of tunnel water seepage locations and water seepage areas, thereby preparing for targeted maintenance strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings: Figure 1 This is a flow chart of the tunnel apparent water seepage detection method; Figure 2 Schematic diagram of the detection network structure; Figure 3 Schematic diagram of the segmentation network structure; Figure 4 This is a schematic diagram of the structure of the tunnel apparent water seepage detection system; Figure 5 This is a schematic diagram comparing the detection accuracy of the proposed method with that of the traditional method. DETAILED DESCRIPTION

[0022] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0023] When detecting tunnel water seepage based on the image processing method, the misjudgment rate of tunnel apparent water seepage detection is high due to the chaotic light and complex background in the tunnel. In view of this, the present invention provides the following embodiments to solve the above technical problems.

[0024] Embodiment 1: This embodiment provides a method for detecting apparent water seepage in a tunnel, such as Figure 1 As shown, including: Step 1, collect basic data of the target tunnel and preprocess the basic data; the basic data includes image data and environmental data; the image data mainly includes image data or video frame data of the target tunnel surface, the environmental data corresponds to the image data, and a distance threshold r is set. For the collected image data A, the corresponding environmental data mainly includes environmental data with the center position of the image data A as a dot and a radius from the dot as the distance threshold r. The environmental data mainly includes soil moisture, air humidity and rainfall duration in the recent time period.

[0025] The preprocessing of the basic data includes: Acquire environmental data, and calculate the image adjustment factor based on the environmental data; the specific calculation method includes: S11, obtaining basic data of the target tunnel, matching each image data with environmental data; the environmental data includes soil moisture Z, air humidity I and cumulative rainfall in the most recent time period T B ; S12, obtaining an image adjustment factor for each image data based on the environmental data: ; S13, performing data enhancement on the image data, and determining the degree of data enhancement in the data enhancement process according to the image adjustment factor: setting a first threshold interval, and when the adjustment factor is in the first threshold interval, performing data enhancement on the image data so that the image contrast parameter is D1; ​​setting a second threshold interval, and when the adjustment factor is in the second threshold interval, performing data enhancement on the image data so that the image contrast parameter is D2; wherein the first threshold interval is greater than the second threshold interval; D1>D2.

[0026] Traditional detection methods are mainly based on image data training and modeling, and their accuracy needs to be improved. This solution performs data enhancement on each image based on environmental data during the preprocessing of image data. For areas with high actual environmental humidity and precipitation, a deeper degree of data enhancement is performed. By directly adjusting the contrast parameters, or adjusting the black point parameters and shadow parameters, the contrast of the image can be enhanced to highlight the data features in the image where the traces of water seepage are not obvious.

[0027] Step 2: Input the preprocessed basic data into the constructed water seepage detection model for detection; the water seepage detection model includes a detection network and a segmentation network; the detection network uses the MobileViT network structure as the basic network, introduces the first coordinate attention mechanism in the global feature extraction part to obtain the global feature, and performs feature fusion on the preliminary features, local features and global features in the feature fusion part to detect the water seepage image; the segmentation network uses the MobileViT network structure as the basic network, and integrates the second coordinate attention mechanism to perform semantic segmentation on the water seepage image to obtain the water seepage area; like Figure 2 As shown, the detection network uses the MobileViT recognition model as the basic network, and introduces the first coordinate attention mechanism in the global feature extraction part to obtain global features, including the following methods: The first coordinate attention mechanism is embedded between the second and third convolutional layers of the global feature extraction part, and between the third and fourth convolutional layers; The first coordinate attention mechanism performs a first self-attention calculation on the height dimension and the width dimension respectively, calculates the attention weight and applies it to the output feature map to enhance or suppress the features at the corresponding position of the output feature map.

[0028] The first coordinate attention mechanism is a permutation coordinate attention mechanism; the permutation coordinate attention mechanism includes a grouping feature part, a fusion attention part and an aggregation feature part; The grouping feature part converts the input feature map X∈R C×H×W It is divided into G groups of sub-features along the channel dimension, expressed as X=[X1,..., X k , ..., X G ], X k ∈R C / G×H×W , where the sub-feature layer X k After capturing the accurate semantic feedback after training, X k Divide into sub-feature maps X along the height and width dimensions k1 , X k2 ∈R C / 2G×H×W The fusion attention part generates a channel attention map based on the relationship between channels, and uses global average pooling to generate s to embed global information, by obtaining a shrink sub-feature map X on the height dimension and width dimension H×W k1,s : ; in, F gp represents the embedding of global information; H represents the total height of the feature map; W represents the total width of the feature map; C represents the total number of channels; R represents a real number; i represents the height, and j represents the width; Then the Sigmoid activation function is used to create compact features and channel attention of the high-dimensional output for: ; Channel attention of width dimension output for: ; Among them, b1 represents the compact parameter of the height dimension; b2 represents the compact parameter of the width dimension; GN (X k2 ) represents the pair feature X k2 The number of groups; W1 represents the coefficient parameter of the height dimension; W2 represents the coefficient parameter of the width dimension; Aggregate feature parts to aggregate the overall output have: .

[0029] The permutation coordinate attention mechanism can focus on the important information in the input feature map to improve the performance of the model. Compared with other attention modules, the permutation coordinate attention mechanism introduces height dimension channels and width dimension channels, and disrupts the channel order of the original feature map by shuffling the channels, further enhancing the diversity of the attention features. The combination of shuffling and attention makes the permutation coordinate attention mechanism have better generalization ability.

[0030] The detection network also introduces a PConv layer in the local feature extraction part to implement convolution operations on some channels.

[0031] Specifically, in the MobileViT recognition model, the standard convolution layer of the local feature extraction part is replaced by the PConv layer; in order to reduce the computational complexity of the detection task and ensure the continuity and regularity of memory access during the task, some channels of the input features are used as specific channels to represent the entire feature map for convolution operations. The number of floating-point operations per second and memory access times of the PConv layer are much smaller than those of the standard convolution layer. Therefore, this solution replaces the original standard convolution layer of the local feature extraction part with the PConv layer to effectively reduce the computational complexity of the network and make the network more lightweight.

[0032] The fusion feature Z obtained by fusing the preliminary features, local features and global features in the feature fusion part includes: ; Among them, M1 represents the fusion weight of the preliminary feature X, the local feature Y and the global feature Z, and its value is a real number between 0 and 1; It represents the element-by-element summation of the feature map; Indicates the element phase corresponding to the characteristic diagram.

[0033] The construction methods of the segmentation network include: Construct a segmentation network based on the MobileViT network structure; Figure 3 As shown, the segmentation network includes a global branch structure and a local branch structure; the global branch structure includes a first encoder and a first decoder; the local branch structure includes a second encoder and a second decoder; the first encoder and the second encoder are used to extract feature maps from image data (input feature maps), and the first decoder and the second decoder are used to parse the encoded data into the original image data form, and add the output of the global branch and the output of the local branch to obtain the output feature map; A second coordinate attention mechanism is embedded between the first convolution layer and the second convolution layer of the first decoder and the second decoder; the second coordinate attention mechanism is a self-attention mechanism with position encoding, and the second coordinate attention mechanism performs second self-attention calculations on the height dimension and the width dimension respectively.

[0034] The second coordinate attention mechanism performs second self-attention calculations on the height dimension and the width dimension respectively, and the method includes: The self-attention calculation of the second coordinate attention mechanism in the width dimension is:

[0035] The self-attention calculation of the second coordinate attention mechanism in the height dimension is:

[0036] in, y ij Represents the self-attention weight of the feature in the i-th row and j-th column; q ij , k ij , v ij are the query vector, key vector and value vector of the feature of the i-th row and j-th column respectively; W is the total width of the feature map; w represents the width of the feature of the i-th row and j-th column; H is the total height of the feature map; w represents the height of the feature of the i-th row and j-th column; T represents the transpose of the vector; G Q , G K , G V1 , G V2 ∈R, respectively represent the control parameters of the query vector relative position information, key vector relative position information, value vector relative position information and value vector offset position information; Represents the position offset of the feature query vector in the width and height dimensions of the i-th row and j-th column; Represents the position offset of the feature key vector in the width and height dimensions of the i-th row and j-th column; Represents the position offset of the feature in the i-th row and j-th column in the width and height dimensions; Represents the position offset of the query vector from the feature of the i-th row and j-th column to the feature of the h-th row and w-th column in the width dimension; Represents the position offset of the feature in the i-th row and j-th column to the feature key vector in the h-th row and w-th column in the width dimension; Represents the position offset of the feature value vector of the i-th row and j-th column to the feature value vector of the h-th row and w-th column in the width dimension; Represents the position offset of the query vector from the feature of the i-th row and j-th column to the feature of the h-th row and w-th column in the height dimension; Represents the position offset of the feature in the i-th row and j-th column to the feature key vector in the h-th row and w-th column in the height dimension; Represents the position offset of the feature value vector of the i-th row and j-th column to the h-th row and w-th column in the height dimension; Softmax w represents the activation function in the width dimension; Softmax h Represents the activation function in the height dimension.

[0037] Step 3: Output the water seepage image and water seepage area.

[0038] For tunnel seepage, it is not enough to only accurately and quickly identify whether there is seepage in a certain area. In order to further obtain a more comprehensive and accurate distribution of tunnel seepage locations and seepage areas, it is necessary to classify and identify the seepage images at the pixel level, that is, to perform semantic segmentation on the seepage areas in the seepage images, so as to prepare for targeted maintenance strategies.

[0039] The MobileViT network structure is a hybrid architecture model of the CNN model architecture and the Transformer model architecture. It has a good classification effect on the data set. However, when identifying apparent water seepage, due to the complex light and background in the tunnel, the target of the seepage part is small and generally has similar performance to the surrounding complex background, which makes it difficult to detect the apparent water seepage in the tunnel and extract features. Therefore, this scheme uses the MobileViT network structure to build a detection network and a segmentation network. At the same time, the MobileViT recognition model is improved in the detection network in terms of model structure and fusion strategy. The first coordinate attention mechanism is introduced in the global feature extraction part to obtain global features. In the feature fusion part, the preliminary features, local features and global features are fused to detect the seepage image; so that the network can more effectively capture the key features of different positions and improve the detection accuracy; the second coordinate attention mechanism is integrated into the segmentation network to segment the seepage area of ​​the seepage image, and the second coordinate attention mechanism is used to suppress unimportant features to highlight the important information in the feature map, which effectively improves the segmentation performance and generalization ability of the segmentation network.

[0040] The detection network also introduces a PConv layer in the local feature extraction part to implement convolution operations on some channels.

[0041] Specifically, in the MobileViT network structure of the detection network, the standard convolution layer of the local feature extraction part is replaced by the PConv layer; in order to reduce the computational complexity of the detection task and ensure the continuity and regularity of memory access during the task, some channels of the input features are used as specific channels to represent the entire feature map for convolution operations. The number of floating-point operations per second and memory access times of the PConv layer are much smaller than those of the standard convolution layer. Therefore, this solution replaces the original standard convolution layer of the local feature extraction part with the PConv layer to effectively reduce the computational complexity of the network and make the network more lightweight.

[0042] Embodiment 2: This embodiment provides a tunnel apparent water seepage detection system, such as Figure 4 As shown, including: A collection module, used to collect basic data of the target tunnel; A preprocessing module, used for preprocessing the basic data; the basic data includes image data and environmental data; The detection module is used to input the pre-processed basic data into the constructed water seepage detection model for detection; the water seepage detection model includes a detection network and a segmentation network; the detection network uses the MobileViT network structure as the basic network, introduces the first coordinate attention mechanism in the global feature extraction part to obtain the global feature, and performs feature fusion on the preliminary features, local features and global features in the feature fusion part to detect the water seepage image; the segmentation network uses the MobileViT network structure as the basic network, and integrates the second coordinate attention mechanism to perform semantic segmentation on the water seepage image to obtain the water seepage area; The output module is used to output water seepage images and water seepage areas.

[0043] Embodiment 3: This embodiment provides a computer-readable medium on which a computer program is stored. The computer program is executed by a processor to implement a tunnel apparent water seepage detection method as described in Embodiment 1. Specifically, the following steps are performed: Step 1: collecting basic data of the target tunnel and preprocessing the basic data; the basic data includes image data and environmental data; Step 2: Input the preprocessed basic data into the constructed water seepage detection model for detection; the water seepage detection model includes a detection network and a segmentation network; the detection network uses the MobileViT network structure as the basic network, introduces the first coordinate attention mechanism in the global feature extraction part to obtain the global feature, and performs feature fusion on the preliminary features, local features and global features in the feature fusion part to detect the water seepage image; the segmentation network uses the MobileViT network structure as the basic network, and integrates the second coordinate attention mechanism to perform semantic segmentation on the water seepage image to obtain the water seepage area; Step 3: Output the water seepage image and water seepage area.

[0044] This implementation compares the detection results based on the detection network method of this solution with the image detection method of the traditional MobileViT architecture, such as Figure 5 As shown in the figure, line b represents the accuracy of the detection results of this solution, and line a represents the accuracy of the detection results of the traditional MobileViT architecture. Figure 5 It can be seen that the accuracy of this scheme is much higher than that of the traditional MobileViT architecture image detection method.

[0045] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting apparent water seepage in a tunnel, characterized in that: include: Collecting basic data of the target tunnel and preprocessing the basic data; the basic data includes image data and environmental data; The preprocessed basic data is input into the constructed water seepage detection model for detection; the water seepage detection model includes a detection network and a segmentation network; the detection network uses the MobileViT network structure as the basic network, introduces the first coordinate attention mechanism in the global feature extraction part to obtain global features, and performs feature fusion on the preliminary features, local features and global features in the feature fusion part to detect water seepage images; the segmentation network uses the MobileViT network structure as the basic network, and incorporates the second coordinate attention mechanism to perform semantic segmentation on the water seepage image to obtain the water seepage area; Output water seepage image and water seepage area.

2. A method for detecting apparent water seepage in a tunnel according to claim 1, characterized in that: The preprocessing of the basic data includes the following method: Acquire environmental data, and calculate an image adjustment factor based on the environmental data; The image data is enhanced, and the degree of data enhancement is determined according to the image adjustment factor during the data enhancement process: A first threshold interval is set. When the adjustment factor is within the first threshold interval, the image data and data enhancement are performed so that the image contrast parameter is D1. A second threshold interval is set. When the adjustment factor is within the second threshold interval, the image data and data enhancement are performed so that the image contrast parameter is D2. The first threshold interval is greater than the second threshold interval; D1>D2.

3. A method for detecting apparent water seepage in a tunnel according to claim 2, characterized in that: The method for obtaining the image adjustment factor includes: obtaining basic data of the target tunnel, and matching each image data with environmental data; the environmental data includes soil moisture Z, air humidity I and cumulative rainfall in the most recent time period T. B ; Calculate the image adjustment factor for each image data based on the environmental data: 。 4. A method for detecting apparent water seepage in a tunnel according to claim 1, characterized in that: The detection network uses the MobileViT recognition model as the basic network and introduces the first coordinate attention mechanism in the global feature extraction part to obtain global features, including the following methods: The first coordinate attention mechanism is embedded between the second and third convolutional layers, and between the third and fourth convolutional layers in the global feature extraction part; The first coordinate attention mechanism performs a first self-attention calculation on the height dimension and the width dimension respectively, calculates the attention weight and applies it to the output feature map to enhance or suppress the features at the corresponding position of the output feature map.

5. A method for detecting apparent water seepage in a tunnel according to claim 1, characterized in that: The first coordinate attention mechanism is a permutation coordinate attention mechanism; the permutation coordinate attention mechanism includes a grouping feature part, a fusion attention part and an aggregation feature part; The grouping feature part converts the input feature map X∈R C×H×W Along the channel dimension, it is divided into G groups of sub-features, expressed as X=[X1,..., X k ,...,X G ], X k ∈R C / G×H×W , where the sub-feature layer X k After capturing the accurate semantic feedback after training, X k Divide into sub-feature maps X along the height and width dimensions k1 , X k2 ∈R C / 2G×H×W The fusion attention part generates a channel attention map based on the relationship between channels, and uses global average pooling to generate s to embed global information, by obtaining a shrinkage sub-feature map X in the height dimension and width dimension H×W k1,s : ; in, F gp Represents the embedding of global information; H represents the total height of the feature map; W represents the total width of the feature map; C represents the total number of channels; R represents a real number; i represents height, j represents width; Then, the Sigmoid activation function is used to create compact features and channel attention of the high-dimensional output. for: ; Channel attention of width dimension output for: ; Among them, b1 represents the height dimension compact parameter; b2 represents the width dimension compact parameter; GN (X k2 ) represents the pair feature X k2 The number of groups; W1 represents the coefficient parameter of the height dimension; W2 represents the coefficient parameter of the width dimension; Aggregate feature parts to aggregate the overall output have: 。 6. A method for detecting apparent water seepage in a tunnel according to claim 5, characterized in that: The fusion feature Z obtained by fusing the preliminary features, local features and global features in the feature fusion part is: ; Among them, M1 represents the fusion weight of the preliminary feature X, local feature Y and global feature Z, and its value is a real number between 0 and 1; Indicates the element-by-element summation of the feature map; Indicates the element phase corresponding to the characteristic graph.

7. A method for detecting apparent water seepage in a tunnel according to claim 1, characterized in that: The methods for constructing the segmentation network include: A segmentation network based on the MobileViT network structure is constructed; the segmentation network includes a global branch structure and a local branch structure; the global branch structure includes a first encoder and a first decoder; the local branch structure includes a second encoder and a second decoder; the first encoder and the second encoder are used to extract feature maps from image data, and the first decoder and the second decoder are used to parse the encoded data into the original image data form; A second coordinate attention mechanism is embedded between the first convolutional layer and the second convolutional layer of the first decoder and the second decoder; the second coordinate attention mechanism is a self-attention mechanism with position encoding, and the second coordinate attention mechanism performs second self-attention calculation in the height dimension and width dimension respectively.

8. A method for detecting apparent water seepage in a tunnel according to claim 7, characterized in that: The second coordinate attention mechanism performs a second self-attention calculation on the height dimension and the width dimension respectively, and the method includes: The self-attention calculation of the second coordinate attention mechanism in the width dimension is: ; The self-attention calculation of the second coordinate attention mechanism in the height dimension is: ; in, y ij Represents the self-attention weight of the feature in the i-th row and j-th column; q ij , k ij , v ij are the query vector, key vector, and value vector of the i-th row and j-th column feature respectively; W is the total width of the feature map; w represents the width of the i-th row and j-th column feature; H is the total height of the feature map; w represents the height of the i-th row and j-th column feature; T represents the transpose of the vector; G Q , G K , G V1 , G V2 ∈R, respectively represent the control parameters of the query vector relative position information, key vector relative position information, value vector relative position information and value vector offset position information; Represents the position offset of the feature query vector in the width and height dimensions of the i-th row and j-th column; Represents the position offset of the feature key vector in the width and height dimensions of the i-th row and j-th column; Represents the position offset of the feature in the i-th row and j-th column in the width and height dimensions; Represents the position offset of the query vector from the feature in the i-th row and j-th column to the feature in the h-th row and w-th column in the width dimension; Represents the position offset of the feature vector in the width dimension from the feature in the i-th row and j-th column to the feature key vector in the h-th row and w-th column; Represents the position offset of the feature value vector of the i-th row and j-th column to the feature value vector of the h-th row and w-th column in the width dimension; Represents the position offset of the query vector in the height dimension from the feature in the i-th row and j-th column to the feature in the h-th row and w-th column; Represents the position offset of the feature in the i-th row and j-th column to the feature key vector in the h-th row and w-th column in the height dimension; Represents the position offset of the feature value vector of the i-th row and j-th column to the feature value vector of the h-th row and w-th column in the height dimension; Softmax w represents the activation function in the width dimension; Softmax h Represents the activation function in the height dimension.

9. A tunnel apparent water seepage detection system, characterized in that: A method for detecting apparent water seepage in a tunnel according to any one of claims 1 to 8, the system comprising: Collection module, used to collect basic data of the target tunnel; A preprocessing module, configured to preprocess the basic data; the basic data includes image data and environmental data; The detection module is used to input the preprocessed basic data into the constructed water seepage detection model for detection; the water seepage detection model includes a detection network and a segmentation network; the detection network uses the MobileViT network structure as the basic network, introduces the first coordinate attention mechanism in the global feature extraction part to obtain global features, and performs feature fusion on the preliminary features, local features and global features in the feature fusion part to detect water seepage images; the segmentation network uses the MobileViT network structure as the basic network, and incorporates the second coordinate attention mechanism to perform semantic segmentation on the water seepage image to obtain the water seepage area; The output module is used to output water seepage images and water seepage areas.

10. A computer-readable medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement a tunnel apparent water seepage detection method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Tunnel chipping or water seepage detection and measurement method based on dual-depth learning model

    CN112488119A

  • Target boundary detection and target segmentation model based on boundary attention consistency

    CN112686913A

  • Pollen image classification method based on cross attention distillation Transformer

    CN113887610A

  • Tunnel lining leakage water image segmentation method

    CN117409023A

  • Method for detecting water leakage of tunnel

    CN118799791A

Cited By

  • Full-section tunnel lining water leakage detection method based on three-dimensional laser array

    CN120760972A