Intelligent quantification method and system for underwater structure cracks

By constructing an SDI-ASF-Idiffusion neural network model and multi-level morphological processing, combined with an ROV high-definition camera and a PyQt5 interactive interface, the problem of efficient and accurate quantification of underwater structure crack detection is solved, and real-time analysis and early warning capabilities are achieved.

CN120564020BActive Publication Date: 2025-10-21FUZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511012859.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-10-21
Estimated Expiration
2045-07-23

AI Technical Summary

Technical Problem

Existing underwater structure crack detection technology has the disadvantages of low efficiency and strong subjectivity, making it difficult to achieve high-precision crack feature extraction and geometric parameter quantification, and lacks real-time analysis and early warning capabilities.

Method used

An SDI-ASF-Idiffusion neural network model was constructed, and images were collected using an ROV high-definition camera. Cracks were identified and segmented using improved optical imaging and image enhancement algorithms. Multi-level morphological processing was used to extract geometric information, and a PyQt5 interactive interface was integrated to achieve real-time visualization and early warning.

Benefits of technology

It achieves high-precision detection and precise quantification of underwater structural cracks, improves the efficiency and accuracy of underwater structure safety monitoring, generates standardized reports and provides real-time warnings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120564020B_ABST
    Figure CN120564020B_ABST
Patent Text Reader

Abstract

The application relates to an underwater structure crack intelligent quantification method and system, and belongs to the technical field of image processing. The method comprises the following steps: constructing an underwater structure crack image dataset, dividing the underwater structure crack image dataset into a training set, a verification set and a test set according to a division ratio; constructing an SDI-ASF-Idiffusion neural network model, setting an optimizer, an initial learning rate, a momentum parameter, weight decay, a batch size setting and a training iteration number; training and testing the SDI-ASF-Idiffusion neural network model to obtain a detection model for underwater structure crack identification and segmentation; performing smoothing processing and morphological operation on crack segmentation results output by the detection model to realize extraction and quantification of geometric information features; and designing an interactive interface based on PyQt5, integrating crack identification results, crack segmentation results and crack quantification information, and completing an underwater structure crack intelligent quantification process. The application can realize high-precision detection and accurate quantification of underwater structure cracks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to an intelligent quantification method and system for underwater structural cracks. Background Art

[0002] Detecting cracks in underwater structures is a crucial component of water conservancy project safety monitoring. Traditional manual detection methods suffer from inefficiency and subjectivity. Existing automated detection technologies face the following challenges: 1) The complex underwater environment makes crack feature extraction difficult, especially for fine cracks and network-like cracks; 2) Most detection methods only provide crack location information and lack the ability to accurately quantify geometric parameters; and 3) Detection systems are disconnected from engineering applications, making real-time on-site analysis and early warning difficult.

[0003] Although deep learning technology has been applied to crack detection, existing methods still have significant shortcomings: 1) Network models are not sufficiently adaptable to the diverse morphologies of underwater cracks; 2) The accuracy of quantification algorithms needs to be improved, especially for key parameters such as crack width, which suffer from large measurement errors; and 3) There is a lack of a complete integrated detection, quantification, and analysis solution. Therefore, the development of an intelligent system that can achieve high-precision detection, precise quantification, and engineering application is of great engineering value. Summary of the Invention

[0004] The purpose of the present invention is to overcome the defects of the prior art and provide an intelligent quantification method and system for underwater structural cracks, so as to achieve high-precision detection and accurate quantification of underwater structural cracks.

[0005] To achieve the above objectives, the technical solution of the present invention is: an intelligent quantification method for underwater structural cracks, comprising:

[0006] S1. Construct an underwater structural crack image dataset, and divide the underwater structural crack image dataset into a training set, a validation set, and a test set according to a division ratio;

[0007] S2. Build the SDI-ASF-Idiffusion neural network model, set the optimizer, initial learning rate, momentum parameter, weight decay, batch size, and number of training iterations;

[0008] S3. Train and test the SDI-ASF-Idiffusion neural network model to obtain a detection model for underwater structure crack identification and segmentation;

[0009] S4. Extracting and quantifying geometric information features from the crack segmentation results output by the detection model through smoothing and morphological operations;

[0010] S5. Design an interactive interface based on PyQt5 to integrate crack identification results, crack segmentation results, and crack quantification information to complete the intelligent quantification process of underwater structure cracks.

[0011] Furthermore, in S1, first, an ROV equipped with a high-definition camera is used to collect images of underwater structural cracks, constrain optical imaging parameters, and simultaneously record the shooting depth, angle, and environmental parameters; the optical imaging meets the following constraints:

[0012]

[0013] in, is the focal length, is the depth of field, Underwater visibility is measured in real time by turbidity sensors. is the central wavelength of the light source, Preset minimum value for target crack, is the horizontal deflection angle of the camera, is the lens field angle, is the minimum resolvable depth of field, is the camera pitch angle, is the turbidity compensation coefficient;

[0014] Secondly, the underwater structure crack image is enhanced by the improved limited contrast adaptive histogram equalization algorithm to obtain the enhanced underwater structure crack image ;

[0015]

[0016] in, is the grayscale value of the original image, is the image pixel coordinate, To limit the contrast of the adaptive histogram equalization function, is the local clipping threshold, is the number of adaptive grids, is the depth compensation gain, is the pixel depth, is the decay constant;

[0017] Finally, the division ratio of the training set, validation set and test set is set to 6:2:2.

[0018] Furthermore, in S2, the SDI-ASF-Idiffusion neural network model is constructed as follows:

[0019] First, a latent space diffusion model is constructed, and its noise prediction network is improved using the crack skeleton prior constraint:

[0020]

[0021] in, is the total loss of the latent space diffusion model, is the noise prediction network, is the image after adding noise, is Gaussian noise, is the time step ( =1000), is the crack skeleton prior map, is the coincidence between the prediction and the prior, Regarding the expected operation of image data distribution and time step, is the weight coefficient of the prior constraint term, The crack probability map is generated by 1×1 convolution of the intermediate feature map of the noise prediction network;

[0022] Secondly, the embedded semantics and details injection SDI module and the attention scale sequence fusion ASF module;

[0023] The SDI module consists of multi-level feature Hadamard product fusion and feature smoothing operations:

[0024]

[0025]

[0026] in, Represents the sequence features after alignment fusion, is the adaptive resolution alignment function, For each level of features, represents a three-dimensional convolution operation, For smooth operation, Corresponding to the features after upsampling, midsampling and downsampling operations respectively, is the sequence feature after three-dimensional convolution fusion, n is the number of feature levels, and n is 3;

[0027] The ASF module includes Gaussian scale space construction and three-scale feature encoding:

[0028]

[0029]

[0030] in, is the scale space function, is a two-dimensional Gaussian kernel, is the scale parameter, is the input feature map, represents the convolution operation; is the output feature, 、 、 are large, medium and small scale features respectively, is the downsampling operation, is the upsampling operation, is channel splicing, which represents multi-scale feature aggregation;

[0031] Finally, the optimizer selects stochastic gradient descent (SGD), sets the initial learning rate (LR) to 0.001, and the momentum parameter to 0.937. The cosine annealing learning rate scheduling strategy is adopted, the weight decay coefficient is set to 0.0005, the batch size is set to 16, and the number of training iterations is 300.

[0032] Furthermore, S3 specifically includes:

[0033] The SDI-ASF-Idiffusion neural network model is trained using the training set, and the training performance of the model is checked using the validation set. The pre-trained SDI-ASF-Idiffusion neural network model, i.e., the detection model, is obtained. The underwater structure cracks are then identified and segmented on the test set to obtain underwater structure images with crack anchor frames and crack masks. The pre-training process uses a joint loss function:

[0034]

[0035] in, is the semantic detail loss, is the scale-aware loss, To detect loss, is the loss weight of the SDI module, is the loss weight of the ASF module, For joint losses.

[0036] Furthermore, S4 specifically includes:

[0037] S4.1. Crack profile optimization:

[0038] According to the morphological Gaussian joint optimization formula, multi-level image processing is performed:

[0039]

[0040] in, is the original crack binary image, is the morphological dilation operation, To expand the kernel, is the Gaussian smoothing kernel, is element-wise multiplication, is the area filter, This is the crack image after optimization processing;

[0041] S4.2. Calculation of crack geometry parameters:

[0042] S4.2.1. Area parameter: Based on the optimized binary image, the connected domain labeling algorithm is used to identify independent crack areas. The total number of foreground pixels in each area is accumulated and multiplied by the actual area conversion coefficient per unit pixel to obtain the actual crack area parameter. ;

[0043] S4.2.2. Length parameter: Use the improved fast parallel thinning algorithm to extract the crack centerline skeleton, accumulate the number of skeleton pixels and multiply it by the actual area conversion coefficient per unit pixel to obtain the actual length parameter of the crack. ;

[0044] S4.2.3. Width parameter: The average crack width parameter is determined by the ratio of the area parameter to the length parameter. The maximum crack width is accurately calculated using the inscribed circle method. The maximum inscribed circle inside the crack is located and its diameter is used as the maximum crack width. The number of pixels with the average crack width and the number of pixels with the maximum crack width are cumulatively counted and multiplied by the actual area conversion coefficient per pixel to obtain the actual average crack width parameter. With the max-width parameter .

[0045] Furthermore, in S4.2, the actual crack area parameter The calculation formula is as follows:

[0046]

[0047] in, is the actual size of pixels in the X and Y directions, is the area connected domain mark, are pixels existing in the connected domain, Represents the cumulative function of the number of pixels in the connected domain;

[0048] Actual crack length parameter The calculation formula is as follows:

[0049]

[0050]

[0051] in, is the coordinate difference of adjacent skeleton points, For an improved fast parallel thinning algorithm, It is the skeleton connected domain mark;

[0052] Actual average crack width parameter With the max-width parameter The calculation formula is as follows:

[0053]

[0054]

[0055] in, For The maximum inscribed circle radius is centered at is the pixel point in the area connected domain.

[0056] Furthermore, S5 specifically includes:

[0057] S5.1. Build a visual interactive interface:

[0058] The multi-view display window is developed using the PyQt5 framework. The main interface includes an image display area, a parameter display area, and a function operation area, enabling simultaneous visualization of original images, test results, and quantitative parameters.

[0059] S5.2. Data Management and Analysis Module:

[0060] S5.2.1. Establish a local database to store crack detection timestamps, spatial position coordinates, and geometric feature parameters;

[0061] S5.2.2. Develop a time series analysis function to select a specific crack region and view the time-varying curve of its geometric parameters;

[0062] S5.2.3. Establish a multi-level early warning mechanism to automatically trigger Level I (>0.3mm), Level II (0.2-0.3mm), and Level III (<0.2mm) early warning alerts based on the maximum width of the crack;

[0063] S5.3. Report generation and export system:

[0064] S5.3.1. Design a standardized report template to automatically generate a PDF document containing a crack distribution thermogram, parameter statistics, and safety assessment recommendations;

[0065] S5.3.2. Implement the one-click export function of detection data, and support the simultaneous output of compressed package files of original images, processing results and quantitative parameters.

[0066] The present invention also provides an intelligent quantification system for underwater structural cracks, comprising:

[0067] Data acquisition unit: construct an underwater structure crack image dataset, and divide the underwater structure crack image dataset into a training set, a validation set, and a test set according to the division ratio;

[0068] Model construction unit: Build the SDI-ASF-Idiffusion neural network model, set the optimizer, initial learning rate, momentum parameter, weight decay, batch size setting, and number of training iterations;

[0069] Model training unit: trains and tests the SDI-ASF-Idiffusion neural network model to obtain a detection model for underwater structure crack identification and segmentation;

[0070] Detection unit: The crack segmentation results output by the detection model are processed through smoothing and morphological operations to extract and quantify geometric information features;

[0071] Interaction unit: The interactive interface is designed based on PyQt5, integrating the crack identification results, crack segmentation results and crack quantification information to complete the intelligent quantification process of underwater structure cracks.

[0072] The present invention also 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 the steps of any of the above methods when executing the program.

[0073] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.

[0074] Compared to existing technologies, the present invention has the following advantages: The method and system construct an underwater crack image dataset and establish an improved diffusion model that embeds semantic detail injection (SDI) and attention scale sequence fusion (ASF) modules to achieve crack identification and segmentation. Multi-level morphological processing is used to optimize crack contours, and connected domain labeling and skeleton extraction algorithms are used to accurately calculate crack area, length, and width parameters. Furthermore, a PyQt5 interactive interface is integrated to visualize detection results and provide multi-level early warning. The resulting intelligent crack quantification system automatically generates standardized reports containing heat maps and safety assessment recommendations, addressing the issue of insufficient measurement accuracy for underwater crack geometric parameters and significantly improving the efficiency of underwater structure safety monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] FIG1 is a flow chart of the method of the present invention;

[0076] FIG2 is a diagram of the Semantics and Detail Injection (SDI) module provided by the present invention;

[0077] FIG3 is a block diagram of the attention scale sequence fusion (ASF) provided by the present invention;

[0078] FIG4 is a schematic diagram of underwater crack detection results provided by the present invention. DETAILED DESCRIPTION

[0079] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.

[0080] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present application. 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 application belongs.

[0081] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form, and it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or their combinations.

[0082] The present invention provides an intelligent quantification method for underwater structural cracks, which can realize high-precision detection and accurate quantification of underwater structural cracks. Figure 1 As shown, the method of the present invention comprises the following steps:

[0083] S1. Construct an underwater structural crack image dataset, and divide the underwater structural crack image dataset into a training set, a validation set, and a test set according to a division ratio;

[0084] S2. Build the SDI-ASF-Idiffusion neural network model, set the optimizer, initial learning rate, momentum parameter, weight decay, batch size, and number of training iterations;

[0085] S3. Train and test the SDI-ASF-Idiffusion neural network model to obtain a detection model for underwater structure crack identification and segmentation;

[0086] S4. Extracting and quantifying geometric information features from the crack segmentation results output by the detection model through smoothing and morphological operations;

[0087] S5. Design an interactive interface based on PyQt5 to integrate crack identification results, crack segmentation results, and crack quantification information to complete the intelligent quantification process of underwater structure cracks.

[0088] Taking a set of underwater structural crack images as an example, we now follow the method flow ( Figure 1 ) for detailed introduction:

[0089] S1: First, a high-definition camera mounted on an ROV was used to collect 1,000 images of underwater structural cracks, constraining the optical imaging parameters and simultaneously recording the shooting depth, angle, and environmental parameters. The optical imaging met the following constraints:

[0090]

[0091] in, Focal length = 35mm; Depth of field = 0.5m; The underwater visibility is 1.0m measured in real time by the turbidity sensor; is the central wavelength of the light source, set to 500nm; The preset minimum value for the target crack is 0.2 mm; is the horizontal deflection angle of the camera, set to ±15°; is the lens field angle, set to 60°; The minimum resolvable depth of field is 20 million pixels; is the camera pitch angle, set to ±15°; is the turbidity compensation coefficient, set to 1.1.

[0092] Secondly, the underwater structure crack image is enhanced by the improved limited contrast adaptive histogram equalization algorithm to obtain the enhanced underwater structure crack image ;

[0093]

[0094] in, is the grayscale value of the original image, is the image pixel coordinate; To limit the contrast adaptive histogram equalization function; is the local clipping threshold, set to 2.0; is the number of adaptive grids, set to 32; is the depth compensation gain, set to 0.2; is the pixel depth, set to 0.05m; is the decay constant, set to 0.85±0.05.

[0095] Finally, the division ratio of the training set, validation set and test set is set to 6:2:2, that is, 600 images in the training set, 200 images in the validation set and 200 images in the test set.

[0096] S2, build the SDI-ASF-Idiffusion neural network model. First, build the latent space diffusion model, and improve its noise prediction network by using the crack skeleton prior constraint:

[0097]

[0098] in, is the total loss of the latent space diffusion model, is the noise prediction network, is the image after adding noise, is Gaussian noise, is the time step ( =1000), is the crack skeleton prior map, is the degree of coincidence between the prediction and the prior, calculated as 0.8, Regarding the expected operation of image data distribution and time step, is the weight coefficient of the prior constraint, set to 0.4, The crack probability map is generated by 1×1 convolution of the intermediate feature map of the noise prediction network;

[0099] Secondly, the Semantics and Detail Infusion (SDI) module and the Attentional Scale Sequence Fusion (ASF) module are embedded;

[0100] like Figure 2 As shown in Figure 1, the SDI (Semantic and Detail Injection) module consists of a multi-level feature Hadamard product fusion and feature smoothing operation, where l = 1 and l = 2 represent feature layers that require downsampling operations, l = 3 represents feature layers that require midsampling operations, and l = 4 represents feature layers that require upsampling operations:

[0101]

[0102]

[0103] in, Represents the sequence features after alignment fusion, is the adaptive resolution alignment function, For each level of features, represents a three-dimensional convolution operation, For smooth operation, Corresponding to the features after upsampling, midsampling and downsampling operations respectively, is the sequence feature after three-dimensional convolution fusion, n is the number of feature levels, and n is 3;

[0104] like Figure 3As shown, the ASF (Attention Scale Sequence Fusion) module includes Gaussian scale space construction and three-scale feature encoding, where P1, P2, P3, P4, and P5 They are feature maps of different levels of the ASF module, used to represent the feature information of the input image at different granularities and resolutions. The P1 resolution is 320×320×64, which is a shallow feature map. It retains the detail information of the input image and provides underlying visual features for small target detection. The P2 resolution is 160×160×128, which is a mid-level feature map. It integrates some semantic information and detail information and is used to balance the feature representation of small and medium-sized targets. The P3 resolution is 80×80×256, which is a mid-level key feature map. It contains rich spatial detail information and is the core feature input for small target detection and segmentation. The P4 resolution is 40×40×512, which is a deep feature map. It focuses on semantic information and is used for feature representation of medium-sized targets. The P5 resolution is 20×20×1024, which is the deepest feature map with the richest semantic information. It mainly represents large targets or global context information. P3 Box, P4 Box, and P5 Box are the small, medium, and large-sized bounding box prediction results output by the ASF module head, corresponding to P3, P4, and P5 respectively. The feature maps are output for small, medium, and large-scale target detection after neck fusion; the TFE (Triple Feature Encoder) module is a triple feature encoder module; the CSP (Cross Stage Partial) module is a cross-stage partial connection module; the CPAM (Channel and Position Attention Mechanism) module is a channel and position attention mechanism module that integrates feature information from the SSFF module and the TFE module; the SSFF (Scale Sequence Feature Fusion) module represents the scale sequence feature fusion operation; f (i, j) represents the pixel value at coordinate (i, j) on the two-dimensional feature map input to the SSFF module (specifically, the preprocessed feature map of P3, P4, and P5); BN (Batch Normalization) represents batch normalization; and SiLU (Sigmoid - weighted Linear Unit) represents the weighted linear unit:

[0105]

[0106]

[0107] in, is the scale space function, is a two-dimensional Gaussian kernel, is the scale parameter, is the input feature map, represents the convolution operation; is the output feature, 、 、 are large, medium and small scale features respectively, is the downsampling operation, is the upsampling operation, is channel splicing, which represents multi-scale feature aggregation;

[0108] Finally, the optimizer selects Stochastic Gradient Descent (SGD), sets the initial learning rate LR to 0.001, and the momentum parameter to 0.937; adopts the cosine annealing learning rate scheduling strategy, sets the weight decay coefficient to 0.0005, the batch size to 16, and the number of training iterations to 300.

[0109] In step S3, the SDI-ASF-Idiffusion neural network model is trained using the training set, and the validation set is used to check the model's training performance. The pre-trained SDI-ASF-Idiffusion neural network model, i.e., the detection model, is obtained. The test set is then used to identify and segment underwater structure cracks, resulting in underwater structure images with crack anchor frames and crack masks, with a size of 1280 × 1280 pixels. The pre-training process uses a joint loss function:

[0110]

[0111] in, is the semantic detail loss, is the scale-aware loss, To detect loss, The loss weight of the SDI module is set to 0.4. is the loss weight of the ASF module, set to 0.6, For joint losses.

[0112] S4, specifically including:

[0113] S4.1. Crack profile optimization:

[0114] According to the morphological Gaussian joint optimization formula, multi-level image processing is performed:

[0115]

[0116] in, The original crack binary image has an input resolution of 1280×1280; It is a morphological dilation operation, and the structure element is a 5×5 cross; is the dilation kernel, d = 2 pixels; is the Gaussian smoothing kernel, =1.5; is element-wise multiplication; For area filtering, k = 10 pixels; For optimized crack image;

[0117] S4.2. Calculation of crack geometry parameters:

[0118] S4.2.1. Area parameter: Based on the optimized binary image, the connected domain labeling algorithm is used to identify independent crack areas. The total number of foreground pixels in each area is accumulated and multiplied by the actual area conversion coefficient per unit pixel to obtain the actual crack area parameter. :

[0119]

[0120] in, is the actual pixel size in the X and Y directions (both 0.0004mm / pixel), is the area connected domain mark, are the pixels in the connected domain (49457), represents the cumulative function of the number of pixels in the connected domain, and the actual crack area parameter (19.78 mm 2 ).

[0121] S4.2.2. Length parameter: Use the improved fast parallel thinning algorithm to extract the crack centerline skeleton, accumulate the number of skeleton pixels and multiply it by the actual area conversion coefficient per unit pixel to obtain the actual length parameter of the crack. :

[0122]

[0123]

[0124] in, is the coordinate difference of adjacent skeleton points, For an improved fast parallel thinning algorithm, It is the skeleton connected domain mark; the number of skeleton pixels is cumulatively counted (1003), and the actual length parameter of the crack under unit width (4.01mm) is obtained.

[0125] S4.2.3. Width parameter: The average crack width parameter is determined by the ratio of the area parameter to the length parameter. The maximum crack width is accurately calculated using the inscribed circle method. The maximum inscribed circle inside the crack is located and its diameter is used as the maximum crack width. The actual average crack width parameter is obtained by accumulating the number of pixels with the average crack width (49) and the number of pixels with the maximum crack width (59), multiplied by the actual area conversion coefficient per unit pixel. = 0.0197mm with the maximum width parameter 0.0236mm:

[0126]

[0127]

[0128] in, For The maximum inscribed circle radius is centered at is the pixel point in the area connected domain.

[0129] Furthermore, S5 specifically includes:

[0130] S5.1. Build a visual interactive interface:

[0131] The multi-view display window is developed using the PyQt5 framework. The main interface includes an image display area, a parameter display area, and a function operation area, enabling simultaneous visualization of original images, test results, and quantitative parameters.

[0132] S5.2. Data Management and Analysis Module:

[0133] S5.2.1. Establish a local database to store crack detection timestamps, spatial position coordinates, and geometric feature parameters;

[0134] S5.2.2. Develop a time series analysis function to select a specific crack region and view the time-varying curve of its geometric parameters;

[0135] S5.2.3. Establish a multi-level early warning mechanism to automatically trigger Level I (>0.3mm), Level II (0.2-0.3mm), and Level III (<0.2mm) early warning alerts based on the maximum width of the crack;

[0136] S5.3. Report generation and export system:

[0137] S5.3.1. Design a standardized report template to automatically generate a PDF document containing a crack distribution thermodynamic map (one copy), a parameter statistics table (one copy), and safety assessment recommendations (one copy);

[0138] S5.3.2. Implement the one-click export function of detection data, and support the simultaneous output of compressed package files of original images, processing results and quantitative parameters.

[0139] Figure 4 This is a schematic diagram of the underwater crack detection results provided by the present invention.

[0140] The present invention also provides an intelligent quantification system for underwater structural cracks, comprising:

[0141] Data acquisition unit: construct an underwater structure crack image dataset, and divide the underwater structure crack image dataset into a training set, a validation set, and a test set according to the division ratio;

[0142] Model construction unit: Build the SDI-ASF-Idiffusion neural network model, set the optimizer, initial learning rate, momentum parameter, weight decay, batch size setting, and number of training iterations;

[0143] Model training unit: trains and tests the SDI-ASF-Idiffusion neural network model to obtain a detection model for underwater structure crack identification and segmentation;

[0144] Detection unit: The crack segmentation results output by the detection model are processed through smoothing and morphological operations to extract and quantify geometric information features;

[0145] Interaction unit: The interactive interface is designed based on PyQt5, integrating the crack identification results, crack segmentation results and crack quantification information to complete the intelligent quantification process of underwater structure cracks.

[0146] The present invention also 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 the steps of any of the above methods when executing the program.

[0147] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.

[0148] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions and effects do not exceed the scope of the technical solution of the present invention, shall fall within the scope of protection of the present invention.

Claims

1. An intelligent quantification method for underwater structural cracks, characterized in that: include: S1. Construct an underwater structural crack image dataset, and divide the underwater structural crack image dataset into a training set, a validation set, and a test set according to a division ratio; S2. Build the SDI-ASF-Idiffusion neural network model, set the optimizer, initial learning rate, momentum parameter, weight decay, batch size, and number of training iterations; S3. Train and test the SDI-ASF-Idiffusion neural network model to obtain a detection model for underwater structure crack identification and segmentation; S4. Extracting and quantifying geometric information features from the crack segmentation results output by the detection model through smoothing and morphological operations; S5. Design an interactive interface based on PyQt5 to integrate crack identification results, crack segmentation results, and crack quantification information to complete the intelligent quantification process of underwater structural cracks; In S1, an ROV equipped with a high-definition camera is first used to capture images of underwater structural cracks, constraining optical imaging parameters and simultaneously recording the shooting depth, angle, and environmental parameters. The optical imaging meets the following constraints: in, is the focal length, is the depth of field, Underwater visibility is measured in real time by turbidity sensors. is the central wavelength of the light source, Preset minimum value for target crack, is the horizontal deflection angle of the camera, is the lens field angle, is the minimum resolvable depth of field, is the camera pitch angle, is the turbidity compensation coefficient; Secondly, the underwater structure crack image is enhanced by the improved limited contrast adaptive histogram equalization algorithm to obtain the enhanced underwater structure crack image ; in, is the grayscale value of the original image, is the image pixel coordinate, To limit the contrast of the adaptive histogram equalization function, is the local clipping threshold, is the number of adaptive grids, is the depth compensation gain, is the pixel depth, is the decay constant; Finally, the division ratio of the training set, validation set and test set is set to 6:2:

2.

2. The intelligent quantification method for underwater structural cracks according to claim 1, characterized in that: In S2, the SDI-ASF-Idiffusion neural network model is constructed as follows: First, a latent space diffusion model is constructed, and its noise prediction network is improved using the crack skeleton prior constraint: in, is the total loss of the latent space diffusion model, is the noise prediction network, is the image after adding noise, is Gaussian noise, is the time step, is the crack skeleton prior map, is the coincidence between the prediction and the prior, Regarding the expected operation of image data distribution and time step, is the weight coefficient of the prior constraint term, The crack probability map is generated by 1×1 convolution of the intermediate feature map of the noise prediction network; Secondly, the embedded semantics and details injection SDI module and the attention scale sequence fusion ASF module; The SDI module consists of multi-level feature Hadamard product fusion and feature smoothing operations: in, Represents the sequence features after alignment fusion, is the adaptive resolution alignment function, For each level of features, represents a three-dimensional convolution operation, For smooth operation, Corresponding to the features after upsampling, midsampling and downsampling operations respectively, is the sequence feature after three-dimensional convolution fusion, n is the number of feature levels, and n is 3; The ASF module includes Gaussian scale space construction and three-scale feature encoding: in, is the scale space function, is a two-dimensional Gaussian kernel, is the scale parameter, is the input feature map, represents the convolution operation; is the output feature, 、 、 are large, medium and small scale features respectively, is the downsampling operation, is the upsampling operation, is channel splicing, which represents multi-scale feature aggregation; Finally, the optimizer selects stochastic gradient descent (SGD), sets the initial learning rate (LR) to 0.001, and the momentum parameter to 0.

937. The cosine annealing learning rate scheduling strategy is adopted, the weight decay coefficient is set to 0.0005, the batch size is set to 16, and the number of training iterations is 300.

3. The intelligent quantification method for underwater structural cracks according to claim 2, characterized in that: S3 specifically includes: The SDI-ASF-Idiffusion neural network model is trained using the training set, and the training performance of the model is checked using the validation set. The pre-trained SDI-ASF-Idiffusion neural network model, i.e., the detection model, is obtained. The underwater structure cracks are then identified and segmented on the test set to obtain underwater structure images with crack anchor frames and crack masks. The pre-training process uses a joint loss function: in, is the semantic detail loss, is the scale-aware loss, To detect loss, is the loss weight of the SDI module, is the loss weight of the ASF module, For joint losses.

4. The intelligent quantification method for underwater structural cracks according to claim 1, characterized in that: S4 specifically includes: S4.

1. Crack profile optimization: According to the morphological Gaussian joint optimization formula, multi-level image processing is performed: in, is the original crack binary image, is the morphological dilation operation, To expand the kernel, is the Gaussian smoothing kernel, is element-wise multiplication, is the area filter, This is the crack image after optimization processing; S4.

2. Calculation of crack geometry parameters: S4.2.

1. Area parameter: Based on the optimized binary image, the connected domain labeling algorithm is used to identify independent crack areas. The total number of foreground pixels in each area is accumulated and multiplied by the actual area conversion coefficient per unit pixel to obtain the actual crack area parameter. ; S4.2.

2. Length parameter: Use the improved fast parallel thinning algorithm to extract the crack centerline skeleton, accumulate the number of skeleton pixels and multiply it by the actual area conversion coefficient per unit pixel to obtain the actual length parameter of the crack. ; S4.2.

3. Width parameter: The average crack width parameter is determined by the ratio of the area parameter to the length parameter. The maximum crack width is accurately calculated using the inscribed circle method. The maximum inscribed circle inside the crack is located and its diameter is used as the maximum crack width. The number of pixels with the average crack width and the number of pixels with the maximum crack width are cumulatively counted and multiplied by the actual area conversion coefficient per pixel to obtain the actual average crack width parameter. With the max-width parameter .

5. The intelligent quantification method for underwater structural cracks according to claim 4, characterized in that: In S4.2, the actual crack area parameter The calculation formula is as follows: in, is the actual size of pixels in the X and Y directions, is the area connected domain mark, are pixels existing in the connected domain, Represents the cumulative function of the number of pixels in the connected domain; Actual crack length parameter The calculation formula is as follows: in, is the coordinate difference of adjacent skeleton points, For an improved fast parallel thinning algorithm, It is the skeleton connected domain mark; Actual average crack width parameter With the max-width parameter The calculation formula is as follows: in, For The maximum inscribed circle radius is centered at is the pixel point in the area connected domain.

6. An intelligent quantification system for underwater structural cracks, characterized in that: include: Data acquisition unit: construct an underwater structure crack image dataset, and divide the underwater structure crack image dataset into a training set, a validation set, and a test set according to the division ratio; Model construction unit: Build the SDI-ASF-Idiffusion neural network model, set the optimizer, initial learning rate, momentum parameter, weight decay, batch size setting, and number of training iterations; Model training unit: trains and tests the SDI-ASF-Idiffusion neural network model to obtain a detection model for underwater structure crack identification and segmentation; Detection unit: The crack segmentation results output by the detection model are processed through smoothing and morphological operations to extract and quantify geometric information features; Interaction unit: Based on PyQt5, the interactive interface is designed to integrate crack identification results, crack segmentation results and crack quantification information to complete the intelligent quantification process of underwater structure cracks; The data acquisition unit is specifically implemented as follows: First, an ROV equipped with a high-definition camera was used to capture images of underwater structural cracks, constraining optical imaging parameters and simultaneously recording the shooting depth, angle, and environmental parameters. The optical imaging met the following constraints: in, is the focal length, is the depth of field, Underwater visibility is measured in real time by turbidity sensors. is the central wavelength of the light source, Preset minimum value for target crack, is the horizontal deflection angle of the camera, is the lens field angle, is the minimum resolvable depth of field, is the camera pitch angle, is the turbidity compensation coefficient; Secondly, the underwater structure crack image is enhanced by the improved limited contrast adaptive histogram equalization algorithm to obtain the enhanced underwater structure crack image ; in, is the grayscale value of the original image, is the image pixel coordinate, To limit the contrast of the adaptive histogram equalization function, is the local clipping threshold, is the number of adaptive grids, is the depth compensation gain, is the pixel depth, is the decay constant; Finally, the division ratio of the training set, validation set and test set is set to 6:2:

2.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Plane pile pier crack disease deep learning and intelligent detection method based on sonar imaging

    CN113450343A

  • Road crack detection method, medium and product

    US20250174019A1