Method and device for segmenting three-dimensional ct images of metal cracks and defects using synchrotron radiation

By combining an improved U-Net network model with the Hessian matrix filtering method, the problem of segmenting metal cracks and defects in synchrotron radiation 3D CT images was solved, achieving efficient and accurate 3D morphology extraction and interaction characterization.

CN118334058BActive Publication Date: 2026-06-19XI AN JIAOTONG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XI AN JIAOTONG UNIV
Filing Date
2024-04-25
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies cannot simultaneously and accurately extract the three-dimensional morphology of metal cracks and defects, resulting in the inability to characterize the interaction between the evolution of defects and fatigue cracks.

Method used

An improved U-Net network model combined with Hessian matrix filtering was used to segment synchrotron radiation 3D CT images. A crack segmentation model was trained using a composite loss function combining binary cross-entropy and structural similarity index, and the 3D crack feature contrast enhancement was performed using Hessian matrix filtering.

🎯Benefits of technology

It achieves efficient and accurate segmentation of metal cracks and defects, and can characterize the interaction between defects and fatigue cracks, thus improving the accuracy and completeness of the segmentation model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118334058B_ABST
    Figure CN118334058B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects. The method involves extracting binary defect images from CT images; inputting the CT images into a trained crack segmentation model to obtain a two-dimensional probability feature map of the crack; training an improved U-Net network model using a training dataset composed of CT images labeled with cracks; employing a composite loss function combining binary cross-entropy and structural similarity index; enhancing the three-dimensional crack feature contrast of the two-dimensional probability feature map using Hessian matrix filtering; binarizing the enhanced two-dimensional probability feature map to obtain a binary crack image; and then superimposing the binary defect image and the binary crack image. The purpose of this invention is to solve the problem of simultaneously and accurately extracting the three-dimensional morphology of defects and cracks, leading to the inability to characterize the interaction between defect and fatigue crack evolution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of synchrotron radiation CT (Computed Tomography) image segmentation technology, specifically relating to a method and apparatus for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects. Background Technology

[0002] Synchrotron radiation X-ray computed tomography (CT) has become a mature characterization technique in materials science. It can characterize defects (cracks, voids, inclusions, etc.) inside optically opaque samples at the micrometer scale. It is commonly used in in-situ experiments to characterize the evolution of material microstructures; a single in-situ test can record dozens of sets of three-dimensional images, each containing approximately two thousand two-dimensional slices. To perform quantitative analysis on such a large dataset, image segmentation methods must be used to automatically extract cracks and defects from grayscale images and convert them into binary data to quantitatively analyze the evolution of microstructures, crack propagation behavior, and other related phenomena.

[0003] With the development of machine learning algorithms, convolutional neural networks have been used in image segmentation. This type of method trains on a dataset, iterates model parameters, and analyzes shallow-deep features of the image to achieve image segmentation. However, this method has difficulties in simultaneously segmenting low-contrast cracks and high-contrast defects, making it difficult to accurately extract the three-dimensional morphology of both defects and cracks at the same time. This results in the inability to characterize the interaction between the evolution of defects and fatigue cracks. Summary of the Invention

[0004] To address the problems existing in the prior art, the present invention provides a method and apparatus for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects. The purpose is to solve the problem that it is difficult to simultaneously and accurately extract the three-dimensional morphology of defects and cracks, resulting in the inability to characterize the interaction between the evolution of defects and fatigue cracks.

[0005] To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution:

[0006] According to a first aspect of the present invention, a method for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects is provided, comprising:

[0007] Acquire synchrotron radiation 3D CT images of metal cracks and defects to be segmented;

[0008] Extract the binary image of the defect from the synchrotron radiation three-dimensional CT image of the metal crack and defect;

[0009] The synchrotron radiation three-dimensional CT images of the metal cracks and defects are input into the trained crack segmentation model to obtain a two-dimensional probability feature map of the cracks. The crack segmentation model is obtained by training an improved U-Net network model with a training dataset consisting of synchrotron radiation three-dimensional CT images of metal cracks and defects labeled with cracks. The loss function of the improved U-Net network model adopts a composite loss function combining binary cross-entropy and structural similarity index.

[0010] The two-dimensional probability feature map of the crack is subjected to three-dimensional crack feature contrast enhancement processing using the Hessian matrix filtering method. The enhanced two-dimensional probability feature map of the crack is then binarized to obtain a binary image of the crack.

[0011] The binary image of the defect is superimposed with the binary image of the crack to achieve the segmentation of metal cracks and defects in the synchrotron radiation three-dimensional CT image of metal cracks and defects.

[0012] In one possible implementation of the first aspect, the composite loss function L Combine for:

[0013] L Combine =α·L cross-entropy +(1-α)·L SSIM (I1,I2)

[0014]

[0015]

[0016] In the formula: L cross-entropy The binary cross-entropy function; y i It is a binary label 0 or 1; p(y i ) is the output belonging to y i The probability of the label; N is the number of pixels in the synchrotron radiation 3D CT image of metal cracks and defects; L SSIM (I1, I2) is the structural similarity exponential function; I1 and I2 are the two images to be compared; μ1 and μ2 are the mean values ​​of the pixel values ​​of images I1 and I2, respectively; σ1 and σ2 are the standard deviations of the pixel values ​​of images I1 and I2, respectively; σ 12 α is the covariance between images I1 and I2; c1 and c2 are constants used in the stabilization formula; α is the participation factor, representing the proportion of the binary cross-entropy function.

[0017] In one possible implementation of the first aspect, the step of using the Hessian matrix filtering method to perform three-dimensional crack feature contrast enhancement processing on the two-dimensional probability feature map of the crack specifically involves:

[0018] The two-dimensional probability feature map of the crack is filtered for noise using a linear bilateral filter.

[0019] The three-dimensional feature values ​​of the two-dimensional probability feature map of cracks after noise filtering are calculated using a Hessian matrix filter. The feature value with the largest absolute value among the three-dimensional feature values ​​is then selected to replace the gray value of the two-dimensional probability feature map of cracks, thereby completing the three-dimensional crack feature contrast enhancement of the two-dimensional probability feature map of cracks.

[0020] In one possible implementation of the first aspect, after enhancing the contrast of the three-dimensional crack features from the completed two-dimensional probability feature map of the crack, the method further includes:

[0021] By using nonlinear bilateral filtering to perform composite filtering on the two-dimensional probability feature map of cracks after grayscale value replacement and the two-dimensional probability feature map of cracks after noise filtering, noise filtering can be achieved on the two-dimensional probability feature map of cracks after the three-dimensional crack feature contrast enhancement processing.

[0022] In one possible implementation of the first aspect, the composite filtering of the crack two-dimensional probability feature map after grayscale value replacement and the crack two-dimensional probability feature map after noise filtering using nonlinear bilateral filtering specifically involves:

[0023]

[0024]

[0025] In the formula, X is the pixel coordinate (x, y, z) of the center point of the convolution window; Y is the pixel coordinate (x, y, z) of a point within the neighborhood of the convolution window; g(X) is the two-dimensional probability feature map of the crack after noise filtering; S(Y) and S(X) are the probability values ​​corresponding to Y and X in the two-dimensional probability feature map of the crack after replacing the gray values, respectively; G(X) is the probability value corresponding to the X coordinate in the two-dimensional probability feature map of the crack after composite filtering; μ is the normalization factor; σ d1 Position discrete parameters in a bilateral filter; σ d2 Discrete parameters for grayscale values.

[0026] In one possible implementation of the first aspect, the binarization of the enhanced crack two-dimensional probability feature map to obtain a crack binary image specifically involves:

[0027] The average image grayscale value and the inter-pixel continuity are used as two thresholding parameters to perform thresholding segmentation on the enhanced crack two-dimensional probability feature map to obtain a crack binary image; the inter-pixel continuity is the number of voxels whose grayscale value and Hessian matrix eigenvector value of the enhanced crack two-dimensional probability feature map do not change abruptly within a unit three-dimensional window size.

[0028] In one possible implementation of the first aspect, the extraction of the defect binary image from the synchrotron radiation three-dimensional CT image of the metal crack and defect specifically involves:

[0029] The Isodata algorithm was used to extract the binary image of the defect from the synchrotron radiation three-dimensional CT image of the metal crack and defect.

[0030] According to a second aspect of the present invention, a synchrotron radiation three-dimensional CT image segmentation apparatus for metal cracks and defects is provided, comprising:

[0031] The acquisition module is used to acquire synchrotron radiation three-dimensional CT images of metal cracks and defects to be segmented;

[0032] The extraction module is used to extract the binary image of the defect from the synchrotron radiation three-dimensional CT image of the metal crack and defect;

[0033] The crack segmentation module is used to input the synchrotron radiation three-dimensional CT images of the metal cracks and defects into the trained crack segmentation model to obtain a two-dimensional probability feature map of the cracks. The crack segmentation model is obtained by training an improved U-Net network model with a training dataset consisting of synchrotron radiation three-dimensional CT images of metal cracks and defects labeled with cracks. The loss function of the improved U-Net network model adopts a composite loss function combining binary cross-entropy and structural similarity index.

[0034] The three-dimensional crack enhancement module is used to perform three-dimensional crack feature contrast enhancement processing on the two-dimensional probability feature map of the crack using the Hessian matrix filtering method, and to perform binarization processing on the enhanced two-dimensional probability feature map of the crack to obtain a crack binary image.

[0035] The overlay module is used to overlay the binary image of the defect with the binary image of the crack to achieve the segmentation of the metal crack and defect in the synchrotron radiation three-dimensional CT image of the metal crack and defect.

[0036] According to a third aspect of the present invention, an apparatus is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the aforementioned method for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects.

[0037] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned method for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects.

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

[0039] This invention provides a method for segmenting synchrotron radiation 3D CT images of metal cracks and defects. First, it extracts only the high-contrast binary images of defects from the synchrotron radiation 3D CT images of metal cracks and defects, avoiding the problem of poor extraction accuracy caused by the attention dispersion of the neural network segmentation model when simultaneously segmenting cracks and defects. Then, a trained crack segmentation model is used to segment only the cracks in the synchrotron radiation 3D CT images of metal cracks and defects, outputting a two-dimensional probability feature map of the cracks. The crack segmentation model is obtained by training an improved U-Net network model on a training dataset composed of synchrotron radiation 3D CT images of metal cracks and defects labeled with cracks. The improved U-Net network model uses a composite loss function combining binary cross-entropy and structural similarity index, introducing a structural similarity index loss function to improve the accuracy of the crack segmentation model. Next, the Hessian matrix filtering method is used to enhance the contrast of the three-dimensional crack features in the two-dimensional probability feature map of the cracks. The enhanced two-dimensional probability feature map of the cracks is then binarized, resulting in a clearer and more complete binary image of the cracks. Finally, the binary image of the defect is superimposed with the binary image of the crack to achieve segmentation of the metal crack and defect in the synchrotron radiation 3D CT image of the metal crack and defect. In other words, the segmentation method of this invention can effectively achieve automated and accurate segmentation of crack and defect synchrotron radiation 3D CT images in high artifact grayscale images, and can simultaneously and accurately extract the 3D morphology of defects and cracks, thereby enabling the characterization of the interaction between the evolution of defects and fatigue cracks.

[0040] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the specific embodiments of the present invention, the drawings used in the description of the specific embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0042] Figure 1 This is a flowchart of a method for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects according to an embodiment of the present invention.

[0043] Figure 2 This is an imaging slice of an AlSi7 aluminum alloy sample under synchrotron radiation CT scan, as described in an embodiment of the present invention. The rotation axis of the sample is parallel to the slice, and defects, cracks, and artifacts can be created in this slice.

[0044] Figure 3This is a binary image after high-contrast manufacturing defect boundary segmentation in an embodiment of the present invention.

[0045] Figure 4 This is a schematic diagram illustrating the training set annotation method and image preparation according to an embodiment of the present invention; Figure 4 In the image, (a) shows the interface of the manual annotation software ImageLabeler, (b) shows the pixel-level annotation results, (c) shows the original training set images, and (d) shows the annotated image set.

[0046] Figure 5 This is a schematic diagram of the U-net convolutional neural network model used in an embodiment of the present invention.

[0047] Figure 6 The training results of the U-net model used in the embodiments of the present invention; Figure 6 In the image, (a) is the original image of the validation set, (b) is the loss function descent curve during training, (c) is the manually labeled result, and (d) is the model output probability spectral density.

[0048] Figure 7 This is a schematic diagram of crack image contrast enhancement based on the Hessian matrix and dual-parameter maximum information entropy thresholding segmentation used in embodiments of the present invention.

[0049] Figure 8 This is the result of the superposition of defects and cracks in the embodiments of the present invention. Figure 8 In the image, (a) is a two-dimensional image and (b) is a three-dimensional reconstructed image. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] like Figure 1 As shown in the figure, this application provides a method for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects, specifically including the following steps:

[0052] S1. Obtain synchrotron radiation 3D CT images of the metal cracks and defects to be segmented.

[0053] It should be understood that synchrotron radiation 3D CT images are usually multi-layered 2D image slices, which are combined to form a 3D CT image.

[0054] S2. Extract the binary image of the defect from the synchrotron radiation three-dimensional CT image of the metal crack and defect.

[0055] It should be understood that the defects in the image have high contrast, and this step extracts a binary image of the defects with high contrast.

[0056] In one embodiment, such as Figure 3 As shown, the Isodata algorithm in ImageJ software is used to extract the binary image of the defect from the synchrotron radiation three-dimensional CT image of the metal crack and defect.

[0057] For example, such as Figure 1 As shown, high-contrast defect boundaries are extracted, and the binarized defect image is stored as a TIF image.

[0058] S3. Input the synchrotron radiation three-dimensional CT images of the metal cracks and defects into the trained crack segmentation model to obtain a two-dimensional probability feature map of the cracks.

[0059] It should be noted that the two-dimensional probability feature map of cracks reflects the probability that each pixel in the image belongs to a crack.

[0060] The training method for the crack segmentation model is as follows: an improved U-Net network model is trained using a training dataset consisting of synchrotron radiation 3D CT images of metal cracks and defects labeled with crack tags. The loss function of the improved U-Net network model is a composite loss function combining binary cross-entropy and structural similarity index, as detailed below:

[0061] L Combine =α·L cross-entropy +(1-α)·L SSIM (I1,I2)

[0062]

[0063]

[0064] In the formula: L cross-entropy The binary cross-entropy function; y i It is a binary label 0 or 1; p(y i ) is the output belonging to y i The probability of the label; N is the number of pixels in the synchrotron radiation 3D CT image of metal cracks and defects; L SSIM (I1, I2) is the structural similarity exponential function; I1 and I2 are the two images to be compared; μ1 and μ2 are the mean values ​​of the pixel values ​​of images I1 and I2, respectively; σ1 and σ2 are the standard deviations of the pixel values ​​of images I1 and I2, respectively; σ 12 α is the covariance between images I1 and I2; c1 and c2 are constants used in the stabilization formula; α is the participation factor, representing the proportion of the binary cross-entropy function.

[0065] In one embodiment, the training of the crack segmentation model is specifically as follows:

[0066] A: Preparation of Synchrotron Radiation 3D CT Image Dataset for Metal Cracks and Defects

[0067] Dataset preparation is fundamental to training the model. In this embodiment, the original CT image data was provided by the European Synchrotron Radiation Facility (ESRF), comprising 10 sets of CT image data from in-situ fatigue crack propagation experiments on aluminum alloys with different cycle numbers (e.g., ...). Figure 2 As shown, each image group has a size of 1024×1024×1024, a bit depth of 16 bits, and is stored in TIF format. To improve image segmentation efficiency, the image is mapped to grayscale values ​​between 0 and 255 using the grayscale value range as the window width and the minimum value as the window bit, and stored in 8-bit image format.

[0068] B: Dataset Labels

[0069] like Figure 4 As shown, crack image labeling is implemented using Matlab ImageLabeler software. In this software, the pixel brush tool is selected to manually select the crack region. The grayscale value range of the labeled image is 0-1, and the result needs to be mapped to the range of 0-255. In this embodiment, a total of 200 synchrotron radiation 3D CT images of metal cracks and defects labeled with crack tags were manually labeled, of which 180 were used for model training and 20 were used for model validation.

[0070] C: Crack segmentation model training and validation

[0071] like Figure 5 As shown, this embodiment employs an improved U-Net network model structure. The network model includes two stages: downsampling and upsampling. The downsampling stage identifies features at different scales through two-dimensional convolutional layers, two-dimensional max-pooling layers, and the ReLU activation function. The downsampling stage has four layers; after each layer, the image size is halved, and the number of feature channels is doubled. To prevent overfitting, a Dropout layer is added before the last layer as the final result of the downsampling stage. The upsampling stage uses deconvolution to recover image features, where the convolution kernel size is the same as in downsampling. A Sigmoid activation function is used, and the multi-channel feature image is cropped and stitched together to output a two-dimensional probability feature map of the crack.

[0072] This invention is used for image segmentation, aiming to map cracked regions to 1 and background regions to 0. Therefore, in most works, binary cross-entropy is used as the loss function for model training, as shown in the following equation, where y i It is a binary label 0 or 1, p(yi ) is the output belonging to y i The probability of the label.

[0073]

[0074] In this invention, to improve training performance, a loss function based on structural similarity index is introduced, as shown in the following formula, where I1 and I2 are the two images to be compared; μ1 and μ2 are the mean pixel values ​​of images I1 and I2, respectively; σ1 and σ2 are the standard deviations of the pixel values ​​of images I1 and I2, respectively; σ 12 c1 and c2 are the covariance between images I1 and I2; c1 and c2 are constants used in the stabilization formula.

[0075]

[0076] In other words, the final model training in this invention uses a composite loss function combining binary cross entropy and structural similarity index:

[0077] L Combine =α·L cross-entropy +(1-α)·L SSIM

[0078] Where α is the participation factor, representing the proportion of the cross-entropy function.

[0079] More specifically, this embodiment builds and trains a crack segmentation model within the TensorFlow Keras framework, using an NVIDIA GeForce GTX 1080Ti GPU for acceleration. Details are as follows:

[0080] C1 Model Training: To increase the number and diversity of training samples, data doubling was performed using methods such as rotation, translation, and mirroring. Training was conducted over 100 epochs, with 50 images per epoch. Model parameters were iterated and saved when the loss function decreased; otherwise, the parameters for that epoch were not saved. The model was stored in .hdf5 format. A composite loss function was used during training. After several trials, it was found that setting the learning rate to 5E-4 resulted in a good balance between training speed and image segmentation quality. The training results are as follows. Figure 6 .

[0081] C2 Model Validation: The model is validated using 20 labeled but untrained images. Grayscale and labeled images are named sequentially with four digits and saved as PNG images (0001-0020.png), stored in the Val_Image and Val_Label subfile paths. The trained model is used for segmentation testing; no thresholding is applied to the probability feature maps, and the two-dimensional probability feature maps of the cracks are directly output.

[0082] Output of C3 crack 2D probabilistic feature map: Name all grayscale images to be segmented with four sequential numbers and save them as PNG images (0001-3600.png) in the Test_Image file path. Use the trained model to segment the images without thresholding the probabilistic feature map. Directly name the crack 2D probabilistic feature map with four sequential numbers and save it as a PNG image (0001-3600.png) in the Propability_Map file path.

[0083] S4. The two-dimensional probability feature map of the crack is subjected to three-dimensional crack feature contrast enhancement processing using the Hessian matrix filtering method. The enhanced two-dimensional probability feature map of the crack is then binarized to obtain a binary image of the crack.

[0084] Traditional neural network-based image segmentation methods directly threshold the two-dimensional probability feature map of cracks, classifying pixel regions with a value greater than 0.5 as foreground (crack) and pixel regions with a value less than 0.5 as background (base material). This invention uses the Hessian matrix filtering method to perform three-dimensional thresholding on the two-dimensional probability feature map of cracks output by the U-net network to obtain a more complete crack image.

[0085] In one embodiment, the process of using the Hessian matrix filtering method to perform three-dimensional crack feature contrast enhancement processing on the two-dimensional probability feature map of the crack is as follows:

[0086] a. Use linear bilateral filtering to filter noise from the two-dimensional probability feature map of the crack.

[0087] For example, such as Figure 7 As shown, open the two-dimensional probability feature map of cracks output by the U-net network in Matlab software and store it as a 1024×1024×1024 matrix data. Use the three-dimensional linear bilateral Gaussian filter shown in the following formula to perform edge-preserving and noise filtering on the two-dimensional probability feature map of cracks. The size of the convolution window is 5×5×5, and the position discrete parameter (σ) in the bilateral filter is... d1 The grayscale value discrete parameter (σ) is set to 3. d2 Set it to 0.3.

[0088]

[0089]

[0090] In the above formula, X is the pixel coordinate (x, y, z) of the center point of the convolution window; Y is the pixel coordinate (x, y, z) of a point within the neighborhood of the convolution window; f(X) and f(Y) are the probability values ​​corresponding to Y and X in the two-dimensional probability feature map of the crack before filtering, respectively; F(X) is the probability value corresponding to the X coordinate in the two-dimensional probability feature map of the crack before filtering; μ is the normalization factor; σ d1 Position discrete parameters in a bilateral filter; σ d2 Discrete parameters for grayscale values.

[0091] b. Calculate the three-dimensional features of the denoised crack two-dimensional probability feature map using a Hessian matrix filter, and select the feature value with the largest absolute value among the three-dimensional feature values ​​to replace the gray value of the crack two-dimensional probability feature map, thereby completing the contrast enhancement of the three-dimensional crack features of the crack two-dimensional probability feature map.

[0092] Specifically, for the noise-filtered two-dimensional probability feature map of cracks obtained after linear bilateral filtering, the three-dimensional Hessian matrix (Q) of each pixel is calculated using the convolution method shown in Equation (1). Hessian As shown in formula (2), the convolution calculation process is implemented using the Conv3 function in Matlab. Subsequently, the eigenvalues ​​and eigenvectors of the three-dimensional Hessian matrix are calculated for all pixels in the three-dimensional image. The gray values ​​of the two-dimensional probability feature map of the crack after noise filtering are replaced with the principal eigenvalue with the largest absolute value, and the data is normalized and stored.

[0093]

[0094] In the above formula, H 11 (x,y,z) represents the first element in the first row and first column of the three-dimensional Hessian matrix, and σ is the discrete parameter in the Gaussian function, which is set to 1 in this invention.

[0095]

[0096] Preferably, after completing the contrast enhancement of the three-dimensional crack features from the two-dimensional probability feature map of the crack, the method further includes:

[0097] c. A nonlinear bilateral filter is used to perform composite filtering on the two-dimensional probability feature map of the crack after replacing the gray values ​​and the two-dimensional probability feature map of the crack after denoising, so as to achieve denoising on the two-dimensional probability feature map of the crack after the three-dimensional crack feature contrast enhancement processing.

[0098] Specifically, the two-dimensional probability feature map of cracks after Hessian matrix filtering and grayscale value replacement significantly improves the contrast of crack regions with a single spatial orientation, but at the same time increases image noise, making it unsuitable for direct crack region identification. Therefore, further nonlinear bilateral filtering is required. The basic form of this filter is essentially the same as that of the linear bilateral filter (as shown in the following equation), the difference being that this filter requires two sets of image inputs: one is the grayscale image after linear filtering (the noise-filtered two-dimensional probability feature map of cracks), which serves as the original image for nonlinear filtering; the other is the image after Hessian matrix filtering (the two-dimensional probability feature map of cracks after grayscale value replacement), used for calculating the filter convolution kernel. The contrast of crack regions in the image after nonlinear bilateral filtering is significantly improved, with minimal noise interference.

[0099]

[0100]

[0101] In the above formula, X is the pixel coordinate (x, y, z) of the center point of the convolution window; Y is the pixel coordinate (x, y, z) of a point within the neighborhood of the convolution window; g(X) is the two-dimensional probability feature map of the crack after noise filtering (i.e., the image after linear filtering); S(Y) and S(X) are the probability values ​​corresponding to Y and X in the two-dimensional probability feature map of the crack after replacing the gray values, respectively; G(X) is the probability value corresponding to the X coordinate in the two-dimensional probability feature map of the crack after composite filtering; μ is the normalization factor; σ d1 Position discrete parameters in a bilateral filter; σ d2 Gray-scale value discrete parameters. Consistent with linear bilateral filters, the position discrete parameter σ in nonlinear bilateral filters... d1 Set to 3, grayscale value discrete parameter σ d2 Set it to 0.3.

[0102] In one embodiment, the process of binarizing the enhanced two-dimensional probability feature map of the crack to obtain a binary image of the crack is as follows:

[0103] The average image grayscale value and the inter-pixel continuity are used as two thresholding parameters to perform thresholding segmentation on the enhanced crack two-dimensional probability feature map to obtain a crack binary image; the inter-pixel continuity is the number of voxels whose grayscale value and Hessian matrix eigenvector value of the enhanced crack two-dimensional probability feature map do not change abruptly within a unit three-dimensional window size.

[0104] In other words, the enhanced crack 2D probabilistic feature map is processed using a two-parameter maximum information entropy thresholding method, as shown in the following equation. The average image grayscale value is defined as the average grayscale value within the three-dimensional window size, and the inter-pixel continuity (g(x,y,z)) is defined as the number of voxels whose grayscale values ​​in the enhanced crack 2D probabilistic feature map do not abruptly change with the Hessian matrix eigenvector values ​​within a unit three-dimensional window size. These two threshold parameters are obtained from the maximum information entropy criterion. Based on the above segmentation method, a binarized crack image can be extracted from the nonlinear bilaterally filtered image.

[0105]

[0106]

[0107] In the above formula, l(x,y,z) is the image continuity index, G(x,y,z) is the image after nonlinear filtering, and d(x,y,z) is the unit eigenvector corresponding to the maximum absolute value eigenvalue of the three-dimensional Hessian matrix. α and β are tolerance parameters, both set to 0.3 in this embodiment.

[0108] S5. The defect binary image and the crack binary image are superimposed to achieve metal crack and defect segmentation in the synchrotron radiation three-dimensional CT image of metal crack and defect.

[0109] In one embodiment, such as Figure 8 As shown, in Fiji software, the defect binary image and crack binary image are overlaid using the Stacks Combine function, and different colors can be used to distinguish them. For example, the defect and sample boundary can be set to green, and the crack to red. A 3D viewer plugin is then used for 3D visualization and reconstruction of the image, as shown in the image. Figure 8 As shown in (b) of the diagram.

[0110] In the embodiments provided by this invention, the convolutional neural network U-net model is combined with an image feature segmentation method based on the Hessian matrix. The U-net model is used to automatically segment metal cracks in synchrotron radiation CT images, solving the problem of automatically identifying geometrically similar cracks and high-contrast strip artifacts. Simultaneously, a Hessian matrix filter is used to enhance the contrast of the three-dimensional crack feature image of the two-dimensional probability feature map of the U-net model, addressing the issue that the U-net model does not consider the three-dimensional features of cracks. This achieves efficient and accurate segmentation of synchrotron radiation three-dimensional CT images of metal cracks and defects with a low-cost training set. In this embodiment, based on the U-net semantic segmentation convolutional neural network, five sets of in-situ propagation CT images of internal fatigue cracks in aluminum alloys obtained from the European Synchrotron Radiation Facility (ESRF) are used. Based on crack propagation theory and MatlabImageLabeler software, crack regions are manually labeled in a small sample (the number of labels does not exceed 3% of the total number of segmented images). The network model is trained through labeled images, and the optimal model weight parameters are stored during the training iteration. After training, the model successfully distinguishes between strip artifacts and cracks, completing the crack feature extraction from multi-artifact synchrotron radiation three-dimensional CT images. In this embodiment, the Hessian matrix filter's ability to characterize the anisotropy of grayscale values ​​in three-dimensional space is utilized. A three-dimensional crack contrast enhancement filter is constructed to address the characteristic of drastic grayscale value changes along the thickness direction of cracks in images. Three-dimensional scale information is added to the U-net segmentation results, and the influence of noise and inclusions is eliminated. This method reduces the dependence on U-net segmentation results, and even under slight underfitting or overfitting, a complete three-dimensional crack image can still be extracted. This invention integrates the deep learning U-net method with the Hessian matrix filtering method, combining the advantages of both to solve the problem of accurate crack segmentation at low cost in large-scale four-dimensional synchrotron radiation scan images. A neural network model is used to achieve pixel-level automatic identification of cracks and artifacts with similar grayscale values ​​and shape features. The Hessian filtering method is used to reprocess the two-dimensional identification results to extract a more complete three-dimensional crack image.

[0111] This invention provides a device for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects, comprising:

[0112] The acquisition module is used to acquire synchrotron radiation 3D CT images of metal cracks and defects to be segmented.

[0113] The extraction module is used to extract the binary image of the defect from the synchrotron radiation three-dimensional CT image of the metal crack and defect.

[0114] The crack segmentation module is used to input the synchrotron radiation three-dimensional CT images of the metal cracks and defects into the trained crack segmentation model to obtain a two-dimensional probability feature map of the cracks. The crack segmentation model is obtained by training an improved U-Net network model with a training dataset consisting of synchrotron radiation three-dimensional CT images of metal cracks and defects labeled with cracks. The loss function of the improved U-Net network model adopts a composite loss function combining binary cross-entropy and structural similarity index.

[0115] The three-dimensional crack enhancement module is used to perform three-dimensional crack feature contrast enhancement processing on the two-dimensional probability feature map of the crack using the Hessian matrix filtering method, and to perform binarization processing on the enhanced two-dimensional probability feature map of the crack to obtain a crack binary image.

[0116] The overlay module is used to overlay the binary image of the defect with the binary image of the crack to achieve the segmentation of the metal crack and defect in the synchrotron radiation three-dimensional CT image of the metal crack and defect.

[0117] The specific implementation methods of the above modules can be found in the relevant content disclosed in the foregoing embodiments, and will not be repeated here.

[0118] In one embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used to implement the operation of a synchrotron radiation three-dimensional CT image segmentation method for metal cracks and defects.

[0119] In one embodiment of the present invention, a method for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data.

[0120] The computer storage medium can be any available medium or data storage device that a computer can access, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs)), optical storage (e.g., CDs, DVDs, BDs, HVDs), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).

[0121] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0122] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0123] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0124] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0125] In the description of this invention, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0126] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for metal crack and defect synchrotron three-dimensional CT image segmentation, characterized in that, include: Acquire synchrotron radiation 3D CT images of metal cracks and defects to be segmented; Extract the binary image of the defect from the synchrotron radiation three-dimensional CT image of the metal crack and defect; The synchrotron radiation three-dimensional CT images of the metal cracks and defects are input into the trained crack segmentation model to obtain a two-dimensional probability feature map of the cracks. The crack segmentation model is obtained by training an improved U-Net network model with a training dataset consisting of synchrotron radiation three-dimensional CT images of metal cracks and defects labeled with cracks. The loss function of the improved U-Net network model adopts a composite loss function combining binary cross-entropy and structural similarity index. The two-dimensional probability feature map of the crack is subjected to three-dimensional crack feature contrast enhancement processing using the Hessian matrix filtering method. The enhanced two-dimensional probability feature map of the crack is then binarized to obtain a binary image of the crack. The defect binary image and the crack binary image are superimposed to achieve metal crack and defect segmentation in the synchrotron radiation three-dimensional CT image of metal crack and defect; The process of using the Hessian matrix filtering method to perform three-dimensional crack feature contrast enhancement processing on the two-dimensional probability feature map of the crack is as follows: The two-dimensional probability feature map of the crack is filtered for noise using a linear bilateral filter. The three-dimensional feature values ​​of the two-dimensional probability feature map of cracks after noise filtering are calculated using a Hessian matrix filter, and the feature value with the largest absolute value among the three-dimensional feature values ​​is selected to replace the gray value of the two-dimensional probability feature map of cracks, thereby completing the three-dimensional crack feature contrast enhancement of the two-dimensional probability feature map of cracks. After enhancing the contrast of the three-dimensional crack features in the completed two-dimensional probability feature map of the crack, the method further includes: By using nonlinear bilateral filtering to perform composite filtering on the two-dimensional probability feature map of cracks after grayscale value replacement and the two-dimensional probability feature map of cracks after noise filtering, noise filtering can be achieved on the two-dimensional probability feature map of cracks after the three-dimensional crack feature contrast enhancement processing.

2. The method for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects according to claim 1, characterized in that, The composite loss function is: In the formula: It is a binary cross-entropy function; It is a binary label, either 0 or 1; The output belongs to The probability of the label; The number of pixels in a synchrotron radiation 3D CT image of metal cracks and defects; It is a structural similarity exponential function; and These are two images to be compared; and These are images and The average pixel value; and These are images and The standard deviation of pixel values; It is an image and Covariance between them; and It is a constant used in the stabilization formula; , representing the proportion of the binary cross-entropy function.

3. The method for segmenting synchrotron radiation three-dimensional CT images of metal cracks and defects according to claim 1, characterized in that, The method of using nonlinear bilateral filtering to perform composite filtering on the crack two-dimensional probability feature map after replacing gray values ​​and the crack two-dimensional probability feature map after noise filtering is as follows: In the formula, The pixel coordinates of the center point of the convolution window (x,y,z) ; The pixel coordinates of a point within the neighborhood of the convolution window (x,y,z) ; This is a two-dimensional probability feature map of the crack after noise filtering; and These are the two-dimensional probability feature maps of cracks after replacing the grayscale values. Y Place and X The corresponding probability value at that location; The crack two-dimensional probability feature map after composite filtering X The probability value corresponding to the coordinate; Normalization factor; Position discrete parameters in a bilateral filter; Discrete parameters for grayscale values.

4. The method according to claim 1, wherein, The enhanced two-dimensional probability feature map of the crack is binarized to obtain a binary image of the crack, specifically as follows: The average image grayscale value and the inter-pixel continuity are used as two thresholding parameters to perform thresholding segmentation on the enhanced crack two-dimensional probability feature map to obtain a crack binary image; the inter-pixel continuity is the number of voxels whose grayscale value and Hessian matrix eigenvector value of the enhanced crack two-dimensional probability feature map do not change abruptly within a unit three-dimensional window size.

5. The method according to claim 1, wherein, The extraction of the defect binary image from the synchrotron radiation three-dimensional CT image of the metal crack and defect is specifically as follows: The Isodata algorithm was used to extract the binary image of the defect from the synchrotron radiation three-dimensional CT image of the metal crack and defect.

6. A synchrotron radiation three-dimensional CT image segmentation device for metal cracks and defects, characterized in that, include: The acquisition module is used to acquire synchrotron radiation three-dimensional CT images of metal cracks and defects to be segmented; The extraction module is used to extract the binary image of the defect from the synchrotron radiation three-dimensional CT image of the metal crack and defect; The crack segmentation module is used to input the synchrotron radiation three-dimensional CT images of the metal cracks and defects into the trained crack segmentation model to obtain a two-dimensional probability feature map of the cracks. The crack segmentation model is obtained by training an improved U-Net network model with a training dataset consisting of synchrotron radiation three-dimensional CT images of metal cracks and defects labeled with cracks. The loss function of the improved U-Net network model adopts a composite loss function combining binary cross-entropy and structural similarity index. The three-dimensional crack enhancement module is used to perform three-dimensional crack feature contrast enhancement processing on the two-dimensional probability feature map of the crack using the Hessian matrix filtering method, and to perform binarization processing on the enhanced two-dimensional probability feature map of the crack to obtain a crack binary image. The overlay module is used to overlay the binary image of the defect with the binary image of the crack to achieve metal crack and defect segmentation in the synchrotron radiation three-dimensional CT image of the metal crack and defect; The process of using the Hessian matrix filtering method to perform three-dimensional crack feature contrast enhancement processing on the two-dimensional probability feature map of the crack is as follows: The two-dimensional probability feature map of the crack is filtered for noise using a linear bilateral filter. The three-dimensional feature values ​​of the two-dimensional probability feature map of cracks after noise filtering are calculated using a Hessian matrix filter, and the feature value with the largest absolute value among the three-dimensional feature values ​​is selected to replace the gray value of the two-dimensional probability feature map of cracks, thereby completing the three-dimensional crack feature contrast enhancement of the two-dimensional probability feature map of cracks. After enhancing the contrast of the three-dimensional crack features in the completed two-dimensional probability feature map of the crack, the method further includes: By using nonlinear bilateral filtering to perform composite filtering on the two-dimensional probability feature map of cracks after grayscale value replacement and the two-dimensional probability feature map of cracks after noise filtering, noise filtering can be achieved on the two-dimensional probability feature map of cracks after the three-dimensional crack feature contrast enhancement processing.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the synchrotron radiation three-dimensional CT image segmentation method for metal cracks and defects as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: When the computer program is executed by the processor, it implements the steps of the synchrotron radiation three-dimensional CT image segmentation method for metal cracks and defects as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Rock core CT crack identification and segmentation method

    CN112991370A

  • Eyeball segmentation method and device based on convolutional neural network and mixed loss function

    CN113706542A