Search

CN-121999296-A - Rock slice image classification method based on field self-adaption

CN121999296ACN 121999296 ACN121999296 ACN 121999296ACN-121999296-A

Abstract

The invention discloses a field-adaptive rock slice image classification method, which comprises the steps of collecting rock slice image data, carrying out multi-scale data preprocessing and geological field data enhancement, extracting multi-level visual features of the rock slice image by utilizing a pre-training DINOv model, carrying out field-specific adaptation on the general visual features by using a geological field-adaptive Adapter module, enhancing the rock slice discriminant feature representation by adopting a dual-path attention mechanism, constructing a progressive hierarchical classification head to realize coarse-to-fine rock classification, designing a multi-stage progressive training strategy to optimize the overall performance of the model and the like. The invention can accurately capture the mineral composition and the structural characteristics of the rock slice under different scales, fully utilizes the multi-scale characteristics and the attention mechanism, thereby realizing the accurate classification of the rock slice and remarkably improving the accuracy and the reliability of the identification of the rock slice.

Inventors

  • ZANG CHUNYAN
  • Jin Shouren
  • ZHOU ZHIGUO
  • ZHENG WEI
  • LU BOWEN
  • CHEN YUN
  • QI HAIYAN
  • SHUI LEILEI
  • WAN HUAN
  • SHI CHANGLIN
  • HE YINJUN
  • CAI TAO
  • LI PANPAN
  • WANG YANYAN
  • ZHOU FUCHUN

Assignees

  • 中海油能源发展股份有限公司

Dates

Publication Date
20260508
Application Date
20260130

Claims (8)

  1. 1. A field-adaptive rock slice image classification method is characterized by comprising the following steps: s1, collecting rock slice image data, and performing multi-scale data preprocessing and geological field data enhancement; S2, inputting the rock slice image subjected to polarization enhancement and multi-scale alignment into a pre-trained visual transducer feature extraction network, and freezing encoder parameters of the rock slice image; s3, self-adaption through geological field The module performs field-specific adaptation on the general visual characteristics; s4, enhancing the discriminative feature representation of the rock slice by adopting a dual-path attention mechanism; s5, constructing a progressive hierarchical classification structure to realize rock classification from coarse to fine; s6, designing a multistage progressive training strategy to optimize the overall performance of the model.
  2. 2. The field-adaptive rock laminate image classification method according to claim 1, wherein said step S1 comprises the steps of: S11, acquiring rock slice polarized light microscope images with different magnification factors, constructing a labeling data set, and constructing a multi-scale image pyramid for each rock slice polarized light microscope image to cover all-scale features consisting of macroscopic rock structures to microscopic minerals; the magnification includes 4×, 10×, 20×, and 40×; The annotation dataset comprises sedimentary rock, a sedimentary rock subclass, igneous rock subclass, metamorphic rock and metamorphic rock subclass; S12, carrying out image preprocessing on the original rock slice polarized light microscope image acquired in the step S11; the image preprocessing comprises illumination normalization, color correction and noise filtering processing; The calculation formula of the image preprocessing is as follows: Wherein: representing pixel intensities of normalized rock slice polarized microscope images; representing pixel intensities of the original rock laminate polarized microscope image; Representing the pixel intensity mean of the original rock laminate polarized microscope image; representing the standard deviation of pixel intensity of the original rock laminate polarized light microscope image; 、 Representing the normalization parameters; S13, enhancing geological field data based on a polarization optical principle, and simulating rock slice optical characteristic changes under different polarization angles by adopting a polarized light rotation simulation formula; The polarized light rotation simulation formula is as follows: Wherein: Indicating the rotation angle as A polarized image at that time; Representing the polarization rotation matrix, The angle of deflection is indicated as such, Representing the normalized input image preprocessed in step S12; Representing a matrix transpose operation; S14, carrying out space alignment and uniform resolution on features of different scales in a multi-scale image pyramid of each rock slice polarization microscope image; the formula of the spatial alignment is: Wherein: Representing the spatially aligned features; representing the number of scales; Represent the first A scale weight for each scale; Represent the first A personal scale feature; Representing the target scale.
  3. 3. The field-adaptive rock laminate image classification method according to claim 1, wherein said step S2 comprises the steps of: S21, loading DINOv model weights pre-trained on a large-scale natural image dataset, and freezing all parameters of a transducer encoder; S22, extracting multi-level features from different depths of DINOv models; the feature extraction formula is: Wherein: Represent the first Layer(s) Layer output characteristics; Represent the first Personal (S) The layer of the material is formed from a layer, Representing the last layer Layer output characteristics; Representation of The number of layers; S23, simultaneously extracting global image features and local patch features, and carrying out feature fusion; The feature fusion formula is as follows: Wherein: representing the fused features; representation layer normalization operations; Representing global feature learnable weights; representing local feature learnable weights; Representing global features; showing local features; Representing a bias term; S24, carrying out dimension and scale standardization processing on the fusion features extracted in the step S23; the standardized formula is: Wherein: Representing the normalized features; Representing an input feature; representing the characteristic mean; Representing the feature variance; representing a small constant, preventing zero removal; representing a learnable scaling factor; Representing a learnable paranoid coefficient.
  4. 4. The field-adaptive rock laminate image classification method according to claim 1, wherein said step S3 comprises the steps of: S31, inserting parallelism after each transducer layer of DINOv models The structure adopts a low-rank decomposition technology; transformer layer post-insertion parallelism The calculation formula of the structure is as follows: Wherein: Representing the characteristics after the parallel Adapter structure is inserted and adapted; Represent the first Layer(s) The characteristics of the layer output are consistent with step S22; Representing a dimension reduction weight matrix, and reducing the characteristic dimension from d to low rank r; representing a lifting-up-to-holding weight matrix, and lifting up the characteristic dimension from low rank r to d; S32, injecting the petrology priori knowledge into the adaptive Adapter module in the geological field through contrast learning; the contrast loss function employed was: Wherein: Representing a contrast loss function; Represent the first Normalized vectors obtained after the samples pass through the encoder; Representation and representation Another embedded vector that constitutes a positive sample pair; An embedded vector representing all other samples in the batch; Representing the number of samples in a batch; representing cosine similarity calculation; representing the temperature parameter of the contrast learning; Representing an indication function; S33, carrying out self-adaptive weighted fusion on the original DINOv features and the Adapter enhancement features; the formula of the self-adaptive weighted fusion is as follows: Wherein: Representing the final fusion characteristics as a subsequent module input; representing adaptive weight parameters; Representing the original DINOv features of the corresponding layer without the Adapter bypass, i.e. step S22 Or a final output feature; representing the characteristics after the parallel Adapter adaptation in the step S31, namely outputting in the step S31; s34, extracting field features from the professional geological annotation by using a knowledge distillation technology; The distillation loss expression for the knowledge distillation technique is: Wherein: Indicating distillation loss; Representation of Divergence; Representing the probability of the student model output; representing the probability of the teacher model output; Indicating the distillation temperature parameters.
  5. 5. The method for classifying rock slice images based on field adaptation according to claim 1, wherein the low-rank decomposition technique is that a parallel Adapter structure adopts a low-rank bottleneck form, two low-rank matrices for linear transformation originally equivalent to d x d are decomposed into W down ∈R d×r and W up ∈R r×d , The Adapter is added to the transducer layer output in a residual bypass fashion, the transducer backbone parameters remain frozen, and only the Adapter parameters are trained.
  6. 6. The field-adaptive rock laminate image classification method according to claim 1, wherein said step S4 comprises the steps of: S41, evaluating importance of different characteristic channels based on a channel attention mechanism; The channel attention calculation formula is as follows: Wherein: representing channel attention weights; representing a sigmoid activation function; representing a multi-layer perceptron; representing average pooling; representing maximum pooling; Representing the final fusion characteristics output in step S33 ; S42, positioning a key area in the sheet image through a spatial attention mechanism; The spatial attention calculation formula is: Wherein: Representing a spatial attention weight; Representation of Convolving; representing channel stitching; s43, designing a cross attention fusion mechanism of a channel and a space; the cross attention fusion formula is as follows: Wherein: representing the cross-attention enhanced features; The representation step ; Representing channel attention weights; Representing a spatial attention weight; Representing element-by-element multiplication; S44, respectively applying a cross attention fusion mechanism on the feature graphs with different scales to integrate the multi-scale attention results; the integrated formula is: Wherein: Representing multi-scale integrated features; Represent the first A scale weight for each scale; Represent the first A cross-attention fusion mechanism of the individual scales, Represent the first The characteristics of the individual dimensions of the features, Representing the number of scales.
  7. 7. The field-adaptive rock laminate image classification method according to claim 1, wherein said step S5 comprises the steps of: S51, progressive hierarchical classification structure design: The classification probability calculation formula of the progressive hierarchical classification structure is as follows: Wherein: Represent the first Classifying the probability; Represent the first The weight of the stage; Represent the first Bias of the stage; Representing an input feature; Representing the probability of the previous class of classification; representing a classification level; S52, gradually refining the characteristic representation in the classifying process; the refinement formula is: Wherein: Represent the first Features after the stage refinement; Representing feature increments; Representing a gating function; S53, introducing a temperature scaling technology to carry out uncertainty calibration on the classification result; The formula for uncertainty calibration is: Wherein: representing the probability after uncertainty calibration; representing the original logits; representing a temperature parameter; S54, fusing the outputs of the multiple classification stages to generate a final comprehensive classification decision; the fusion formula of the outputs of the plurality of classification stages is: Wherein: representing a final classification probability; Representing the level weight; Represent the first And (5) classifying the probability.
  8. 8. The field-adaptive rock laminate image classification method according to claim 1, wherein said step S6 comprises the steps of: s61, gradually unlocking and optimizing parameters of different modules by adopting a staged training strategy; the three-stage training loss function of the stage training strategy is as follows: In the above formula: 、 、 Representing the total loss of the three phases respectively; Representing a classification loss; 、 respectively representing balance coefficients; representing the contrast learning loss function of the step S32; Representing the distillation loss function of step S34; s62, designing a joint learning framework of a rock classification main task and an auxiliary task; The total loss function of the joint learning framework is: Wherein: Representing a total loss function; representing task weights; Represent the first Loss of individual tasks; representing the number of tasks; S63, dynamically adjusting the weight coefficient of the multi-task loss based on task difficulty and importance; The adjustment formula for adjusting the weight coefficient of the multitasking loss is: Wherein: Represent the first The weight of each task; Representing a learnable parameter; A learnable parameter corresponding to the j-th task is represented; s64, implementing an early-stopping mechanism based on the performance of the verification set, and selecting an optimal model.

Description

Rock slice image classification method based on field self-adaption Technical Field The invention belongs to the technical field of geological exploration and lithology recognition, and particularly relates to a rock slice image classification method based on field self-adaption DINOv and an attention mechanism. Background In the oil and gas exploration and development process, core sheet identification is a key technical means for identifying reservoir lithology, analyzing mineral composition and evaluating reservoir space characteristics. The traditional core slice identification mainly relies on geological specialists to manually observe and describe through a polarized light microscope, and the rock type and the cause mechanism thereof are determined through comprehensive analysis of the characteristics such as mineral components, structural structures, diagenetic effects and the like. With the development of digital imaging technology, a rock slice image analysis method based on computer vision is gradually applied, visual features such as color, texture, shape and the like are extracted through an image processing algorithm, and the automatic identification of rock types is realized by combining a support vector machine, a random forest and other traditional machine learning algorithms. In recent years, deep learning technology is introduced into the geological field, and deep features of rock slices are automatically learned by using models such as Convolutional Neural Networks (CNNs), so that the automation level of recognition is improved to a certain extent. However, the existing core slice image identification method still has three outstanding problems of (1) the field adaptability is insufficient, a general model pre-trained on a natural image data set is mostly adopted, significant differences of the rock slice image and the natural image on an imaging mechanism and feature distribution are not fully considered, the representation capability of the model on professional features such as mineral optical characteristics, crystal morphology and the like is limited, the multi-scale features are underutilized, the rock slice contains macroscopic rock structure and microscopic mineral composition information, the existing method is often focused on single-scale feature analysis, a multi-scale feature fusion mechanism from a mineral particle level to a rock structure level cannot be effectively established, a hierarchical classification strategy is lacked, the rock classification itself has a strict hierarchical system (from three rock types to specific lithology), a flattened classification architecture is mostly adopted, hierarchical association information in the lithology classification system is not fully utilized, and accuracy in fine-grained lithology identification is limited. Therefore, a new intelligent core sheet image identification method is urgently needed, the technical bottleneck can be effectively solved, accurate and efficient identification from mineral composition to rock type is realized, and reliable technical support is provided for oil and gas reservoir evaluation and geological research. Disclosure of Invention The invention provides a rock slice image classification method based on field self-adaption DINOv and an attention mechanism, which aims to solve the technical defects of insufficient field adaptability, insufficient multi-scale feature utilization and single classification level of the existing method. The invention is realized by the following technical scheme: A method for classifying rock slice images based on DINOv and attention mechanisms, comprising the steps of: s1, collecting rock slice image data, and performing multi-scale data preprocessing and geological field data enhancement; S2, inputting the rock slice images with polarization enhancement and multi-scale alignment into a pre-training transducer feature extraction network and freezing an encoder, extracting multi-layer output features, and fusing a last layer CLS token and a patch token to obtain lithology discrimination characterization; s3, self-adaption through geological field The module performs field-specific adaptation on the general visual characteristics; s4, enhancing the discriminative feature representation of the rock slice by adopting a dual-path attention mechanism; s5, constructing a progressive hierarchical classification structure to realize rock classification from coarse to fine; s6, designing a multistage progressive training strategy to optimize the overall performance of the model. In the above technical solution, the step S1 specifically includes the following steps: S11, acquiring rock slice polarized light microscope images with different magnification factors, constructing a labeling data set, and constructing a multi-scale image pyramid for each rock slice polarized light microscope image to cover all-scale features consisting of macroscopic rock structures to microscopic mi