Hydraulic tunnel underwater crack segmentation method and system based on lightweight segmentation model
Through the lightweight segmentation model optimized by deep separable convolution and multi-stage preprocessing, the contradiction between lightweight, accuracy and efficiency in underwater crack detection is solved, and efficient and accurate underwater crack detection is achieved, which can adapt to complex underwater environments.
Patent Information
- Application Number
- CN202511169152.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-10-14
AI Technical Summary
Existing underwater crack detection technologies have problems such as insufficient model lightweighting, contradiction between accuracy and efficiency, and insufficient feature analysis capabilities, resulting in low efficiency and accuracy of underwater crack detection. In addition, existing methods do not optimize the preprocessing process based on the characteristics of underwater images and have poor adaptability.
A lightweight encoder-decoder network structure is constructed using depthwise separable convolution. Combined with multi-stage preprocessing and five-fold cross-validation, the network structure and preprocessing process are optimized to enhance the crack feature extraction capability and adapt to complex underwater environments.
It significantly reduces the underwater crack image segmentation time, improves detection accuracy and efficiency, meets real-time requirements, enhances the model's adaptability to complex underwater scenes, and reduces missed detections and false detections.
Smart Images

Figure CN120783056A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of underwater crack detection in hydraulic tunnels, and in particular relates to a method and system for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the growing demand for optimized water resource allocation, hydraulic tunnels are widely used in power generation, water supply, and water transmission. However, factors such as water flow impact and earthquakes can easily cause cracks in tunnel structures, threatening project safety. Traditional inspection methods rely on visual observation after manually draining the tunnel, which is inefficient, costly, and risky, and also severely limits detection accuracy and scope.
[0004] In recent years, underwater robots (ROVs) equipped with high-precision cameras have been able to capture images of tunnel cracks. However, the complex underwater environment results in images with defects such as uneven lighting, high turbidity, and discontinuous crack targets. These low-quality images interfere with crack feature extraction, further reducing detection accuracy and extending analysis time. Although deep learning technology offers new insights for crack detection, existing models still face the following key challenges in practical applications: (1) Insufficient model lightweight: High-resolution images and complex backgrounds require a lot of computing resources. Existing semantic segmentation models (such as UNet and PSPNet) are difficult to deploy on mobile devices such as ROV and cannot meet real-time requirements.
[0005] (2) The contradiction between accuracy and efficiency: Although mainstream models (such as DeepLabV3) have high accuracy, they are computationally complex, while lightweight models (such as UNet++) require sacrificing accuracy.
[0006] (3) Insufficient feature analysis capabilities: With the development of underwater robot technology, ROVs equipped with high-precision cameras can now automatically collect images of underwater cracks in hydraulic tunnels, which to some extent overcomes the limitations of manual detection. However, the underwater environment of hydraulic tunnels is complex and uncontrolled, and the collected images generally have low-quality problems such as uneven lighting, low contrast caused by turbid water, discontinuous crack targets, or blurred edges. These image noises seriously interfere with the extraction of crack features, making it significantly more difficult to distinguish cracks from the background, which directly affects the accuracy and efficiency of subsequent detection. Poor adaptability to underwater scenes: Public datasets lack underwater crack samples, and existing methods do not optimize the preprocessing process for underwater image characteristics (such as low contrast and noise interference), resulting in insufficient feature extraction. Summary of the Invention
[0007] To overcome the deficiencies of the above-mentioned prior art, the present invention provides a method and system for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model, which can significantly reduce the segmentation time of underwater crack images in hydraulic tunnels while ensuring segmentation accuracy.
[0008] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: A first aspect of the present invention provides a method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model.
[0009] The underwater crack segmentation method of hydraulic tunnel based on lightweight segmentation model includes: Obtain surface images of underwater cracks in hydraulic tunnels and construct an underwater image database through screening; Perform multi-stage preprocessing on images in the underwater image database; Constructing a lightweight segmentation model and evaluating the segmentation complexity. When the segmentation complexity of the constructed lightweight segmentation model meets the requirements, segmenting the images in the underwater image database; wherein the lightweight segmentation model is an encoder-decoder network structure constructed by depthwise separable convolution; The segmented image is sliced, spliced and denoised to obtain the crack segmentation image.
[0010] Furthermore, the multi-stage preprocessing includes: data enhancement, data augmentation and data slicing processing operations.
[0011] Furthermore, the data enhancement includes: separating the L channel, A channel and B channel of the RGB image, performing an adaptive histogram equalization operation on and only on the L channel; then, recombining the processed L channel with the original A channel and B channel, and converting them back to RGB space through channel superposition.
[0012] Furthermore, the data slicing operation includes: determining a patch size based on a principle of optimal segmentation performance, and cutting the image into slices with overlapping degrees.
[0013] Furthermore, the encoder-decoder network structure includes an upsampling path and a downsampling path, and the downsampling path includes a first downsampling block and a second downsampling block; wherein, the first downsampling block includes a convolutional layer, a DSC module and a maximum pooling layer; and the second downsampling block includes two DSC modules and a maximum pooling layer.
[0014] Furthermore, the segmentation complexity of the lightweight segmentation model is evaluated, including: evaluating the network complexity of the lightweight segmentation model and calculating the computational complexity of the DSC module in the lightweight segmentation model; comparing the evaluation value of the network complexity with the computational complexity of the DSC module, and evaluating the segmentation complexity of the lightweight segmentation model with the obtained ratio.
[0015] Furthermore, when the segmentation complexity of the lightweight segmentation model does not meet the standard, the five-fold cross-validation method is used to train the lightweight segmentation model.
[0016] A second aspect of the present invention provides a hydraulic tunnel underwater crack segmentation system based on a lightweight segmentation model.
[0017] The underwater crack segmentation system for hydraulic tunnels based on a lightweight segmentation model includes: The image acquisition module is configured to: obtain surface images of underwater cracks in hydraulic tunnels and construct an underwater image database through screening; The preprocessing module is configured to: perform multi-stage preprocessing on the images in the underwater image database; An image segmentation module is configured to: evaluate the segmentation complexity of a lightweight segmentation model, and when the segmentation complexity of the lightweight segmentation model meets the requirements, segment the images in the underwater image database; wherein the lightweight segmentation model is an encoder-decoder network structure constructed by depthwise separable convolution; The image stitching module is configured to slice, stitch and denoise the segmented image to obtain a crack segmentation image. A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of the method for segmenting underwater cracks in a hydraulic tunnel based on a lightweight segmentation model as described in the first aspect of the present invention.
[0018] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and runnable on the processor. When the processor executes the program, it implements the steps in the method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model as described in the first aspect of the present invention.
[0019] One or more of the above technical solutions have the following beneficial effects: (1) This paper constructs an encoder-decoder network structure through depthwise separable convolution (DSC), significantly reducing the computational complexity of the model. Replacing the standard convolution layer with depthwise separable convolution can significantly reduce the number of parameters and computational complexity while ensuring feature extraction capabilities. This makes the model better adapted to the limited computing power of mobile devices such as ROVs, meets the real-time requirements of underwater crack detection, and thus enables efficient deployment of the model on lightweight devices.
[0020] (2) The lightweight segmentation model of the present invention balances detection accuracy and computational efficiency by optimizing the network structure. On the one hand, the encoder-decoder structure fully extracts crack features through the downsampling path, and accurately restores crack details through the upsampling path. Five-fold cross-validation is combined to ensure segmentation accuracy. On the other hand, the application of depthwise separable convolution significantly improves the computational efficiency of the model, solving the problem of "high-precision models are computationally complex, while lightweight models sacrifice accuracy", and achieving a coordinated optimization of accuracy and efficiency.
[0021] (3) The present invention enhances the underwater crack feature extraction capability through a multi-stage preprocessing process. Specifically, the RGB image is converted to the LAB color space, and contrast-limited adaptive histogram equalization (CLAHE) is applied only to the L channel, which not only enhances the contrast between the crack and the background but also preserves the original color information. At the same time, the sample diversity is expanded through data augmentation operations such as image cropping and rotation, and the key crack features are focused on by combining slicing with the optimal patch size. The above preprocessing process is specifically designed for the characteristics of underwater images such as uneven illumination, high turbidity, and discontinuous cracks. It significantly improves the model's adaptability to complex underwater scenes, ensures that crack features are fully extracted, and reduces the problems of missed detection and false detection caused by feature ambiguity.
[0022] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0024] Figure 1 This is a flow chart of a method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model in Example 1 of the present invention.
[0025] Figure 2 Schematic diagram of image transformation of underwater cracks in a hydraulic tunnel in Example 1 of the present invention.
[0026] Figure 3 This is a structural diagram of the lightweight segmentation model in Example 1 of the present invention.
[0027] Figure 4 This is a structural diagram of the fifth downsampling block of the lightweight segmentation model in Example 1 of the present invention.
[0028] Figure 5 Schematic diagram comparing the segmentation performance of the DSC-UNet algorithm in Example 1 of the present invention and the existing algorithms.
[0029] Figure 6Schematic diagram of the relationship between accuracy and time of different network models in Example 1 of the present invention.
[0030] Figure 7 Schematic diagram of the image post-processing operation flow in Example 1 of the present invention. DETAILED DESCRIPTION
[0031] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0032] It should be noted that the terms used herein are for describing particular embodiments only and are not intended to limit the exemplary embodiments according to the present invention.
[0033] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.
[0034] Example 1 This embodiment discloses a method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model.
[0035] like Figure 1 As shown in FIG, the underwater crack segmentation method of hydraulic tunnel based on the lightweight segmentation model includes: Step S1: Acquire surface images of underwater cracks in hydraulic tunnels and construct an underwater image database by screening; Step S2, performing multi-stage preprocessing on the images in the underwater image database; Step S3: constructing a lightweight segmentation model and evaluating the segmentation complexity. When the segmentation complexity of the constructed lightweight segmentation model meets the requirements, segmenting the images in the underwater image database; wherein the lightweight segmentation model is an encoder-decoder network structure constructed by depthwise separable convolution; Step S4: Slice and splice the segmented image and perform denoising to obtain a crack segmentation image.
[0036] Based on the above process, the present invention can significantly reduce the segmentation time of underwater crack images of hydraulic tunnels while ensuring segmentation accuracy. To facilitate understanding of the technical solution of the present invention, the specific implementation method of the technical solution of the present invention is further explained and illustrated below.
[0037] In step S1, the surface images of underwater cracks in hydraulic tunnels are automatically acquired using an underwater robot (ROV), and the images containing cracks are manually selected and annotated to construct an underwater image database.
[0038] In this example, the images collected were from underwater concrete cracks at the construction site and in an indoor laboratory. After screening, the images were divided into a training set and a test set at a ratio of 7:1. Since there is currently no publicly available shared dataset for hydraulic tunnels, this example used an ROV (underwater robot) equipped with an 1800p high-definition underwater camera and a 40wled fill light to collect images of underwater concrete cracks at the construction site and in an indoor laboratory. A total of 225 crack images with a resolution of 4000×3000 pixels were included, all of which were characterized by complex backgrounds, low contrast, and a wide variety of crack types. After screening the collected images, the dataset was annotated at the pixel level using the VIA annotation tool. The annotated crack images were randomly divided into a training set and a test set at a ratio of 7:1 for subsequent model training.
[0039] In step S2, multi-stage preprocessing is performed on the images in the underwater image database, wherein the multi-stage preprocessing includes data enhancement, data augmentation and data slicing processing operations.
[0040] In the specific implementation process, first, the histogram equalization algorithm is used to enhance the image contrast of the collected data; then, the data is expanded through operations such as image cropping and rotation; finally, after the appropriate patch size is selected through experiments, the image is cropped into slices of corresponding sizes. Specifically: 1) Data augmentation involves converting the RGB image to the LAB color space. In LAB, the "L" channel represents the lightness channel, while the "A" and "B" channels represent the color channels. Therefore, the "L" channel provides more information about cracks. Contrast-constrained adaptive histogram equalization (CLAHE) is applied to the L channel to enhance crack characteristics. The enhanced L channel is then merged with the A and B channels of the original image. Finally, the merged image is converted back to RGB format by overlaying a mask.
[0041] 2) Data augmentation includes: using the data augmentation tool Augmentor to perform horizontal, vertical, flip, and translation transformations on the crack images, and finally obtaining 2450 images with a resolution of 1024×1024 to establish the underwater crack dataset of hydraulic tunnels. The augmentation effect is as follows: Figure 2 shown.
[0042] 3) Data slicing operations include: determining the patch size based on the principle of optimal segmentation performance and cropping the image into slices with overlapping degrees. Specifically, the process of experimentally selecting the appropriate patch size is as follows: Determine the appropriate patch size for the dataset through experiments , the crack images of the processed database are cropped into Each image slice has half the overlap with its adjacent slice. By iteratively adjusting the slice cropping size while keeping the training parameters consistent, the image slice with the highest segmentation performance is selected. value.
[0043] In step S3, a lightweight segmentation model is constructed and the segmentation complexity is evaluated. When the segmentation complexity of the constructed lightweight segmentation model meets the requirements, the images in the underwater image database are segmented. Figure 3 As shown, the encoder-decoder network structure includes an upsampling path and a downsampling path.
[0044] The downsampling path consists of six downsampling modules: one first downsampling block and five second downsampling blocks. The first downsampling block consists of a 3x3 convolutional layer, a DSC module, and a max pooling layer. Specifically, a 3x3 convolutional layer generates 64 feature maps, which are then processed by the DSC module. The first DSC block convolves each of the 64 feature maps with a 3x3 convolution kernel, while the second block uses a 1x1 convolution kernel to generate 128 feature maps. These convolutional layers all have a stride of 1 and use the RELU activation function. The second downsampling block consists of two DSC modules and a max pooling layer. The DSC consists of a 3x3 depthwise convolution layer and a 1x1 pointwise convolution layer. All other modules in the downsampling path consist of two DSCs and a max pooling layer. When an image passes through a downsampling module, the length and width of the output feature maps are halved, but the number of feature maps is doubled.
[0045] The fifth module of the downsampling path passes through two DSC modules followed by a maximum pooling layer with a 2×2 kernel and a stride of 2, as shown in Figure 4 As shown. The M feature maps of 512 channels of the first DSC module produce 512 feature maps of the same dimension. Then, its output is sent to the second DSC to match the generated Finally, the output is max-pooled to generate the input feature maps of the same downsampling block, which are 1024 in number and 4×4 in size.
[0046] The upsampling path consists of five upsampling modules with the same structure. Each upsampling module contains an upsampling layer with a kernel of 2×2 and a stride of 2. Subsequently, this upsampling layer is connected to two DSC modules with the same shape as the downsampling layer.
[0047] The feature maps of each layer obtained by the downsampling path need to undergo dense convolution before being accepted by the upsampling path. The upsampling output feature map is concatenated with the corresponding encoding path output feature map using a bilinear function and fed into the convolution block, where it is decoded layer by layer to obtain the corresponding feature map.
[0048] On this basis, the encoder-decoder network structure is further composed of a convolutional layer with a kernel of 1×1 and a standard softmax activation layer as the output part; among them, the activation layer separates the cracks in the image from the background.
[0049] Since the constructed network architecture consists of multiple blocks and each block includes two DSCs, replacing the standard convolutional layer with DSC can significantly reduce the overall computational complexity.
[0050] Based on the constructed lightweight segmentation model, its segmentation complexity needs to be evaluated, including: evaluating the network complexity of the lightweight segmentation model and calculating the computational complexity of the DSC module in the lightweight segmentation model; comparing the evaluated value of the network complexity with the computational complexity of the DSC module, and using the obtained ratio to evaluate the segmentation complexity of the lightweight segmentation model. This can be achieved through the following methods: 1) Evaluate the complexity of the improved network based on the network structure used.
[0051] A set of sizes The feature map F is taken as input, and a set of sizes is The feature map G is the output; where Corresponding to the width and height of the input feature map, is the number of input image channels, is the number of output image channels, Corresponding to the width and height of the output feature map. They represent the convolution sizes of the standard convolution layer and depthwise convolution respectively, and the convolution kernel of the point-by-point convolution is 1×1.
[0052] The convolution calculation process is obtained according to the following formula: ; in, represents the filters of the convolutional layer, The input feature map representing the input image, Represents the output feature map of the input image. For a standard convolution process with a stride of 1, The A standard convolution filter is applied to The In the feature map, The A feature map.
[0053] The computational complexity of standard convolution is obtained according to the following formula: ; DSC divides the convolution layer into two steps. For the first layer of DSC, each input feature map is processed on each channel. Therefore, the computational cost of depthwise convolution is For the second layer, The feature maps are superimposed and the application size is The filter provides a single value of the feature map, and the filter is applied iteratively times, so the computational cost of the point-by-point convolution operation is .
[0054] 2) Determine the computational complexity of the DSC module, namely: ; 3) Determine the ratio of the computational effort of the standard convolution module to that of the DSC module, i.e.: .
[0055] Furthermore, when the segmentation complexity of the lightweight segmentation model does not meet the standard, the five-fold cross-validation method is used to train the lightweight segmentation model, and the obtained dataset is divided into five sub-datasets for cross-validation. In order to better evaluate the selected method, a comparative analysis is conducted on the hydraulic tunnel crack dataset with several other mainstream deep learning semantic segmentation networks. The evaluation indicators used in this invention are: intersection over union (IOU), precision, recall, and time. These indicators enable quantitative analysis of method performance. Their corresponding formulas are shown below: ; ; ; ; Among them, TP and TN represent the number of pixels correctly classified as cracks and background, respectively, while FP and FN represent the number of pixels misclassified as cracks and background, respectively. represents the ratio between the number of pixels predicted to be cracks and the number of pixels that are cracks, represents the ability to correctly classify pixels into background and cracks, They reflect the ability to correctly classify pixels as cracks and the ability to correctly classify pixels as background, respectively. The execution time refers to the number of underwater cracks that can be detected per unit time.
[0056] 1) Detection Accuracy Verification: The results of the five-fold cross-validation are shown in Table 1. The differences in the test accuracy of the hydraulic tunnel crack dataset on the four indicators are 0.063, 0.017, 0.033, and 0.055, respectively. Table 1 Average performance indicators of the database
[0057] In addition, to evaluate the selected method, a qualitative and quantitative comparative analysis was conducted with several other mainstream deep learning semantic segmentation networks for the hydraulic tunnel crack dataset. The qualitative effects of crack segmentation of different methods are as follows: Figure 5 Comparing the proposed method with existing models reveals that other processing methods suffer from numerous noise interference points and significant missed detections, while the proposed method can obtain rich crack information and exhibits strong denoising capabilities. The proposed model preserves spatial structural information while also considering the distribution and continuity of high-level features.
[0058] 2) Detection efficiency verification: To better evaluate the selected method, a quantitative comparison is made between the performance of the existing instance segmentation network and the hydraulic tunnel crack dataset, as shown in Table 2.
[0059] Table 2 Evaluation comparison of different methods in the tunnel crack dataset
[0060] The model of the present invention aims to improve the segmentation accuracy while reducing the execution time. The existing models all follow the same stable trend, such as Figure 6 As shown by the blue slash line, at the same time, the proposed method achieves the highest accuracy in the shortest time.
[0061] In step S4, the segmented image is sliced, spliced, and denoised to obtain a crack segmentation image.
[0062] The slice images after the previous segmentation are recombined into a single segmented crack image, and the image is smoothed and denoised using morphological methods to finally obtain a crack segmentation image.
[0063] The biggest task of post-processing is to reassemble the pre-cut patches into a single segmented crack image, such as Figure 7 As shown in the figure, the segmented crack images are first collected and resized to the size of the cropped patches. Then, these segmented crack patches are incrementally replicated and the masks of the used images are superimposed on the merged mask to eliminate the information of splicing misalignment. Finally, a morphological erosion transformation is applied using a 3×3 circular convolution kernel to obtain the local minimum to achieve image denoising.
[0064] Although the present invention has been described in considerable detail and with particularity with respect to several embodiments, it is not intended to limit the present invention to any of these details or embodiments or any particular embodiment, so as to effectively encompass the intended scope of the present invention. In addition, the present invention has been described above with respect to embodiments foreseen by the inventors for the purpose of providing a useful description, and those insubstantial modifications of the present invention that are not currently foreseen may still represent equivalent modifications of the present invention.
[0065] Example 2 This embodiment discloses a hydraulic tunnel underwater crack segmentation system based on a lightweight segmentation model.
[0066] The underwater crack segmentation system for hydraulic tunnels based on a lightweight segmentation model includes: The image acquisition module is configured to be integrated into the underwater robot to automatically acquire surface images of underwater cracks in hydraulic tunnels, screen out images containing cracks and annotate them to build an underwater image database; The preprocessing module is configured to: perform multi-stage preprocessing on the images in the underwater image database; An image segmentation module is configured to: evaluate the segmentation complexity of a lightweight segmentation model, and when the segmentation complexity of the lightweight segmentation model meets the requirements, segment the images in the underwater image database; wherein the lightweight segmentation model is an encoder-decoder network structure constructed by depthwise separable convolution; The image stitching module is configured to slice, stitch and denoise the segmented image to obtain a crack segmentation image. Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.
[0067] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for segmenting underwater cracks in a hydraulic tunnel based on a lightweight segmentation model as described in the first embodiment of the present disclosure.
[0068] Example 4 The purpose of this embodiment is to provide an electronic device.
[0069] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model as described in the first embodiment of the present disclosure are implemented.
[0070] The steps involved in the apparatuses of Examples 2, 3, and 4 above correspond to those of Method Example 1. For detailed implementations, please refer to the relevant description of Example 1. The term "computer-readable storage medium" should be understood to mean a single medium or multiple media containing one or more instruction sets; it should also be understood to include any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and causing the processor to perform any method of the present invention.
[0071] Those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using a general-purpose computer device. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0072] Although the above describes the specific embodiments of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without any creative work are still within the scope of protection of the present invention.
Claims
1. A method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model, characterized in that: include: Obtain surface images of underwater cracks in hydraulic tunnels and construct an underwater image database through screening; Perform multi-stage preprocessing on images in the underwater image database; Constructing a lightweight segmentation model and evaluating the segmentation complexity. When the segmentation complexity of the constructed lightweight segmentation model meets the requirements, segmenting the images in the underwater image database; wherein the lightweight segmentation model is an encoder-decoder network structure constructed by depthwise separable convolution; The segmented image is sliced, spliced and denoised to obtain the crack segmentation image.
2. The method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model according to claim 1, characterized in that: The multi-stage preprocessing includes: data enhancement, data augmentation and data slicing processing operations.
3. The method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model according to claim 2, characterized in that: The data enhancement includes: separating the L channel, A channel and B channel of the RGB image, performing an adaptive histogram equalization operation on and only on the L channel; then, recombining the processed L channel with the original A channel and B channel, and converting them back to RGB space through channel superposition.
4. The method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model according to claim 2, characterized in that: The data slicing operation includes: determining a patch size based on a principle of optimal segmentation performance, and cutting the image into slices with overlapping degrees.
5. The method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model according to claim 1, characterized in that: The encoder-decoder network structure includes an upsampling path and a downsampling path, and the downsampling path includes a first downsampling block and a second downsampling block; wherein the first downsampling block includes a convolutional layer, a DSC module and a maximum pooling layer; and the second downsampling block includes two DSC modules and a maximum pooling layer.
6. The method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model according to claim 1, characterized in that: Evaluating the segmentation complexity of the lightweight segmentation model includes: evaluating the network complexity of the lightweight segmentation model and calculating the computational complexity of the DSC module in the lightweight segmentation model; comparing the evaluation value of the network complexity with the computational complexity of the DSC module, and evaluating the segmentation complexity of the lightweight segmentation model with the obtained ratio.
7. The method for segmenting underwater cracks in hydraulic tunnels based on a lightweight segmentation model according to claim 1, characterized in that: When the segmentation complexity of the lightweight segmentation model does not meet the standard, the five-fold cross-validation method is used to train the lightweight segmentation model.
8. The underwater crack segmentation system for hydraulic tunnels based on lightweight segmentation model is characterized by: include: The image acquisition module is configured to: obtain surface images of underwater cracks in hydraulic tunnels and construct an underwater image database through screening; The preprocessing module is configured to: perform multi-stage preprocessing on the images in the underwater image database; An image segmentation module is configured to: evaluate the segmentation complexity of a lightweight segmentation model, and when the segmentation complexity of the lightweight segmentation model meets the requirements, segment the images in the underwater image database; wherein the lightweight segmentation model is an encoder-decoder network structure constructed by depthwise separable convolution; The image stitching module is configured to slice, stitch and denoise the segmented image to obtain a crack segmentation image.
9. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for segmenting underwater cracks in a hydraulic tunnel based on a lightweight segmentation model are implemented.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method for segmenting underwater cracks in a hydraulic tunnel based on a lightweight segmentation model are implemented as described in any one of claims 1 to 7.