A method, system, device and medium for detecting cracks on tunnel lining surface

The method enhances tunnel crack detection by preprocessing, feature extraction, and optimization techniques to improve model robustness and accuracy, addressing inefficiencies in existing manual and digital methods.

CN118864447BActive Publication Date: 2024-12-10CHINA RAILWAY SOUTHWEST SCI RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411319551.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-10
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

Existing tunnel crack detection methods rely on inefficient manual inspection and digital image processing with poor algorithm reliability, low model robustness, and are not suitable for complex environments, leading to suboptimal detection of approximate and fuzzy targets.

Method used

A method involving image preprocessing, feature extraction, and optimization using horizontal, vertical, and average feature processing, followed by feature fusion and optimization with spatial and channel attention mechanisms to enhance model robustness and accuracy.

Benefits of technology

The method improves crack detection accuracy by reducing false and missed detections, enabling more continuous and complete crack detection on tunnel linings, adapting to different object arrangements and scale changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118864447B_ABST
    Figure CN118864447B_ABST
Patent Text Reader

Abstract

The invention discloses a method, system, equipment and medium for detecting cracks on the surface of a tunnel lining, and relates to the technical field of crack detection. The method comprises: performing multiple feature extraction processes on each image in a sample training set, and fusing the feature maps respectively obtained from the multiple feature extraction processes to obtain a feature fusion map corresponding to each image in the sample training set; performing feature optimization processes on each feature fusion map respectively, and inputting each feature fusion map after the feature optimization processes into a preset initial model for processing until the initial model reaches a preset training end condition, and determining the initial model that reaches the training end condition as a crack detection model; obtaining an image to be detected on the surface of a tunnel lining, and inputting the image to be detected into a crack detection model for processing to obtain a crack detection result of the image to be detected; the method proposed in the scheme can reduce the situation of false detection and missed detection, and at the same time, the cracks detected are more continuous and complete.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of crack detection, and more specifically, to a method, system, equipment and medium for detecting cracks on the surface of a tunnel lining. Background Art

[0002] At present, China's tunnel construction is still in a stage of continuous development. With the increase of service time, the frequency of defects in tunnels also increases accordingly, which will have a negative impact on the service life of tunnels. In addition, the operating environment of tunnels is complex and there are many uncertain factors. The pressure faced by daily inspection work in tunnels is also increasing. Therefore, in order to ensure the safety of tunnel space, it is necessary to conduct real-time monitoring and detection of lining cracks in tunnels.

[0003] Traditional tunnel crack detection mainly relies on manual inspection by inspectors with the naked eye, which is inefficient, costly, and may also pose certain safety risks. At present, the identification of cracks at home and abroad has shifted from traditional manual inspection to detection based on digital image processing, and has made many advances. For example, the tunnel crack identification method based on "feature + classifier" mainly separates crack information from the image, and further identifies cracks by combining shape and edge features. For example, based on the improvement of computing power performance, computer vision methods based on deep learning have attracted the attention of more and more scholars. Target detection is an important technology in the field of computer vision that combines object recognition and positioning.

[0004] In the above scheme, the screening method of classifier identification is relatively simple, but the algorithm reliability is poor. Once the detection target is different, the classification features need to be manually re-extracted. Therefore, the model is not robust and has poor portability in complex environments, and is not suitable for solving actual engineering problems. In recent years, many detection methods for cracks in tunnels have been proposed, but in actual scenarios, the detection effect of approximate targets and fuzzy targets is still not ideal, and objective conditions such as many model parameters and large calculation amount will increase the difficulty of detection and make it difficult to meet the requirements of tunnel detection.

[0005] In view of this, this application is hereby made. Summary of the invention

[0006] The object of the present invention is to provide a method, system, equipment and medium for detecting cracks on the surface of a tunnel lining, so as to solve the problems existing in the above-mentioned background technology.

[0007] The above technical objectives of the present invention are achieved through the following technical solutions:

[0008] In a first aspect, the present application provides a method for detecting cracks on a tunnel lining surface, comprising the following specific steps:

[0009] Acquire an image set, divide each image in the image set into a plurality of sub-images of the same size, and obtain a first set of a plurality of sub-images corresponding to each image, wherein the image set includes a plurality of crack images and a plurality of non-crack images of the same size;

[0010] A corresponding number of sub-images are randomly selected from the first set, and are spliced ​​into spliced ​​images with the same size as the images in the image set, to obtain a second set containing a plurality of spliced ​​images, and the image set and the second set are determined as sample training sets;

[0011] Perform multiple feature extraction processes on each preprocessed image in the sample training set, and fuse the feature maps obtained by the multiple feature extraction processes to obtain a feature fusion map corresponding to each image in the sample training set;

[0012] Perform feature optimization processing on each feature fusion graph respectively, and input each feature fusion graph after feature optimization processing into a preset initial model for processing until the initial model reaches a preset training end condition, and the initial model that reaches the training end condition is determined as a crack detection model;

[0013] The image to be detected of the tunnel lining surface is obtained, and the image to be detected is input into the crack detection model for processing to obtain the crack detection result of the image to be detected, and the crack detection result includes the presence of cracks and the absence of cracks.

[0014] The beneficial effects of the present invention are as follows: in this scheme, when preparing a sample set for training an initial model, each image in the image set is firstly divided into a plurality of sub-images of the same size, so that each image corresponds to a plurality of sub-images that can be spliced ​​back to the original image, and then the sub-images are formed into a set, and the sub-images of the number of cuts of each image in the image set are randomly selected from the set for splicing, and the number of images obtained after splicing is consistent with the number of images in the image set, and the spliced ​​images are used as the second set; before the initial model is trained by the second set and the image set, it is first pre-processed by denoising, filtering, normalization, etc., and then the features of each image in the second set and the image set are extracted and optimized respectively, and finally The initial model is trained using each image that has been processed with feature optimization until the initial model reaches the training end condition to complete the model training; in actual use, the image to be detected on the surface of the tunnel lining is obtained, and the image to be detected on the surface of the tunnel lining is subjected to the same preprocessing, feature extraction processing and feature optimization processing, and then the feature map obtained after the feature optimization processing of the image to be detected is input into the crack detection model for processing, thereby obtaining the crack detection result of the image to be detected, and the crack detection result includes the presence of cracks and the absence of cracks. When the crack detection result is the presence of cracks, the crack detection model outputs the trajectory, shape, etc. of the crack, thereby realizing crack detection of the tunnel lining surface image.

[0015] In this scheme, the number of sub-images of each image in the image set are randomly selected from the set corresponding to the sub-images for splicing, and the spliced ​​image and the original image are used together to train the initial model, that is, both the synthetic image and the original image are used as the input of the model, which can not only enrich the background but also increase the number of small targets, and also allow the model to better adapt to different object arrangements and scale changes, thereby improving the robustness of the model; by performing multiple feature extraction processes on each image in the sample training set and fusing the results of each feature processing, the features of the crack area can be effectively obtained; and feature optimization processing is performed on each feature fusion map separately, which can retain more feature information and optimize the spatial information of low-level features. Compared with the detection method in the prior art, the method proposed in this scheme can reduce false detections and missed detections, and the detected cracks are more continuous and complete.

[0016] Based on the above technical solution, the present invention can also be improved as follows.

[0017] Furthermore, the feature extraction process includes horizontal feature processing, vertical feature processing and average feature processing, wherein:

[0018] The specific horizontal feature processing is as follows:

[0019] ;

[0020] In the formula, represents the feature map obtained by horizontal feature processing, represents the width of each image in the sample training set, Indicates that the pixel is ( i , j ) of a two-dimensional image;

[0021] The vertical feature processing is as follows:

[0022] ;

[0023] In the formula, represents the feature map obtained by vertical feature processing, Represents the height of each image in the sample training set, Indicates that the pixel is ( i , j ) of a two-dimensional image;

[0024] The specific average feature processing is:

[0025] ;

[0026] In the formula, represents the feature map obtained by averaging features, Represents the height of each image in the sample training set, represents the width of each image in the sample training set, Indicates that the pixel is A two-dimensional image of , Represent the coefficients respectively.

[0027] The beneficial effect of adopting the above further scheme is that more feature information can be retained by utilizing the three feature extraction methods of horizontal feature processing, vertical feature processing and average feature processing, which is more beneficial for subsequent model training.

[0028] Furthermore, the above feature fusion graph is specifically:

[0029] ;

[0030] In the formula, represents the feature map obtained by horizontal feature processing, represents the feature map obtained by vertical feature processing, represents the feature map obtained by averaging features, Represents the feature fusion graph.

[0031] Furthermore, the above feature optimization process is specifically as follows:

[0032] The feature fusion map is dimensionally compressed using spatial attention to obtain a first-dimensional image of the feature fusion map after dimension compression;

[0033] Perform a convolution operation on the first dimension image, and based on the result of the convolution operation, use the Sigmoid function to obtain the spatial position weight parameters of each feature in the feature fusion graph;

[0034] The spatial position weight parameters of each feature are applied to the corresponding feature fusion map to obtain the feature optimization processing result of the feature fusion map.

[0035] The beneficial effect of adopting the above further scheme is: by introducing a suitable attention mechanism to optimize the features at different stages, the weights of the pixel information at the spatial position can be redistributed; that is, while retaining more feature information, spatial attention is used to optimize the spatial information of the low-level features, and channel attention is used to optimize the high-level contextual information.

[0036] Furthermore, the result of the above convolution operation includes a first branch processing result and a second branch processing result, wherein:

[0037] The processing results of the first branch are as follows:

[0038] ;

[0039] The processing results of the second branch are as follows:

[0040] ;

[0041] In the formula, Indicates the processing result of the first branch, Indicates the processing result of the second branch, and Both represent convolution operations. and Represent the convolution operation respectively and The parameters of the convolution kernel, Represents the first dimension image.

[0042] Furthermore, the above spatial position weight parameters are specifically:

[0043] ;

[0044] The feature optimization processing results of the feature fusion graph are as follows:

[0045] ;

[0046] In the formula, represents the first dimension image, represents the spatial position weight parameter, Represents the operation of the Sigmoid function, Indicates the processing result of the first branch, Indicates the processing result of the second branch, Represents the feature fusion graph after feature optimization.

[0047] Furthermore, the above training ends when the total loss function does not exceed the threshold. The total loss function is specifically:

[0048] ;

[0049] In the formula, represents the total loss function, represents the first loss function, represents the second loss function;

[0050] The first loss function is specifically:

[0051] ;in:

[0052] ;

[0053] In the formula, represents the first loss function, represents the output of the initial model, represents the true value image, represents the model parameters, represents the weights of different losses, represents crack pixels, represents non-crack pixels, represents the intermediate parameter, , Represents the predicted input The probability of belonging to category 1, Represents the predicted input The real category, represents the input of the initial model;

[0054] The second loss function is specifically:

[0055] ;

[0056] In the formula, represents the second loss function, represents the model parameters, represents crack pixels, represents non-crack pixels, represents the intermediate parameter, , Represents the predicted input The probability of belonging to category 1, Represents the predicted input The real category, Represents the input of the initial model.

[0057] In a second aspect, the present application provides a tunnel lining surface crack detection system, which is applied to a tunnel lining surface crack detection method according to any one of the first aspects, comprising:

[0058] The first module is used to obtain an image set, divide each image in the image set into multiple sub-images of the same size, and obtain a first set of multiple sub-images corresponding to each image, wherein the image set includes multiple crack images and multiple crack-free images of the same size;

[0059] The second module is used to randomly extract a corresponding number of sub-images from the first set, and stitch them into stitched images with the same size as the images in the image set, to obtain a second set containing a plurality of stitched images, and determine the image set and the second set as sample training sets;

[0060] The third module is used to perform multiple feature extraction processes on each preprocessed image in the sample training set, and fuse the feature maps obtained by the multiple feature extraction processes to obtain a feature fusion map corresponding to each image in the sample training set;

[0061] The fourth module is used to perform feature optimization processing on each feature fusion map respectively, and input each feature fusion map after feature optimization processing into a preset initial model for processing until the initial model reaches a preset training end condition, and the initial model that reaches the training end condition is determined as a crack detection model;

[0062] The fifth module is used to obtain the image to be detected on the tunnel lining surface, and input the image to be detected into the crack detection model for processing to obtain the crack detection result of the image to be detected. The crack detection result includes the presence of cracks and the absence of cracks.

[0063] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods in the first aspect when executing the computer program.

[0064] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute any one of the methods in the first aspect.

[0065] Compared with the prior art, the present invention has at least the following beneficial effects:

[0066] In the present application, when preparing a sample set for training the initial model, each image in the image set is first divided into multiple sub-images of the same size, so that each image corresponds to multiple sub-images that can be spliced ​​back to the original image, and then the sub-images are formed into a set, and sub-images of the same number of cuts as each image in the image set are randomly selected from the set for splicing. The number of images obtained after splicing is consistent with the number of images in the image set, and the spliced ​​images are used as the second set; before the initial model is trained with the second set and the image set, it is first pre-processed by denoising, filtering, normalization, etc., and then feature extraction and feature optimization are performed on each image in the second set and the image set respectively, and finally the images are trained using the pre-processed image set. The initial model is trained for each image processed by feature optimization until the initial model reaches the training end condition to complete the model training; in actual use, the image to be detected on the tunnel lining surface is obtained, and the image to be detected on the tunnel lining surface is subjected to the same preprocessing, feature extraction processing and feature optimization processing, and then the feature map obtained after the feature optimization processing of the image to be detected is input into the crack detection model for processing, thereby obtaining the crack detection result of the image to be detected, and the crack detection result includes the presence of cracks and the absence of cracks. When the crack detection result is the presence of cracks, the crack detection model outputs the trajectory, shape, etc. of the crack, thereby realizing crack detection of the tunnel lining surface image.

[0067] In the present application, a number of sub-images of each image in the image set are randomly selected from the set corresponding to the sub-images for splicing, and the initial model is trained together with the spliced ​​image and the original image, that is, both the synthetic image and the original image are used as the input of the model, which can not only enrich the background but also increase the number of small targets, and also allow the model to better adapt to different object arrangements and scale changes, thereby improving the robustness of the model; by performing multiple feature extraction processes on each image in the sample training set and fusing the results of each feature processing, the features of the crack area can be effectively obtained; and by performing feature optimization processing on each feature fusion image separately, more feature information can be retained, and the spatial information of low-level features can be optimized. Compared with the detection method in the prior art, the method proposed in this scheme can reduce false detections and missed detections, and the detected cracks are more continuous and complete.

[0068] In this application, by using three feature extraction methods, namely horizontal feature processing, vertical feature processing and average feature processing, more feature information can be retained, which is more beneficial for subsequent model training; by introducing a suitable attention mechanism to optimize the features at different stages, the weights of pixel information at spatial positions can be redistributed; that is, on the premise of retaining more feature information, spatial attention is used to optimize the spatial information of low-level features, and channel attention is used to optimize high-level contextual information. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0070] Figure 1 A method flow chart of the detection method in an embodiment of the present invention;

[0071] Figure 2 A connection diagram of a detection system in an embodiment of the present invention;

[0072] Figure 3 Schematic diagram of the connection of electronic equipment in an embodiment of the present invention. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0074] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0075] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0076] In the description of the embodiments of the present invention, "plurality" means at least 2.

[0077] Embodiment 1: In order to solve the problems that the existing detection methods have poor algorithm reliability, low model robustness, poor portability, and are not suitable for solving actual engineering problems, and the detection effect of approximate targets and fuzzy targets in actual scenarios is still not ideal, and objective conditions such as many model parameters and large calculation amount will increase the difficulty of detection and make it difficult to meet the requirements of tunnel detection, this embodiment provides a method for detecting cracks on the surface of a tunnel lining, such as Figure 1 As shown, the specific steps include:

[0078] S1, obtaining an image set, dividing each image in the image set into multiple sub-images of the same size, and obtaining a first set of multiple sub-images corresponding to each image, wherein the image set includes multiple crack images and multiple crack-free images of the same size.

[0079] When preparing a sample set for training the initial model, each image in the image set is first divided into multiple sub-images of the same size, so that each image corresponds to multiple sub-images that can be spliced ​​back to the original image, and then the sub-images form a set.

[0080] S2, randomly extracting a corresponding number of sub-images from the first set, and splicing them into a spliced ​​image with the same size as each image in the image set, to obtain a second set containing multiple spliced ​​images, and determining the image set and the second set as a sample training set.

[0081] Among them, sub-images of the number of cuts of each image in the image set are randomly selected from the set for splicing, and the number of images obtained after splicing is consistent with the number of images in the image set, and the spliced ​​images are used as the second set.

[0082] Specifically, a number of sub-images corresponding to the set of sub-images are randomly selected from the cuts of each image in the image set for splicing, and the spliced ​​image and the original image are used together to train the initial model. That is, both the synthetic image and the original image are used as the input of the model, which can not only enrich the background but also increase the number of small targets, and also enable the model to better adapt to different object arrangements and scale changes, thereby improving the robustness of the model.

[0083] S3, performing multiple feature extraction processes on each preprocessed image in the sample training set, and fusing the feature maps obtained by the multiple feature extraction processes to obtain a feature fusion map corresponding to each image in the sample training set.

[0084] The preprocessing may include noise reduction processing, filtering processing, normalization processing, etc., and then feature extraction is performed on each image in the second set and the image set respectively, and the extracted features are fused.

[0085] Optionally, the feature extraction process includes horizontal feature processing, vertical feature processing and average feature processing, wherein:

[0086] The specific horizontal feature processing is as follows:

[0087] ;

[0088] In the formula, represents the feature map obtained by horizontal feature processing, represents the width of each image in the sample training set, Indicates that the pixel is ( i , j ) of a two-dimensional image.

[0089] Furthermore, the vertical feature processing is specifically as follows:

[0090] ;

[0091] In the formula, represents the feature map obtained by vertical feature processing, Represents the height of each image in the sample training set, Indicates that the pixel is ( i , j ) of a two-dimensional image.

[0092] Furthermore, the above average feature processing is specifically as follows:

[0093] ;

[0094] In the formula, represents the feature map obtained by averaging features, Represents the height of each image in the sample training set, represents the width of each image in the sample training set, Indicates that the pixel is A two-dimensional image of , Represent the coefficients respectively.

[0095] Optionally, the feature fusion graph is specifically:

[0096] ;

[0097] In the formula, represents the feature map obtained by horizontal feature processing, represents the feature map obtained by vertical feature processing, represents the feature map obtained by averaging features, Represents the feature fusion graph.

[0098] S4, perform feature optimization processing on each feature fusion graph respectively, and input each feature fusion graph after feature optimization processing into a preset initial model for processing until the initial model reaches a preset training end condition, and determine the initial model that reaches the training end condition as the crack detection model; wherein the initial model can be a BP neural network model, and the feature fusion graph is input into the initial model to enable the initial model to perform deep learning, thereby achieving the purpose of prediction.

[0099] Optionally, the above feature optimization process is specifically as follows:

[0100] S41, using spatial attention to perform dimension compression on the feature fusion map, to obtain a first dimensional image of the feature fusion map after dimension compression.

[0101] S42, performing a convolution operation on the first dimensional image, and based on the result of the convolution operation, using a Sigmoid function to obtain a spatial position weight parameter of each feature in the feature fusion image.

[0102] S43, applying the spatial position weight parameter of each feature to the corresponding feature fusion map to obtain a feature optimization processing result of the feature fusion map.

[0103] Among them, by introducing a suitable attention mechanism to optimize the features at different stages, the weights of pixel information at spatial positions can be redistributed; that is, while retaining more feature information, spatial attention is used to optimize the spatial information of low-level features, and channel attention is used to optimize high-level contextual information.

[0104] Optionally, the result of the convolution operation includes a first branch processing result and a second branch processing result, wherein:

[0105] The processing results of the first branch are as follows: ;

[0106] The processing results of the second branch are as follows: ;

[0107] In the formula, Indicates the processing result of the first branch, Indicates the processing result of the second branch, and Both represent convolution operations. and Represent the convolution operation respectively and The parameters of the convolution kernel, Represents the first dimension image.

[0108] Optionally, the above spatial position weight parameters are specifically: ;

[0109] The feature optimization processing results of the feature fusion graph are as follows: ;

[0110] In the formula, represents the first dimension image, represents the spatial position weight parameter, Represents the operation of the Sigmoid function, Indicates the processing result of the first branch, Indicates the processing result of the second branch, Represents the feature fusion graph after feature optimization.

[0111] Optionally, the above training end condition is that the total loss function does not exceed a threshold. The total loss function is specifically:

[0112] ;

[0113] In the formula, represents the total loss function, represents the first loss function, represents the second loss function.

[0114] Furthermore, the above first loss function is specifically:

[0115] ;in:

[0116] ;

[0117] In the formula, represents the first loss function, represents the output of the initial model, represents the true value image, represents the model parameters, represents the weights of different losses, represents crack pixels, represents non-crack pixels, represents the intermediate parameter, , Represents the predicted input The probability of belonging to category 1, Represents the predicted input The real category, Represents the input of the initial model.

[0118] Furthermore, the above second loss function is specifically:

[0119] ;

[0120] In the formula, represents the second loss function, represents the model parameters, represents crack pixels, represents non-crack pixels, represents the intermediate parameter, , Represents the predicted input The probability of belonging to category 1, Represents the predicted input The real category, Represents the input of the initial model.

[0121] S5, obtaining the image to be detected of the tunnel lining surface, and inputting the image to be detected into the crack detection model for processing to obtain the crack detection result of the image to be detected, wherein the crack detection result includes the presence of cracks and the absence of cracks.

[0122] Among them, in actual use, the image to be detected of the tunnel lining surface is obtained, and the same preprocessing, feature extraction processing and feature optimization processing are performed on the image to be detected on the tunnel lining surface. The feature map obtained after the feature optimization processing of the image to be detected is input into the crack detection model for processing, thereby obtaining the crack detection result of the image to be detected. The crack detection result includes the presence of cracks and the absence of cracks. When the crack detection result is the presence of cracks, the crack detection model outputs the trajectory, shape, etc. of the crack, thereby realizing crack detection of the tunnel lining surface image.

[0123] Embodiment 2: This embodiment of the present application provides a tunnel lining surface crack detection system, which is applied to a tunnel lining surface crack detection method in any one of Embodiment 1, such as Figure 2 As shown, including:

[0124] The first module is used to obtain an image set, divide each image in the image set into multiple sub-images of the same size, and obtain a first set of multiple sub-images corresponding to each image. The image set includes multiple crack images and multiple crack-free images of the same size.

[0125] The second module is used to randomly extract a corresponding number of sub-images from the first set and stitch them into a stitching image with the same size as each image in the image set to obtain a second set containing multiple stitching images, and determine the image set and the second set as sample training sets.

[0126] The third module is used to perform multiple feature extraction processes on each preprocessed image in the sample training set, and fuse the feature maps obtained by the multiple feature extraction processes to obtain a feature fusion map corresponding to each image in the sample training set.

[0127] The fourth module is used to perform feature optimization processing on each feature fusion map respectively, and input each feature fusion map after feature optimization processing into a preset initial model for processing until the initial model reaches the preset training end condition, and the initial model that reaches the training end condition is determined as the crack detection model.

[0128] The fifth module is used to obtain the image to be detected on the tunnel lining surface, and input the image to be detected into the crack detection model for processing to obtain the crack detection result of the image to be detected. The crack detection result includes the presence of cracks and the absence of cracks.

[0129] Embodiment 3: This embodiment of the present application provides an electronic device, such as Figure 3 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any method in Embodiment 1 is implemented.

[0130] Embodiment 4: The embodiment of the present application provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute any method in Embodiment 1.

[0131] 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 cracks on a tunnel lining surface, characterized in that: The specific steps include: Acquire an image set, divide each image in the image set into a plurality of sub-images of the same size, and obtain a first set of a plurality of sub-images corresponding to each image, wherein the image set includes a plurality of crack images and a plurality of non-crack images of the same size; Randomly extract a corresponding number of sub-images from the first set, and stitch them into mosaics with the same size as the images in the image set, to obtain a second set containing a plurality of mosaics, and determine the image set and the second set as a sample training set; Performing multiple feature extraction processes on each preprocessed image in the sample training set, and fusing the feature maps obtained by the multiple feature extraction processes to obtain a feature fusion map corresponding to each image in the sample training set; The feature optimization process is as follows: Utilizing spatial attention to perform dimension compression on the feature fusion map, thereby obtaining a first dimensional image of the feature fusion map after the dimension compression; Performing a convolution operation on the first dimensional image, and based on the result of the convolution operation, using a Sigmoid function to obtain a spatial position weight parameter of each feature in the feature fusion image; Applying the spatial position weight parameter of each feature to the corresponding feature fusion map to obtain the feature optimization processing result of the feature fusion map; Performing feature optimization processing on each of the feature fusion graphs respectively, and inputting each of the feature fusion graphs after feature optimization processing into a preset initial model for processing until the initial model reaches a preset training end condition, and determining the initial model that reaches the training end condition as a crack detection model; An image to be detected of the tunnel lining surface is obtained, and the image to be detected is input into the crack detection model for processing to obtain a crack detection result of the image to be detected, wherein the crack detection result includes whether cracks exist or not.

2. A method for detecting cracks on a tunnel lining surface according to claim 1, characterized in that: The feature extraction process includes horizontal feature processing, vertical feature processing and average feature processing, wherein: The horizontal feature processing is specifically as follows: In the formula, A1 represents the feature map obtained by horizontal feature processing, W represents the width of each image in the sample training set, and x i , j Represents a two-dimensional image with pixel (i, j); The vertical feature processing is specifically as follows: Where A2 represents the feature map obtained by vertical feature processing, H represents the height of each image in the sample training set, and x i , j Represents a two-dimensional image with pixel (i, j); The average feature processing is specifically as follows: Where A3 represents the feature map obtained by averaging feature processing, H represents the height of each image in the sample training set, W represents the width of each image in the sample training set, and x i*h+i,j*w+j Represents a two-dimensional image with pixels (i*h+i, j*w+j), where h and w represent coefficients respectively.

3. A method for detecting cracks on a tunnel lining surface according to claim 2, characterized in that: The feature fusion graph is specifically: A=A1+A2+A3; In the formula, A1 represents the feature map obtained by horizontal feature processing, A2 represents the feature map obtained by vertical feature processing, A3 represents the feature map obtained by average feature processing, and A represents the feature fusion map.

4. A method for detecting cracks on a tunnel lining surface according to claim 1, characterized in that: The result of the convolution operation includes a first branch processing result and a second branch processing result, wherein: The first branch processing result is specifically: C1=conv2(conv1(f, W1), W2); The second branch processing result is specifically: C2=conv1(conv2(f, W1), W2); Wherein, C1 represents the processing result of the first branch, C2 represents the processing result of the second branch, conv1 and conv2 both represent convolution operations, W1 and W2 represent the parameters of the convolution kernels in the convolution operations conv1 and conv2 respectively, and f represents the first dimensional image.

5. A method for detecting cracks on a tunnel lining surface according to claim 4, characterized in that: The spatial position weight parameter is specifically: S = σ(C1+C2); The feature optimization processing result of the feature fusion graph is specifically as follows: f 1 =f*S; In the formula, f represents the first dimension image, S represents the spatial position weight parameter, σ represents the operation of the Sigmoid function, C1 represents the processing result of the first branch, C2 represents the processing result of the second branch, and f 1 Represents the feature fusion graph after feature optimization.

6. A method for detecting cracks on a tunnel lining surface according to claim 1, characterized in that: The training end condition is that the total loss function does not exceed the threshold, and the total loss function is specifically: L = L1 + L2; In the formula, L represents the total loss function, L1 represents the first loss function, and L2 represents the second loss function; The first loss function is specifically: in: In the formula, L1 represents the first loss function, Y 1 represents the output of the initial model, Y represents the true value image, W represents the model parameters, and w m Represents the weights of different losses, G + represents crack pixels, G - represents non-crack pixels, α represents the intermediate parameter, α=G + / (G + +G - ), P i represents the probability that the predicted input X belongs to category 1, y i Represents the true category of the predicted input X, where X represents the input of the initial model; The second loss function is specifically: In the formula, L2 represents the second loss function, W represents the model parameters, G + represents crack pixels, G - represents non-crack pixels, α represents the intermediate parameter, α=G + / (G + +G - ), P i represents the probability that the predicted input X belongs to category 1, y i Represents the true category of the predicted input X, where X represents the input of the initial model.

7. A tunnel lining surface crack detection system, applied to a tunnel lining surface crack detection method according to any one of claims 1 to 6, characterized in that: include: A first module is used to obtain an image set, divide each image in the image set into a plurality of sub-images of the same size, and obtain a first set of a plurality of sub-images corresponding to each image, wherein the image set includes a plurality of crack images and a plurality of non-crack images of the same size; A second module is used to randomly extract a corresponding number of sub-images from the first set, and stitch them together into stitched images with the same size as the images in the image set, to obtain a second set including a plurality of stitched images, and to determine the image set and the second set as a sample training set; The third module is used to perform multiple feature extraction processes on each preprocessed image in the sample training set, and fuse the feature maps obtained by the multiple feature extraction processes to obtain a feature fusion map corresponding to each image in the sample training set; The fourth module is used to perform feature optimization processing on each of the feature fusion graphs, and input each feature fusion graph after feature optimization processing into a preset initial model for processing until the initial model reaches a preset training end condition, and the initial model that reaches the training end condition is determined as a crack detection model; The fifth module is used to obtain the image to be detected on the tunnel lining surface, and input the image to be detected into the crack detection model for processing to obtain the crack detection result of the image to be detected, and the crack detection result includes the presence of cracks and the absence of cracks.

8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the method according to any one of claims 1 to 6 is implemented when the processor executes the computer program.

9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which enable a computer to execute the method of any one of claims 1-6.