Micro-fatigue crack length calculation method based on u-net network
By optimizing the U-net network structure and combining depthwise separable convolution and attention mechanisms, the problem of identifying the length of micro-motion fatigue cracks was solved, enabling accurate detection and measurement of fine cracks and improving recognition accuracy and efficiency.
Patent Information
- Application Number
- CN202211605743.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-12-14
AI Technical Summary
Existing technologies cannot effectively identify and measure the length of fretting fatigue cracks, especially the fine cracks on components such as engine blade tenons.
An optimized U-net network is used to identify micro-motion fatigue cracks through image segmentation and the centerline algorithm. The network structure is optimized by combining depthwise separable convolution and attention mechanism to expand the receptive field and resolution, thereby achieving accurate detection and length measurement of fine cracks.
It enables accurate identification and length measurement of minute fatigue cracks, reducing computational load and training time, and improving network speed and detection accuracy.
Smart Images

Figure CN116228641B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of crack detection technology, specifically to a method for calculating the length of fretting fatigue cracks based on U-net networks. Background Technology
[0002] Under prolonged high-frequency fretting conditions, mechanical components are prone to developing fretting fatigue cracks. Furthermore, with increasing load and cycle count, the crack propagation rate continuously increases, and early, minute fatigue cracks can develop into significant cracks, weakening the local stiffness of the component and even inducing local failure, threatening the overall structural safety. Therefore, monitoring the length of fretting fatigue cracks is beneficial for quantifying their specific impact on equipment performance, which is of great significance for predicting the overall safe lifespan of mechanical structures.
[0003] In the prior art, patent document CN111445446B discloses a concrete surface crack detection method based on an improved U-net. The neural network template used in this method has a relatively large computational load and can only obtain long cracks. Patent document CN113284107A discloses a real-time concrete crack detection method that introduces an attention mechanism to improve U-net. However, this detection model can only obtain fine cracks and cannot obtain the length information of fine cracks.
[0004] In general, deep learning methods are currently used to identify cracks. However, since fretting fatigue cracks are usually very small, ranging from one hundred to several hundred micrometers, and their length and width are extremely small, they cannot be clearly distinguished from the sample surface. Therefore, existing deep learning-based crack detection technologies cannot effectively identify small fatigue cracks. Thus, it is necessary to develop identification methods suitable for small fatigue cracks such as those found in engine blade tenon samples, in order to identify small cracks and achieve early identification of fretting fatigue cracks. Summary of the Invention
[0005] In view of the above problems, the purpose of this invention is to provide a method for calculating the length of fretting fatigue cracks based on U-net network, which is applicable to monitoring the length of fretting fatigue cracks generated during different cycles of fretting in components such as engine blade tenon samples.
[0006] The technical solution of the present invention is as follows:
[0007] A method for calculating the length of fretting fatigue cracks based on U-net networks includes the following steps:
[0008] S1. Train the optimized U-net network using original images of a certain type of fretting fatigue crack to obtain the trained U-net network model. The specific steps include the following:
[0009] S11. Obtain the original image of a certain type of fretting fatigue crack. Since the fretting cracks generated by different equipment and different motion modes are not the same, the original image to be obtained is a fretting fatigue crack obtained by the same type of equipment using the same motion mode. For example, they are all fretting fatigue cracks generated by cyclic stress on engine blade tenon specimens, fretting fatigue cracks generated by cyclic stress on steel wires, and fatigue cracks generated by cyclic stress on high-speed train axles.
[0010] S12. The crack areas in the original image are labeled pixel by pixel to form closed shapes. There are several standard software programs, such as LabelMe, labelimg and rolabelimg.
[0011] S13. Use an image segmentation kit to batch organize the labeled original images into a complete dataset format and use it as the training, testing, and validation sets for the optimized U-net model. Train the optimized U-net model to obtain the trained U-net network model. The image segmentation kit in this step is not limited to PaddleSeg and Vox datasets.
[0012] S2. Obtain images of fretting fatigue cracks similar to those in step S1 as experimental images; use the trained U-net network model to segment, detect, and identify fretting fatigue cracks in the experimental images to obtain segmentation and detection result images.
[0013] S3. Measure the length of the fretting fatigue crack in the segmented detection result image. There are various specific measurement methods. This invention provides a specific measurement method, including the following steps:
[0014] S31. Generate the centerline of the fretting fatigue crack in the segmentation detection result image using the centerline algorithm;
[0015] S32. Calculate the length of the central axis to obtain the length of the fretting fatigue crack: Count the number of pixels on the central axis of the fretting fatigue crack, and based on the resolution of the segmented detection result image, convert the total number of pixels to obtain the total length of the central axis of the fretting fatigue crack.
[0016] In the U-net network structure, downsampling reduces the probability of pixels being correctly labeled, and upsampling in the U-net network has limited ability to recover feature information, making crack width information unclear and failing to detect fine cracks. This invention proposes an optimized U-net network that fuses max pooling layers, upsampling layers, and small-sized depthwise separable convolutional kernels to construct a novel module that expands resolution and increases network depth to enlarge the receptive field. Multi-scale connections maintain a balance between the receptive field and resolution. Under the premise of maximizing the receptive field, maximum resolution is maintained, thereby achieving the detection of fine cracks. Specifically, the optimized U-net network includes...
[0017] The optimized U-net network includes an upsampling module, a concatenate operation, a downsampling module, and a layer fusion module located at the bottom of the upsampling module and the bottom of the downsampling module;
[0018] The layer fusion module includes a first convolutional pooling layer group and a fusion layer connected in sequence. The first convolutional pooling layer group includes one depthwise separable convolutional module and four first convolutional pooling layers connected in parallel. Each first convolutional pooling layer includes a max pooling layer with a stride of 2, a 1×1 depthwise separable convolutional module, and a 2×2 upsampling layer. The feature map output by the downsampling module is input into the first convolutional pooling layer group. The fusion layer adds and fuses the input image features, and the feature map output by the fusion layer is input into the upsampling module. This U-net network uses the non-linear activation function ReLU to process the output of each layer, which can improve the non-linear expression of the network and reduce the gradient vanishing phenomenon during the convolution process.
[0019] The feature vector of the U-net network has a depth of 2048. Both the upsampling module and the downsampling module include five sequentially connected second convolutional layer groups. Each second convolutional layer group includes a residual block, an attention mechanism module, and two transposed convolutional layers connected in sequence.
[0020] The residual block includes depthwise separable convolution, transposed convolution, and BN layers. The input of the residual block is fused with the output of the residual block after convolution through skip connection in the additive layer.
[0021] The attention mechanism module includes an encoding block and a decoding block. The encoding block includes a max pooling layer and a convolutional layer, while the decoding block includes an upsampling layer and a convolutional layer. The feature information output from the residual block is input into the attention mechanism. Soft attention mechanisms tend to be over-parameterized during training. The input of the attention mechanism module is fused with the output classified by the sigmoid function in the attention mechanism module through a skip connection. The fused output serves as the final output, which solves the problem of redundant parameter calculations in soft attention mechanisms and optimizes the convolutional neural network.
[0022] The Concatenate operation concatenates the feature maps generated by the upsampling module and the downsampling feature maps using the np.concatennate function. In the Concatenate operation, a BN layer is added before the non-linear activation function ReLU to alleviate the slow convergence of the input distribution of the previous layer towards the two ends of the non-linear function. The BN layer performs a normalization process on the input data to an N(0,1) normal distribution before finally inputting it into the activation function ReLU. This can generate a more obvious gradient during backpropagation, effectively helping the network converge and thus improving the gradient vanishing phenomenon.
[0023] Beneficial effects:
[0024] (1) The method of the present invention is an identification method that can accurately identify minute fatigue cracks and determine the length of the cracks.
[0025] (2) In the U-net network structure of this invention, a first convolutional pooling layer group and a fusion layer are set up sequentially between the upsampling module and the downsampling module. This reduces the amount of computation, improves the network speed, and expands the feature map to capture local and detailed information, thereby accurately identifying tiny micro-motion fatigue cracks. In addition, by fusion of layers to stitch together the channel dimensions, the training time of the network model can be reduced, the feature map can be expanded, and the resolution can be increased. Setting a depthwise separable convolutional module in the first convolutional pooling layer group can effectively reduce the amount of parameter computation. At the same time, setting the kernel size of the separable convolutional module to 1×1 can reduce the number of channels. Attached Figure Description
[0026] Figure 1 This is a flowchart of an optimized U-net network according to Embodiment 1 of the present invention;
[0027] Figure 2 This is a flowchart of the layer fusion module in Embodiment 1 of the present invention;
[0028] Figure 3 This is a flowchart of the residual block in Embodiment 1 of the present invention;
[0029] Figure 4 This is a flowchart of the attention mechanism module in Embodiment 1 of the present invention;
[0030] Figure 5 This is a flowchart of the crack length calculation for the experimental image in Embodiment 1 of the present invention. Detailed Implementation
[0031] To provide a clearer understanding of the technical features, objectives, and beneficial effects of the present invention, an embodiment of the invention will be further described in conjunction with the accompanying drawings. This embodiment is only for further illustration of the invention and should not be construed as limiting the scope of protection of the invention. Non-essential improvements and adjustments made by those skilled in the art based on the content of the invention also fall within the scope of protection of the present invention.
[0032] Example 1
[0033] This embodiment uses the fretting fatigue crack generated by cyclic vibration of an engine blade tenon as an example to illustrate the method for calculating the length of the fretting fatigue crack of the present invention, which specifically includes the following steps:
[0034] S1. Using the original image of the fretting fatigue crack generated by the cyclic vibration of the engine blade tenon, the optimized U-net network is trained to obtain the trained U-net network model. The specific steps include the following:
[0035] S11. Obtain the original image of the fretting fatigue crack generated by the cyclic vibration of the engine blade tenon: In order to obtain a clear original image of the fretting fatigue crack, this embodiment uses the Zhongji GPS100 high-frequency fatigue testing machine. Based on this device, a digital microscope is placed on the side of the tenon sample to monitor the crack propagation on both sides of the tenon sample and collect image data.
[0036] S12. Label the crack areas in the original image pixel by pixel using LabelMe software, so that the crack areas form closed shapes.
[0037] S13. Use the image segmentation toolkit PaddleSeg to batch organize the labeled original images into a complete dataset format and use it as the training set, test set, and validation set of the optimized U-net model. Train the optimized U-net model to obtain the trained U-net network model.
[0038] In the U-net network structure, downsampling reduces the probability of pixels being correctly labeled, and upsampling in the U-net network has limited ability to recover feature information, making crack width information unclear and failing to detect fine cracks. This invention proposes an optimized U-net network that fuses max pooling layers, upsampling layers, and small-sized depthwise separable convolutional kernels to construct a novel module that expands resolution and increases network depth to enlarge the receptive field. Multi-scale connections maintain a balance between the receptive field and resolution. Under the premise of maximizing the receptive field, maximum resolution is maintained, thereby achieving the detection of fine cracks. Specifically, the optimized U-net network includes...
[0039] Figure 1This is a flowchart of the optimized U-net network in this embodiment. The optimized U-net network includes an upsampling module, a concatenate operation, a downsampling module, and a layer fusion module located at the bottom of the upsampling module and the bottom of the downsampling module.
[0040] Figure 2 This is a flowchart of the layer fusion module, which includes a first convolutional pooling layer group and a fusion layer connected in sequence. The first convolutional pooling layer group includes one depthwise separable convolutional module and four first convolutional pooling layers connected in parallel. Each first convolutional pooling layer includes a max pooling layer with a stride of 2, a 1×1 depthwise separable convolutional module, and a 2×2 upsampling layer. The feature map output by the downsampling module is input into the first convolutional pooling layer group. The fusion layer adds and fuses the input image features, and the feature map output by the fusion layer is input into the upsampling module. This U-net network uses the non-linear activation function ReLU to process the output of each layer, which can improve the non-linear expression of the network and reduce the gradient vanishing phenomenon during the convolution process.
[0041] The feature vector depth of this U-net network is 2048. Please refer to [further details]. Figure 2 Both the upsampling module and the downsampling module include five sequentially connected second convolutional layer groups. Each second convolutional layer group includes a residual block, an attention mechanism module, and two transposed convolutional layers that are connected in sequence.
[0042] Please refer to Figure 3 , Figure 3 This is a flowchart of the residual block. The residual block includes depthwise separable convolution, transposed convolution, and BN layers. The input of the residual block is fused with the output of the residual block after convolution through skipconnection in the summation layer.
[0043] Please refer to Figure 4 , Figure 4 This is a flowchart of the attention mechanism module, which includes an encoding block and a decoding block. The encoding block includes a max pooling layer and a convolutional layer, while the decoding block includes an upsampling layer and a convolutional layer. The feature information output from the residual block is input into the attention mechanism. During training, the attention mechanism is over-parameterized. The input of the attention mechanism module is fused with the output classified by the sigmoid function in the attention mechanism module through a skip connection. The fused input forms a single output, which solves the problem of redundant parameter calculation in the soft attention mechanism and optimizes the convolutional neural network.
[0044] The Concatenate operation concatenates the feature maps generated by the upsampling module and the downsampling feature maps using the np.concatennate function. In the Concatenate operation, a BN layer is added before the non-linear activation function ReLU to alleviate the slow convergence of the input distribution of the previous layer towards the two ends of the non-linear function. The BN layer performs a normalization process on the input data to an N(0,1) normal distribution, and finally inputs the value of the activation function ReLU. This can generate a more obvious gradient during backpropagation, effectively helping the network to converge and thus improving the gradient vanishing phenomenon.
[0045] This embodiment sets up a first convolutional pooling layer group and a fusion layer connected sequentially between the upsampling module and the downsampling module. This reduces computational load, improves network speed, and expands the feature map to capture local and detailed information. Furthermore, layer fusion to stitch together channel dimensions reduces network training time, expands feature maps, and increases resolution. Setting a depthwise separable convolutional module within the first convolutional pooling layer group effectively reduces parameter computation, and setting the kernel size of this separable convolutional module to 1×1 reduces the number of channels.
[0046] S2. Obtain fretting fatigue crack images of the same type as in step S1 as experimental images; use the trained U-net network model to segment and detect fretting fatigue cracks in the experimental images to obtain segmentation and detection result images; use the centerline algorithm to obtain the centerline in the crack segmentation result images; use a non-zero element statistical function to count the number of pixels contained in the centerline, the specific detection and recognition process is as follows: Figure 5 As shown.
[0047] S3. Measure the length of the fretting fatigue crack in the segmentation test result image, specifically including the following steps:
[0048] S31. Generate the centerline of the fretting fatigue crack in the segmentation detection result image using the centerline algorithm.
[0049] S32. Calculate the length of the central axis to obtain the length of the fretting fatigue crack: Count the number of pixels along the central axis of the fretting fatigue crack, and based on the resolution of the segmented detection result image, convert the total number of pixels to obtain the total length of the central axis of the fretting fatigue crack. For example, if the number of pixels along the central axis of a crack in an image is 80, and the number of pixels along the diagonal of the image is 1000, with a diagonal length of 43cm, then in this case, 1000px = 43cm, or 1px = 0.43mm. Therefore, the length of the central axis is: 80 × 0.43mm = 34.4mm.
[0050] The foregoing has described the relevant content of the present invention, and those skilled in the art will be able to implement the present invention based on these descriptions. All other embodiments obtained by those skilled in the art based on the above description of the present invention without inventive effort should fall within the scope of protection of the present invention.
Claims
1. A method for calculating the length of fretting fatigue cracks based on U-net networks, characterized in that, Includes the following steps: S1. The optimized U-net network is trained using a certain type of original image of fretting fatigue crack to obtain the trained U-net network model; S2. Obtain images of fretting fatigue cracks similar to those in step S1 as experimental images; use the trained U-net network model to segment, detect and identify fretting fatigue cracks in the experimental images to obtain segmentation and detection result images. S3. Measure the length of the fretting fatigue crack in the segmentation test result image; The optimized U-net network includes an upsampling module, a concatenate operation, a downsampling module, and a layer fusion module located between the bottom of the upsampling module and the bottom of the downsampling module. The layer fusion module comprises a first convolutional pooling layer group and a fusion layer connected in sequence. The first convolutional pooling layer group includes one depthwise separable convolutional module and four first convolutional pooling layers connected in parallel. Each first convolutional pooling layer includes a max pooling layer with a stride of 2, a 1×1 depthwise separable convolutional module, and a 2×2 upsampling layer. The feature map output from the downsampling module is input into the first convolutional pooling layer group. The fusion layer adds and fuses the input image features, and the feature map output from the fusion layer is input into the upsampling module. The non-linear activation function used in this U-net network is ReLU. The feature vector of the U-net network has a depth of 2048. Both the upsampling module and the downsampling module include five sequentially connected second convolutional layer groups. Each second convolutional layer group includes a residual block, an attention mechanism module, and two transposed convolutional layers connected in sequence. The residual block includes depthwise separable convolution, transposed convolution, BN layer and additive layer. The input of the residual block is fused with the output of the residual block after convolution through skip connection in the additive layer. The attention mechanism module includes an encoding block and a decoding block. The encoding block includes a max pooling layer and a convolutional layer, and the decoding block includes an upsampling layer and a convolutional layer. The feature information output by the residual block is input into the attention mechanism module. The input of the attention mechanism module is fused with the output classified by the sigmoid function in the attention mechanism module through a skip connection. The Concatenate operation concatenates the feature map generated by the upsampling module with the downsampling feature map using the np.concatennate function. In the Concatenate operation, a BN layer is added before the non-linear activation function ReLU to normalize the input data to an N(0,1) normal distribution. The normalized data is then input into the activation function ReLU.
2. The method for calculating the length of fretting fatigue cracks based on U-net network according to claim 1, characterized in that, Step S1 includes the following steps: S11. Obtain the original image of a certain type of fretting fatigue crack; S12. Mark the crack areas in the original image pixel by pixel so that the crack areas form a closed shape; S13. Use an image segmentation kit to batch organize the labeled original images into a complete dataset format and use it as the training set, test set, and validation set of the optimized U-net model. Train the optimized U-net model to obtain the trained U-net network model.
3. The method for calculating the length of fretting fatigue cracks based on U-net network according to claim 1, characterized in that, Step S3 includes the following steps: S31. Generate the centerline of the fretting fatigue crack in the segmentation detection result image using the centerline algorithm; S32. Calculate the length of the central axis to obtain the length of the fretting fatigue crack.
4. The method for calculating the length of fretting fatigue cracks based on U-net network according to claim 3, characterized in that, Step S32 includes the following steps: The number of pixels along the central axis of the fretting fatigue crack is counted, and the total length of the central axis of the fretting fatigue crack is obtained by converting the total number of pixels to units based on the resolution of the segmented detection result image.
Citation Information
Patent Citations
A Concrete Surface Crack Detection Method Based on Improved U-net
CN111445446B
Attention mechanism improved U-net introduced concrete crack real-time detection method
CN113284107A
Bridge surface crack detection method based on YOLO v3 and attention mechanism
CN111681240A
Nuclear power pipeline defect detection system based on deep learning attention mechanism
CN111899224A