A shale pore type automatic identification method based on SegFormer
By improving the network using SegFormer and combining the encoder and decoder, and using transposed convolution and 3D relation modeling, the problems of spatial detail loss and poor generalization ability in shale pore identification in traditional methods are solved, and efficient 2D and 3D pore type identification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIV OF MINING & TECH (BEIJING)
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-02
AI Technical Summary
Traditional methods for identifying shale pores suffer from problems such as loss of spatial details, loss of spatial dimensional information, and poor generalization ability. In particular, the stability and robustness of the model are affected when identifying smaller pores, and two-dimensional convolution cannot effectively utilize the spatial information of three-dimensional data.
We adopted an improved SegFormer network, combined with an encoder and decoder, and used a four-layer Transformer block, FPN module, transposed convolution, and MLP for pore identification. We constructed two-dimensional and three-dimensional shale pore type identification models, and preserved edge information and performed three-dimensional relationship modeling through transposed convolution.
It achieves the preservation of edge information and the reduction of fuzziness effect, solves the problem of spatial detail loss in traditional methods, improves the model's generalization ability to multi-scale shale pore features, and can effectively identify two-dimensional and three-dimensional pore types.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of shale pore type identification technology, and in particular to an automatic shale pore type identification method based on SegFormer. Background Technology
[0002] Pores and fractures in rocks influence the storage and migration of oil and gas, and accurate identification of pore types is crucial for oil and gas exploration and development. Therefore, accurate identification of pore types and fractures has become an important research topic. In the exploration and development of unconventional reservoirs such as shale oil and gas, traditional rock physics experiments face difficulties such as sample preparation and long experimental cycles, especially for dense rocks and samples with complex pore structures. With the development of computer hardware and artificial intelligence, deep learning technology has been widely used in various fields. Its excellent performance in image recognition has attracted many geoscientists to apply it to areas such as pore type and fracture identification. However, in practical applications, problems remain, such as time-consuming and labor-intensive dataset production and low accuracy in the final identification results. Therefore, research on accurate segmentation of shale pores and fractures has significant practical significance and challenges. Researchers have used deep learning technology to identify different lithofacies types. This model can identify nine lithofacies types with an accuracy rate of 90.02%. Researchers constructed a deep learning model based on ResNeXt-50 for accurate prediction of sandstone, limestone, and shale types. Researchers constructed a network model based on FLU-net for intelligent identification and classification of micropores in shale reservoirs. They also built a network model based on residual neural networks to identify fractures and different pore types in shale, and further calculated and analyzed relevant pore parameters. A deep learning-based method for identifying micropores in shale was proposed, overcoming the shortcomings of traditional segmentation methods that rely too heavily on human subjectivity and have low accuracy. This deep learning method achieved a high accuracy of 87% in identifying pores and fractures under electron microscopy. Researchers applied MaskR-CNN, FCN, and U-Net models to shale scanning electron microscopy images, showing that the U-Net model is more suitable for identifying major minerals, organic matter, and pores. A new network model combining channel attention mechanisms was proposed, which showed good performance in identifying fractures in shale electron microscopy images. Researchers acquired 58 high-resolution digital core scanning electron microscopy images using focused ion beam technology and performed automatic intelligent detection of pore types in shale reservoirs based on a deep convolutional neural network model, achieving an average accuracy of 0.65. Based on the characteristics of shale pore images, the researchers improved the HAFCN model. The results showed that the model has a greater advantage in segmenting shale, with an average segmentation accuracy of 0.8576.
[0003] Despite progress in feature extraction and representation, the generalization ability of these models across different scenarios still needs improvement. Particularly when dealing with smaller pores, spatial details are lost, affecting the model's stability and robustness. Furthermore, traditional upsampling methods struggle to effectively handle the variable pore sizes in shale images. While two-dimensional pore identification has achieved good results, it also faces the following challenges: 1) Some pore structures lack obvious features in two-dimensional images but possess relevant features in Z-axis slices. However, two-dimensional convolution can only model relationships between two-dimensional data in the X and Y directions, failing to utilize the rich spatial information between adjacent slices. 2) Most shale CT data is three-dimensional, composed of multiple stacked slices. Two-dimensional convolution cannot model relationships between three-dimensional data in the X, Y, and Z dimensions, resulting in low utilization of the rich spatial information between adjacent slices. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, the purpose of this invention is to provide an automatic identification method for shale pore types based on SegFormer, which solves the problems of spatial detail loss, spatial dimensionality information loss, and poor generalization ability of traditional methods.
[0005] To achieve the above objectives, the present invention provides the following solution:
[0006] An automatic identification method for shale pore types based on SegFormer includes:
[0007] Two-dimensional images for target recognition were acquired using an electron microscope.
[0008] Acquire target CT 3D images;
[0009] The target recognition 2D image is input into a 2D shale pore type recognition model pre-built based on the SegFormer improved network for pore recognition, and the 2D shale pore type recognition result is obtained; the SegFormer improved network includes: an encoder and a decoder connected in sequence; the encoder includes: four Transformer blocks; the decoder includes: an FPN module, a transposed convolution, and an MLP connected in sequence;
[0010] The target CT 3D image is input into a 3D shale pore type identification model pre-constructed based on the SegFormer improved network for pore identification, and the 3D shale pore type identification result is obtained.
[0011] Preferably, the construction process of the two-dimensional shale pore type identification model includes:
[0012] Different types of images were collected using an electron microscope to obtain raw data;
[0013] The original data is labeled to obtain a control learning dataset;
[0014] The original data is amplified to obtain an amplified dataset;
[0015] The amplified dataset is preprocessed to obtain a preprocessed dataset;
[0016] The preprocessed dataset is input into the preset SegFormer improved network for learning to obtain the network recognition result;
[0017] The SegFormer improved network is iteratively trained based on the contrastive learning dataset and the network recognition results to obtain the two-dimensional shale pore type recognition model.
[0018] Preferably, the construction process of the three-dimensional shale pore type identification model includes:
[0019] Collect raw CT 3D image sets;
[0020] Convert the original CT 3D image set into JPG format;
[0021] The original CT 3D image set is preprocessed and enhanced to obtain an optimized CT 3D image set;
[0022] A subset of images was randomly selected from the optimized CT 3D image set and manually annotated to obtain partially annotated images;
[0023] Based on the partially annotated images, a semi-supervised annotation model is used to annotate the images in the optimized CT 3D image set after removing the partially annotated images, to obtain an annotated CT 3D image set.
[0024] The SegFormer improved network is iteratively trained using the labeled CT 3D image set to obtain the 3D shale pore type identification model.
[0025] Preferably, the amplification process includes: image rotation and symmetry transformation; the image preprocessing includes: image denoising and brightness adjustment.
[0026] Preferably, the preprocessed dataset is input into the preset SegFormer improved network for learning to obtain the network recognition result, including:
[0027] The preprocessed dataset is input into a cascaded four-layer Transformer block to obtain the first layer encoded features to the fourth layer encoded features;
[0028] The first layer of encoded features to the fourth layer of encoded features are respectively input into the four parallel processing branches in the FPN module for decoding processing to obtain the first layer of decoded vector to the fourth layer of decoded vector;
[0029] The transposed convolution is used to perform convolution processing on the first layer decoding vector to the fourth layer decoding vector to obtain the fused vector;
[0030] The fusion vector is mapped using an MLP to obtain the network recognition result.
[0031] The present invention discloses the following technical effects:
[0032] This invention provides an automatic identification method for shale pore types based on SegFormer. By applying transposed convolution to the output features of the FPN module, it solves the problem of spatial detail loss caused by traditional methods, and achieves the preservation of edge information and the reduction of blurring effect. Through the construction of a three-dimensional shale pore type identification model, it solves the problems of lack of three-dimensional relationship modeling and insufficient utilization of spatial information between adjacent slices, and realizes the extraction of spatial information between adjacent slices and three-dimensional relationship modeling. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a schematic diagram of the automatic identification process of shale pore type based on SegFormer provided in an embodiment of the present invention;
[0035] Figure 2 This is a network model structure diagram of the SegFormer model provided in an embodiment of the present invention;
[0036] Figure 3 A network architecture diagram provided for embodiments of the present invention;
[0037] Figure 4 This is a flowchart illustrating the upsampling operation process provided in an embodiment of the present invention.
[0038] Figure 5 The original image of the dataset provided in the embodiments of the present invention;
[0039] Figure 6 Schematic diagrams of different model methods MIou provided in embodiments of the present invention;
[0040] Figure 7The model training results provided in the embodiments of the present invention;
[0041] Figure 8 This is a diagram showing the SegFormer network recognition results provided in an embodiment of the present invention.
[0042] Figure 9 A comparison chart of SegFormer network recognition results provided in an embodiment of the present invention;
[0043] Figure 10 The mIoU and mPA diagrams of the SegFormer model provided in this embodiment of the invention;
[0044] Figure 11 The crack dataset provided in the embodiments of the present invention;
[0045] Figure 12 The pore data set provided in the embodiments of the present invention;
[0046] Figure 13 Crack annotation diagram provided for embodiments of the present invention;
[0047] Figure 14 This is a flowchart of image segmentation provided in an embodiment of the present invention;
[0048] Figure 15 A three-dimensional reconstruction diagram provided for an embodiment of the present invention;
[0049] Figure 16 Crack identification slice image provided in an embodiment of the present invention;
[0050] Figure 17 A three-dimensional image of a crack provided for an embodiment of the present invention;
[0051] Figure 18 A three-dimensional diagram of pores provided for an embodiment of the present invention. Detailed Implementation
[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] The purpose of this invention is to provide an automatic identification method for shale pore types based on SegFormer, which solves the problems of spatial detail loss, spatial dimensionality loss, and poor generalization ability of traditional methods.
[0054] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] Figure 1 This is a schematic diagram of the automatic identification process for shale pore types based on SegFormer provided in an embodiment of the present invention, as shown below. Figure 1 As shown, this invention provides an automatic identification method for shale pore types based on SegFormer, including:
[0056] Step 100: Acquire two-dimensional images for target identification using an electron microscope;
[0057] Step 200: Acquire 3D CT images of the target;
[0058] Step 300: Input the target recognition 2D image into a 2D shale pore type recognition model pre-built based on the SegFormer improved network for pore recognition, and obtain the 2D shale pore type recognition result; the SegFormer improved network includes: an encoder and a decoder connected in sequence; the encoder includes: four Transformer blocks; the decoder includes: an FPN module, a transposed convolution, and an MLP connected in sequence;
[0059] Step 400: Input the target CT 3D image into the 3D shale pore type identification model pre-constructed based on the SegFormer improved network for pore identification, and obtain the 3D shale pore type identification result.
[0060] Specifically, the construction process of the two-dimensional shale pore type identification model includes:
[0061] Different types of images were collected using an electron microscope to obtain raw data;
[0062] The original data is labeled to obtain a control learning dataset;
[0063] The original data is amplified to obtain an amplified dataset;
[0064] The amplified dataset is preprocessed to obtain a preprocessed dataset;
[0065] The preprocessed dataset is input into the preset SegFormer improved network for learning to obtain the network recognition result;
[0066] The SegFormer improved network is iteratively trained based on the contrastive learning dataset and the network recognition results to obtain the two-dimensional shale pore type recognition model.
[0067] Furthermore, the construction process of the three-dimensional shale pore type identification model includes:
[0068] Collect raw CT 3D image sets;
[0069] Convert the original CT 3D image set into JPG format;
[0070] The original CT 3D image set is preprocessed and enhanced to obtain an optimized CT 3D image set;
[0071] A subset of images was randomly selected from the optimized CT 3D image set and manually annotated to obtain partially annotated images;
[0072] Based on the partially annotated images, a semi-supervised annotation model is used to annotate the images in the optimized CT 3D image set after removing the partially annotated images, to obtain an annotated CT 3D image set.
[0073] The SegFormer improved network is iteratively trained using the labeled CT 3D image set to obtain the 3D shale pore type identification model.
[0074] Optionally, the amplification process includes: image rotation and symmetry transformation; the image preprocessing includes: image denoising and brightness adjustment.
[0075] Further, the preprocessed dataset is input into the preset SegFormer improved network for learning to obtain the network recognition results, including:
[0076] The preprocessed dataset is input into a cascaded four-layer Transformer block to obtain the first layer encoded features to the fourth layer encoded features;
[0077] The first layer of encoded features to the fourth layer of encoded features are respectively input into the four parallel processing branches in the FPN module for decoding processing to obtain the first layer of decoded vector to the fourth layer of decoded vector;
[0078] The transposed convolution is used to perform convolution processing on the first layer decoding vector to the fourth layer decoding vector to obtain the fused vector;
[0079] The fusion vector is mapped using an MLP to obtain the network recognition result.
[0080] Specifically, SegFormer is an efficient deep learning model in the field of semantic segmentation. It combines a hierarchical Transformer encoder with a lightweight multilayer perceptron (MLP) decoder. Figure 2As shown, the hierarchical Transformer encoder of this model can generate multi-scale feature maps. Meanwhile, SegFormer avoids the design of traditional complex decoders, instead employing an efficient MLP decoder structure. This decoder effectively aggregates feature information from different levels, fusing local and global attention, exhibiting powerful representation capabilities. These characteristics make it highly suitable for the shale image pore type identification and crack segmentation task in this embodiment. This network structure has the following characteristics: 1) a hierarchical Transformer encoder that does not require explicit location encoding; 2) equipped with a lightweight all-MLP decoder, resulting in low computational complexity and fewer model training parameters; 3) on the pore segmentation semantic segmentation dataset, its efficiency, accuracy, and robustness are superior to semantic segmentation models such as DeepLab.
[0081] Furthermore, the image processing flow of SegFormer is as follows: The MiT (MixTransformer) module in the encoder first processes the input image using an Overlapped Patch Embedding (OPE) structure. OPE uses standard convolutional layers to divide the image into overlapping image blocks and flattens these blocks into a sequence for subsequent modules. This sequence is then processed through the EMSA (Efficient Multi-head Self-Attention) layer and the MixFFN (Mixed Feedforward Network) layer.
[0082] Specifically, the method proposed in this embodiment is based on the SegFormer network, and its architecture is as follows: Figure 3 As shown, the architecture mainly consists of two parts: an encoder and a decoder. The encoder comprises four Transformer blocks and is used to extract multi-scale features from the input image. The decoder consists of a Feature Pyramid Network (FPN) and transposed convolutions: the FPN enhances context awareness and preserves fine edges by fusing multi-scale features; the transposed convolutions are responsible for restoring the spatial dimension of the feature maps, thereby optimizing the feature learning process. The Transformer blocks enhance network depth by stacking multiple EMSA modules with MixFFN units, thereby capturing richer detailed information and high-level semantic features. Unlike common architectures, MiT adopts a unique strategy: it directly performs self-attention computation at each independent scale, rather than fusing cross-scale information first and then performing unified processing. This design aims to handle multi-scale features more flexibly, making self-attention computation at each scale more focused and efficient. After the input image passes through four Transformer blocks sequentially, a set of feature maps at different resolutions is generated. These feature maps contain hierarchical feature information (from coarse-grained to fine-grained) at different levels, providing rich multi-scale input for the subsequent FPN mechanism.
[0083] Furthermore, traditional upsampling methods often face numerous challenges, such as information loss, blurred edges, high computational requirements, and limited model generalization ability. These methods typically perform interpolation operations without considering the correlation between features, resulting in the loss of detailed information in the generated high-resolution features. In contrast, transposed convolution, as a learnable convolution operation, can effectively recover some spatial information, improving the spatial resolution of the feature map while maintaining its representational power. The decoder design in this embodiment uses transposed convolution to replace traditional upsampling techniques, and its implementation process is as follows: Figure 4 As shown, this transposed convolutional module consists of several convolutional layers with a stride greater than 1 (i.e., strided convolution). By applying transposed convolution to the output features of the FPN module, the spatial resolution of the feature map can be gradually improved while effectively preserving detailed information, thus solving the problem of spatial detail loss caused by traditional methods. Furthermore, traditional upsampling methods struggle to effectively handle the variable pore sizes in shale images, while transposed convolution better preserves edge information and reduces blurring effects. By employing a learnable transposed convolutional kernel, features can be upsampled to a higher spatial resolution, thereby enhancing the model's generalization ability to multi-scale shale pore features. This characteristic also helps the model adapt to shale pore and fracture structures of different sizes and scales, improving overall robustness.
[0084] Specifically, this involves two-dimensional pore identification. The dataset consists of raw images collected using an electron microscope. These images were manually filtered to determine the types of pores they contain. To further enrich the dataset, address overfitting during model training, and enhance the generalization ability of the deep learning model, the raw image data was augmented. This augmentation process involved rotating and performing symmetric transformations on each image, resulting in a new dataset of over 2000 images. Figure 5 This is a display image of the expanded dataset. In this embodiment, electron microscope images are used as initial data. Preprocessing steps such as denoising, image rotation, and brightness adjustment are performed on these images to further increase the variety of data types and improve the overall quality. The training and validation sets are divided in a 9:1 ratio. Labeling software is used to process the original electron microscope images into an image dataset suitable for training deep learning networks. This dataset is then used for object detection and image segmentation, achieving efficient, fast, and accurate identification of pore types and cracks.
[0085] Optionally, the experimental environment and parameter settings are as follows: The main hardware and software configuration used in the training process is as follows: The program runs on a Win10 system, and the selected image processor is an NVIDIA P5000, which meets the relevant requirements for installing CUDA. To ensure that the installed CUDA can be compiled normally, the relevant compiler, Visual Studio, needs to be installed first. Since Python itself lacks core libraries such as NumPy commonly used in deep learning training, and Anaconda, as a tool that integrates the basic Python environment, has installed various commonly used Python packages, it allows users to quickly build a deep learning environment suitable for model training. In this embodiment, the version used in the deep learning model training process is Anaconda 4.12.0.
[0086] Preferably, model evaluation metrics are used. To better evaluate the image segmentation performance of the model, this embodiment uses common parameters of the image segmentation evaluation system, mainly including pixel accuracy (PA) and mean intersection-over-union (MIOU). Pixel accuracy is mainly the ratio of the number of correctly classified pixels to the total number of pixels in the image. Mean pixel accuracy is an improved pixel accuracy, which calculates the proportion of correctly classified pixels of different categories and then calculates the average of the total categories. Mean intersection-over-union is the area of intersection between two different regions, that is, the degree of overlap between the true label region and the predicted region. In addition to pixel accuracy, mean pixel accuracy, and mean intersection-over-union mentioned above, commonly used metrics for image segmentation also include precision, recall, and F1 score. Precision is the proportion of true samples in the model's prediction results. Recall reflects the probability that positive samples are accurately identified, while F1 is a quantified value of the weighted average of precision and recall.
[0087] Furthermore, the model evaluation training is compared. Figure 6 This paper presents a comparison of the average pixel accuracy of SegFormer, DeepLab, and UNet during training. Compared to the other two networks, SegFormer is more effective at reducing the loss value during training. Initially, the average pixel accuracy of the three networks is similar, but as training progresses, SegFormer consistently and steadily outperforms the other two. This indicates that SegFormer has stronger adaptability and optimization capabilities during training, can more effectively reduce errors, and the lower loss value foreshadows higher prediction accuracy and generalization ability. (Model training results are referenced.) Figure 7 .
[0088] Figure 8 and Figure 9The image shows the segmentation results from the SegFormer model. The left column represents the original image, and the right column represents the segmented image. In the SegFormer model segmentation, green represents organic pores, blue represents inorganic pores, and cyan represents cracks. The image demonstrates that the model effectively identifies organic pores, inorganic pores, and microcracks, and reasonably segments the edges, closely approximating the true values. It also performs well in segmenting small organic and inorganic pores and microcracks.
[0089] Optionally, comparative experiments with different models are conducted. To more accurately compare the segmentation accuracy of the DeeplabV3 model and the SegFormer model, this embodiment uses pixel accuracy (PA), precision (Pr), recall (Re), F1 score, and mean intersection over union (MIoU) as the main evaluation criteria for model segmentation performance, achieving accurate segmentation of image aperture types.
[0090] Figure 10 The following are the segmentation metrics for the SegFormer model. The SegFormer model achieves an average pixel-level accuracy (MIoU) of 85.6%, with 93% for organic pores, 69% for inorganic pores, and 82% for cracks. Its average intersection-over-union (mPA) is 91.61%, with 98% for organic pores, 77% for inorganic pores, and 93% for cracks. This experiment aims to further evaluate the effectiveness of SegFormer in shale pore and crack image segmentation. For comparative experiments, several well-known methods in the image segmentation field were selected for comparison, including Deeplabv3, U-Net, and SegFormer. All models were trained using the same training parameters and strategies. The experimental results conducted on the same dataset are shown in Table 1.
[0091] Table 1
[0092] Methods Miou MPA MPrecision MRecall DeepLabV3 0.567 0.849 0.615 0.849 Unet 0.858 0.908 0.913 0.908 SegFormer 0.856 0.916 0.922 0.916
[0093] Table 1 shows that the MIou value (Unet) is similar to that of SegFormer; however, SegFormer consistently achieves the highest MPA, MPrecision, and Mrecall. Based on performance evaluation metrics, the SegFormer model was selected for image segmentation. SegFormer is an image segmentation model based on the advanced transformer architecture. Compared to commonly used convolutional neural networks, it possesses a global receptive field. When segmenting shale SEM images, the SegFormer model achieved an MIouU of 85.6%, with 69% for organic pores, 93% for inorganic pores, and 82% for cracks. Its mPA value was 91.61%. Both its Precision and Recall exceeded 90%, thus the SegFormer model's segmentation accuracy surpassed that of commonly used convolutional neural networks. Considering the training processes of different models and different evaluation metrics, the model developed in this embodiment can effectively segment pore types in images.
[0094] Specifically, this involves 3D pore identification and dataset processing. Pore identification, as an indispensable and crucial step, plays a key role in oil and gas exploration. This embodiment utilizes deep learning to develop a 3D image processing algorithm. High-resolution CT slice images of shale and sandstone are used as inputs during model training, allowing the model to learn the connectivity and development of pores and minerals between different slices, effectively identifying pore and fracture types. Detecting the number, size, and connectivity of pores is essential in oil and gas exploration, but traditional rock physics experimental methods cannot accurately reflect the structural characteristics of pores, and the actual pore structure is difficult to measure directly. Therefore, CT is a common method for detecting pore characteristics. This technology is a non-destructive scanning technique, fully extracting the pore characteristics inside the sample without damaging the original sample. Through CT image processing, rock pore characteristics can be observed intuitively and conveniently.
[0095] Furthermore, Figure 11 and Figure 12For CT slice images, to further optimize CT images, this embodiment uses Python programming to convert the image format, that is, to convert the original CT image format to JPG format. Simultaneously, the image brightness is appropriately increased to facilitate clearer observation of the internal information of the image. The JPG format image is shown below. Due to interference and other factors affecting the electronic components of the CT equipment during image acquisition, the original CT data cannot be directly used in the deep learning model training process. Therefore, directly obtaining CT images requires data preprocessing. Appropriate preprocessing of the original data can improve algorithm performance and model output reliability. Data filtering or smoothing is used to suppress noise and further enhance the features of pores or cracks in the image, based on which image segmentation is performed. After cropping, rotation, and enhancement steps, the image quality, resolution, and number of images are further improved. Through semi-supervised annotation model processing, the original CT images are processed into an image dataset suitable for deep learning. This dataset is used to train the model based on artificial intelligence deep learning algorithms and fully convolutional neural networks, thereby obtaining the model's recognition map of pore structures in electron microscope images. The model can efficiently and accurately learn the features and patterns of the input image. Crack annotation image is shown below. Figure 13 As shown.
[0096] refer to Figure 14 Pore segmentation process:
[0097] 1) Each group of CT images consists of a different number of CT slices. In order to facilitate image processing and segmentation, this embodiment stores the CT slices as a single image file.
[0098] 2) For each CT slice, data annotation is performed. First, a portion of the data is randomly selected and manually annotated. The remaining data is annotated using a semi-supervised annotation model. The original image is divided into two categories, cracks and background, according to the target category, and the dataset is annotated.
[0099] 3) This image segmentation method is based on a convolutional neural network, which combines the original image with a labeled mask. Figure 1 The parameters of the deep learning model are gradually adjusted in a one-to-one correspondence input network to continuously optimize the weight file of the network. A fixed number of iterations is used in the actual network training process. The corresponding network model is trained through multiple iterations. After training is completed, the test set is used for testing.
[0100] refer to Figure 15In CT image segmentation tasks, since the number of features in CT slices of rock cracks is often less than that in ordinary color images, this embodiment designs a convolutional neural network model as shown in the figure above. The overall architecture of the convolutional neural network designed in this embodiment mainly consists of core layers such as convolution and pooling, achieving accurate pixel-level recognition and classification of images. This neural network architecture uses CT image slices as raw input data. These slices include structured information of pixel neighborhoods. After nonlinear operations such as convolution and pooling in the neural network, the predicted results of the slices are output. The parameter settings in the network are continuously improved through preprocessing data, resulting in a network model with high accuracy. The specific training process of the network uses images containing local receptive fields. After nonlinear mapping relationships in the network, the slice image crack and the corresponding background image are output. The later part of the network classifies the extracted features to determine the category to which the superpixels belong. This model can simplify the specific steps of pixel segmentation and improve the accuracy of image segmentation. The feature decoding part of the network decodes and classifies the extracted features to determine the specific type of the segmented object. This network program has lower computational complexity and higher image accuracy in actual operation.
[0101] Preferably, 3D visualization of CT images is used. To intuitively display the 3D morphological features of the microstructure of pores and cracks, this embodiment uses 3D visualization software to reconstruct the real structure from the processed CT images. If all CT data were used for structural parameter extraction and performance simulation, the computational load would be enormous, requiring high computer performance and consuming a significant amount of time. Therefore, this embodiment selects a portion of CT slices for 3D model construction.
[0102] Figures 16 to 18 The results present visualizations of cracks and pores in two dimensions and three dimensions. CT slices after crack identification show the distribution of cracks in the two-dimensional image, providing a more intuitive representation for crack research. CT slices after pore identification show the size, shape, and distribution of pores in the image through two-dimensional slicing, facilitating the analysis of the specific structure of pores. Figure 17 and Figure 18 The images show the three-dimensional distribution of fractures and pores. The three-dimensional fracture distribution image visually illustrates the direction and spatial nature of fractures, providing a more comprehensive view of their three-dimensional structure. The three-dimensional pore image visually displays the specific distribution and size of pores in three-dimensional space, providing important visual support for studying the impact of different pore structures on oil and gas production and reservoir performance.
[0103] Specifically, to achieve intelligent identification of pores, fractures, and minerals, an optimized SegFormer algorithm was used to achieve pixel-level semantic segmentation of pores and fractures, significantly improving the segmentation accuracy to 91.6%. Simultaneously, it effectively identified organic pores, inorganic pores, and micro-fractures, achieving pore segmentation and pore category labeling. This algorithm also outperforms traditional threshold segmentation methods in generalization ability and automation, reducing the influence of subjective human judgment on the results. In traditional rock pore and fracture identification, two-dimensional image analysis methods have significant limitations, making it difficult to comprehensively capture the three-dimensional information of the rock's internal structure. This embodiment proposes a three-dimensional image reconstruction method combined with deep learning technology, achieving three-dimensional visualization of rock pores and fractures. It three-dimensionally presents the extension direction, spatial connectivity, and interaction with surrounding rocks of fractures, as well as the distribution, size variations, and interconnectivity of pores in three-dimensional space, providing rich information for in-depth analysis of the microstructural characteristics of rocks and their impact on reservoir and seepage performance.
[0104] The beneficial effects of this invention are as follows:
[0105] This invention applies transposed convolution to the output features of the FPN module, which can better preserve edge information and reduce blurring effects. It can gradually improve the spatial resolution of the feature map and effectively preserve detailed information, thereby enhancing the model's generalization ability to multi-scale shale pore features. Through the constructed three-dimensional shale pore type identification model, it can model the relationship between three-dimensional data from three dimensions and realize the extraction of spatial information between adjacent slices.
[0106] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0107] This embodiment uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for automatic identification of shale pore type based on SegFormer, characterized in that, include: Two-dimensional images for target recognition were acquired using an electron microscope. Acquire target CT 3D images; The target recognition 2D image is input into a 2D shale pore type recognition model pre-constructed based on the SegFormer improved network for pore recognition, and the 2D shale pore type recognition result is obtained. The SegFormer improved network includes: an encoder and a decoder connected in sequence; the encoder includes: four Transformer blocks; the decoder includes: an FPN module, a transposed convolution, and an MLP connected in sequence. The target CT 3D image is input into a 3D shale pore type identification model pre-constructed based on the SegFormer improved network for pore identification, and the 3D shale pore type identification result is obtained.
2. The method for automatic identification of shale pore type based on SegFormer according to claim 1, characterized in that, The construction process of the two-dimensional shale pore type identification model includes: Different types of images were collected using an electron microscope to obtain raw data; The original data is labeled to obtain a control learning dataset; The original data is amplified to obtain an amplified dataset; The amplified dataset is preprocessed to obtain a preprocessed dataset; The preprocessed dataset is input into the preset SegFormer improved network for learning to obtain the network recognition result; The SegFormer improved network is iteratively trained based on the contrastive learning dataset and the network recognition results to obtain the two-dimensional shale pore type recognition model.
3. The method for automatic identification of shale pore type based on SegFormer according to claim 1, characterized in that, The construction process of the three-dimensional shale pore type identification model includes: Collect raw CT 3D image sets; Convert the original CT 3D image set into JPG format; The original CT 3D image set is preprocessed and enhanced to obtain an optimized CT 3D image set; A subset of images was randomly selected from the optimized CT 3D image set and manually annotated to obtain partially annotated images; Based on the partially annotated images, a semi-supervised annotation model is used to annotate the images in the optimized CT 3D image set after removing the partially annotated images, to obtain an annotated CT 3D image set. The SegFormer improved network is iteratively trained using the labeled CT 3D image set to obtain the 3D shale pore type identification model.
4. The method for automatic identification of shale pore type based on SegFormer according to claim 2, characterized in that, The amplification process includes: image rotation and symmetry transformation; the image preprocessing includes: image denoising and brightness adjustment.
5. The method for automatic identification of shale pore type based on SegFormer according to claim 2, characterized in that, The preprocessed dataset is input into the preset SegFormer improved network for learning, and the network recognition results are obtained, including: The preprocessed dataset is input into a cascaded four-layer Transformer block to obtain the first layer encoded features to the fourth layer encoded features; The first layer of encoded features to the fourth layer of encoded features are respectively input into the four parallel processing branches in the FPN module for decoding processing to obtain the first layer of decoded vector to the fourth layer of decoded vector; The transposed convolution is used to perform convolution processing on the first layer decoding vector to the fourth layer decoding vector to obtain the fused vector; The fusion vector is mapped using an MLP to obtain the network recognition result.