A rock thin section image classification processing method based on improved ConvNeXt V2

By inserting a global attention mechanism and a multi-scale feature fusion module into the ConvNeXtV2 network, combined with the Lion optimizer, the problems of low accuracy and efficiency in rock thin section image classification are solved, and more efficient and accurate rock thin section image analysis is achieved.

CN123181889APending Publication Date: 2026-11-27PETROCHINA CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510691889.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient classification accuracy and low training efficiency in rock thin-section image classification, especially in rock thin-section images with complex microstructures, where traditional CNN methods struggle to effectively capture key features.

Method used

An improved ConvNeXtV2 network model is adopted, a global attention mechanism is inserted, a multi-scale feature fusion module is designed, and the Lion optimizer is used to replace the Adamw optimizer, thereby improving the model's feature extraction capability and training speed.

Benefits of technology

It significantly improves the classification accuracy and training efficiency of rock thin section images, enhances the model's generalization ability and computational efficiency, reduces information diffusion, and improves the ability to perceive global features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181889A_ABST
    Figure CN123181889A_ABST
Patent Text Reader

Abstract

The rock slice image classification processing method based on the improved ConvNeXt V2 is provided, and ConvNeXt V2 is used as a core feature extraction network; a global attention mechanism is inserted into a stem layer of the ConvNeXt V2 network model, so as to capture image features in multiple dimensions; a multi-scale feature fusion module is designed to replace ordinary convolution in a down-sampling layer, and the multi-scale feature fusion module is obtained based on improvement of an Inception module; and a Lion optimizer is used to replace an original Adamw optimizer to train the network model. Not only can key information in the image be effectively captured and utilized, and information diffusion be reduced, but also the parameter quantity and the calculation quantity of the model are kept simple, the generalization ability and the training speed of the model are improved, and therefore more efficient and accurate analysis and identification can be realized in the application of rock slice image classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer-aided image processing technology, specifically relating to an image processing method based on an improved ConvNeXt V2 for rock thin section image classification. Background Technology

[0002] Rock classification is a crucial step in oil and gas exploration, primarily based on the physical properties of rocks. Traditional methods mainly rely on microscopic observation of thin rock sections to determine rock composition and structure, a process that is time-consuming, costly, and highly subjective. Employing computer-aided techniques for feature extraction and lithology identification from rock images can reduce reliance on specialized personnel and instruments, improving efficiency and enabling the discovery of hidden geological information. While traditional convolutional neural network (CNN)-based methods can capture local and global features of images, their high complexity and limitations in capturing high-frequency details, especially in images with complex microstructures like thin rock sections, make effectively extracting key features and improving classification accuracy a significant challenge.

[0003] To overcome the aforementioned problems, some improved CNN models have been proposed in recent years. For example, Chinese patent application CN116543256A discloses a TransUNet-based method for granularity recognition of rock thin section images. Compared to traditional CNNs, TransUNet, applied to the field of rock thin section image recognition, combines the advantages of Transformer and U-Net, replacing the encoder with ResNet50, which can effectively capture image information and help improve segmentation accuracy in granularity recognition tasks. However, it relies on a complex Transformer structure in rock thin section image processing and lacks global attention and multi-scale feature fusion modules, resulting in insufficient ability to capture complex features of rock thin section images, leading to limited classification accuracy and training efficiency. Summary of the Invention

[0004] To address the insufficient accuracy of existing methods in classifying and recognizing rock thin section images, this invention proposes a rock thin section image classification method based on an improved ConvNeXtV2. This method uses ConvNeXtV2 as the core feature extraction network, embeds a global attention mechanism, designs a multi-scale feature fusion module, and replaces the original Adamw optimizer with the Lion optimizer. This improved ConvNeXtV2 method not only more effectively captures and utilizes key information in the image and reduces information diffusion, but also maintains a streamlined model in terms of parameters and computational cost, improving generalization ability and training speed. Consequently, it achieves more efficient and accurate analysis and recognition in rock thin section image classification applications.

[0005] The technical solution adopted by this invention to solve its technical problem is as follows:

[0006] A method for classifying rock thin section images based on an improved ConvNeXtV2 network model is proposed. The improvements to the ConvNeXtV2 network model are as follows: a global attention mechanism is inserted into the stem layer of the ConvNeXtV2 network model to capture image features across multiple dimensions; a multi-scale feature fusion module is designed to replace the ordinary convolution in the downsampling layer, and this multi-scale feature fusion module is an improvement based on the Inception module; the Lion optimizer is used instead of the original Adamw optimizer to train the network model; and the image to be processed is input into the improved ConvNeXtV2 network model for feature extraction and classification.

[0007] Furthermore, the global attention mechanism consists of two sequential sub-modules: a channel attention module and a spatial attention module. The overall calculation process is as follows:

[0008]

[0009] Where: F1 represents the input feature map; F2 is the weighted result of F1 after passing through the channel attention module; F3 is the weighted result of F2 after passing through the spatial attention module; M c (F1) represents the channel attention map; M s (F2) represents spatial attention mapping; This indicates element-wise multiplication.

[0010] Furthermore, the channel attention module first transposes the feature matrix of the input feature map F1 from C×W×H to W×H×C, and inputs it into a multilayer perceptron (MLP) to amplify the cross-dimensional channel-space dependencies; then, the resulting feature matrix is ​​transposed to C×H×W, and after activation by the nonlinear activation function sigmoid, the final channel attention map M is obtained. c (F1); The input feature map F1 is weighted by the channel attention module to obtain the feature map F2, and the feature map F2 is input to the spatial attention module.

[0011] Furthermore, after the feature map F2 is input into the spatial attention module, it first passes through a 7×7 convolutional layer, and then undergoes dimensionality reduction processing using a reduction ratio. The output feature map then passes through another 7×7 convolutional layer to output the features with the original number of channels. After activation by the sigmoid function, the spatial attention map M is finally output. s (F2), feature map F2 is weighted by the spatial attention module to obtain feature map F3.

[0012] Furthermore, the Inception module is improved by using depthwise convolution and pointwise convolution.

[0013] Further improvements based on the Inception module are as follows: the Inception module is improved into a linear bottleneck structure without residual shorting, pooling layers are removed, and three parallel branches are set for feature extraction. Each branch first uses pointwise convolution to perform dimensionality increase, and then uses 3×3 and 5×5 depthwise convolutions in the second and third branches to extract features of each channel. Finally, pointwise convolution is used to perform feature dimensionality reduction.

[0014] Furthermore, the kernel size of the pointwise convolution is 1×1×C, where C is the number of channels of the output information of the previous layer; each kernel of the pointwise convolution performs a weighted combination of the feature map of the previous step in the channel direction to generate a new feature map.

[0015] Furthermore, the depthwise convolution uses an independent convolution kernel to perform convolution operations on each channel of the previous layer's output. While keeping the number of channels unchanged, the spatial information within each channel is processed independently. After each channel undergoes depthwise convolution, the number of channels in the output feature map is the same as the number of channels in the input feature map, and each channel corresponds to the result of processing by an independent convolution kernel.

[0016] This invention also has two other applications:

[0017] An electronic device includes a processor and a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the method described above.

[0018] A computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the method described above.

[0019] The beneficial effects of this invention include:

[0020] This invention inserts a global attention mechanism into the stem layer of the ConvNeXtV2 network model, enabling it to capture important features in three dimensions. This allows the model to extract key information from images while ignoring irrelevant information in both channel and spatial dimensions, thus improving model performance. A multi-scale feature fusion module is designed to replace ordinary convolutions in the downsampling layer, increasing the network's adaptability to scale and widening the network, thereby improving performance. The Inception module is improved into a linear bottleneck structure without residual shorting, pooling layers are removed, and three parallel branches are used for feature extraction. Each branch first uses pointwise convolutions for dimensionality upscaling, then uses 3×3 and 5×5 depthwise convolutions in the second and third branches respectively to extract features from each channel, and finally uses pointwise convolutions for feature dimensionality reduction. This allows the network to maintain high feature representation ability while reducing model parameters and computational cost. Using the Lion optimizer instead of the original Adamw improves the prediction accuracy and convergence speed of model training.

[0021] In summary, this invention employs a global attention mechanism to improve performance by reducing information diffusion and amplifying global interactive representations, thereby enhancing the ability to perceive global features. A multi-scale feature fusion module is designed to effectively fuse feature maps of different scales. This module replaces ordinary convolutions in the downsampling layer, increasing the network's adaptability to scale and widening the network, thus improving network performance. The model optimizer is improved by using the Lion optimizer instead of the original Adamw, resulting in faster speed, better generalization performance, and lower memory consumption. By introducing a global attention mechanism, a multi-scale feature fusion module, and the Lion optimizer, this invention significantly improves the accuracy and training efficiency of rock thin-section image classification, greatly enhancing the efficiency of rock microstructure research. Attached Figure Description

[0022] Figure 1 This is a structural diagram of the improved ConvNeXtV2 network model of this invention;

[0023] Figure 2 This is a structural diagram of the global attention mechanism of this invention;

[0024] Figure 3 (a) is a structural diagram of the channel attention module of the present invention. Figure 3 (b) is a structural diagram of the spatial attention module of the present invention;

[0025] Figure 4 This is a diagram of the stem layer structure with attention mechanism of the present invention;

[0026] Figure 5 This is a structural diagram of the Inception module of this invention;

[0027] Figure 6This is a diagram of the depth-separable convolution structure of the present invention;

[0028] Figure 7 This is a structural diagram of the multi-scale feature fusion module of the present invention. Detailed Implementation

[0029] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.

[0030] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0031] Example 1: A rock thin section image classification method based on an improved ConvNeXt V2 network model. The following improvements were made to the ConvNeXtV2 network model: a global attention mechanism was inserted after the stem layer of the ConvNeXtV2 network model to improve performance by reducing information diffusion and amplifying global interactive representation; a multi-scale feature fusion module was designed to replace the ordinary convolution in the downsampling layer, increasing the network's adaptability to scale and widening the network to improve network performance; the Lion optimizer was used instead of the original Adamw to improve the prediction accuracy and convergence speed of the model training.

[0032] The improved ConvNeXtV2 network model structure is as follows: Figure 1 As shown, the global attention mechanism is inserted into the stem layer of the ConvNeXt V2 network model. The channel attention module structure of the global attention mechanism is as follows: Figure 3 As shown in (a). Given an input feature map F1, the feature matrix is ​​first transposed from C×W×H to W×H×C and input into a two-layer multilayer perceptron (MLP) to amplify the cross-dimensional channel-space dependencies. Then, the resulting feature matrix is ​​transposed back to C×H×W and activated by the sigmoid nonlinear activation function to obtain the final channel attention map M. c (F1). The input feature map F1 is weighted by channel attention to obtain the feature map F2. H is the height of the feature map, W is the width of the feature map, and C is the number of channels.

[0033] The spatial attention module structure of the global attention mechanism is as follows: Figure 3As shown in (b), two convolutional layers were used for spatial information fusion. However, max pooling reduced information utilization, negatively impacting the process. Pooling was removed to further preserve the feature mapping. The feature map F2 was first input through a 7×7 convolutional layer. Since spatial attention increases the number of parameters, a reduction factor of 4 was used for dimensionality reduction. The output features then passed through another 7×7 convolutional layer to output the original number of channels. After activation by the sigmoid function, the spatial attention mapping M was finally output. s (F2).

[0034] The global attention mechanism consists of two sequential sub-modules: the channel attention module and the spatial attention module. The overall calculation process is as follows:

[0035]

[0036] In the formula: F2 is the weighted result of F1 after passing through the channel attention module; F3 is the weighted result of F2 after passing through the spatial attention module; This indicates element-wise multiplication.

[0037] The structure of the Inception module is as follows: Figure 5 As shown, there are four branches, using 1×1, 3×3, and 5×5 convolutional kernels and 3×3 pooling layers respectively. The input feature map passes through these four branches in parallel to obtain four outputs, which are then concatenated to obtain the final output. This design creates a sparse network structure that increases network depth and width while reducing parameters, generating dense data, which improves neural network performance while ensuring efficient use of computational resources. This invention improves the Inception module using depthwise separable convolution. Depthwise separable convolution decomposes a complete convolution operation into two steps: depthwise convolution (DW) and pointwise convolution (PW). The detailed structure is as follows. Figure 6 As shown, in depthwise convolution, each channel of the input is convolved independently using a small kernel, resulting in a feature map with the same number of channels as the input. This makes it impossible to expand or compress the number of feature maps in the channel dimension. Furthermore, it doesn't effectively utilize the correlation between features from different channels at the same spatial location; while reducing computation, it loses information interaction in the channel dimension. Therefore, pointwise convolution is needed to combine these feature maps.

[0038] Pointwise convolution is a 1×1 convolution. Its kernel size is 1×1×C, where C is the number of channels in the previous layer's output. Therefore, each kernel in pointwise convolution weights and combines the feature maps from the previous step along the channel direction to generate a new feature map. Compared to ordinary convolution, depthwise separable convolution significantly reduces the number of parameters and lowers model complexity.

[0039] The Inception module is improved into a linear bottleneck structure without residual shorting, pooling layers are removed, and three parallel branches are used for feature extraction. Each branch first uses PW convolutions for dimensionality upscaling, then uses 3×3 and 5×5 DW convolutions in the second and third branches respectively to extract features for each channel, and finally uses PW convolutions for feature dimensionality reduction. This allows the network to maintain high feature representation ability while reducing model parameters and computational cost. The improved bottleneck structure is named MFM (Multi-scale Feature Fusion Module), and the MFM module replaces the ordinary convolutions in the downsampling layers. The improved structure is as follows. Figure 7 As shown.

[0040] The Lion optimizer, based on mean squared error and a novel gradient direction method, better handles complex loss functions and training data, thereby improving the model's generalization ability. It utilizes efficient search techniques to explore an infinitely sparse program space. To bridge the generalized gap between the agent and the target task, program selection and simplification strategies are also introduced. Unlike adaptive optimizers, Lion updates each parameter computed through symbolic operations with the same magnitude. Its performance gain increases with the training batch size. The inventors have conducted extensive experiments on various tasks, including image classification, image-text retrieval, and diffusion models, and most tasks show that Lion outperforms mainstream optimizers such as AdamW.

[0041] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A rock thin section image classification processing method based on an improved ConvNeXtV2, characterized in that, The improvements made to the ConvNeXtV2 network model are as follows: a global attention mechanism is inserted into the stem layer of the ConvNeXtV2 network model to capture image features in multiple dimensions; a multi-scale feature fusion module is designed to replace the ordinary convolution in the downsampling layer, and the multi-scale feature fusion module is improved based on the Inception module; the Lion optimizer is used instead of the original Adamw optimizer to train the network model; the image to be processed is input into the improved ConvNeXtV2 network model for feature extraction and classification.

2. The rock thin section image classification processing method based on the improved ConvNeXtV2 according to claim 1, characterized in that, The global attention mechanism consists of two sequential sub-modules: a channel attention module and a spatial attention module. The overall calculation process is as follows: Where: F1 represents the input feature map; F2 is the weighted result of F1 after passing through the channel attention module; F3 is the weighted result of F2 after passing through the spatial attention module; M c (F1) represents the channel attention map; M s (F2) represents spatial attention mapping; This indicates element-wise multiplication.

3. The rock thin section image classification processing method based on the improved ConvNeXtV2 according to claim 2, characterized in that, The channel attention module first transposes the feature matrix of the input feature map F1 from C×W×H to W×H×C, and inputs it into a multilayer perceptron (MLP) to amplify the cross-dimensional channel-space dependencies. Then, the resulting feature matrix is ​​transposed to C×H×W and activated by the non-linear activation function sigmoid to obtain the final channel attention map M. c (F1); The input feature map F1 is weighted by the channel attention module to obtain the feature map F2, and the feature map F2 is input to the spatial attention module.

4. The rock thin section image classification processing method based on the improved ConvNeXtV2 according to claim 3, characterized in that, After the feature map F2 is input into the spatial attention module, it first passes through a 7×7 convolutional layer, and then undergoes dimensionality reduction processing using a reduction ratio. The output feature map then passes through another 7×7 convolutional layer to output the features with the original number of channels. After activation by the sigmoid function, the spatial attention map M is finally output. s (F2), feature map F2 is weighted by the spatial attention module to obtain feature map F3.

5. The rock thin section image classification processing method based on the improved ConvNeXtV2 according to claim 1, characterized in that, The Inception module is improved by using depthwise convolution and pointwise convolution.

6. The rock thin section image classification processing method based on the improved ConvNeXtV2 according to claim 5, characterized in that, The improvements based on the Inception module are as follows: the Inception module is improved into a linear bottleneck structure without residual shorting, pooling layers are removed, and three parallel branches are set up for feature extraction. Each branch first uses pointwise convolution to perform dimensionality increase, and then uses 3×3 and 5×5 depthwise convolution to extract features of each channel in the second and third branches respectively. Finally, pointwise convolution is used to perform feature dimensionality reduction.

7. The rock thin section image classification processing method based on the improved ConvNeXtV2 according to claim 6, characterized in that, The kernel size of the pointwise convolution is 1×1×C, where C is the number of channels of the output information of the previous layer. Each kernel of the pointwise convolution performs a weighted combination of the feature map of the previous step in the channel direction to generate a new feature map.

8. The rock thin section image classification processing method based on the improved ConvNeXtV2 according to claim 7, characterized in that, The depthwise convolution operates on each channel of the previous layer's output using an independent convolution kernel. While keeping the number of channels constant, it processes the spatial information within each channel independently. After depthwise convolution, the output feature map has the same number of channels as the input feature map, and each channel corresponds to the result of processing by an independent convolution kernel.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the rock thin section image classification processing method according to any one of claims 1 to 8.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the rock thin section image classification processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • TransUNet-based rock slice image granularity identification method, electronic equipment and storage medium

    CN116543256A