A method and system for intelligent characterization and three-dimensional reconstruction of internal pores of rock mass

By combining focused ion beam scanning electron microscopy with pore segmentation networks, the problem of accurately identifying the internal pore structure of rock masses in traditional methods has been solved, achieving high-precision three-dimensional reconstruction and quantitative analysis of internal pores in rock masses.

CN121476269BActive Publication Date: 2026-04-17SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2026-01-07
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional methods are difficult to obtain the true microscopic pore structure inside the rock mass without damage, and the gray values ​​of impurities in the rock core image are similar to those of pores, which increases the difficulty of pore extraction and results in low accuracy of 3D reconstruction.

Method used

We employ a focused ion beam scanning electron microscope (SEM) slicing-imaging sequence approach, combined with a pore segmentation network. We utilize the global contextual understanding of Transformer and the local feature extraction of CNN, and perform pore segmentation through a hybrid loss function with trainable weights. Furthermore, we combine 3D connectivity analysis and morphological operations to achieve 3D reconstruction.

Benefits of technology

It achieves high-precision and quantitative three-dimensional reconstruction of internal pores in rock masses, improves the accuracy and robustness of pore identification and segmentation, and provides a reliable microstructure model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121476269B_ABST
    Figure CN121476269B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for intelligent characterization and three-dimensional reconstruction of internal pores in rock masses, relating to the field of rock mass internal structure analysis technology. The method includes: acquiring a sequence of two-dimensional images of the core material inside the target rock mass using a focused ion beam scanning electron microscope (SEM) slicing-imaging sequence; segmenting each two-dimensional image in the sequence using a pore segmentation network to obtain several two-dimensional pore segmentation maps; constructing three-dimensional binary data of the pores according to the slicing sequence based on the two-dimensional pore segmentation maps; and performing three-dimensional reconstruction and structural characterization of the core pores based on the three-dimensional binary data. This invention constructs an integrated workflow of "imaging-recognition-reconstruction-evaluation," realizing a closed-loop chain from nanoscale real three-dimensional data acquisition to intelligent recognition, three-dimensional reconstruction, and quantitative analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rock mass internal structure analysis technology, specifically to a method and system for intelligent characterization and three-dimensional reconstruction of rock mass internal pores. Background Technology

[0002] In recent years, the development of new energy sources and the exploration of unconventional oil and gas have received widespread attention. In the construction of underground energy resources and the assessment of unconventional oil and gas reservoirs, the study of the micro- and nano-scale spatial structure within rock masses plays a fundamental and crucial role. The crystal structure of halite, the distribution of impurities, and their relationship with micropores within rock masses are essential for assessing the tightness, long-term stability, and safety of reservoirs. For unconventional reservoirs such as tight sandstone and shale, the characterization of micropore structure is critical. Therefore, accurately identifying and reconstructing the pore structure within rock masses has become a core technological bottleneck that urgently needs to be overcome in the fields of rock mechanics, oil and gas geology, and new energy development.

[0003] Traditional methods for studying the internal structure of rock masses mainly rely on indirect measurement techniques such as mercury intrusion porosimetry and nitrogen adsorption, or on two-dimensional observations using optical microscopes and conventional scanning electron microscopes. However, these methods struggle to obtain the true, microscopic spatial distribution of pores within the rock mass without causing damage, exhibiting significant limitations such as low resolution and substantial sample preparation damage. Therefore, image-based three-dimensional reconstruction technology is an effective approach for characterizing complex rock structures. However, its reconstruction accuracy heavily depends on high-quality original image data, and the algorithms themselves often focus on extracting visual features. The grayscale values ​​of impurities such as organic matter and clay minerals in rock core images are similar to those of pores, increasing the difficulty of pore extraction. This further complicates the accurate construction of three-dimensional digital rock cores. Summary of the Invention

[0004] To address the aforementioned problems, this invention proposes a method and system for intelligent characterization and three-dimensional reconstruction of internal pores in rock masses. It constructs an integrated workflow of "imaging-recognition-reconstruction-evaluation," realizing a closed-loop chain from the acquisition of nanoscale real three-dimensional data to intelligent recognition, three-dimensional reconstruction, and quantitative analysis.

[0005] According to some embodiments, the present invention adopts the following technical solution:

[0006] A method for intelligent characterization and three-dimensional reconstruction of internal pores in rock masses, comprising:

[0007] Two-dimensional image sequences of rock cores inside the target rock mass are obtained by using a focused ion beam scanning electron microscope sectioning-imaging sequence.

[0008] Aperture segmentation network is used to segment each two-dimensional image in a two-dimensional image sequence to obtain several two-dimensional aperture segmentation images;

[0009] Based on the two-dimensional segmentation map of pores, three-dimensional binary volume data of pores are constructed according to the slice sequence.

[0010] Based on the three-dimensional binary data, the core pores were reconstructed in three dimensions and their structure was characterized.

[0011] The aperture segmentation network combines the global contextual understanding capability of Transformer with the local feature extraction advantage of CNN, and uses a hybrid loss function with trainable weights to segment apertures in two-dimensional images.

[0012] According to some embodiments, the present invention adopts the following technical solution:

[0013] A system for intelligent characterization and three-dimensional reconstruction of internal pores in rock masses, comprising:

[0014] The sequence acquisition module is configured to acquire a two-dimensional image sequence of the core material inside the target rock mass through a focused ion beam scanning electron microscope sectioning-imaging sequence operation mode.

[0015] The pore segmentation module is configured to: use a pore segmentation network to perform pore segmentation on each two-dimensional image in the two-dimensional image sequence to obtain several pore two-dimensional segmentation images;

[0016] The 3D construction module is configured to: construct 3D binary volume data of pores based on the 2D pore segmentation map and in the order of the slice sequence;

[0017] The reconstruction and characterization module is configured to perform three-dimensional reconstruction and structural characterization of core pores based on three-dimensional binary data.

[0018] The aperture segmentation network combines the global contextual understanding capability of Transformer with the local feature extraction advantage of CNN, and uses a hybrid loss function with trainable weights to segment apertures in two-dimensional images.

[0019] According to some embodiments, the present invention adopts the following technical solution:

[0020] A computer program product includes a computer program that, when executed by a processor, implements the aforementioned method for intelligent characterization and three-dimensional reconstruction of internal pores in rock masses.

[0021] According to some embodiments, the present invention adopts the following technical solution:

[0022] A non-transitory computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement the aforementioned method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass.

[0023] According to some embodiments, the present invention adopts the following technical solution:

[0024] An electronic device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass.

[0025] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0026] This invention fully leverages the respective advantages of advanced microscopic imaging technology and artificial intelligence algorithms, proposing a method and system for intelligent characterization and three-dimensional reconstruction of internal pores in rock masses based on focused ion beam scanning electron microscopy (FIB-SEM). This method integrates high-quality FIB-SEM data acquisition, deep learning-based intelligent information extraction, and three-dimensional visualization results expression, establishing an advanced "imaging-recognition-reconstruction-evaluation" workflow. It has high scalability and provides a more reliable microstructural model for the application of high-precision, quantitative three-dimensional digital characterization technology, possessing broad scientific value and application prospects.

[0027] This invention proposes a pore segmentation network with dual encoders (CNN-Transformer). The CNN encoder uses a lightweight improved version of GhostNet to efficiently extract local multi-scale features, while the Transformer encoder captures global contextual dependencies. Through a specially designed multi-level feature fusion module (FFM) and feature connection module (RPM), adaptive and deep fusion of local details and global semantics is achieved, solving the recognition problem caused by irregular pore shapes, complex backgrounds, and similar gray levels in complex rock core images.

[0028] This invention proposes a hybrid loss function with trainable weights that dynamically fuses binary cross-entropy loss (BCE) and Dice loss. By setting the weight parameters to be trainable, the model can automatically find the balance point between the two losses during training. This ensures pixel-level classification stability while optimizing boundary segmentation accuracy, effectively alleviating the training bias problem caused by severe imbalance between apertures and background pixels.

[0029] In the 3D reconstruction stage, this invention combines 3D connectivity analysis and morphological operations, and utilizes the spatial context information of sequential images to optimize the segmentation results, thereby improving the connectivity and accuracy of the 3D porosity model. At the same time, it adopts a dual computational framework based on binary volume data and 3D mesh model to cross-validate and multi-dimensionally characterize porosity and fractal dimension, ensuring the reliability and physical significance of the results. Attached Figure Description

[0030] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0031] Figure 1 This is a diagram of the pore segmentation network framework for Example 1.

[0032] Figure 2 This is a structural diagram of the Transformer in Example 1.

[0033] Figure 3 This is a structural diagram of the FFM in Example 1.

[0034] Figure 4 This is a schematic diagram of the Cube in Example 1. Detailed Implementation

[0035] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0036] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0037] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0038] Example 1

[0039] One embodiment of the present invention provides a method for intelligent characterization and three-dimensional reconstruction of internal pores in rock masses, comprising:

[0040] S1. Obtain a two-dimensional image sequence of the rock core inside the target rock mass by using a focused ion beam scanning electron microscope sectioning-imaging sequence.

[0041] S2. Using a pore segmentation network, perform pore segmentation on each two-dimensional image in the two-dimensional image sequence to obtain several pore two-dimensional segmentation images;

[0042] S3. Based on the two-dimensional pore segmentation map, construct the three-dimensional binary volume data of the pores according to the slice sequence;

[0043] S4. Based on the three-dimensional binary data, perform three-dimensional reconstruction and structural characterization of the core pores;

[0044] The aperture segmentation network combines the global contextual understanding capability of Transformer with the local feature extraction advantage of CNN, and uses a hybrid loss function with trainable weights to segment apertures in two-dimensional images.

[0045] As one embodiment, the present invention provides a method for intelligent characterization and 3D reconstruction of internal pores in rock masses. This method constructs an integrated workflow of "imaging-recognition-reconstruction-evaluation," realizing a closed-loop chain from nanoscale real 3D data acquisition to intelligent recognition, 3D reconstruction, and quantitative analysis. The method establishes a rock mass FIB-SEM image dataset through high-precision sequential imaging using focused ion beam and scanning electron microscopy. Simultaneously, pores exhibit significant local features and dispersed global features in the images. To improve the performance of rock pore segmentation, which is affected by complex scenes including irregular shapes, complex image backgrounds, and limitations in acquiring global contextual information, a pore segmentation network is constructed. This network combines the global contextual understanding capabilities of Transformer and the local feature extraction advantages of CNN, and utilizes a trainable loss function to significantly improve the accuracy and robustness of pore recognition and segmentation. Accurate two-dimensional pore segmentation maps were obtained using the constructed segmentation network. Then, three-dimensional binary volumetric data of the pores were obtained according to the slice sequence. Finally, the moving cubes method was used to reconstruct the three-dimensional pore structure of the core. Porosity and fractal characteristics were selected as characterization parameters to characterize the core pore structure based on both binary volumetric data and the three-dimensional reconstruction model. This quantitatively assessed the core's storage capacity, internal structural complexity, and surface roughness. The specific implementation process is as follows:

[0046] 1. Dataset Construction

[0047] The microstructure of rock pores was characterized using focused ion beam (FIB) and scanning electron microscopy (SEM), and FIB-SEM slices of the rock were obtained, which are two-dimensional image sequences of the rock core inside the target rock mass.

[0048] In rock pore structure research, FIB-SEM technology, compared to traditional micro-CT or other imaging methods, is more suitable for detailed studies at the nanoscale, clearly revealing nanopores, micropores, and pore throats. Furthermore, FIB-SEM provides true, continuous distribution and connectivity information of pore space in three-dimensional space through a "slice-imaging" sequential approach, enabling the reconstruction of realistic three-dimensional volumetric data. Different minerals in FIB-SEM images exhibit extremely complex textures and contrasts, facilitating pore identification by segmentation networks that capture local texture features and accurately distinguish mineral boundaries. Core FIB-SEM images were constructed, with uniform pixel size adjustments. Pixel-level annotations were performed on the background and pores in each FIB-SEM image. The annotated dataset was randomly divided into training, validation, and test sets in an 8:1:1 ratio.

[0049] The rock core here is a columnar rock sample drilled from underground. It is a part of the rock and is a "sample" obtained by humans. The rock core retains the original state of the underground (such as bedding, fractures, pores, etc.), so it can be used for scientific research to analyze reservoir properties (porosity, permeability), oil and gas content, formation pressure, etc.

[0050] 2. Data Augmentation

[0051] The original images are standardized. First, histogram equalization is used to enhance contrast. Since noise is generated during image acquisition and transmission, Fourier transform filtering is used to remove noise from the rock scanning electron microscope images to improve image quality. Second, the data is further enhanced by adjusting image brightness and contrast, as well as rotating and flipping the images to generate diverse samples, improve the model's generalization ability, and prevent overfitting.

[0052] 3. Construction of Pore Segmentation Network

[0053] This embodiment designs a deep learning model integrating convolutional neural networks and Transformers to achieve accurate pore segmentation in core images with complex backgrounds. It combines the global contextual understanding capability of Transformers with the local feature extraction advantages of CNNs to improve the accuracy of rock pore recognition. To achieve better segmentation results, a dual-encoder segmentation network structure is constructed by combining Transformers and CNNs. To address the feature map redundancy problem during pore recognition, the CNN encoder utilizes the lightweight Ghostnet to improve network recognition efficiency. Finally, a feature fusion module is designed to achieve dual-branch fusion. Figure 1 As shown, the proposed crack segmentation network consists of five main components: (1) Transformer encoding branch; (2) CNN encoding branch; (3) feature fusion module; (4) feature connection module between encoder and decoder; and (5) feature decoder.

[0054] (1) Transformer encoder

[0055] The Transformer encoding branch contains two modules: an input module and an encoding module, such as... Figure 1 As shown. The input module consists of block partitioning operations and position encoding operations.

[0056] First, the input image is segmented into small, non-overlapping image patches. These patches serve as sequence elements for extracting deep features. Each patch is linearly mapped to a one-dimensional vector and then input into the embedding layer. This input module converts the input image in [H,W,C] format into a token sequence in the standard Transformer module input format. Positional encoding establishes the relative positional relationships between image patch features, ensuring the model can accurately locate the feature tokens during attention computation, thus facilitating the learning process. The positional embedding formula is as follows:

[0057]

[0058] (1)

[0059] in, Represents the position of the sequence. Represents the dimension of a vector. This represents the feature dimension corresponding to each sequence. The features at even positions are calculated using a sine function, and the features at odd positions are calculated using a cosine function.

[0060] The output of the input module is passed to the encoding module, which contains a series of consecutive Transformer layers. Referring to the DeiT model, each module contains three Transformer layers, such as... Figure 1 As shown; previous studies have shown that 12 layers achieve optimal performance. This network contains 12 Transformer layers, each of which is as follows: Figure 2 As shown, it contains two sub-layers: Multi-Head Attention (MHA) and Feedforward Network (FFN). Residual connections and normalization operations are added between the sub-layers. The self-attention mechanism used in each layer can capture the feature dependencies between the template region and the search region in the global feature representation, thereby achieving effective fusion of global features.

[0061] (2) CNN encoder

[0062] To implement the proposed network architecture, an encoder based on an improved GhostNet is used in the CNN encoding branch. The lightweight network structure GhostNet is used as the backbone feature extractor. Through its unique Ghost modules, GhostNet significantly reduces computational complexity while maintaining representational power, thus greatly improving the efficiency of aperture segmentation. This encoder contains five convolutional modules, such as... Figure 1 As shown, Ghost module 1 contains standard convolutional layers and batch normalization layers as basic feature extractors, and subsequent Ghost modules 2-5 are formed by stacking multiple Ghost modules to create feature pyramids. Figure 1 The Ghost module 2 shown contains 4 Ghost modules and outputs 40-channel feature maps. Ghost module 3 is configured with 6 Ghost modules and outputs 80-channel feature maps. Ghost module 4 integrates 8 Ghost modules and outputs 160-channel feature maps. Ghost module 5 finally increases the number of channels to 320 through 4 Ghost modules.

[0063] Each Ghost module employs a dual-path architecture of feature generation and phantom transformation: the main path generates some essential feature maps through standard convolution, while the auxiliary path applies a cheap linear transformation to the essential features to generate phantom feature maps. Finally, the dual features are fused through channel concatenation. This design significantly reduces computational complexity while maintaining representational power. The network achieves progressive downsampling through convolution operations with a stride of 2, halving the feature map size step by step while multiplying the number of channels, ultimately forming multi-scale feature representations ranging from 64×64 to 8×8. Through this efficient architecture, this encoding branch achieves progressive semantic extraction of multi-scale pore structures in complex backgrounds while preserving local details of the pores.

[0064] (3) Feature fusion module

[0065] Based on the proposed network framework, the Transformer and CNN coding branches have enhanced their ability to extract global contextual features and local geometric features, but they lack communication and information transfer mechanisms between different branches. In addition, if only the top-level outputs of the two coding branches are fused, it will lead to information loss and a lack of local contextual information with high-level semantics.

[0066] Therefore, this embodiment utilizes a novel feature fusion module to perform feature fusion at multiple levels, and can adaptively assign higher weights to important features related to cracks during the training and learning process, such as... Figure 1As shown, FFM fuses the outputs of a series of modules (from modules 2 to 5) in the CNN encoding branch with the outputs of the corresponding layers in the Transformer encoding branch. The resolution of the final output feature maps of the two encoding branches is set to be consistent, the feature map resolution in the Transformer branch remains constant, while the feature map resolution in the CNN branch decreases sequentially after each convolutional module. This module enables the model to compute feature maps of different resolutions, thereby effectively fusing the output feature maps from the intermediate layers of the two branches. The specific structure of FFM is as follows: Figure 3 As shown:

[0067] Let the high-resolution features (i.e., the output of the CNN encoding branch, which contains rich local detail information, such as the edges of apertures and textures) be... Where H is the height of the feature map and W is the width of the feature map. This represents the number of channels in the feature map.

[0068] Let the low-resolution feature (i.e., the output of the Transformer coding branch, which contains rich global context information) be... .

[0069] 1) Upsampling

[0070] Upsampling the low-resolution feature map to make its spatial dimensions the same as the high-resolution feature map can be expressed by the following formula:

[0071]

[0072] Where Upsample means upsampling. This indicates low-resolution features.

[0073] 2) splicing

[0074] The high-resolution features and the upsampled low-resolution features are concatenated, which can be expressed by the following formula:

[0075]

[0076] Here, Concat represents feature concatenation. Indicates the features after splicing. This represents the low-resolution features after upsampling.

[0077] 3) Refining and Fusion

[0078] Two 3×3 Ghost Modules, two Batch Normalization (BN) layers, and one ReLU activation function layer are used to refine and fuse the concatenated features. This process eliminates semantic differences in the scaled-down feature maps, reduces the number of channels, ensures model accuracy, and lowers computational costs. The process is as follows:

[0079] The first Ghost Module is 3×3, which can be represented by the formula:

[0080]

[0081] in, The feature map is processed by the first Ghost Module 3×3 unit. This represents the first 3×3 Ghost Module, where ReLU is the activation function and BN represents batch normalization, which normalizes the output of the Ghost Module. Features after splicing + This refers to the number of input channels for the first Ghost Module 3×3. The number of output channels for the first Ghost Module 3×3 is given by r, which represents the expansion factor of the Ghost Module. r=2 is commonly used, which can reduce the computational load by about 50% while maintaining good feature diversity.

[0082] The second Ghost Module is 3×3, which can be represented by the formula:

[0083]

[0084] in, Indicates the main path output features. This indicates the second 3×3 Ghost Module. For the feature map processed by the first Ghost Module 3×3 unit, BN represents batch normalization. This is the number of input channels for the second GhostModule3×3. This represents the number of output channels for the second Ghost Module 3×3, and r represents the expansion factor of the Ghost Module, which is usually r=2.

[0085] 4) Residual connection

[0086] After the concatenated features undergo two Ghost Module 3×3 depth transformations, a Ghost Module 1×1 + BN residual connection path is established to prevent the loss of important details. This lightweight residual connection protects the original information, achieving a balance between efficiency and effectiveness. This process is represented as:

[0087]

[0088] in, The output feature map represents the residual path. For a 1×1 Ghost Module, BN represents batch normalization. This is the original high-resolution feature map. This represents the number of input channels for Ghost Module 1×1. The number of output channels for Ghost Module 1×1 must be consistent with the number of output channels for the main path. r represents the expansion ratio factor of Ghost Module, which is usually r=2.

[0089] 5) Adding residuals

[0090] The main output path features are added together with the high-resolution features after Ghost Module 1×1 + BN transformation. This process is expressed by the following formula:

[0091]

[0092] in, Indicates the characteristics after addition. Indicates the main path output features. The output feature map represents the residual path.

[0093] 6) The channel attention mechanism utilizes the Squeeze-and-Excitation Module (SE) to learn the importance of balanced features, specifically:

[0094] Global pooling, expressed by the formula:

[0095]

[0096] Among them, Z c This represents the pooling result of the c-th channel, where C represents the channel index, and c = 1, 2, ... ,for (i,j) is the feature value of the c-th channel at position (i,j), where i represents the height index (row number), j represents the width index (column number), c represents the channel index, H is the feature map height, and W is the feature map width.

[0097] Two fully connected layers can be represented by the following formula:

[0098]

[0099] Where s represents the channel weight vector, with values ​​between 0 and 1; It is the ReLU activation function. It is the Sigmoid function. These are the weights of the fully connected layer. The input vector.

[0100] 7) Implement rescaling through feature weighting:

[0101]

[0102] (4) Feature connection module

[0103] To effectively bridge the semantic gap between the encoder and decoder, this embodiment uses an optimized Residual Path Module (RPM) and integrates it into the corresponding connection paths of the GhostNet encoder and decoder. The RPM adopts a modular architecture design, with each basic unit consisting of parallel 3×3 convolutional blocks and 1×1 convolutional blocks. The 3×3 convolutional blocks are responsible for spatial feature extraction, while the 1×1 convolutional blocks focus on channel relationship modeling. The outputs of both are fused through residual connections and then output through the ReLU activation function, forming a multi-level feature processing capability.

[0104] In this network architecture, three RPM modules are set up according to the feature characteristics of the GhostNet encoder. When processing the 40-channel low-level features of the second-order output, RPM1 adopts a 6-level basic module stack and a 256-channel output design to fully extract and transmit shallow semantic information rich in spatial details. For the 80-channel mid-level features of the third order, RPM2 is configured with a 4-level basic module and a 128-channel output to achieve a balanced transmission of detailed features and semantic information. For the 160-channel high-level features of the fourth order, RPM3 is simplified to a 2-level basic module and a 64-channel output, focusing on the refined transmission of deep semantic information. This differentiated design ensures that the features extracted from each stage of GhostNet can obtain semantic enhancement that matches the target scale before being fed into the decoder, which is beneficial for the subsequent accurate recovery of pore structure details.

[0105] (5) Decoder

[0106] The core function of the decoder is to reduce the dimensionality of high-level feature maps and restore them to their original input size to obtain segmentation labels. For example... Figure 1 As shown, the decoder consists of five upsampling modules. Each upsampling module contains three parts connected in series, which together complete the process of amplifying and refining the low-resolution feature map to the high-resolution feature map: (1) convolution + batch normalization + ReLU activation function; (2) transposed convolution + batch normalization + ReLU activation function; (3) convolution + batch normalization + ReLU activation function. The input of the first upsampling module comes from the fused feature map output from the top layer of the dual-branch encoder, and the input of the remaining upsampling modules is formed by fusing the feature map output from the preceding upsampling module with the feature map output from the corresponding residual path module through element-wise addition.

[0107] The final segmentation result is obtained by processing a 1×1 convolutional layer and a sigmoid activation function. Unlike traditional encoders that usually use inter-layer information splicing, this method combines the feature map obtained by RPM with the information from the previous decoder module by summing elements, which significantly improves computational efficiency and memory utilization while ensuring segmentation accuracy.

[0108] (6) Loss function

[0109] A suitable loss function can effectively improve the model's learning performance on specific target features during training. Cross-entropy loss function is often used in natural image segmentation tasks, but it is difficult to solve the problem of poor performance due to the severe imbalance between pore pixels and background pixels in core images.

[0110] The binary cross-entropy (BCE) loss function treats all classes of pixels in the image equally during gradient backpropagation, making it highly susceptible to imbalanced samples. This problem inhibits the learning of aperture features, causing the model to make biased predictions about the image background. The binary cross-entropy loss function is defined as follows:

[0111]

[0112] Among them, L bce This represents the binary cross-entropy loss value, where N represents the total number of pixels, i represents the pixel index, and 1 ≤ i ≤ N; x i y represents the true class of the i-th pixel, with a value of 0 or 1; i This represents the probability that the model predicts the i-th pixel as a hole, 0 ≤ y i ≤1, for example, y i =0.9, then the model is 90% certain that this is a pore, y i =0.1, the model believes it is likely the matrix.

[0113] The Dice loss function measures the similarity of pixels of the same type between the predicted and labeled images at a global scale. When calculating the intersection ratio between the target and the ground truth, this loss function alleviates the problem of imbalance between positive and negative samples by ignoring a large number of background pixels. The formula for calculating the Dice loss function is as follows:

[0114]

[0115] Where N is the total number of pixels in the image. This represents the true value of the i-th image pixel. Let represent the predicted value of the i-th image pixel; however, when and If the value is too small, the backpropagation gradient of the Dice loss will change drastically, which can easily lead to unstable model training. This problem can be solved by setting an appropriate ε value. In this embodiment, ε is set to 1.

[0116] Therefore, to overcome the above problems, this embodiment proposes a hybrid loss function combining Dice loss and BCE loss to improve the performance of the aperture image segmentation model. BCE loss provides a stable gradient signal for each pixel, forcing the model to make a binary classification decision of "is it an aperture" or "is not an aperture," providing a good foundation for model training. Dice loss directly optimizes the Dice coefficient, a commonly used evaluation metric in segmentation tasks. This coefficient is a statistical measure of the overlap between segmented regions, focusing on the overlapping area between the predicted and real regions. This makes it adept at optimizing boundary segmentation accuracy and handling small targets. The specific formula is as follows:

[0117]

[0118] Where α and β are weight coefficients and are trainable parameters.

[0119] The optimal weights are highly dependent on the specific dataset and model architecture. Therefore, by setting them as trainable parameters, the model can explore the optimal balance between BCE loss and Dice loss during training. At different stages of training, the model requires gradient guidance with different focuses. For example, the initial stage requires stable guidance from BCE, while the later stage requires boundary optimization from Dice. Trainable weights can automatically adapt to this need.

[0120] The Softmax function can be used to parameterize the α and β weights. First, define two unconstrained, trainable parameters γα and γβ, initialized to 0, and then apply the Softmax function for normalization:

[0121]

[0122] ,

[0123]

[0124] Construct the final trainable hybrid loss function:

[0125]

[0126] in, and Like other parameters of the model, such as the weights of convolutional layers, they are updated via backpropagation and gradient descent algorithms. The optimizer updates the parameters based on the total loss. right and Calculate the gradient and adjust the values; for example, in a training batch, Provided than If the gradient direction is more favorable, then the optimizer will increase... The relative value, thus assigning it in the next step. Higher weight.

[0127] 4. Aperture segmentation based on image sequence

[0128] The pore segmentation map obtained from the segmentation network is optimized by using morphological opening and closing operations to remove small noise points and fill internal holes, making the segmented region smoother and more complete. By utilizing the spatial context information of continuous slices, pores that should be connected in three-dimensional space but are actually not connected in the initial segmentation are stitched together, while isolated noise points are removed, thus obtaining a more accurate and connected pore volume data in three-dimensional space.

[0129] The sequentially arranged binary segmentation images are stacked, with pore regions set to 1 and other regions to 0, to form a three-dimensional binary volume data. For each segmentation image, a new binary image containing only pores is generated, specifically:

[0130] A pixel value of 1 indicates that the pixel is identified as a pore; a pixel value of 0 indicates that the pixel is the matrix, i.e., the part other than the pore. Finally, a three-dimensional binary array of size [Height, Width, n] is obtained, which is the initial pore volume data.

[0131] The above process is used to create three-dimensional volume data for the target category of pores, and then three-dimensional connected component analysis is performed, including:

[0132] (1) Connectivity analysis

[0133] For pore space analysis, 26-connectivity is typically used. A voxel p and q are 26-connected if and only if they satisfy:

[0134]

[0135] Where, x p Represents the x-coordinate and y-coordinate of voxel p. p Represents the y-coordinate and z-coordinate of voxel p. p The z-coordinate of voxel p; x q Represents the x-coordinate and y-coordinate of voxel q. q Represents the y-coordinate and z-coordinate of voxel q. qLet z represent the z-coordinate of voxel q. The formula states that if the maximum distance between voxels p and q is equal to 1, then the two voxels are 26-connected.

[0136] Given a 3D binary volume data V (x,y,z)∈{0,1}, where 1 represents the porous phase and 0 represents the matrix phase. The purpose of three-dimensional connected component analysis is to... V Identify all sets of 1s that are interconnected in three-dimensional space, and mark each connected set as a unique component; finally, output a tag body data. L (x,y,z), where L ∈{0,1,2,..., N}, 0 represents the matrix, 1 to N represent N A different connected pore component.

[0137] (2) Component volume analysis

[0138] Following connectivity analysis, a quantitative description of the component volume can be performed on each connected component. Let the label value of the m-th connected component be... Its volume in the tag body data L (In terms of voxel count) can be calculated using the following formula:

[0139]

[0140] in, It is the Kronecker function, when The value is 1 if it is true and 0 otherwise. This formula essentially calculates the values ​​of the label data. The total number of voxels.

[0141] By calculating the volume of all components, a volume threshold is set. To filter out tiny components that are considered noise, i.e. when < When this happens, the component is treated as noise and removed from the analysis; finally, the volume data of the pores is obtained, that is, the three-dimensional binary volume data of the pores, which can be used as input for three-dimensional reconstruction.

[0142] 5. Characterization of core pore structure based on three-dimensional binary data

[0143] After obtaining the volumetric data of the pores, porosity and fractal characteristics were selected as characterization parameters to characterize the pore structure of the rock core, specifically as follows:

[0144] (1) Porosity calculation

[0145] Porosity n is a macroscopic property of porous media, defined as the volume occupied by pores in the porous media. The ratio of porosity to total volume is the most readily obtainable characterization parameter and an important parameter affecting the fluid transport performance in porous media. It also determines many physical properties. The expression for porosity is as follows:

[0146]

[0147] Where n represents porosity, Represents pore volume. Indicates the total pore volume. It represents the solid volume, that is, the actual volume of the solid matrix skeleton, excluding any pores.

[0148] In discrete digital volume data, the volume of an object is proportional to the number of voxels it occupies. Therefore, the pore volume can be obtained by counting the number of pore voxels, while the total volume is the total number of voxels. The total number of pore voxels is expressed by the formula:

[0149]

[0150] Porosity is expressed by the formula:

[0151]

[0152] (2) Fractal dimension calculation

[0153] Calculate the fractal dimension, which quantifies the structural complexity, from the given three-dimensional binary porous volume data V. fractal dimension It is a scalar that describes the distribution complexity and space-filling ability of the porous phase in three-dimensional space. It measures the distribution complexity and space-filling ability of the porous phase itself in three-dimensional space and is used to measure fractal characteristics.

[0154] Using the three-dimensional box counting method, for a fractal structure, there is a power-law relationship between the minimum number of boxes N(r) required to cover it and the box size r. By analyzing this relationship, the fractal dimension can be calculated, as shown in the following formula:

[0155] 1) Power-law relationship:

[0156]

[0157] Where N(r) represents the number of boxes, r represents the size of the boxes, and ∝ is a proportional sign. Let be the volume fractal dimension. This relationship represents the minimum number of boxes required to cover the porous structure. With box size negative It is directly proportional to the power of the power.

[0158] 2) Linearized form:

[0159]

[0160] Where N(r) represents the number of boxes, and r represents the size of the boxes. Let C be the fractal dimension of the volume, and C be a constant term.

[0161] 3) Fractal dimension calculation:

[0162]

[0163] in, The complexity and heterogeneity of the pore space structure were quantified. The closer to 3, the more complex the porous phase is, almost like a solid body filling the space; The lower the value, the simpler and sparser the pore structure.

[0164] 6. Reconstruction and Characterization of Three-Dimensional Pore Structure

[0165] The Marching Cubes algorithm is used to reconstruct rock porosity. First, a rendering platform is built based on the binary porosity data. This platform consists of small voxels from top to bottom and left to right, each containing small isosurface patches. Then, the coordinates of the intersection points between the patches and the voxel edges, as well as the directions of the isosurface extensions, are calculated. Finally, the isosurfaces are drawn to form the surface contour. The Marching Cubes algorithm process is described below:

[0166] 1) Read continuous two-dimensional slice image data of rock cores.

[0167] 2) Scan the image data from left to right and front to back. For the parts that need to be modeled and drawn, complete the construction of Cubes; the vertex distribution of each slice, such as... Figure 4 As shown.

[0168] 3) Based on the threshold of the isosurface, compare the vertex pixels of each voxel with it to obtain the state information of each vertex and establish the state table of each voxel.

[0169] 4) Based on the index value of the state table of each voxel, the triangular facet partitioning method of the voxel is obtained.

[0170] 5) Solve for the vertex coordinates of the isosurface inside the non-empty voxel.

[0171] 6) Solve the normal vector at each vertex of the face linearly from the gradient values ​​of each edge vertex of the voxel.

[0172] 7) Process the n-1 layers of voxel data sequentially from front to back and from top to bottom.

[0173] 8) Combine the vertex coordinates and normal vectors of the facets to draw isosurfaces and establish the model.

[0174] Using the binary data of pores as input, the Marching Cubes algorithm extracts an isosurface, typically with a value of 0.5. This is the 3D geometric model of that category. The mesh model is the specific implementation and approximate representation of the 3D geometric model in the computer. The mesh model consists of vertices and faces. The Marching Cubes algorithm can be implemented using the scikit-image library in Python, and 3D visualization can be achieved using the vedo library. Color and transparency are assigned to the mesh model of the pore components of the rock core's internal structure, and an intuitive 3D structural diagram is generated through rendering.

[0175] After three-dimensional reconstruction of the core pores, porosity and fractal characteristics were selected as characterization parameters. Based on the three-dimensional reconstruction model, the core pore structure was characterized, including:

[0176] (1) Porosity calculation based on three-dimensional reconstruction model

[0177] The volume enclosed by the closed pore surface defined by the triangular mesh is calculated, and then its proportion in the total volume of the core sample is calculated. The porosity calculation based on 3D reconstruction is mainly used for verification. If the porosity result is similar to that calculated based on binary volume data, it proves that the 3D reconstruction is effective; if the difference is large, it indicates a problem with the 3D reconstruction. Using the divergence theorem in computational geometry, the calculation of the volume enclosed by a closed surface is transformed into the calculation of the surface integral. The specific formula is as follows:

[0178] 1) The directional volume contribution of a single triangle:

[0179]

[0180] in, These are the vectors of the three vertices of the triangle.

[0181] 2) Total pore volume:

[0182]

[0183] Where T is the total number of triangles in the grid.

[0184] 3) Porosity:

[0185]

[0186]

[0187] Where, Φ mesh V represents the mesh-based porosity. poreFor pore volume, It is the total volume of the core sample, L x L represents the length of the core sample in the x-direction. y L represents the length of the rock core sample in the y-direction. z This represents the length of the rock core sample in the z-direction.

[0188] (2) Fractal dimension calculation based on three-dimensional reconstruction

[0189] The fractal dimension based on 3D reconstruction measures the roughness and tortuosity of the pore-matrix interface. The expression for the pore distribution in 3D space is:

[0190]

[0191] Where r represents the measurement scale, revealing that the observed porosity-related volume V changes with the observation scale r used, and ∝ is proportional to the value of r. The fractal dimension of the aperture distribution is expressed by the formula:

[0192]

[0193] The fractal dimension of pore structures in three-dimensional space It is a number between 2 and 3, which quantifies the roughness of the inner surface of the pores; The closer the fractal dimension is to 2, the smoother the pore throat surface, the stronger the homogeneity, and the better the rock's storage capacity; conversely, the closer the fractal dimension is to 2, the smoother the pore throat surface, the stronger the homogeneity, and the better the rock's storage capacity. The closer the fractal dimension is to 3, the rougher the pore throat surface is, and the worse the rock's storage capacity. This indicates that the fractal structure is more complex and heterogeneous.

[0194] The method in this embodiment integrates high-quality FIB-SEM data acquisition, deep learning intelligent information extraction, and three-dimensional visualization results expression, and establishes an advanced "imaging-recognition-reconstruction-evaluation" workflow. It has high scalability and provides a more reliable microstructure model for the application of high-precision and quantitative three-dimensional digital characterization technology, and has broad scientific value and application prospects.

[0195] Example 2

[0196] One embodiment of the present invention provides a system for intelligent characterization and three-dimensional reconstruction of internal pores in rock masses, comprising:

[0197] The sequence acquisition module is configured to acquire a two-dimensional image sequence of the core material inside the target rock mass through a focused ion beam scanning electron microscope sectioning-imaging sequence operation mode.

[0198] The pore segmentation module is configured to: use a pore segmentation network to perform pore segmentation on each two-dimensional image in the two-dimensional image sequence to obtain several pore two-dimensional segmentation images;

[0199] The 3D construction module is configured to: construct 3D binary volume data of pores based on the 2D pore segmentation map and in the order of the slice sequence;

[0200] The reconstruction and characterization module is configured to perform three-dimensional reconstruction and structural characterization of core pores based on three-dimensional binary data.

[0201] The aperture segmentation network combines the global contextual understanding capability of Transformer with the local feature extraction advantage of CNN, and uses a hybrid loss function with trainable weights to segment apertures in two-dimensional images.

[0202] Example 3

[0203] One embodiment of the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass.

[0204] Example 4

[0205] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided for storing computer instructions. When the computer instructions are executed by a processor, the method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass is implemented.

[0206] Example 5

[0207] One embodiment of the present invention provides an electronic device, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the aforementioned method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass.

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

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

[0210] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A method for intelligent characterization and three-dimensional reconstruction of internal pores in rock masses, characterized in that, include: Two-dimensional image sequences of rock cores inside the target rock mass are obtained by using a focused ion beam scanning electron microscope sectioning-imaging sequence. Aperture segmentation network is used to segment each two-dimensional image in a two-dimensional image sequence to obtain several two-dimensional aperture segmentation images; Based on the two-dimensional segmentation map of pores, three-dimensional binary volume data of pores are constructed according to the slice sequence. Based on the three-dimensional binary data, the core pores were reconstructed in three dimensions and their structure was characterized. The aperture segmentation network combines the global contextual understanding capability of Transformer and the local feature extraction advantage of CNN, and uses a hybrid loss function with trainable weights to segment apertures in two-dimensional images. The aperture segmentation network includes a Transformer coding branch, a CNN coding branch, a feature fusion module, a feature connection module, and a decoder; The Transformer encoding branch is used to extract global contextual features of the image; The CNN encoding branch uses a lightweight GhostNet as the backbone network to extract local multi-scale features; The feature fusion module is used to adaptively weight and fuse the features output by the two branches at multiple levels; The feature connection module is used to pass features from each stage of the encoder to the decoder; The decoder is used to upsample the fused features and restore them to the input size, outputting the aperture segmentation result; The adaptive weighted fusion is specifically as follows: Upsampling involves upsampling the low-resolution feature map output by the CNN coding branch so that its spatial size is the same as that of the high-resolution feature map. The high-resolution features output from the Transformer coding branch are concatenated with the upsampled low-resolution features. The refined fusion uses two Ghost Module 3×3 layers, two BN layers, and one ReLU activation function layer to refine and fuse the concatenated features. Residual connections are used to protect the original information by creating a GhostModule 1×1 + BN residual connection path after the spliced ​​features undergo two Ghost Module 3×3 depth transformations. The residuals are summed, adding the main output path features and the high-resolution features after Ghost Module 1×1 + BN transformation; The channel attention mechanism utilizes SE to learn the importance of balanced features and obtains the channel weight vector; Rescaling is achieved by using channel weight vectors and feature weighting; In the 3D reconstruction stage, the segmentation results are optimized by combining 3D connectivity analysis and morphological operations and utilizing the spatial context information of the sequence images. At the same time, a dual computational framework based on binary volume data and 3D mesh model is adopted to cross-validate and multi-dimensionally characterize porosity and fractal dimension.

2. The method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass as described in claim 1, characterized in that, The hybrid loss function of the trainable weights is constructed by weighting the Dice loss and BCE loss with the optimal weights. The Dice loss measures the similarity of the same type of pixels between the predicted map and the labeled map at a global scale, while the BCE loss focuses on the overlapping area between the predicted region and the real region. The optimal weights depend on the specific dataset and model architecture. By setting the weights as trainable parameters, the model can explore the best balance between BCE loss and Dice loss during training.

3. The method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass as described in claim 1, characterized in that, After constructing the three-dimensional binary volume data of the pores, noise removal can be performed through connectivity analysis and component volume analysis; The connectivity analysis identifies all connected pore components from the three-dimensional binary data, the component volume analysis calculates the volume of each identified connected pore component, and finally, noise removal is performed based on the volume threshold.

4. The method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass as described in claim 1, characterized in that, The three-dimensional reconstruction uses the moving cube method to reconstruct the pores of the rock, thus obtaining a three-dimensional geometric model of the rock mass.

5. The method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass as described in claim 4, characterized in that, The structural characterization selects porosity and fractal features as characterization parameters. Based on the volume enclosed inside the closed pore surface defined by triangular mesh, the core pore structure of the three-dimensional geometric model is characterized to obtain porosity and fractal features based on three-dimensional reconstruction.

6. The method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass as described in claim 5, characterized in that, It also includes calculating porosity and fractal features based on the number of voxels in the three-dimensional binary data; The effectiveness of 3D reconstruction is verified by comparing the porosity calculated based on 3D reconstruction and porosity calculated based on binary data.

7. A system for intelligent characterization and three-dimensional reconstruction of internal pores in rock masses, characterized in that, The method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass as described in any one of claims 1-6 includes: The sequence acquisition module is configured to acquire a two-dimensional image sequence of the core material inside the target rock mass through a focused ion beam scanning electron microscope sectioning-imaging sequence operation mode. The pore segmentation module is configured to: use a pore segmentation network to perform pore segmentation on each two-dimensional image in the two-dimensional image sequence to obtain several pore two-dimensional segmentation images; The 3D construction module is configured to: construct 3D binary volume data of pores based on the 2D pore segmentation map and in the order of the slice sequence; The reconstruction and characterization module is configured to perform three-dimensional reconstruction and structural characterization of core pores based on three-dimensional binary data. The aperture segmentation network combines the global contextual understanding capability of Transformer with the local feature extraction advantage of CNN, and uses a hybrid loss function with trainable weights to segment apertures in two-dimensional images.

8. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement a method for intelligent characterization and three-dimensional reconstruction of internal pores in rock mass as described in any one of claims 1-6.

9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the method for intelligent characterization and three-dimensional reconstruction of internal pores of rock mass as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Aperture structure obtaining method and device thereof

    CN106920238A

  • Lung CT image segmentation method based on Transform and convolutional neural network

    CN116739985A