A rock thin section hierarchical identification method based on deep learning
By using a hybrid architecture deep learning model that combines ResNet and Swin Transformer networks, automated and accurate dual-level identification of rock thin sections was achieved. This addresses the shortcomings of existing technologies in analyzing local details and global structures, thereby improving identification efficiency and accuracy.
Patent Information
- Application Number
- CN202511596509.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-11-04
AI Technical Summary
Existing technologies cannot effectively address the dual analytical needs of local details and global structure in rock thin section images, and they ignore the hierarchical classification system in geology, resulting in lithology identification results that rely on expert experience and are inefficient.
A hybrid deep learning model, combining ResNet and Swin Transformer backbone networks, is used to extract local and global features. The model is then optimized through a dual-task joint loss function to achieve dual-level recognition of rock thin sections.
It improves the model's generalization ability and robustness, enabling it to automatically and objectively identify coarse-grained and fine-grained categories of rock thin sections, conforming to the identification logic of geologists and improving identification efficiency and accuracy.
Smart Images

Figure CN121053652B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of lithology identification, and particularly relates to a rock thin section level identification method based on deep learning. BACKGROUND
[0002] Lithology identification is a basic research field of geology, and plays a crucial role in geological mapping, mineral resource exploration, oil and gas reservoir evaluation, engineering geological stability evaluation and geological disaster prediction. At present, the mainstream technical means for lithology identification is rock thin section identification. This method observes rock thin sections under a polarizing microscope, and professional personnel comprehensively analyzes and identifies the microscopic characteristics of the rock, such as mineral composition, content, particle size, structure and structure, etc., based on their geological knowledge and long-term accumulated experience. However, this traditional method has obvious limitations: first, the identification result is highly dependent on the professional level and subjective judgment of the identifier, and different experts may have different identification results for the same thin section; second, the manual identification process is time-consuming and labor-intensive, and the efficiency is low. In the face of the massive core samples generated by modern drilling engineering, manual identification has become a bottleneck restricting the efficiency of geological work.
[0003] In order to overcome the shortcomings of manual identification, automatic image analysis technology, especially deep learning, has been introduced into the field of rock thin section identification. The existing technical routes can be summarized as follows: (1) traditional machine learning-based methods: early research work mainly extracts features through manual design of feature extraction operators. The common shortcomings of this kind of method are that the feature design process is complex, depends on expert knowledge, and the shallow features extracted have limited expression ability, making it difficult to cope with the complexity and diversity of rock images, and the generalization ability is weak. (2) Deep learning-based methods: with the development of deep learning, models represented by CNN are widely used, realizing automatic feature extraction. However, the core convolution operation of CNN is essentially a local operation, which makes the model have inherent defects in capturing long-distance dependencies and global structural information necessary for determining part of the rock type (such as metamorphic rock with schistosity and banded structure). In recent years, the Transformer model has shown strong global context modeling ability with its self-attention mechanism, and has also been introduced into visual tasks. Swin Transformer reduces the computational complexity by introducing hierarchical structure and shift window mechanism, making it suitable for image recognition. However, the Transformer model generally lacks the inductive bias that CNN has, resulting in lower efficiency in learning local fine-grained features, and usually requires larger scale datasets for training to avoid overfitting.
[0004] In summary, the prior art, whether traditional methods or single deep learning models, cannot perfectly balance the dual analysis needs of local details and global structure of rock thin section images, and generally ignore the inherent hierarchical classification system of geology. Therefore, developing a new deep learning method that can fuse multi-scale features and combine geological prior knowledge is an urgent need to promote the development of rock thin section intelligent recognition technology. SUMMARY
[0005] The purpose of the embodiment of the present application is to provide a rock thin section hierarchical identification method based on deep learning, aiming to solve the problems raised in the above background art.
[0006] The embodiment of the present application is implemented in this way, a rock thin section hierarchical identification method based on deep learning, comprising the following steps:
[0007] Step 1: data collection and preprocessing;
[0008] Screen and organize rock thin section microscopic images containing metamorphic rocks, igneous rocks and sedimentary rocks, build an original image dataset, and establish a dual classification label containing coarse granularity and fine granularity for each image;
[0009] Step 2: data augmentation;
[0010] Perform data augmentation operations on the preprocessed image dataset to form a sample dataset;
[0011] Step 3: sample data division;
[0012] Randomly divide the augmented sample dataset into a training image sample dataset and a test image sample dataset according to a predetermined ratio;
[0013] Step 4: model construction and training;
[0014] Build a deep learning model with a hybrid architecture, input the image into the pre-trained ResNet backbone network and SwinTransformer backbone network at the same time, extract local feature maps and global feature maps; align and fuse the two feature maps to obtain a fused feature map; input the fused feature map into the channel attention module and the spatial attention module for attention enhancement; convert the feature map after attention enhancement into a feature vector through the pooling layer, input it into the hierarchical classification module, first predict the coarse-grained category, then concatenate the coarse classification result with the feature vector and predict the fine-grained category; use a double-task joint loss function to optimize the model;
[0015] Step 5: model application;
[0016] Apply the trained model to rock thin section identification and output coarse-grained and fine-grained dual categories.
[0017] Further technical solutions, in the step 2, the data enhancement operation includes random scaling and cropping, random horizontal flip, random rotation, color disturbance and random erasing.
[0018] Further technical solutions, in the step 4, the total loss of the double-task joint loss function Composed of the cross-entropy loss of the coarse-grained classification task and the cross-entropy loss of the fine-grained classification task:
[0019] ;
[0020] Wherein, is the coarse-grained classification loss, is the fine-grained classification loss.
[0021] Wherein, the calculation formula of each cross-entropy loss is:
[0022] ;
[0023] In the formula, denotes the classification loss, is the number of current training batch samples, is the number of categories, is the sample The true label of the category , is the probability that the model predicts that the sample belongs to the category ; by minimizing the total loss, the two classification tasks promote each other in the training process and improve the model performance together.
[0024] Another purpose of the embodiment of the application is a rock thin section hierarchical identification system based on deep learning, based on the above method, the system comprises a data preprocessing module, a double-main feature extraction module, a feature fusion module, a serial double attention module, a hierarchical classification module and a model training optimization module.
[0025] The data preprocessing module is used for preprocessing the rock thin section image to be identified;
[0026] The double-main feature extraction module is used for inputting the preprocessed image into two parallel backbone networks at the same time, wherein the ResNet backbone network is used for extracting local feature maps, and the Swin Transformer backbone network is used for extracting global feature maps;
[0027] The feature fusion module is used for performing channel alignment and element-by-element addition fusion on the feature maps output by the two networks to obtain a fused feature map;
[0028] The serial double attention module is used for weighted optimization of the fused features.
[0029] The hierarchical classification module converts the feature map optimized by the double attention into a one-dimensional feature vector through an adaptive average pooling layer; for the enhanced feature map, a coarse-grained category is first predicted, and then the prediction result is combined with the feature vector to jointly predict a fine-grained category.
[0030] The model training optimization module guides the parameter optimization of the model through a double-task joint loss function.
[0031] Further technical solutions, the double-main-stem feature extraction module includes a local feature extractor and a global feature extractor;
[0032] The local feature extractor adopts a ResNet-50 network, and by intercepting the part before the full connection layer and the final pooling layer of the ResNet network, it is used as a pure feature extractor to extract a high-dimensional feature map containing local detail information.
[0033] The global feature extractor adopts a Swin Transformer backbone network, intercepts the output of the middle layer of the network, and selects a feature map matching the spatial size of the output feature map of the ResNet to extract the global macro features of the rock.
[0034] Further technical solutions, the serial double attention module includes a channel attention module and a spatial attention module;
[0035] The channel attention module aggregates the spatial information of each feature channel through global average pooling and global maximum pooling operations, then sends the information to a shared multi-layer perception to model the correlation between channels, and finally generates a weight between 0 and 1 for each channel; the weight is multiplied back to the original feature map to enhance the feature channels beneficial to lithology identification and suppress noise or redundant channels;
[0036] The spatial attention module performs average pooling and maximum pooling on the feature map along the channel dimension, concatenates the two pooling results, and generates a spatial attention map through a convolution layer; the map gives each spatial position of the feature map a weight, so that the model focuses on the key areas in the image.
[0037] Further technical solutions, the system further includes an explainability verification module;
[0038] The explainability verification module adopts a gradient weighted class activation mapping technology to perform explainability analysis on the model after training; by calculating the gradient of the target class score with respect to the feature map of a specific convolution layer inside the model, a heat map is generated to visualize which areas in the input image the model focuses on when making a specific classification decision.
[0039] By comparing the generated heat map with the original rock thin section image, it is determined whether the model focuses on key mineral and structural features with geological classification significance.
[0040] The rock thin section hierarchical identification method based on deep learning provided by the embodiment of the present application has the following beneficial effects:
[0041] (1) Excellent generalization ability: Compared with the accuracy of the training set, the accuracy of the model on the test set decreases less, effectively avoiding the overfitting problem that may occur in other models. At the same time, it also shows strong robustness on the independent external validation set, and the identification accuracy of igneous rocks and sedimentary rocks reaches 94.97% and 95.65%, respectively.
[0042] (2) Decision-making process has geological rationality: Through explainability analysis, it is proved that the model can focus on key mineral and structural features with geological classification significance, and its decision-making process conforms to the identification logic of geologists, thereby enhancing the credibility of the model.
[0043] (3) Realize efficient and objective automation: The traditional subjective and time-consuming manual identification process is changed into an automated and standardized process, which provides an efficient, objective and repeatable lithology identification benchmark for large-scale geological data processing, and has important application value in deep resource exploration and geological disaster assessment fields. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 A flowchart of the rock thin section hierarchical identification method based on deep learning provided by the embodiment of the present application is provided.
[0045] Figure 2 A structure diagram of the series double attention module in the rock thin section hierarchical identification system based on deep learning provided by the embodiment of the present application is provided. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0047] The specific implementation of the present application is described in detail below in combination with specific embodiments.
[0048] As Figure 1 shown, a rock thin section hierarchical identification method based on deep learning is provided for an embodiment of the application, comprising the following steps:
[0049] Step 1: data collection and preprocessing;
[0050] First, screen and organize the rock thin section microscopic images containing three major rock types of metamorphic rock, igneous rock and sedimentary rock, and construct the original image dataset. According to the file name information of each image, establish a double classification label for each image containing coarse granularity (igneous rock, sedimentary rock, metamorphic rock) and fine granularity (specific lithology name), and form a rock microscopic thin section image dataset containing complete label information, which is prepared for subsequent model training.
[0051] Step 2: data augmentation;
[0052] In order to expand the number of training samples, increase the diversity of data to improve the generalization ability and robustness of the model, a series of data augmentation operations are performed on the preprocessed image dataset to form a sample dataset. The specific operations include: image random scaling and cropping to simulate the observation effect under different magnifications, image random horizontal flipping to increase the mirror image samples of the image, image random rotation to simulate the case of placing the thin section at any angle under the microscope, adjusting the brightness, contrast, saturation, etc. of the image to adapt to different lighting and shooting conditions, and randomly erasing a small area of the image to force the model to learn more features outside the local area.
[0053] Step 3: sample data division;
[0054] The sample dataset after data augmentation is randomly divided according to the preset proportion to obtain the training image sample dataset for model training and the test image sample dataset for evaluating the performance of the model.
[0055] Step 4: model construction and training;
[0056] First, a hybrid architecture deep learning model is constructed, and then the training image sample dataset divided in step 3 is used to train and optimize the model. The model is constructed by first performing double-main parallel feature extraction, i.e., inputting the training image sample into the pre-trained ResNet backbone network and Swin Transformer backbone network at the same time. The ResNet backbone network extracts local fine-grained features such as mineral crystal color and shape in the image through its deep convolutional layers, outputting local feature maps; while the Swin Transformer backbone network captures global macro features such as the overall structure and structure of the rock in the image using its self-attention mechanism and hierarchical structure, outputting global feature maps.
[0057] Then, the feature fusion and attention enhancement stage is entered, the feature maps output by the two backbone networks are aligned in the channel dimension and are added element by element, the local feature map and the global feature map are fused into a unified fusion feature map, and then the fusion feature map is sequentially sent into the channel attention module and the spatial attention module to adaptively enhance the most discriminative information. In the hierarchical classification stage, the feature map after attention enhancement is converted into a feature vector through a pooling layer and is input into a hierarchical dependent classification module. The module first predicts a coarse-grained category, then splices the coarse classification result and the feature vector, and inputs them into a fine-grained classification head to predict the final fine-grained lithology.
[0058] In the model training and verification stage, first, the hyperparameters in the training process are set, such as using the Adam optimizer, setting the minimum batch size to 60, the initial learning rate to 1e-4, the maximum training round to 300 times and enabling the learning rate decay strategy. During training, a double-task joint loss function is used to simultaneously calculate and optimize the coarse and fine-grained classification tasks. The model is trained on the training set for multiple rounds, and after each or several rounds, the training accuracy and loss rate are evaluated on the test set. If the evaluation result is not satisfactory, the parameters are adjusted and retraining is performed; if the training evaluation is satisfactory, the current model is finally tested and verified on the test image sample data set, and the test accuracy is evaluated. If the test result does not reach the preset performance indicator, the parameters are adjusted and retraining is performed again; if the test is satisfactory, the training process is ended, and the finally trained deep learning model is output.
[0059] Step 5: model application;
[0060] The finally trained and saved model is used for actual rock thin section identification tasks. A rock thin section image to be identified is input, and the model automatically performs a series of operations such as feature extraction, fusion and classification, and finally outputs the coarse-grained and fine-grained dual category names corresponding to the image.
[0061] As a preferred embodiment of the present application, in step 4, the total loss of the double-task joint loss function is composed of the cross-entropy loss of the coarse-grained classification task and the cross-entropy loss of the fine-grained classification task:
[0062] ;
[0063] wherein, is the coarse-grained classification loss, is the fine-grained classification loss.
[0064] wherein, the calculation formula of each cross-entropy loss is:
[0065] ;
[0066] In the formula, Represents classification loss, This represents the number of samples in the current training batch. For the number of categories, For the sample In category The true label, Predict samples for the model Category The probability of classification. By minimizing the total loss, the two classification tasks mutually promote each other during training, jointly improving model performance.
[0067] Another embodiment of the invention provides a rock thin section hierarchical recognition system based on deep learning. Based on the above method, the system includes a data preprocessing module, a dual-backbone feature extraction module, a feature fusion module, a cascaded dual attention module, a hierarchical classification module, and a model training optimization module.
[0068] The data preprocessing module is used to preprocess the rock thin section images to be identified, including operations such as size normalization and data augmentation.
[0069] The dual-backbone feature extraction module is used to simultaneously input the preprocessed image into two parallel backbone networks, wherein the ResNet backbone network is used to extract local feature maps, and the Swing Transformer backbone network is used to extract global feature maps.
[0070] The feature fusion module is used to perform channel alignment and element-wise addition and fusion of the feature maps output by the two networks to obtain a preliminary, comprehensive fused feature map.
[0071] The cascaded dual attention module is used to perform weighted optimization on the fused features, highlighting key information.
[0072] The hierarchical classification module converts the feature map optimized by dual attention into a one-dimensional feature vector through an adaptive average pooling layer. For the enhanced feature map, a coarse-grained category is first predicted, and then the prediction result is combined with the feature vector to jointly predict the fine-grained category.
[0073] The model training optimization module guides the optimization of model parameters through a function that combines coarse and fine-grained classification losses.
[0074] In a preferred embodiment of the present invention, the dual-backbone feature extraction module includes a local feature extractor and a global feature extractor;
[0075] The local feature extractor employs a ResNet-50 network pre-trained on a large general-purpose image dataset. The core of ResNet is its residual learning unit, which, by introducing shortcut connections, allows the network to learn identity mappings, effectively solving the problems of gradient vanishing and model degradation in deep networks, making it possible to build deeper, more expressive networks. This system extracts the portion of the ResNet network before the fully connected layers and the final pooling layer, making it a pure feature extractor. When a standard-sized image is input, this module outputs a high-dimensional feature map containing rich local details such as the color, shape, and texture of mineral crystals.
[0076] The global feature extractor employs the Swin Transformer backbone network. Unlike traditional Transformers that directly flatten images into sequences, the Swin Transformer constructs hierarchical feature maps and computes self-attention within non-overlapping local windows, then achieves cross-window information interaction through window shifting operations. This design not only significantly reduces computational complexity, enabling efficient processing of high-resolution images, but also captures contextual information of images at different scales. The global feature extractor is responsible for extracting global macroscopic features of the rock, such as its overall structure, bedding, and grain orientation. Similarly, the output of its intermediate layers is extracted, and a feature map whose spatial size matches that of the ResNet output feature map is selected.
[0077] In a preferred embodiment of the present invention, in the feature fusion module, since the feature maps output by the two backbone networks have inconsistent channel dimensions, a channel alignment layer (one) is first used. A batch normalization layer (following the convolutional layer) adjusts the number of output channels of the Swin Transformer to match the number of output channels of the ResNet. Then, the adjusted global feature map is added element-wise to the local feature map output by the ResNet to obtain a preliminary, comprehensive fused feature map.
[0078] like Figure 2 As shown, in a preferred embodiment of the present invention, a cascaded dual attention module is designed to enable the model to learn autonomously and focus on the features most important for classification. This includes a channel attention module and a spatial attention module. Specifically:
[0079] Channel Attention: The fused feature map first passes through a channel attention module. This module aims to model the importance of each feature channel. It aggregates the spatial information of each feature channel through global average pooling and global max pooling operations, and then feeds this information into a shared multilayer perceptron to model the correlation between channels, ultimately generating a weight between 0 and 1 for each channel. This weight is multiplied back into the original feature map, thereby enhancing the feature channels that are beneficial for lithology identification while suppressing noisy or redundant channels.
[0080] Spatial Attention: Channel-weighted feature maps are fed into the spatial attention module. This module aims to model the importance of different spatial locations. It performs average pooling and max pooling on the feature maps along the channel dimension, concatenates the results, and generates a spatial attention map through a convolutional layer. This map assigns a weight to each spatial location in the feature map, allowing the model to focus on key regions in the image, such as mineral grains or structures, while ignoring background or irrelevant areas. This sequential design, channel-first then spatial, is more efficient than parallel processing or single attention.
[0081] In a preferred embodiment of the present invention, the hierarchical classification module adopts an original classification structure based on hierarchical dependency.
[0082] 1) Input the above feature vectors into an independent coarse-grained classification head and output the predicted probabilities of the three major rock types (metamorphic rocks, igneous rocks, and sedimentary rocks).
[0083] 2) The predicted probability vector output by the coarse-grained classifier is concatenated with the original feature vector to form a new feature vector containing high-level category prior information. This enhanced new vector is then input into a separate fine-grained classifier to output the predicted probability of the specific rock subclass. This design allows the fine-grained classification decision process to utilize the results of the coarse-grained classification as contextual information, thereby more accurately distinguishing categories that are similar in fine-grained terms but different in coarse-grained terms.
[0084] As a preferred embodiment of the present invention, in order to solve the problem of the "black box" of deep learning models and to verify whether their classification decisions are based on geological logic, the system introduces an interpretability verification module.
[0085] 1) Validation method: Gradient-weighted class activation mapping (GFRP) is used to perform interpretability analysis on the trained model. By calculating the gradient of the target class score relative to the feature map of a specific convolutional layer within the model, a heatmap is generated to visualize which regions in the input image the model focuses on most when making specific classification decisions.
[0086] 2) Validation Objective: By comparing the generated heatmap with the original rock thin section images, it is possible to intuitively determine whether the model focuses on key minerals and structural features of geological significance. If the area focused by the model is consistent with the judgment criteria of geological experts, it proves that the model's decision-making process has geological rationality, thereby enhancing its credibility and reliability in practical applications.
[0087] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for identifying rock thin section hierarchies based on deep learning, characterized in that, Includes the following steps: Step 1: Data collection and preprocessing; We selected and organized thin section microscopic images of rocks including metamorphic rocks, igneous rocks, and sedimentary rocks, constructed an original image dataset, and created dual classification labels for each image, including coarse-grained and fine-grained labels. Step 2: Data Augmentation; Data augmentation operations are performed on the preprocessed image dataset to form a sample dataset; Step 3: Divide the sample data; The enhanced sample dataset is randomly divided into a training image sample dataset and a test image sample dataset according to a preset ratio; Step 4: Model building and training; A hybrid deep learning model is constructed by simultaneously inputting images into a pre-trained ResNet backbone network and a SwinTransformer backbone network to extract local and global feature maps. The two feature maps are then channel-aligned and fused to obtain a fused feature map. This fused feature map is then fed into a channel attention module and a spatial attention module for attention enhancement. The attention-enhanced feature map is converted into a feature vector through a pooling layer and fed into a hierarchical classification module. First, a coarse-grained category is predicted. Then, the coarse classification result is concatenated with the feature vector to predict a fine-grained category. Finally, a dual-task joint loss function is used to optimize the model. Step 5: Model Application; The trained model was used for rock thin section recognition, outputting both coarse-grained and fine-grained dual categories.
2. The deep learning-based rock thin section layer identification method according to claim 1, characterized in that, In step 2, the data augmentation operations include random scaling and cropping, random horizontal flipping, random rotation, color perturbation, and random erasure.
3. The deep learning-based rock thin section layer identification method according to claim 1, characterized in that, In step 4, the total loss of the dual-task joint loss function It consists of the cross-entropy loss from coarse-grained classification tasks and the cross-entropy loss from fine-grained classification tasks: ; in, It is a coarse-grained classification loss. It is a fine-grained classification loss; The formula for calculating each cross-entropy loss is as follows: ; In the formula, Represents classification loss, This represents the number of samples in the current training batch. For the number of categories, For the sample In category The true label, Predict samples for the model Category The probability; by minimizing the total loss, the two classification tasks mutually promote each other during training, jointly improving model performance.
4. A deep learning-based rock thin section layer identification system, based on the deep learning-based rock thin section layer identification method according to any one of claims 1-3, characterized in that, The system includes a data preprocessing module, a dual-backbone feature extraction module, a feature fusion module, a cascaded dual attention module, a hierarchical classification module, and a model training optimization module. The data preprocessing module is used to preprocess the rock thin section images to be identified; The dual-backbone feature extraction module is used to simultaneously input the preprocessed image into two parallel backbone networks, wherein the ResNet backbone network is used to extract local feature maps, and the Swing Transformer backbone network is used to extract global feature maps. The feature fusion module is used to perform channel alignment and element-wise addition and fusion of the feature maps output by the two networks to obtain a fused feature map. The cascaded dual attention module is used for weighted optimization of the fused features; The hierarchical classification module converts the feature map optimized by dual attention into a one-dimensional feature vector through an adaptive average pooling layer; for the enhanced feature map, a coarse-grained category is first predicted, and then the prediction result is combined with the feature vector to jointly predict the fine-grained category. The model training and optimization module uses a dual-task joint loss function to guide the optimization of model parameters.
5. The rock thin section layer identification system based on deep learning according to claim 4, characterized in that, The dual-backbone feature extraction module includes a local feature extractor and a global feature extractor; The local feature extractor uses a ResNet-50 network. By truncating the part of the ResNet network before the fully connected layer and the final pooling layer, it is made into a pure feature extractor for extracting high-dimensional feature maps containing local detail information. The global feature extractor uses the Swing Transformer backbone network, extracts the output of its intermediate layers, and selects a feature map that matches the spatial size of the ResNet output feature map to extract the global macroscopic features of the rock.
6. The rock thin section layer identification system based on deep learning according to claim 4, characterized in that, The cascaded dual attention module includes a channel attention module and a spatial attention module; The channel attention module aggregates the spatial information of each feature channel through global average pooling and global max pooling operations, and then feeds this information into a shared multilayer perceptron to model the correlation between channels, and finally generates a weight between 0 and 1 for each channel. The weights are multiplied back into the original feature map to enhance feature channels that are beneficial for lithological identification and to suppress noisy or redundant channels. The spatial attention module performs average pooling and max pooling on the feature map along the channel dimension, concatenates the two pooling results and generates a spatial attention map through a convolutional layer, assigning a weight to each spatial location of the feature map, so that the model focuses on the key regions in the image.
7. The rock thin section layer identification system based on deep learning according to claim 4, characterized in that, The system also includes an interpretability verification module; The interpretability verification module uses gradient-weighted class activation mapping technology to perform interpretability analysis on the trained model; by calculating the gradient of the target class score relative to the feature map of a specific convolutional layer inside the model, a heat map is generated to visualize which regions in the input image the model pays the most attention to when making a specific classification decision. By comparing the generated heatmap with the original rock thin section image, it can be determined whether the model focuses on key minerals and structural features that are of geological classification significance.
Citation Information
Patent Citations
Deep learning-based rock slice image lithology identification method
CN118506068A
Face change detection method, device and equipment based on multi-granularity feature fusion
CN119888870A