Semantic segmentation method, device and equipment of digital core image and medium
Patent Information
- Application Number
- CN202610517854.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-17
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-04-17
AI Technical Summary
[0003]然而,三维数字岩心图像在微观尺度下呈现出复杂的多矿物成分共存、孔隙-矿物边界模糊、类别分布极度不平衡等特性,导致传统的语义分割方法难以满足高精度、高鲁棒性的需求
[0056]The semantic segmentation method, apparatus, device, and medium for digital core images provided in this application not only utilize the image information of each target slice in an image sequence but also stack several adjacent slices in the sequence along the channel dimension to form a multi-channel 2.5D input tensor containing local three-dimensional context information. This tensor is input into a pre-trained encoder-decoder segmentation network. The network extracts depth features from the input through its encoder part, and then fuses and upsamples the features through its decoder part, finally outputting a pixel-level pore-mineral semantic segmentation result for the target slice. By sliding this process to all target slices in the slice sequence and recombining their respective segmentation results in sequence, a unified three-dimensional pore-mineral semantic segmentation result for the complete digital core image can be obtained. This achieves the technical effect of significantly improving the discrimination accuracy of pore-mineral boundaries and the consistency of segmentation results among adjacent slices while maintaining two-dimensional computational efficiency.
Smart Images

Figure CN122454167B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of semantic segmentation technology for digital core images, and in particular to a semantic segmentation method, apparatus, device and medium for digital core images. Background Technology
[0002] As oil and gas exploration delves deeper into unconventional reservoirs (such as shale gas and tight oil), accurate characterization of rock microstructure has become a core requirement for reservoir evaluation and development strategy optimization. FIB-SEM (Focused Ion Beam Scanning Electron Microscopy) technology, through layer-by-layer cutting and high-resolution imaging, can acquire three-dimensional digital core images of rock samples, providing a data foundation for studying pore networks, mineral distribution, and their spatial relationships.
[0003] However, 3D digital core images exhibit complex characteristics at the microscale, such as the coexistence of multiple mineral components, blurred pore-mineral boundaries, and extremely unbalanced category distribution. This makes it difficult for traditional semantic segmentation methods to meet the requirements of high accuracy and robustness. Furthermore, the 3D continuity of digital core images requires segmentation results to maintain spatial consistency between adjacent slices, while existing methods often use independent 2D slices as processing units, making it difficult to effectively model long-range spatial dependencies between slices. Therefore, existing technologies suffer from low accuracy in semantic segmentation of 3D digital core images. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for semantic segmentation of digital core images, in order to improve the accuracy of semantic segmentation of digital core images.
[0005] In a first aspect, embodiments of this application provide a semantic segmentation method for digital core images, including:
[0006] The target slice in the slice sequence of the digital core image, as well as the adjacent slices centered on the target slice, are used to form a multi-channel 2.5D input tensor;
[0007] Based on a pre-trained encoder-decoder network, feature extraction and feature fusion are performed on the multi-channel 2.5D input tensor to obtain pore-mineral semantic segmentation results;
[0008] Based on the pore-mineral semantic segmentation results corresponding to multiple target slices, the pore-mineral semantic segmentation results of the digital core image are obtained.
[0009] In one possible implementation, feature extraction is performed on the multi-channel 2.5D input tensor, including:
[0010] Based on the encoder, the multi-channel 2.5D input tensor is downsampled to obtain downsampling results at multiple levels;
[0011] Based on the multi-scale attention fusion module, each downsampling result is processed to obtain the initial feature extraction result of each downsampling result, until the initial feature extraction result corresponding to the final level downsampling result is obtained, and the initial feature extraction result is determined as the feature extraction result of the target slice.
[0012] In one possible implementation, based on a multi-scale attention fusion module, each downsampling result is processed to obtain an initial feature extraction result for each downsampling result, including:
[0013] Based on the basic mapping unit, feature extraction is performed on the original input features of the target downsampling result to obtain preliminary feature extraction results; wherein, the basic mapping unit is composed of convolution, normalization and nonlinear activation functions;
[0014] The preliminary feature extraction results are weighted in both the channel and spatial dimensions to obtain the weight information of each channel dimension and each pixel in the target downsampling.
[0015] Based on the weight information of each channel dimension and each pixel in the target downsampling, the weighted feature extraction result of the target downsampling is obtained;
[0016] Residual connections are performed between the original input features and the weighted feature extraction results to obtain the initial feature extraction results for target downsampling.
[0017] In one possible implementation, after obtaining the feature extraction results of the target slice, the process includes:
[0018] The feature extraction results of the target slice are subjected to 1×1 convolution, 3×3 convolution, dilated convolution and global pooling operations respectively to obtain 1×1 convolution features, 3×3 convolution features, dilated convolution features and global pooling features respectively;
[0019] The 1×1 convolutional features, 3×3 convolutional features, dilated convolutional features, and global pooling features are fused to obtain the feature extraction result after the target slice is fused.
[0020] In one possible implementation, after obtaining the feature extraction results of the fused target slices, the process includes:
[0021] Based on the decoder, the feature extraction results after the target slice fusion are upsampled to obtain upsampled results at multiple levels.
[0022] Based on the attention gating mechanism, each upsampling result is processed to obtain the initial feature fusion result of each upsampling result, until the initial feature fusion result corresponding to the last level of upsampling results is obtained. The initial feature fusion result is determined as the feature fusion result of the target slice. The attention gating mechanism is used to generate spatial weight coefficients based on the gating signal of the decoder and to selectively weight the skip connection features from the encoder.
[0023] In one possible implementation, a multi-channel 2.5D input tensor is formed from the target slice in the slice sequence of the digital core image, and the adjacent slices centered on the target slice, including:
[0024] When the adjacent slices required for the target slice exceed the valid boundaries of the slice sequence, a virtual slice is generated using a mirror index, and the adjacent slices of the target slice are determined based on the virtual slice.
[0025] In one possible implementation, the process of training the encoder-decoder network includes:
[0026] A composite boundary loss function is used to calculate the pore-mineral semantic segmentation loss. The composite boundary loss function is obtained by weighted summation of the similarity loss function, the focus loss function, and the boundary loss function. Among them, the similarity loss function is used to measure the overlap area between the generated pore-mineral semantic segmentation result and the corresponding digital core, the focus loss function is used to identify the key segmentation regions in the pore-mineral semantic segmentation result, and the boundary loss function is used to optimize the boundary clarity of the pore-mineral semantic segmentation result.
[0027] The parameters of the encoder-decoder network are optimized based on the composite boundary loss to obtain a trained encoder-decoder network.
[0028] Secondly, embodiments of this application provide a semantic segmentation apparatus for digital core images, comprising:
[0029] The first processing module is used to form a multi-channel 2.5D input tensor from the target slice in the slice sequence of the digital core image and the adjacent slices centered on the target slice;
[0030] The second processing module is used to extract and fuse features from the multi-channel 2.5D input tensor based on the pre-trained encoder-decoder network to obtain the pore-mineral semantic segmentation result.
[0031] The third processing module is used to obtain the pore-mineral semantic segmentation results of the digital core image based on the pore-mineral semantic segmentation results corresponding to multiple target slices.
[0032] In one possible implementation, the second processing module is further configured to:
[0033] Based on the encoder, the multi-channel 2.5D input tensor is downsampled to obtain downsampling results at multiple levels;
[0034] Based on the multi-scale attention fusion module, each downsampling result is processed to obtain the initial feature extraction result of each downsampling result, until the initial feature extraction result corresponding to the final level downsampling result is obtained, and the initial feature extraction result is determined as the feature extraction result of the target slice.
[0035] In one possible implementation, the second processing module is further configured to:
[0036] Based on the basic mapping unit, feature extraction is performed on the original input features of the target downsampling result to obtain preliminary feature extraction results; wherein, the basic mapping unit is composed of convolution, normalization and nonlinear activation functions;
[0037] The preliminary feature extraction results are weighted in both the channel and spatial dimensions to obtain the weight information of each channel dimension and each pixel in the target downsampling.
[0038] Based on the weight information of each channel dimension and each pixel in the target downsampling, the weighted feature extraction result of the target downsampling is obtained;
[0039] Residual connections are performed between the original input features and the weighted feature extraction results to obtain the initial feature extraction results for target downsampling.
[0040] In one possible implementation, the second processing module is further configured to:
[0041] The feature extraction results of the target slice are subjected to 1×1 convolution, 3×3 convolution, dilated convolution and global pooling operations respectively to obtain 1×1 convolution features, 3×3 convolution features, dilated convolution features and global pooling features respectively;
[0042] The 1×1 convolutional features, 3×3 convolutional features, dilated convolutional features, and global pooling features are fused to obtain the feature extraction result after the target slice is fused.
[0043] In one possible implementation, the second processing module is further configured to:
[0044] Based on the decoder, the feature extraction results after the target slice fusion are upsampled to obtain upsampled results at multiple levels.
[0045] Based on the attention gating mechanism, each upsampling result is processed to obtain the initial feature fusion result of each upsampling result, until the initial feature fusion result corresponding to the last level of upsampling results is obtained. The initial feature fusion result is determined as the feature fusion result of the target slice. The attention gating mechanism is used to generate spatial weight coefficients based on the gating signal of the decoder and to selectively weight the skip connection features from the encoder.
[0046] In one possible implementation, the first processing module is further configured to:
[0047] When the adjacent slices required for the target slice exceed the valid boundaries of the slice sequence, a virtual slice is generated using a mirror index, and the adjacent slices of the target slice are determined based on the virtual slice.
[0048] In one possible implementation, the third processing module is further configured to:
[0049] A composite boundary loss function is used to calculate the pore-mineral semantic segmentation loss. The composite boundary loss function is obtained by weighted summation of the similarity loss function, the focus loss function, and the boundary loss function. Among them, the similarity loss function is used to measure the overlap area between the generated pore-mineral semantic segmentation result and the corresponding digital core, the focus loss function is used to identify the key segmentation regions in the pore-mineral semantic segmentation result, and the boundary loss function is used to optimize the boundary clarity of the pore-mineral semantic segmentation result.
[0050] The parameters of the encoder-decoder network are optimized based on the composite boundary loss to obtain a trained encoder-decoder network.
[0051] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0052] The memory stores computer-executed instructions;
[0053] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0054] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0055] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0056] The semantic segmentation method, apparatus, device, and medium for digital core images provided in this application not only utilize the image information of each target slice in an image sequence but also stack several adjacent slices in the sequence along the channel dimension to form a multi-channel 2.5D input tensor containing local three-dimensional context information. This tensor is input into a pre-trained encoder-decoder segmentation network. The network extracts depth features from the input through its encoder part, and then fuses and upsamples the features through its decoder part, finally outputting a pixel-level pore-mineral semantic segmentation result for the target slice. By sliding this process to all target slices in the slice sequence and recombining their respective segmentation results in sequence, a unified three-dimensional pore-mineral semantic segmentation result for the complete digital core image can be obtained. This achieves the technical effect of significantly improving the discrimination accuracy of pore-mineral boundaries and the consistency of segmentation results among adjacent slices while maintaining two-dimensional computational efficiency. Attached Figure Description
[0057] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0058] Figure 1 Flowchart of the semantic segmentation method for digital core images provided in this application Figure 1 ;
[0059] Figure 2 Flowchart of the semantic segmentation method for digital core images provided in this application Figure 2 ;
[0060] Figure 3 An architecture diagram of the encoder-decoder network for the semantic segmentation method of digital core images provided in this application;
[0061] Figure 4 A schematic diagram of the multi-scale attention fusion module structure for the semantic segmentation method of digital core images provided in this application;
[0062] Figure 5 A schematic diagram illustrating the fusion of the semantic segmentation method for digital core images provided in this application;
[0063] Figure 6 A schematic diagram of the attention gating mechanism of the semantic segmentation method for digital core images provided in this application;
[0064] Figure 7 A schematic diagram of the segmentation effect of the semantic segmentation method for digital core images provided in this application. Figure 1 ;
[0065] Figure 8 A schematic diagram of the segmentation effect of the semantic segmentation method for digital core images provided in this application. Figure 2 ;
[0066] Figure 9 A schematic diagram of the semantic segmentation device for the digital core image provided in this application;
[0067] Figure 10 A hardware schematic diagram of the semantic segmentation device for digital core images provided in this application.
[0068] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0069] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods and approaches consistent with some aspects of this application as detailed in the appended claims.
[0070] FIB-SEM (Focused Ion Beam Scanning Electron Microscopy) technology, through layer-by-layer segmentation and high-resolution imaging, can acquire three-dimensional digital core images of rock samples, providing a valuable data foundation for studying pore networks, mineral distribution, and their spatial relationships. Accurate semantic segmentation of pores and minerals is a crucial prerequisite for subsequent quantitative analyses such as permeability prediction and fluid simulation. However, existing segmentation techniques still have significant limitations in dealing with the complex microscopic characteristics of digital core images, resulting in segmentation accuracy that fails to meet the high requirements of practical applications.
[0071] However, semantic segmentation of FIB-SEM images faces the following challenges:
[0072] 1. Boundary Ambiguity Problem: At the micro- and nano-scale, the physical boundaries between pores and mineral particles, as well as between different mineral phases, often exhibit continuous gray-scale transitions, accompanied by significant partial volume effects, leading to unclear boundaries. Traditional threshold- or rule-based segmentation methods are prone to over-segmentation or under-segmentation in such regions, making it difficult to obtain stable and reliable segmentation results.
[0073] 2. Class imbalance problem: The volume fraction of different mineral phases in digital cores varies significantly. Some key minerals (such as clay minerals and heavy minerals) account for only a very low proportion in the image, causing a serious class imbalance problem. This makes the segmentation model prone to bias towards the background or dominant mineral class during training, making it difficult to effectively identify rare mineral phases.
[0074] 3. Microstructural complexity: Rock microstructure exhibits significant multi-scale complexity. Mineral grains and pore structures have a large scale span, irregular shapes, and rich texture variations. Single-scale or fixed-morphology assumptions are insufficient to fully characterize such complex structures.
[0075] To address the aforementioned issues, traditional image processing methods based on thresholding, edge detection, or region growing are insufficient for high-precision segmentation, while segmentation schemes relying on specialized instruments or manual intervention suffer from high costs and poor versatility. In recent years, encoder-decoder convolutional neural networks, represented by U-Net, have achieved widespread success in medical image segmentation, and their variants have also been introduced into mineral image analysis. However, when processing highly complex FIB-SEM digital core images, existing U-Net and its improved methods still exhibit significant limitations.
[0076] On the one hand, U-Net primarily relies on local convolution operators for feature extraction, resulting in a limited receptive field and difficulty in effectively modeling the long-range spatial dependencies commonly found in digital core samples, such as the correlation between pore morphology and the distribution of distant mineral grains. On the other hand, its skip connections typically employ fixed, isotropic feature cascading or addition, failing to distinguish the varying importance of features at different levels and spatial locations to the segmentation results. This can easily introduce redundant noise in regions with blurred boundaries, weakening boundary discrimination capabilities. Furthermore, most U-Net variants use two-dimensional slices as the basic processing unit, ignoring the essential characteristic of digital core samples as three-dimensional continuum data. Independently processing slices can easily lead to inconsistent segmentation results between adjacent slices, disrupting the continuity of the three-dimensional structure.
[0077] To overcome the limitation of local receptive fields in convolutional neural networks, Vision Transformer (ViT) and its variants achieve global context modeling through a self-attention mechanism, theoretically possessing stronger long-range dependency modeling capabilities. However, ViT-like models typically have high computational complexity and are heavily reliant on large-scale labeled data. The high cost and limited sample size of FIB-SEM digital core image acquisition and fine annotation make it difficult for these models to fully leverage their advantages in practical core segmentation tasks. Furthermore, patch-based block processing methods easily disrupt the integrity of pores and mineral boundaries and introduce additional artifacts at block edges.
[0078] Meanwhile, existing methods mostly employ cross-entropy loss, Dice loss, or simple combinations thereof, failing to provide in-depth customization for the characteristics of mineral segmentation, such as blurred boundaries and extreme class imbalance, making it difficult to achieve synergistic optimization among regional consistency, class balance, and boundary accuracy. Although some studies have attempted to introduce spatial context information through 2.5D slice stacking or 3D convolutional networks, they still generally face engineering problems such as high computational cost, parameter expansion, and lack of boundary slice context.
[0079] In summary, existing technologies suffer from low accuracy in semantic segmentation of 3D digital core images. There is a lack of a FIB-SEM digital core semantic segmentation solution that can simultaneously possess multi-scale adaptive feature modeling capabilities, effectively utilize 3D continuous context information, balance boundary accuracy and class balance, and achieve a reasonable balance between computational complexity and training stability.
[0080] This application aims to address the core contradiction in existing digital core semantic segmentation methods: inaccurate boundary discrimination and poor spatial continuity of results due to the neglect of 3D context in 2D models, while 3D models are computationally expensive and impractical. The overall solution proposed in this application abandons the dualistic strategy of independent 2D processing and complete 3D modeling, and instead designs a compromise and innovative path of local 3D perception and global 2D interconnection. This introduces key 3D neighborhood information at the model input with minimal computational cost, thereby significantly improving the ability to distinguish fuzzy boundaries and the consistency of results between slices without excessively increasing complexity.
[0081] The specific technical implementation is as follows: First, in the data preparation stage, considering the three-dimensional continuity of digital core images, this invention employs a 2.5D sliding window sampling strategy. For each target slice in the sequence, it is not treated as an isolated two-dimensional image, but rather as a whole with several slices immediately preceding and following it in the depth direction. This thin layer of data containing continuous information is stacked in the channel dimension to construct a multi-channel 2.5D input tensor. This operation is the physical embodiment of the technical approach; its core lies in the fact that the input it provides to subsequent processing units already contains information on the local morphological evolution of the target region in the third-dimensional direction. For example, a blurred spot on the current slice can be more easily determined as a cross-section of a small pore or an isolated noise point by observing whether it continues, expands, or disappears on adjacent slices.
[0082] Secondly, at the model design level, this application inputs the aforementioned 2.5D tensor rich in contextual information into a specially designed and trained encoder-decoder neural network for processing. This network is the core of the entire invention; its encoder part is responsible for deep feature extraction from this multi-channel input. Through convolution and downsampling operations, the network can learn and fuse joint features from the central slice and its context slices at multiple scales, thereby constructing a more robust and discriminative feature representation of pores, minerals, and their boundaries.
[0083] The decoder is responsible for progressively upsampling and refining these high-level, abstract features to restore the spatial resolution of the original input, ultimately outputting a pixel-level pore-mineral semantic segmentation map for the current target slice. The entire network is trained end-to-end, with the optimization goal of ensuring that the output segmentation map is not only accurate on the current slice but also more reliable in identifying blurred regions by utilizing neighborhood information.
[0084] Finally, at the result synthesis level, through the aforementioned processing of individual target slices, a sliding window approach is used to traverse every slice (or select slices as needed) in the entire digital core image sequence. For each slice in the sequence, it has one opportunity to be used as a target slice, assisted by its neighboring slices, and accurately segmented by the network. Ultimately, all independently generated 2D segmentation results, each utilizing its own 3D context, are re-stacked according to their original spatial order to obtain a complete and high-precision 3D digital core pore-mineral semantic segmentation result. This approach ensures that the final 3D result is macroscopically composed of a series of locally optimal and spatially coordinated 2D results, thus achieving a balance between high precision and 3D consistency overall.
[0085] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0086] Figure 1 Flowchart of the semantic segmentation method for digital core images provided in this application Figure 1 ,like Figure 1 As shown, the method includes:
[0087] S101. The target slice in the slice sequence of the digital core image, as well as the adjacent slices centered on the target slice, are used to form a multi-channel 2.5D input tensor.
[0088] In this embodiment, a sequence of digital core slice images acquired by a FIB-SEM device is used. For each target slice to be analyzed in the sequence, a fixed number of adjacent slices are selected forward and backward in the slice sequence, centered on the target slice. These consecutive slices are then stacked in the channel dimension to form a 2.5D input sample. Simultaneously, the 2.5D input sample undergoes intensity normalization, noise suppression, and data enhancement processing such as random flipping and rotation to reduce the impact of imaging noise and improve the model's generalization ability. Furthermore, the target slice and its adjacent slices are stacked in the channel dimension to form a multi-channel 2.5D input tensor with C×(2n+1) input channels, where C is the number of channels in the original slice. This introduces local three-dimensional structural context information while maintaining two-dimensional computational complexity.
[0089] S102. Based on the pre-trained encoder-decoder network, feature extraction and feature fusion are performed on the multi-channel 2.5D input tensor to obtain the pore-mineral semantic segmentation result.
[0090] In this embodiment, the pre-trained encoder-decoder network first extracts deep features from the multi-channel 2.5D input tensor through the encoder part. The encoder consists of multiple layers of convolution and downsampling, which can progressively abstract and refine multi-scale features from low-level texture to high-level semantics from the composite information of the input. In particular, it learns how to utilize the correlation between information between different slices to enhance the discrimination of pore edges and mineral textures. Subsequently, the decoder part of the network starts working. Through upsampling and feature fusion operations, it gradually restores the abstract features extracted by the encoder to the spatial resolution of the original input, and finally outputs the probability of each pixel belonging to each category (such as pores, quartz, clay, etc.), thereby generating a pixel-level pore-mineral semantic segmentation result map for the current target slice.
[0091] S103. Based on the pore-mineral semantic segmentation results corresponding to multiple target slices, obtain the pore-mineral semantic segmentation results of the digital core image.
[0092] In this embodiment, step S102 is applied automatically and in batches to the entire digital core image sequence. Specifically, using a sliding window approach, each slice in the sequence is sequentially used as a target slice, and steps S101 and S102 are repeated. Each processing step outputs a high-quality semantic segmentation result image centered on that slice. Finally, all the generated segmentation result images corresponding to different target slices are precisely aligned and re-stacked according to their spatial order in the original 3D core image, thereby assembling a complete and coherent 3D data volume, namely the pore-mineral semantic segmentation result of the digital core image.
[0093] The semantic segmentation method for digital core images provided in this application employs a multi-channel 2.5D input tensor. This not only preserves all two-dimensional information of the target slice but also embeds a limited but crucial third-dimensional spatial context at the data input end by introducing its neighboring slices. This allows the subsequent encoder-decoder network to perceive the continuity and variation trend of pores or mineral structures along the slice sequence direction at the initial stage of feature extraction. This provides a crucial basis for distinguishing image noise from real structures and determining the affiliation of blurred boundaries. The pre-trained network model's encoder part extracts multi-level feature representations from complex 2.5D input, ranging from local texture to global semantics, through multi-layer convolution and downsampling. The decoder part, through upsampling and feature fusion, gradually restores these abstract features into pixel-level category prediction maps with the same resolution as the input, accurately labeling each pixel as belonging to a pore or a specific mineral. This method ensures the spatial consistency of the three-dimensional segmentation results while achieving an excellent balance between computational efficiency and accuracy, thus improving the accuracy of semantic segmentation of three-dimensional digital core images.
[0094] Figure 2 Flowchart of the semantic segmentation method for digital core images provided in this application Figure 2 ,like Figure 2 As shown, in this embodiment... Figure 1 Based on the examples, a semantic segmentation method for digital core images is described in detail. This method includes:
[0095] S201. Based on the encoder, the multi-channel 2.5D input tensor is downsampled to obtain downsampling results at multiple levels.
[0096] In this embodiment, the encoder uses a multi-level hierarchical downsampling method to gradually reduce spatial resolution and improve semantic abstraction capabilities. Figure 3 This diagram illustrates the encoder-decoder network architecture for the semantic segmentation method of digital core images provided in this application. Based on this encoder-decoder architecture, it includes a four-level downsampling encoder, a bottleneck layer, and a four-level upsampling decoder. Each level of the encoder employs a MAF-Block (Multi-scale Attention Fusion Block), which integrates improved dual convolutional blocks, enhanced CBAM attention, and residual connections. MSFF multi-scale feature fusion is used in the bottleneck layer for the decoder. Each level of the decoder employs an upsampling MAF-Block module, which includes an attention-gated skip connection mechanism and the MAF-Block.
[0097] S202. Based on the basic mapping unit, feature extraction is performed on the original input features of the target downsampling result to obtain preliminary feature extraction results; weights are calculated for the channel dimension and spatial dimension of the preliminary feature extraction results to obtain the weight information of each channel dimension and each pixel in the target downsampling; based on the weight information of each channel dimension and each pixel in the target downsampling, the weighted feature extraction result of the target downsampling is obtained; residual connection is performed on the original input features and the weighted feature extraction result to obtain the initial feature extraction result of the target downsampling.
[0098] In this embodiment, the basic mapping unit is constructed based on convolution, normalization, and nonlinear activation functions.
[0099] Figure 4 This is a schematic diagram of the multi-scale attention fusion module structure for the semantic segmentation method of digital core images provided in this application. Based on the basic mapping unit in the multi-scale attention fusion module, the target downsampling result F is processed. in (C×H×W) and perform preliminary feature transformation on it. The specific process includes performing a 3×3 convolution, batch normalization and ReLU activation function on the input features, followed by another 3×3 convolution and batch normalization, so as to extract the preliminary feature extraction results containing multi-scale information.
[0100] A dual-path attention mechanism is executed in parallel, which calculates the weights of the channel dimension and spatial dimension of the initial feature extraction results respectively: one path compresses spatial information through average pooling, restores the number of channels through two fully connected layers, and then activates through Sigmoid to output the weight information of each channel dimension; the other path fuses spatial features by concatenating max pooling and average pooling, and then activates through Sigmoid after 7×7 convolution and batch normalization to output the spatial weight information of each pixel.
[0101] Subsequently, the channel weights and spatial weights are multiplied element-wise to achieve double weighting of the initial feature extraction results, thereby highlighting the feature responses of key channels and important spatial regions. Finally, the multi-scale attention fusion module performs residual concatenation (i.e., element-wise addition) between the weighted feature extraction results and the original input features of the target downsampling results to alleviate gradient vanishing and preserve original information. The final initial feature extraction result F is then output through the ReLU activation function. out This completes the feature enhancement process of a basic mapping unit.
[0102] In one possible implementation, upon obtaining the initial feature extraction results, residual connections are performed based on convolution, normalization, and nonlinear activation functions according to the following formula:
[0103]
[0104] Where F(x) is a two-layer 3×3 convolution mapping; when the input and output channels are inconsistent, W 1×1 Channel projection is implemented using 1×1 convolution; when the number of channels is consistent, the residual is an identity mapping.
[0105] Channel attention is constructed using the following formula to obtain the weight information for each channel dimension in the target downsampling:
[0106]
[0107] Where AvgPool(x) represents global average pooling; W1 and W2 are 1×1 convolutions; 𝛿(∙) is the ReLU activation function; and 𝜎(∙) is the Sigmoid function.
[0108] S203. Continue until the initial feature extraction result corresponding to the downsampling result of the last level is obtained, and then determine the initial feature extraction result as the feature extraction result of the target slice.
[0109] In this embodiment, feature extraction is performed step by step for each downsampling, and the initial feature extraction result of the last level is determined as the feature extraction result of the target slice after the last level.
[0110] S204. Perform 1×1 convolution, 3×3 convolution, dilated convolution and global pooling operations on the feature extraction results of the target slice to obtain 1×1 convolution features, 3×3 convolution features, dilated convolution features and global pooling features respectively; fuse the 1×1 convolution features, 3×3 convolution features, dilated convolution features and global pooling features to obtain the feature extraction results of the target slice after fusion.
[0111] In this embodiment, Figure 5 A schematic diagram illustrating the semantic segmentation method for digital core images provided in this application, as shown below. Figure 5 As shown, the feature extraction result F of the target slice inThe input F (C×H×W) is fed in parallel into four convolutional branches with different structures. Branch 1 uses a 1×1 convolution to capture local features, compressing the number of channels from C to C / 4. This is used to capture fine-grained local features, while batch normalization and ReLU activation enhance non-linear expressiveness. The output channel count is also C / 4, used to extract texture and edge information within a moderate receptive field. The third branch uses a 3×3 dilated convolution with a dilation rate of 2, also with C / 4 channels, expanding the receptive field without significantly increasing the number of parameters, thus capturing a broader contextual structure. The fourth branch first compresses the spatial dimension through global average pooling, then adjusts the number of channels through a 1×1 convolution, and finally restores the original spatial size through upsampling, used to extract global contextual information from the entire slice. The outputs of the four branches are concatenated along the channel dimension to form a preliminary aggregation of multi-scale feature fusion. Then, a 1×1 convolution is used for channel compression and feature recalibration, and residual connections are introduced to convert the original input F... in The fused feature map is added to the merged feature map to maintain information flow and mitigate gradient decay. Finally, the merged feature map is output after passing through the ReLU activation function, denoted as F. out_msff This refers to the feature extraction result after the target slices are fused. This result combines local finesse, mid-level structure awareness, and global context understanding, providing richer feature support for subsequent semantic segmentation.
[0112] Alternatively, the outputs of the four branches can be concatenated along the channel dimension and then fused using a 1×1 convolution according to the following formula:
[0113]
[0114] Where: Y represents the feature map output after concatenation and convolution of multi-branch features; X represents the input feature map; This indicates that the first branch of feature extraction is performed on the input feature map; This indicates that a second-branch feature extraction is performed on the input feature map; This indicates that the third branch feature extraction is performed on the input feature map; GAP(X) indicates that the input feature map is subjected to global and average pooling 1×1 convolution, batch normalization and ReLU activation; Up indicates upsampling operation; Concat indicates that the output features of each branch are concatenated in the channel dimension. This indicates that the concatenated feature map is subjected to 1×1 convolution and batch normalization.
[0115] S205. Based on the decoder, the feature extraction results after the target slice is fused are upsampled to obtain upsampled results at multiple levels. Based on the attention gating mechanism, each upsampled result is processed to obtain the initial feature fusion result of each upsampled result until the initial feature fusion result corresponding to the last level of upsampled result is obtained. The initial feature fusion result is then determined as the feature fusion result of the target slice.
[0116] In this embodiment, the attention gating mechanism is used to generate spatial weight coefficients based on the gating signal of the decoder, and to selectively weight the skip connection features from the encoder. Figure 6 This diagram illustrates the attention gating mechanism of the semantic segmentation method for digital core images provided in this application. The implementation of the attention gating mechanism begins with the decoder performing multi-level upsampling on the feature extraction results after the target slice fusion. The upsampling results at each level are input to the attention gating module along with the skip connection features from the encoder to achieve cross-level feature selection and fusion. Specifically, this mechanism receives two inputs: a gating signal g from the decoder and skip connection features x from the encoder. First, 1×1 convolution and batch normalization are performed on the gating signal g and the skip connection features x, respectively.
[0117]
[0118] Furthermore, attention weights are generated based on the obtained g' and x':
[0119]
[0120] Where ReLU represents the ReLU activation function; The mapping operation for generating attention weights specifically includes a 1×1 convolution that reduces the number of channels to 1 and batch normalization. This represents the Sigmoid activation function.
[0121] This attention weight map reflects the importance distribution of each spatial location to the current decoding layer. After upsampling the attention weight map to the same spatial size as x, it is multiplied element-wise with the original skip connection feature x to achieve dual channel and spatial weighting, generating the attention-weighted feature X. attended Subsequently, the upsampled decoder features and X attended The features are spliced along the channel dimension to form a fused feature, which is then input into the MAF-block for further feature refinement.
[0122] This process is repeated at each level of the decoder until the upsampling result of the highest level completes attention weighting and fusion. The final output of the initial feature fusion result is then determined as the final feature fusion result of the target slice. The core function of the attention gating mechanism is to dynamically generate spatial weights through the decoder's gating signal, selectively enhancing or suppressing skip connection features in the encoder, thereby focusing on the truly critical regions in semantic segmentation. This effectively solves the problems of information loss in deep networks and feature redundancy in shallow layers, significantly improving the segmentation accuracy of pores and mineral boundaries in digital core images.
[0123] In one possible implementation, when the adjacent slices required by the target slice exceed the valid boundaries of the slice sequence, a virtual slice is generated using a mirror index, and the adjacent slices of the target slice are determined based on the virtual slice.
[0124] When the required slice sequence exceeds the valid boundary, a virtual slice is generated using a mirror index:
[0125]
[0126] Among them, slice idx±n The n adjacent slices required for the target slice, where n is the number of adjacent slices of the target slice; slice idx is the target slice; N is the total number of slices in the slice sequence.
[0127] One possible implementation includes the following during the training of the encoder-decoder network:
[0128] A composite boundary loss function is used to calculate the pore-mineral semantic segmentation loss. The composite boundary loss function is obtained by weighted summation of the similarity loss function, the focus loss function, and the boundary loss function. Among them, the similarity loss function is used to measure the overlap area between the generated pore-mineral semantic segmentation result and the corresponding digital core, the focus loss function is used to identify the key segmentation regions in the pore-mineral semantic segmentation result, and the boundary loss function is used to optimize the boundary sharpness of the pore-mineral semantic segmentation result. The parameters of the encoder-decoder network are optimized based on the composite boundary loss to obtain the trained encoder-decoder network.
[0129] The similarity loss function can be determined according to the following formula:
[0130]
[0131] Where p represents the probability value of the network model predicting the sample pixel as the target category; y represents the true label value corresponding to the sample pixel; This represents a smoothing constant, used to prevent the denominator from being zero during calculation.
[0132] The focus loss function can be determined according to the following formula:
[0133]
[0134] in, This represents the probability that the network model predicts the true class of the sample. This represents the focusing parameter, used to control the degree of weight decay for easily classified samples; This represents the standard cross-entropy loss value.
[0135] The boundary loss function can be determined according to the following formula:
[0136]
[0137] in, represents the cross-entropy loss calculated between the predicted probability p and the true label y for a pixel; B represents the boundary indicator mask.
[0138] The composite boundary loss function can be obtained from the following formula:
[0139]
[0140] Where L is the composite boundary loss function; α is the weight of the similarity loss function; β is the weight of the focus loss function; and γ is the weight of the boundary loss function.
[0141] Figure 7 A schematic diagram of the segmentation effect of the semantic segmentation method for digital core images provided in this application. Figure 1 ,Depend on Figure 7 As shown, where Figure 7 (a) is the original digital core. Figure 7 (b) shows the instrument's segmentation effect. Figure 7 (c) The segmentation effect of the semantic segmentation method provided in this application, from... Figure 7 As can be seen, there is no significant difference between the semantic segmentation method and the instrument segmentation effect of the digital core images provided in this application, and it performs well in terms of preserving slender pores, distinguishing mineral boundaries, and noise robustness.
[0142] Table 1 shows the semantic segmentation results of different semantic segmentation models for digital core images:
[0143] Table 1: Comparison of different semantic segmentation model metrics
[0144]
[0145] Among them, Dice (Dice Similarity Coefficient) is used to measure the degree of overlap between the predicted segmented region and the real labeled region; mIoU (mean Intersection over Union) is used to calculate the intersection of the predicted region and the real region divided by the union of the two (i.e., IoU) for each category (such as porosity, different mineral types), and then take the average for all categories; mPA (mean Pixel Accuracy) is used to calculate the number of pixels correctly predicted in this category divided by the total number of real pixels in this category for each category, and then take the average for all categories.
[0146] By employing different semantic segmentation models to perform semantic segmentation on digital core samples, semantic segmentation results were obtained. Based on the semantic segmentation results of each model and the original digital core samples, three metrics—Dice, mIoU, and mPA—were calculated. Table 1 shows that the encoder-decoder network provided in this application, namely DcMAF-Net, possesses comprehensive and significant performance advantages. Specifically, the Dice coefficient is 95.97%; mIoU is 91.28%; and mPA is 95.36%, all higher than other semantic segmentation models.
[0147] Figure 8 A schematic diagram of the segmentation effect of the semantic segmentation method for digital core images provided in this application. Figure 2 , Figure 8 (a) shows the instrument's segmentation effect; Figure 8 (b) The segmentation effect of the semantic segmentation method provided in this application. Figure 8 (c) shows the segmentation results of the unet semantic segmentation model; Figure 8 (d) shows the segmentation results of the unet++ semantic segmentation model. Figure 8 As can be seen, compared with other semantic segmentation models, the segmentation effect of the DcMAF-Net encoder-decoder network provided in this application (see black diagram) exhibits two prominent features: better detail integrity and higher boundary accuracy.
[0148] Optionally, the DcMAF-Net encoder-decoder network provided in this application includes three important components: a multi-channel 2.5D input tensor, a multi-scale attention fusion module, and a composite boundary loss function. To verify the importance of these three components to the DcMAF-Net encoder-decoder network in the semantic segmentation method for digital core images provided in this application, the core components are gradually removed through ablation to verify the performance contribution of each component to the DcMAF-Net encoder-decoder network.
[0149] Table 2 is a comparison table of ablation experiments:
[0150] Table 2: Comparison of Ablation Experiments
[0151]
[0152] The digital core samples were semantically segmented using a complete DcMAF-Net encoder-decoder network. The semantic segmentation results were then compared with the original digital core samples to obtain the mIoU and mPA indices. Further, the composite boundary loss function, the multi-scale attention fusion module, and the multi-scale attention fusion module were ablated, as were the multi-channel 2.5D input tensor, the multi-scale attention fusion module, and the composite boundary loss function. Based on the ablated DcMAF-Net encoder-decoder network, the digital core samples were semantically segmented again, yielding corresponding semantic segmentation results. These results were then compared with the original digital core samples to obtain the corresponding mIoU and mPA indices.
[0153] As shown in Table 2, the complete DcMAF-Net encoder-decoder network achieves the best results in both mIoU and mPA (91.28% and 95.36%, respectively). When multi-channel 2.5D input tensors are not used to input the encoder-decoder network, and multi-scale attention fusion module and composite boundary loss function are not used, the mIoU performance drops significantly to 90.06%. Only by restoring the multi-scale attention fusion module and composite boundary loss function can the mIoU be improved by 1.05 percentage points, indicating that the multi-slice context information contributes the most significantly.
[0154] Furthermore, the multi-scale attention fusion module and the composite boundary loss function exhibit a clear synergistic enhancement effect: the performance degradation caused by removing both simultaneously (mIoU 91.11%) exceeds that caused by removing either component alone, indicating that multi-scale feature extraction and attention-guided feature fusion mutually promote each other and jointly optimize the detail segmentation capability. In summary, the multi-channel 2.5D input tensor, the multi-scale attention fusion module, and the composite boundary loss function each play a unique role and are indispensable. Their effective integration enables the DcMAF-Net encoder-decoder network to achieve the optimal performance balance.
[0155] Figure 9 A schematic diagram of the semantic segmentation device for digital core images provided in this application is shown below. Figure 9 As shown, the semantic segmentation device 90 for digital core images provided in this embodiment includes:
[0156] The first processing module 901 is used to form a multi-channel 2.5D input tensor from the target slice in the slice sequence of the digital core image and the adjacent slices centered on the target slice;
[0157] The second processing module 902 is used to perform feature extraction and feature fusion on the multi-channel 2.5D input tensor based on the pre-trained encoder-decoder network to obtain the pore-mineral semantic segmentation result;
[0158] The third processing module 903 is used to obtain the pore-mineral semantic segmentation results of the digital core image based on the pore-mineral semantic segmentation results corresponding to multiple target slices.
[0159] In one possible implementation, the second processing module 902 is further configured to:
[0160] Based on the encoder, the multi-channel 2.5D input tensor is downsampled to obtain downsampling results at multiple levels;
[0161] Based on the multi-scale attention fusion module, each downsampling result is processed to obtain the initial feature extraction result of each downsampling result, until the initial feature extraction result corresponding to the final level downsampling result is obtained, and the initial feature extraction result is determined as the feature extraction result of the target slice.
[0162] In one possible implementation, the second processing module 902 is further configured to:
[0163] Based on the basic mapping unit, feature extraction is performed on the original input features of the target downsampling result to obtain preliminary feature extraction results; wherein, the basic mapping unit is composed of convolution, normalization and nonlinear activation functions;
[0164] The preliminary feature extraction results are weighted in both the channel and spatial dimensions to obtain the weight information of each channel dimension and each pixel in the target downsampling.
[0165] Based on the weight information of each channel dimension and each pixel in the target downsampling, the weighted feature extraction result of the target downsampling is obtained;
[0166] Residual connections are performed between the original input features and the weighted feature extraction results to obtain the initial feature extraction results for target downsampling.
[0167] In one possible implementation, the second processing module 902 is further configured to:
[0168] The feature extraction results of the target slice are subjected to 1×1 convolution, 3×3 convolution, dilated convolution and global pooling operations respectively to obtain 1×1 convolution features, 3×3 convolution features, dilated convolution features and global pooling features respectively;
[0169] The 1×1 convolutional features, 3×3 convolutional features, dilated convolutional features, and global pooling features are fused to obtain the feature extraction result after the target slice is fused.
[0170] In one possible implementation, the second processing module 902 is further configured to:
[0171] Based on the decoder, the feature extraction results after the target slice fusion are upsampled to obtain upsampled results at multiple levels.
[0172] Based on the attention gating mechanism, each upsampling result is processed to obtain the initial feature fusion result of each upsampling result, until the initial feature fusion result corresponding to the last level of upsampling results is obtained. The initial feature fusion result is determined as the feature fusion result of the target slice. The attention gating mechanism is used to generate spatial weight coefficients based on the gating signal of the decoder and to selectively weight the skip connection features from the encoder.
[0173] In one possible implementation, the first processing module 901 is further configured to:
[0174] When the adjacent slices required for the target slice exceed the valid boundaries of the slice sequence, a virtual slice is generated using a mirror index, and the adjacent slices of the target slice are determined based on the virtual slice.
[0175] In one possible implementation, the third processing module 903 is further configured to:
[0176] A composite boundary loss function is used to calculate the pore-mineral semantic segmentation loss. The composite boundary loss function is obtained by weighted summation of the similarity loss function, the focus loss function, and the boundary loss function. Among them, the similarity loss function is used to measure the overlap area between the generated pore-mineral semantic segmentation result and the corresponding digital core, the focus loss function is used to identify the key segmentation regions in the pore-mineral semantic segmentation result, and the boundary loss function is used to optimize the boundary clarity of the pore-mineral semantic segmentation result.
[0177] The parameters of the encoder-decoder network are optimized based on the composite boundary loss to obtain a trained encoder-decoder network.
[0178] The semantic segmentation device for digital core images provided in this embodiment can execute the method provided in the above-described method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0179] Figure 10 A hardware schematic diagram of the semantic segmentation device for digital core images provided in this application. (See attached diagram.) Figure 10As shown, the electronic device 100 provided in this embodiment includes at least one processor 1001 and a memory 1002. Optionally, the device 100 further includes a communication component 1003. The processor 1001, memory 1002, and communication component 1003 are connected via a bus 1004.
[0180] In a specific implementation, at least one processor 1001 executes computer execution instructions stored in memory 1002, causing at least one processor 1001 to perform the above-described method.
[0181] The specific implementation process of processor 1001 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0182] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0183] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0184] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0185] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0186] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0187] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0188] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0189] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, methods, or units, and may be electrical, mechanical, or other forms.
[0190] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0191] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0192] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0193] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0194] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A semantic segmentation method for digital core images, characterized in that, include: The target slice in the slice sequence of the digital core image, and the adjacent slices centered on the target slice, are used to form a multi-channel 2.5D input tensor; Based on the pre-trained encoder-decoder network, the multi-channel 2.5D input tensor is downsampled according to the encoder to obtain downsampling results at multiple levels. Based on the multi-scale attention fusion module, each downsampling result is processed to obtain the initial feature extraction result of each downsampling result, until the initial feature extraction result corresponding to the last level downsampling result is obtained, and the initial feature extraction result is determined as the feature extraction result of the target slice; The feature extraction results of the target slice are subjected to 1×1 convolution, 3×3 convolution, dilated convolution, and global pooling operations to obtain 1×1 convolution features, 3×3 convolution features, dilated convolution features, and global pooling features, respectively. The 1×1 convolution features, the 3×3 convolution features, the dilated convolution features, and the global pooling features are then fused to obtain the fused feature extraction results of the target slice. According to the decoder, the feature extraction results after the target slice fusion are upsampled to obtain upsampled results at multiple levels. Based on the attention gating mechanism, each upsampling result is processed to obtain the initial feature fusion result of each upsampling result, until the initial feature fusion result corresponding to the last level upsampling result is obtained, and the initial feature fusion result is determined as the feature fusion result of the target slice; wherein, the attention gating mechanism is used to generate spatial weight coefficients according to the gating signal of the decoder, and selectively weight the skip connection features from the encoder; Based on the feature extraction results after the target slice is fused and the feature fusion results of the target slice, the pore-mineral semantic segmentation results are obtained; Based on the pore-mineral semantic segmentation results corresponding to multiple target slices, the pore-mineral semantic segmentation results of the digital core image are obtained.
2. The method according to claim 1, characterized in that, The multi-scale attention fusion module processes each downsampling result to obtain an initial feature extraction result for each downsampling result, including: Based on the basic mapping unit, feature extraction is performed on the original input features of the target downsampling result to obtain preliminary feature extraction results; wherein, the basic mapping unit is composed of convolution, normalization and nonlinear activation functions; The preliminary feature extraction results are weighted in terms of channel dimension and spatial dimension to obtain the weight information of each channel dimension and the weight information of each pixel in the target downsampling. Based on the weight information of each channel dimension and the weight information of each pixel in the target downsampling, the weighted feature extraction result of the target downsampling is obtained; The original input features and the weighted feature extraction results are joined by a residual connection to obtain the initial feature extraction result of the target downsampling.
3. The method according to claim 1, characterized in that, The step of forming a multi-channel 2.5D input tensor from the target slice in the slice sequence of the digital core image, and the adjacent slices centered on the target slice, includes: When the adjacent slices required for the target slice exceed the valid boundary of the slice sequence, a virtual slice is generated using a mirror index, and the adjacent slices of the target slice are determined based on the virtual slice.
4. The method according to any one of claims 1-3, characterized in that, The training of the encoder-decoder network includes: A composite boundary loss function is used to calculate the pore-mineral semantic segmentation loss. The composite boundary loss function is obtained by weighted summation of the similarity loss function, the focus loss function, and the boundary loss function. The similarity loss function is used to measure the overlap area between the generated pore-mineral semantic segmentation result and the corresponding digital core. The focus loss function is used to identify key segmentation regions in the pore-mineral semantic segmentation result. The boundary loss function is used to optimize the boundary clarity of the pore-mineral semantic segmentation result. The parameters of the encoder-decoder network are optimized based on the composite boundary loss to obtain the trained encoder-decoder network.
5. A semantic segmentation device for digital core images, characterized in that, include: The first processing module is used to form a multi-channel 2.5D input tensor from the target slice in the slice sequence of the digital core image and the adjacent slices centered on the target slice; The second processing module is used to perform downsampling processing on the multi-channel 2.5D input tensor based on the encoder in the pre-trained encoder-decoder network to obtain downsampling results at multiple levels. Based on the multi-scale attention fusion module, each downsampling result is processed to obtain the initial feature extraction result of each downsampling result, until the initial feature extraction result corresponding to the last level downsampling result is obtained, and the initial feature extraction result is determined as the feature extraction result of the target slice; The second processing module is further configured to perform 1×1 convolution, 3×3 convolution, dilated convolution, and global pooling operations on the feature extraction results of the target slice, respectively, to obtain 1×1 convolution features, 3×3 convolution features, dilated convolution features, and global pooling features; and to fuse the 1×1 convolution features, the 3×3 convolution features, the dilated convolution features, and the global pooling features to obtain the fused feature extraction results of the target slice. The second processing module is also used to perform upsampling processing on the feature extraction results after the target slice fusion according to the decoder, so as to obtain upsampling results at multiple levels; Based on the attention gating mechanism, each upsampling result is processed to obtain the initial feature fusion result of each upsampling result, until the initial feature fusion result corresponding to the last level upsampling result is obtained, and the initial feature fusion result is determined as the feature fusion result of the target slice; wherein, the attention gating mechanism is used to generate spatial weight coefficients according to the gating signal of the decoder, and selectively weight the skip connection features from the encoder; The second processing module is also used to obtain pore-mineral semantic segmentation results based on the feature extraction results after the target slice is fused and the feature fusion results of the target slice; The third processing module is used to obtain the pore-mineral semantic segmentation result of the digital core image based on the pore-mineral semantic segmentation results corresponding to multiple target slices.
6. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Automatic tumor region detection method and system based on image segmentation
CN121329946A
Improved multi-modal three-dimensional medical image classification method based on fusion assistance
CN121767757A