Rock core CT image crack segmentation method and device based on deep learning
By employing a deep learning method based on the U-Net network and CBMA attention mechanism, the problem of low efficiency in crack segmentation of core CT images was solved, achieving efficient and accurate automated crack segmentation and reducing the difficulty of dataset construction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PETROLEUM & CHEMICAL CORP
- Filing Date
- 2024-11-06
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies struggle to efficiently and automatically segment cracks in core CT images. Traditional methods are inefficient, and deep learning methods are not widely used in crack segmentation of core CT images.
We employ a deep learning approach based on the U-Net network, combined with the CBMA attention mechanism, to improve the efficiency and accuracy of crack segmentation through data augmentation and model training, thereby constructing a crack segmentation model adapted to the resolution of core CT images.
It improves the efficiency and accuracy of crack segmentation in core CT images, reduces the need for a large number of training images, and enhances the operability of the model and its ability to identify crack regions.
Smart Images

Figure CN121998997A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing in seismic exploration, and more specifically, to a method and apparatus for crack segmentation of core CT images based on deep learning. Background Technology
[0002] The study of fractures in sedimentary rocks is of guiding significance for oil and gas resource exploration. Industrial CT can reconstruct three-dimensional images of rock cores, revealing the structure of cracks within them. Although industrial CT can perform three-dimensional imaging of rock cores, the contrast between the background and cracks in the final image is very low, and cracks are present at multiple scales in the image. Manual crack segmentation is inefficient under such imaging conditions, failing to meet actual production needs. To address the difficulties of manual crack segmentation, many researchers have proposed using computer vision techniques to automate crack segmentation in CT core slices. Traditional vision methods tend to construct rule-based crack segmentation models, completing the segmentation work by analyzing the matching degree between various features in the image and the segmentation model. Traditional methods generally include three steps: image preprocessing, focusing on noise reduction; crack feature construction, constructing features to distinguish crack and non-crack patterns using various feature analysis methods; and crack identification and segmentation, providing an identification model to determine crack information in the image based on the constructed features. In recent years, with the development of deep learning technology, the performance of image segmentation tasks has been greatly improved. A number of deep learning methods for image segmentation have emerged both domestically and internationally. Typical examples include image segmentation methods based on fully convolutional networks, semantic image segmentation methods based on encoder-decoder networks, crack segmentation networks based on feature pyramids, and filamentary target segmentation networks based on U-Net. Currently, deep learning methods for crack segmentation in core CT images have not yet seen large-scale applications. Therefore, using deep learning-based crack segmentation methods for core CT images could be considered. Summary of the Invention
[0003] The purpose of this invention is to propose a method and apparatus for crack segmentation of core CT images based on deep learning, thereby improving the efficiency of automated analysis of core CT images.
[0004] To achieve the above objectives, in a first aspect, the present invention proposes a deep learning-based crack segmentation method for core CT images, comprising:
[0005] A training dataset is created, which includes multiple training samples. Each training sample includes a core CT slice image and the corresponding artificial crack segmentation and annotation results.
[0006] The number of training samples in the training dataset is increased to form a new dataset, and the new dataset is divided into a training set and a test set.
[0007] A deep learning network model is constructed to identify crack features in input core CT images and output crack segmentation results. The deep learning network model includes a U-Net network. The shrinking path of feature extraction in the U-Net network adopts a feature extraction network based on VGG-16. The upsampling expansion path in the U-Net network adds a CBMA attention module. The CBMA attention module is used to change the model's attention to different spatial locations and channels in the feature map, thereby increasing the weight of the region where the core crack is located.
[0008] The deep learning network model is trained and its parameters are tuned using the training set until the model converges, thus completing the training.
[0009] The trained deep learning network model is tested using the test set, and the crack segmentation performance of the deep learning network model is evaluated.
[0010] Optionally, expanding the number of training samples in the training dataset includes:
[0011] Data augmentation is performed on each core CT slice image in the training dataset to obtain more training data, while the corresponding crack segmentation results are adjusted to match the augmented image data.
[0012] Optionally, the U-Net network includes a 9-layer structure consisting of a shrinking path for feature extraction and an expanding path for upsampling, wherein the encoder part for feature extraction includes layers 1 to 5, and the decoder part for upsampling includes layers 6 to 9.
[0013] In the U-Net network, the shrinking path for feature extraction adopts a VGG-16 network with the fully connected layers and output layers removed. The features from the last max pooling layer of the VGG-16 network are directly output to the input of the expansion path part of the U-Net network. Convolutional layers and pooling layers with the same output image resolution are treated as the same layer operation.
[0014] The upsampling extension path in the U-Net network is as follows: the output of the 4th pooling layer and the output feature map of the 5th layer after the CBMA attention module and upsampling operation are concatenated by channel and used as the input of the 6th layer;
[0015] The 6th layer performs two convolutions and outputs the convolution result to the CBMA attention module. The feature map output after the upsampling operation is concatenated with the feature map output by the pooling of the 3rd layer by channel and used as the input of the 7th layer.
[0016] The 7th layer performs two convolutions and outputs the convolution result to the CBMA attention module. The feature map output after the upsampling operation is concatenated with the feature map output by the pooling of the 2nd layer by channel and used as the input of the 8th layer.
[0017] The 8th layer performs two convolutions and outputs the convolution result to the CBMA attention module. The feature map output after the upsampling operation is concatenated with the feature map output by the pooling of the 1st layer by channel and used as the input of the 9th layer.
[0018] The 9th layer performs three convolution operations on the input feature map and outputs a segmentation result map with the same resolution as the input image.
[0019] Optionally, the upsampling extension path in the U-Net network further includes:
[0020] The output of the CBMA module of the 5th layer is convolved by a 1x1 convolution kernel and upsampled by 4 times, and then fed into the input layer of the 7th layer. It is then stitched together with other input images as the input of the 7th layer.
[0021] The output of layer 7 via the CBMA module is convolved with a 1x1 convolution kernel and upsampled by 4 times, and then fed into the input layer of layer 9. It is then stitched together with other input images to serve as the input of layer 9.
[0022] Optionally, training and tuning the deep learning network model using the training set includes:
[0023] The deep learning network model is trained using the training set. The model outputs a segmented image with the same resolution as the input image for each input image, and the crack segmentation results of all images in the training set are obtained to complete one training cycle.
[0024] The obtained crack segmentation results are compared with the manually segmented and labeled results in the training set. The error between the two is calculated using a loss function. Based on the calculated error, the parameter settings of the deep learning network model are adjusted, and the model is retrained using each set of images in the training set.
[0025] Repeat the above training process until the model parameters converge, and you will obtain a fully trained deep learning network model.
[0026] Optionally, the metrics for evaluating the crack segmentation performance of the deep learning network model include the Dice coefficient, global accuracy, and recall.
[0027] Optionally, the CBMA attention module includes a channel attention unit and a spatial attention unit;
[0028] For a feature map, the channel attention unit constructs two feature information maps through max pooling and average pooling. The result of max pooling is the first feature information map, and the result of average pooling is the second feature information map. The two feature information maps are fed into a multilayer perceptron to generate a channel attention map.
[0029] For a feature map, the spatial attention unit constructs two feature information maps by max pooling and average pooling along the dimensional direction. Then, the two feature information maps are convolved to obtain a two-dimensional feature map, which represents the attention weights that should be assigned to different positions in the image space.
[0030] The CBMA attention module first multiplies the input feature map bitwise with the channel attention map, and then multiplies it bitwise with the spatial attention map to output the result.
[0031] Optionally, it also includes:
[0032] Input the core CT image to be processed;
[0033] The deep learning network model, after training and testing, is used to identify crack features in the input core CT image and output crack segmentation results.
[0034] Secondly, this invention proposes a deep learning-based crack segmentation device for core CT images, comprising:
[0035] The data input module is used to input the core CT images to be processed;
[0036] The crack segmentation module is used to identify crack features in the input core CT image using the deep learning network model that has been trained and tested, and to output crack segmentation results.
[0037] The deep learning network model includes a U-Net network. The shrinking path of feature extraction in the U-Net network adopts a feature extraction network based on the VGG-16 network. The upsampling expansion path in the U-Net network adds a CBMA attention module. The CBMA attention module is used to change the model's attention to different spatial locations and channels in the feature map, thereby increasing the weight of the region where the rock core crack is located.
[0038] Thirdly, the present invention provides an electronic device, the electronic device comprising:
[0039] At least one processor; and,
[0040] A memory communicatively connected to the at least one processor; wherein,
[0041] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the deep learning-based crack segmentation method for core CT images described in the first aspect.
[0042] The beneficial effects of this invention are as follows:
[0043] The method of this invention first expands the original training dataset through data augmentation, then constructs a crack segmentation model based on the U-Net network. To adapt to the resolution of core CT images, the shrinking path of feature extraction in the U-Net network adopts a feature extraction network based on the VGG-16 network. In the expansion path of the U-Net model, a CBMA attention mechanism module is introduced to change the model's attention to different spatial locations and channels in the feature map. A skip connection mechanism is also introduced into the expansion path to increase the weight of the core crack region in the spatial domain, thereby improving the network's ability to segment cracks. The model is trained and its parameters are adjusted using the training set to obtain a model that performs well on the training set. Finally, the test set is imported into the trained model to test its performance, resulting in the final core CT image crack segmentation model. Based on this deep learning model, the efficiency of crack segmentation in core CT slice images is improved, and the obtained model maintains a high accuracy.
[0044] Meanwhile, this invention uses a model based on the U-Net network, which to some extent reduces the requirement for the number of training images, lowers the difficulty of constructing core CT datasets, and improves the operability of the method.
[0045] Furthermore, this invention introduces the CMBA attention mechanism into the construction of the U-Net network, which improves the model's ability to distinguish specific channels and regions. In core CT slice images, the proportion of pixels occupied by cracks is relatively low, and the introduction of the attention mechanism improves the model's processing efficiency and accuracy to a certain extent.
[0046] The system of the present invention has other features and advantages that will be apparent from or will be set forth in detail in the accompanying drawings and following detailed description, which together serve to explain the particular principles of the invention. Attached Figure Description
[0047] The above and other objects, features and advantages of the present invention will become more apparent from the accompanying drawings, in which like reference numerals generally denote like parts.
[0048] Figure 1The diagram illustrates the steps of a deep learning-based crack segmentation method for core CT images according to an embodiment of the present invention.
[0049] Figure 2 A structural diagram of a deep learning network model in one embodiment of the present invention is shown.
[0050] Figure 3 A schematic diagram of the CMBA attention module in one embodiment of the present invention is shown.
[0051] Figure 4 A schematic diagram of a channel attention unit in one embodiment of the present invention is shown.
[0052] Figure 5 A schematic diagram of a spatial attention unit in one embodiment of the present invention is shown. Detailed Implementation
[0053] Due to factors such as the system function of the receiver and the distribution pattern of the cracks themselves during the CT reconstruction process, core CT slice images suffer from limitations such as low image contrast, low signal-to-noise ratio, and irregular crack distribution. Existing image segmentation models are not accurate in segmenting cracks in core CT images. To address these technical problems, this invention provides a core CT image crack segmentation method based on a U-Net network and a CBMA attention mechanism. To adapt to the resolution of core CT images, this invention appropriately adjusts the encoder-decoder part of the U-Net model, adding a CBMA attention mechanism module to the decoder part. This increases the weight of the crack region in the spatial domain, providing an effective solution for automating crack segmentation in core CT slice images.
[0054] The invention will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0055] Example 1
[0056] like Figure 1 As shown, this embodiment provides a deep learning-based crack segmentation method for core CT images, including:
[0057] S1: Create a training dataset. The training dataset includes multiple training samples. Each training sample includes a core CT slice image and its corresponding artificial crack segmentation and annotation results.
[0058] Specifically, this step collects multiple sets of core CT slice image data and obtains a training dataset through manual segmentation. Each sample data in the training dataset includes a core CT slice image and its corresponding manual crack segmentation result.
[0059] S2: Expand the number of training samples in the training dataset to form a new dataset, and divide the new dataset into a training set and a test set;
[0060] This step performs data augmentation on each core CT slice image in the training dataset to obtain more training data, while adjusting the corresponding crack segmentation results to match the augmented image data.
[0061] Specifically, for the original training dataset obtained in step S1, data augmentation operations are performed on each image. Operations such as rotation, translation, scaling, and mirroring are used to obtain more training data, while the segmentation results are adjusted to fit the augmented data. Based on this, the dataset is divided into a training set and a test set.
[0062] S3: Construct a deep learning network model. The deep learning network model is used to identify crack features in the input core CT images and output crack segmentation results. The deep learning network model includes a U-Net network. The shrinking path of feature extraction in the U-Net network adopts a feature extraction network based on the VGG-16 network. The upsampling expansion path in the U-Net network adds a CBMA attention module. The CBMA attention module is used to change the model's attention to different spatial locations and channels in the feature map, thereby increasing the weight of the region where the core crack is located.
[0063] Specifically, this step constructs a crack segmentation network model based on the U-Net network and the CBMA attention mechanism, as follows:
[0064] like Figure 2 As shown, the U-Net network consists of a 9-layer structure, including a shrinking path for feature extraction and an expanding path for upsampling; the encoder part for feature extraction includes layers 1 to 5, and the decoder part for upsampling includes layers 6 to 9.
[0065] In the U-Net network, the shrinking path for feature extraction adopts the VGG-16 network with the fully connected layers and output layers removed. The features from the last max pooling layer of the VGG-16 network are directly output to the input of the expansion path part of the U-Net network. Convolutional layers and pooling layers with the same output image resolution are treated as the same layer operation.
[0066] The upsampling extension path in the U-Net network is as follows: The output of the pooling layer of layer 4 is concatenated channel-wise with the output feature map of layer 5 after the CBMA attention module and upsampling operation, and used as the input of layer 6; layer 6 performs two convolutions, outputting the convolution result to the CBMA attention module, and the feature map output after the upsampling operation is concatenated channel-wise with the feature map output of layer 3 pooling, and used as the input of layer 7; layer 7 performs two convolutions, outputting the convolution result to the CBMA attention module, and the feature map output after the upsampling operation is concatenated channel-wise with the feature map output of layer 2 pooling, and used as the input of layer 8; layer 8 performs two convolutions, outputting the convolution result to the CBMA attention module, and the feature map output after the upsampling operation is concatenated channel-wise with the feature map output of layer 1 pooling, and used as the input of layer 9; layer 9 performs three convolutions on the input feature map, outputting a segmentation result map with the same resolution as the input image.
[0067] Furthermore, to enable the U-Net network's upsampling path to utilize higher-order features more effectively, a dense connection is added to the upsampling expansion path. Specifically, the output of layer 5 after the CBMA module is convolved with a 1x1 kernel and upsampled by 4 times before being fed to the input layer of layer 7, where it is concatenated with other input images as the input to layer 7. Similarly, the output of layer 7 after the CBMA module is convolved with a 1x1 kernel and upsampled by 4 times before being fed to the input layer of layer 9, where it is concatenated with other input images as the input to layer 9. In other words, a skip connection mechanism is added to the U-Net network's expansion path, and the output of each layer in the expansion path, except for the final output layer, needs to pass through the CBMA module to maintain the network's attention.
[0068] like Figure 3 As shown, the CBMA attention module includes a channel attention unit and a spatial attention unit;
[0069] like Figure 4 As shown, for a feature map, the channel attention unit constructs two feature information maps through max pooling and average pooling. The result of max pooling is the first feature information map, and the result of average pooling is the second feature information map. The two feature information maps are fed into a multilayer perceptron to generate a channel attention map.
[0070] like Figure 5 As shown, for a feature map, the spatial attention unit constructs two feature information maps by max pooling and average pooling along the dimensional direction. Then, the two feature information maps are convolved to obtain a two-dimensional feature map (spatial attention map), which represents the attention weights that should be assigned to different positions in the image space.
[0071] The CBMA attention module first multiplies the input feature map bitwise with the channel attention map, and then multiplies it bitwise with the spatial attention map, before outputting the result.
[0072] S4: Use the training set to train and tune the deep learning network model until the model converges, thus completing the training.
[0073] This step imports the training set into the model for training, completing the parameter tuning and training of the model to obtain the final training result. The training methods include:
[0074] The deep learning network model is trained using the training set. The model outputs a segmented image with the same resolution as the input image for each input image. The crack segmentation results of all images in the training set are obtained, and one training cycle is completed.
[0075] The obtained crack segmentation results are compared with the manually segmented and labeled results in the training set. The error between the two is calculated using a loss function. Based on the calculated error, the parameter settings of the deep learning network model are adjusted, and the model is retrained using each set of images in the training set.
[0076] Repeat the above training process until the model parameters converge, and you will obtain a fully trained deep learning network model.
[0077] S5: Test the trained deep learning network model using the test set and evaluate the crack segmentation performance of the deep learning network model.
[0078] Specifically, the model obtained in step S4 is applied to the test set to obtain the segmentation results of the test data, which are used to evaluate the actual effect of the model. It is preferred to use three evaluation indicators, namely Dice coefficient, global accuracy and recall, to evaluate the model effect.
[0079] After training and testing the deep learning network model, the model can be applied to automated crack segmentation of core CT images. Specific methods include:
[0080] Input the core CT image to be processed;
[0081] The deep learning network model, after training and testing, is used to identify crack features in the input core CT images and output crack segmentation results.
[0082] Example 2
[0083] This embodiment provides a deep learning-based core CT crack segmentation method, including the following steps:
[0084] Step 1: Collect multiple sets of core CT slice image data, and obtain the training dataset D = {(A1,B1),(A2,B2),(A3,B3),...,(A...} through manual segmentation. n B n )}. Among them, A i B represents a core CT slice image to be segmented. i Indicates with A i The corresponding manual segmentation results, 1≤i≤n, where n represents the number of core CT slice images in the dataset.
[0085] Step 2: For dataset D, perform data augmentation operations on each image. Through operations such as rotation, translation, scaling, and mirroring, obtain more training data, and adjust the segmentation results to fit the augmented data, resulting in a new dataset Dn. Split dataset Dn into a training set Dt and a test set De.
[0086] Step 3: Construct a crack segmentation network model based on U-Net network and CBMA attention mechanism, as follows:
[0087] The shrinking path (encoder) of U-Net feature extraction uses a VGG-16-based feature extraction network. The fully connected layers and output layer of the VGG-16 network are removed, and the features from the last max-pooling layer are directly output to the input of the U-Net network decoder (expansion path). Convolutional and pooling layers with the same output image resolution are treated as a single layer operation. Therefore, the feature extraction part consists of 5 layers: layers 1 to 5, and the decoder part consists of 4 layers: layers 6 to 9.
[0088] The U-Net upsampling extension path is as follows: The pooling output of layer 4 is concatenated channel-wise with the feature map output from layer 5 after the CBMA attention module and upsampling operation, and this concatenation is used as the input to layer 6. Layer 6 performs two convolutions, and the convolution result is output to the CBMA attention module. The feature map output after the upsampling operation is concatenated channel-wise with the feature map output from layer 3, and this concatenation is used as the input to layer 7. Layer 7 performs two convolutions, and the convolution result is output to the CBMA attention module. The feature map output after the upsampling operation is concatenated channel-wise with the feature map output from layer 2, and this concatenation is used as the input to layer 8. Layer 8 performs two convolutions, and the convolution result is output to the CBMA attention module. The feature map output after the upsampling operation is concatenated channel-wise with the feature map output from layer 1, and this concatenation is used as the input to layer 9. Layer 9 performs three convolutions on the input feature maps, outputting a segmentation result map with the same resolution as the input image.
[0089] To make the upsampling path of U-Net more effective in utilizing high-order features, a dense connection is added to the extended upsampling path. Specifically: the output of layer 5 after the CBMA attention module is convolved with a 1x1 convolution kernel and upsampled by 4 times, then fed into the input layer of layer 7, and concatenated with other input images as the input of layer 7. The output of layer 7 after the CBMA attention module is convolved with a 1x1 convolution kernel and upsampled by 4 times, then fed into the input layer of layer 9, and concatenated with other input images as the input of layer 9.
[0090] Step 4: Train the deep learning network model constructed in Step 3 using the training set Dt. For each input image, the model outputs a segmentation image R with the same resolution as the input image. i Obtain the results of all images in dataset Dt to complete one training iteration.
[0091] Step 5: Compare the first output result obtained in Step 4 with the manual segmentation result in dataset DT, and calculate the error using the loss function. Adjust the parameter settings of the U-Net model based on this error. Repeat Step 4 to retrain each group of images in dataset Dt, obtaining the second training result. Compare the second training result with the manual segmentation result, calculate the loss function, and correct the parameter settings of the U-Net model. Repeat this training process until the model parameters converge. Use the converged model as the output to obtain the model for crack segmentation in core CT slice images.
[0092] Furthermore, the model obtained in step 5 is applied to the test set De to obtain the segmentation results of the test data, which are used to evaluate the actual performance of the model. Available evaluation metrics include the Dice coefficient, global accuracy, and recall.
[0093] The CBMA attention module used in this embodiment includes a channel attention unit and a spatial attention unit.
[0094] For a feature map, the channel attention unit constructs two feature information maps through max pooling and average pooling. The result of max pooling is called the first feature information map, and the result of average pooling is called the second feature information map. The two feature information maps are fed into a multilayer perceptron to generate a channel attention map.
[0095] For a feature map, the spatial attention unit constructs two feature maps by max pooling and average pooling along the dimensional direction; then, the two feature maps are convolved to obtain a two-dimensional feature map (spatial attention map), which represents the attention weights that should be assigned to different locations in the image space.
[0096] The CBMA attention module first multiplies the input feature map bitwise with the channel attention map, and then multiplies it bitwise with the spatial attention map, before outputting the result.
[0097] The advantages of this method include:
[0098] 1. By constructing a deep learning-based model, the efficiency of crack segmentation in core CT slice images was improved, and the obtained model maintained a high accuracy.
[0099] 2. Using a model based on the U-Net network reduces the number of training images required to some extent, lowers the difficulty of constructing the core CT dataset, and improves the operability of the method.
[0100] 3. Introducing an attention mechanism into the construction of the U-Net network improves the model's ability to distinguish specific channels and regions. Cracks account for a relatively low proportion of pixels in core CT slice images; the introduction of the attention mechanism improves the model's processing efficiency and accuracy to some extent.
[0101] Example 3
[0102] This embodiment proposes a deep learning-based crack segmentation method for core CT images, based on an improved U-Net network and the CBMA attention mechanism. Data augmentation expands the training set, and the CBMA mechanism reduces the impact of numerous non-crack regions in the training set on model training. In addition to the original skip-layer connections in the U-Net model, a skip-layer connection mechanism is introduced into the U-Net network's extension path, enhancing the network's ability to utilize deep models. The model described in this invention improves the accuracy of crack identification in core CT images, significantly aiding subsequent automated image analysis tasks.
[0103] The method in this embodiment includes the following steps:
[0104] The first step is to construct a core CT slice image dataset. This includes the original core CT slice images and their corresponding artificial crack annotations. The training dataset is expanded using transformations such as translation, rotation, mirroring, scaling, and projection to increase the number of training samples and improve the model's generalization and robustness.
[0105] The second step is to construct a deep learning network segmentation model based on U-Net. The structure of the U-Net network itself is similar to an encoder-decoder network. The encoder part corresponds to the contraction path in the U-Net network used to capture image features, extracting image features through convolutional layers; the decoder part corresponds to the upsampling expansion path in the U-Net network used to accurately locate the segmentation results, transferring deep features to shallower layers through skip connections, thereby improving the efficiency of using deep features.
[0106] For the feature extraction part (shrinkage path) of the U-Net network, this approach uses the VGG-16 model, removing the fully connected and softmax layers, allowing this part of the network to focus solely on feature extraction. (Reference) Figure 2 The VGG-16 model performs five max-pooling operations on the image, corresponding to five sets of convolution operations. The kernel size for each of these five convolution operations is 3x3, with a stride of 1, and the boundary padding is "same" to ensure the size of the convolution result is consistent with the input. The number of kernels in the five convolution operations is 64, 128, 256, 512, and 512, respectively.
[0107] The result of each convolution operation needs to pass through a max pooling layer. The pooling size is 2*2, so that the size of the pooled feature map is half that of the input. Since there are 5 pooling operations, the image in the network has 6 scales.
[0108] For the expansion path portion of the U-Net network, this invention uses convolution operations corresponding to those in the contraction path portion. The kernel size and number remain consistent, and the original image size is restored through progressive upsampling. This scheme uses a 2x2 deconvolution method for upsampling. The final convolution operation outputs a 1-dimensional result image, as the input core CT slice image also has a 1-dimensional dimension.
[0109] The network model used in this method retains the original skip connection mechanism in U-Net.
[0110] The third step is to introduce the CBMA attention mechanism. CBMA's attention mechanism is divided into channel attention and spatial attention. Channel attention aims to determine the image dimension most beneficial for crack segmentation. The spatial attention mechanism is used to increase the model's attention to the crack and its surrounding area, and to increase the weight of the crack region's feature values.
[0111] The fourth step involves feeding the data-augmented core CT slice image dataset into the model for training, completing the parameter tuning and training of the model, and obtaining the final training result. The loss function is set as follows:
[0112]
[0113] Where, p i The prediction result given by the model at index i. The model provides p, which is the result of manual segmentation of the training set. i It may contain decimal values, which need to be binarized before being imported into the loss function for calculation.
[0114] The obtained model is applied to the test set to obtain the segmentation results of the test data, which is used to evaluate the actual performance of the model. Available evaluation metrics include Dice coefficient, global accuracy, and recall.
[0115] Example 4
[0116] This embodiment provides a deep learning-based crack segmentation device for core CT images, including:
[0117] The data input module is used to input the core CT images to be processed;
[0118] The crack segmentation module is used to identify crack features in the input core CT image using the deep learning network model that has been trained and tested, and to output crack segmentation results.
[0119] The deep learning network model includes a U-Net network. The shrinking path of feature extraction in the U-Net network adopts a feature extraction network based on the VGG-16 network. The upsampling expansion path in the U-Net network adds a CBMA attention module. The CBMA attention module is used to change the model's attention to different spatial locations and channels in the feature map, thereby increasing the weight of the region where the rock core crack is located.
[0120] The specific architecture and functions of the deep learning network model in this embodiment are the same as those in Embodiments 1-3 above, and will not be repeated here.
[0121] Example 5
[0122] This invention proposes an electronic device, the electronic device comprising:
[0123] At least one processor; and,
[0124] A memory communicatively connected to the at least one processor; wherein,
[0125] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the deep learning-based crack segmentation method for core CT images described in the above embodiments.
[0126] An electronic device according to embodiments of the present disclosure includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc.
[0127] The processor may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. In one embodiment of this disclosure, the processor is used to execute computer-readable instructions stored in the memory.
[0128] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.
Claims
1. A deep learning-based method for crack segmentation in core CT images, characterized in that, include: A training dataset is created, which includes multiple training samples. Each training sample includes a core CT slice image and the corresponding artificial crack segmentation and annotation results. The number of training samples in the training dataset is increased to form a new dataset, and the new dataset is divided into a training set and a test set. A deep learning network model is constructed to identify crack features in input core CT images and output crack segmentation results. The deep learning network model includes a U-Net network. The shrinking path of feature extraction in the U-Net network adopts a feature extraction network based on VGG-16. The upsampling expansion path in the U-Net network adds a CBMA attention module. The CBMA attention module is used to change the model's attention to different spatial locations and channels in the feature map, thereby increasing the weight of the region where the core crack is located. The deep learning network model is trained and its parameters are tuned using the training set until the model converges, thus completing the training. The trained deep learning network model is tested using the test set, and the crack segmentation performance of the deep learning network model is evaluated.
2. The deep learning-based crack segmentation method for core CT images according to claim 1, characterized in that, The expansion of the number of training samples in the training dataset includes: Data augmentation is performed on each core CT slice image in the training dataset to obtain more training data, while the corresponding crack segmentation results are adjusted to match the augmented image data.
3. The deep learning-based crack segmentation method for core CT images according to claim 1, characterized in that, The U-Net network comprises a 9-layer structure consisting of a shrinking path for feature extraction and an expanding path for upsampling. The encoder part for feature extraction includes layers 1 to 5, and the decoder part for upsampling includes layers 6 to 9. The shrinking path for feature extraction in the U-Net network adopts a VGG-16 network with the fully connected layers and output layers removed. The features from the last max pooling layer of the VGG-16 network are directly output to the input of the expansion path part of the U-Net network. Convolutional layers and pooling layers with the same output image resolution are treated as the same layer operation. The upsampling extension path in the U-Net network is as follows: the output of the 4th pooling layer and the output feature map of the 5th layer after the CBMA attention module and upsampling operation are concatenated by channel and used as the input of the 6th layer; The 6th layer performs two convolutions and outputs the convolution result to the CBMA attention module. The feature map output after the upsampling operation is concatenated with the feature map output by the pooling of the 3rd layer by channel and used as the input of the 7th layer. The 7th layer performs two convolutions and outputs the convolution result to the CBMA attention module. The feature map output after the upsampling operation is concatenated with the feature map output by the pooling of the 2nd layer by channel and used as the input of the 8th layer. The 8th layer performs two convolutions and outputs the convolution result to the CBMA attention module. The feature map output after the upsampling operation is concatenated with the feature map output by the pooling of the 1st layer by channel and used as the input of the 9th layer. The 9th layer performs three convolution operations on the input feature map and outputs a segmentation result map with the same resolution as the input image.
4. The deep learning-based crack segmentation method for core CT images according to claim 3, characterized in that, The upsampling extension path in the U-Net network also includes: The output of the CBMA module of the 5th layer is convolved by a 1x1 convolution kernel and upsampled by 4 times, and then fed into the input layer of the 7th layer. It is then stitched together with other input images as the input of the 7th layer. The output of layer 7 via the CBMA module is convolved with a 1x1 convolution kernel and upsampled by 4 times, and then fed into the input layer of layer 9. It is then stitched together with other input images to serve as the input of layer 9.
5. The deep learning-based crack segmentation method for core CT images according to claim 1, characterized in that, Training and tuning the deep learning network model using the training set includes: The deep learning network model is trained using the training set. The model outputs a segmented image with the same resolution as the input image for each input image, and the crack segmentation results of all images in the training set are obtained to complete one training cycle. The obtained crack segmentation results are compared with the manually segmented and labeled results in the training set. The error between the two is calculated using a loss function. Based on the calculated error, the parameter settings of the deep learning network model are adjusted, and the model is retrained using each set of images in the training set. Repeat the above training process until the model parameters converge, and you will obtain a fully trained deep learning network model.
6. The deep learning-based crack segmentation method for core CT images according to claim 1, characterized in that, The metrics for evaluating the crack segmentation performance of the deep learning network model include the Dice coefficient, global accuracy, and recall.
7. The deep learning-based crack segmentation method for core CT images according to claim 1, characterized in that, The CBMA attention module includes a channel attention unit and a spatial attention unit; For a feature map, the channel attention unit constructs two feature information maps through max pooling and average pooling. The result of max pooling is the first feature information map, and the result of average pooling is the second feature information map. The two feature information maps are fed into a multilayer perceptron to generate a channel attention map. For a feature map, the spatial attention unit constructs two feature information maps by max pooling and average pooling along the dimensional direction. Then, the two feature information maps are convolved to obtain a two-dimensional feature map, which represents the attention weights that should be assigned to different positions in the image space. The CBMA attention module first multiplies the input feature map bitwise with the channel attention map, and then multiplies it bitwise with the spatial attention map to output the result.
8. The deep learning-based crack segmentation method for core CT images according to claim 1, characterized in that, Also includes: Input the core CT image to be processed; The deep learning network model, after training and testing, is used to identify crack features in the input core CT image and output crack segmentation results.
9. A deep learning-based crack segmentation device for core CT images, characterized in that, include: The data input module is used to input the core CT images to be processed; The crack segmentation module is used to identify crack features in the input core CT image using the deep learning network model that has been trained and tested, and to output crack segmentation results. The deep learning network model includes a U-Net network. The shrinking path of feature extraction in the U-Net network adopts a feature extraction network based on the VGG-16 network. The upsampling expansion path in the U-Net network adds a CBMA attention module. The CBMA attention module is used to change the model's attention to different spatial locations and channels in the feature map, thereby increasing the weight of the region where the rock core crack is located.
10. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the deep learning-based crack segmentation method for core CT images according to any one of claims 1-8.