A method and system for tight reservoir wettability identification based on improved deep residual networks

By constructing a transfer learning model using an improved deep residual network, the problems of long time consumption and large error in tight reservoir wettability determination were solved, achieving fast and accurate automatic wettability identification and improving work efficiency and recognition accuracy.

CN117671319BActive Publication Date: 2026-06-30PETROCHINA CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PETROCHINA CO LTD
Filing Date
2022-09-07
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies for determining the wettability of tight reservoirs are time-consuming and subject to significant human error, resulting in large errors and making it difficult to achieve automated and efficient wettability determination.

Method used

An improved deep residual network is adopted, and a transfer learning model is constructed. The model is pre-trained on the ImageNet dataset and the learning rate is adjusted. The model is optimized by combining a spatial transformation network and a fully connected layer with the training dataset to achieve wettability identification of tight reservoirs.

Benefits of technology

It achieves rapid and accurate automatic identification of wettability in tight reservoirs, reduces the influence of human factors, improves work efficiency, and reduces the error of measurement results, thus realizing intelligent wettability identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117671319B_ABST
    Figure CN117671319B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for identifying the wettability of tight reservoirs based on an improved deep residual network. The method includes: acquiring an image sample set of rock samples and constructing a transfer learning model; pre-training the transfer learning model using the ImageNet dataset to obtain a transfer network model; training the transfer network model using a training dataset to obtain a reservoir wettability identification model; inputting a test dataset into the reservoir wettability identification model to predict wettability; visually analyzing the decision region of the reservoir wettability identification model; and evaluating the accuracy of the reservoir wettability identification model by comparing the decision region, the predicted wettability category, and the actual wettability category. This invention is simple and easy to operate, eliminates the influence of human factors in traditional wettability measurement methods, reduces measurement errors, improves work efficiency, and can truly achieve intelligent automatic identification of tight reservoir wettability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of oil and gas exploration and development technology, and specifically relates to a method and system for identifying the wettability of tight reservoirs based on an improved depth residual network. Background Technology

[0002] The wettability of reservoir rocks is one of the important parameters for improving oil recovery. Due to the characteristics of tight reservoirs—low permeability, complex micro- and nanopore development, and strong heterogeneity—characterizing their wettability is a significant challenge. Currently, the more mature research methods for tight reservoir wettability are mainly divided into qualitative and quantitative determination methods. Qualitative methods mainly include low-temperature electron scanning (Yan Qituan, Guo Hekun, Liu Sumin. Study on the variation characteristics of wettability of reservoir sandstone samples by environmental scanning electron microscopy [J]. Petroleum Exploration and Development, 2001, 28(6):2-0.), Wilhelmy dynamic plate method (Ma Yonghai. A new wettability determination method - Wilhelmy dynamic plate method [J]. Petroleum Experimental Geology, 1995, 17(4):402-405.), and relative permeability method (Li Qin. Evaluation of reservoir rock surface wettability by relative permeability method [J]. Petroleum Experimental Geology, 1996, 18(4):454-458.). Chinese patent (publication number CN111175169A) discloses that a balanced humidity recovery test is performed on rock samples to quantitatively evaluate rock wettability based on three dimensions: constant weight time, constant humidity rate, and water content. Quantitative methods mainly include contact angle measurement (Wu Jiawen. Study on wettability changes using video optical contact angle measuring instrument [J]. Fault Block Oil and Gas Field, 2011, 18(2): 220-222.), USBM method (Yan Jienian, Hong Shiduo, Zong Xiwu, et al. Evaluation of the wetting effect of completion fluid and its components on sandstone using Amott / USBM method [J]. Petroleum Exploration and Development, 1993, 20(5): 82-91.), and nuclear magnetic resonance relaxation method (Que Hongpei. Determination of wettability of porous media - nuclear magnetic resonance (NMR) relaxation method [J]. Foreign Oilfield Engineering, 1995, 11(6): 1-5.). Among quantitative methods, Zhang Yayun et al. (Zhang Yayun, Chen Mian, Chen Jun, et al. Neural network prediction model of shale wettability [J]. J]. Fault-block Oil and Gas Field, 2018, 25(6):726-731.) Based on the relationship between rock fabric and drilling fluid performance characteristics, a quantitative characterization study of wettability was carried out using the generalized regression neural network (GRNN) method; Xie Ranhong et al. (Xie Ranhong, Gao Guozhong, Feng Qining, et al. Predicting reservoir wettability using neural network and relative permeability curve [J]. Progress in Exploration Geophysics, 2003, 26(4):326-328.) Starting from the characteristic performance on the relative permeability curve, the relative permeability curve of the reservoir was predicted using the backpropagation neural network model. Based on the six characteristic quantities on the obtained relative permeability curve, the wettability of the reservoir was predicted according to the triple saturation criterion for judging the wettability of reservoir rocks based on the Craig criterion. Although these qualitative and quantitative methods have their own advantages and disadvantages, they all have a common feature, which is that they are time-consuming and the excessive influence of human factors leads to relatively large errors in the results.Therefore, how to enable computers to automatically determine the wettability of tight reservoirs based on existing geological data, overcome the influence of human factors, reduce the error of measurement results, and improve work efficiency is one of the technologies that artificial intelligence urgently needs to tackle. Summary of the Invention

[0003] To address the above problems, this invention discloses a tight reservoir wettability identification method based on an improved deep residual network, comprising:

[0004] Obtain an image sample set of rock samples and build a transfer learning model;

[0005] The transfer learning model was pre-trained using the ImageNet dataset to obtain the transfer network model;

[0006] The transfer network model was trained using the training dataset to obtain a reservoir wettability identification model;

[0007] The test dataset is input into the reservoir wettability identification model to predict wettability;

[0008] The decision region of the reservoir wettability identification model is visualized and analyzed. The accuracy of the reservoir wettability identification model is evaluated by comparing the decision region, the predicted wettability category results, and the actual wettability category.

[0009] Furthermore, acquiring the image sample set of the rock sample includes the following steps:

[0010] To obtain a sample set of images of the microscopic distribution of oil and water with different pore structures and different minerals;

[0011] The image sample set is divided into a training dataset, a validation dataset, and a test dataset;

[0012] Artificially labeled boundaries for pore structure, oil, and water were created for both the training and validation datasets, and wettability categories of oil-wet, water-wet, and neutral were constructed.

[0013] The oil-wetting behavior of kaolinite was observed and marked as oil-wetting behavior in neutral wetting, while the water-wetting behavior of illite and feldspar was marked as water-wetting behavior in neutral wetting.

[0014] Furthermore, the transfer learning model includes a spatial transformation network, convolutional layers, max pooling layers, global average pooling layers, and fully connected layers.

[0015] Furthermore, the step of pre-training the transfer learning model using the ImageNet dataset to obtain the transfer network model includes the following steps:

[0016] The transfer learning model is divided into four parts: the first part is the spatial transformation network, the second part includes one input convolutional layer and one max pooling layer, the third part contains four convolutional layers, and the fourth part is the classification output part.

[0017] The transfer learning model was pre-trained using the ImageNet dataset to obtain the initialization learning parameters for the four segments of the transfer learning model.

[0018] Adjust the learning rate of the four segments of the transfer learning model;

[0019] The classification output part in the transfer learning model is deleted and replaced with a structure containing a fully connected layer with multiple output nodes, a new Softmax layer, and a category output layer.

[0020] The initial learning parameters for each segment of the transfer learning model are set, and the initial learning parameter for the replaced fourth segment classification output is μ, thus obtaining the transfer network model.

[0021] Furthermore, the expression for the range of values ​​for μ is as follows:

[0022]

[0023] Where Not and Nin are the number of output and input nodes of the fourth classification output section after replacement, respectively.

[0024] Furthermore, training the transfer network model using the training dataset to obtain the reservoir wettability identification model includes the following steps:

[0025] The image samples in the training dataset are mapped and transformed through a spatial transformation network to obtain optimized image sample data.

[0026] Divide the training dataset into N equal parts;

[0027] Import N training datasets into the transfer learning network model to generate initial reconstructed data;

[0028] Based on the initial reconstructed data, calculate the output reconstructed data of the transfer network model;

[0029] Calculate the reconstruction loss and accuracy for N training datasets and the output reconstructed data;

[0030] The weights, biases, and momentum parameters of the transfer network model are updated and iterated.

[0031] If the number of iterations exceeds the threshold, import the validation dataset;

[0032] Calculate the loss value and accuracy of the validation dataset. Stop training when the loss value no longer shows a decreasing trend, thus obtaining the reservoir wettability identification model.

[0033] Furthermore, the visualization analysis of the decision region of the reservoir wettability identification model, and the evaluation of the accuracy of the reservoir wettability identification model by comparing the decision region, the predicted wettability category results, and the actual wettability category, includes the following steps:

[0034] An image is input into the reservoir wettability identification model to extract feature maps;

[0035] Calculate the weight coefficients for each channel of the feature map;

[0036] Based on the weighting coefficients, the output feature map is linearly weighted by channel, and the class activation value corresponding to the output wettability category is calculated.

[0037] A class activation heatmap is obtained based on the class activation value;

[0038] The size of the class activation heatmap is adjusted and overlaid on the input image. The predicted wettability category is compared with the actual wettability category to evaluate the accuracy of the reservoir wettability identification model.

[0039] Furthermore, the formula for the weighting coefficient is as follows:

[0040]

[0041] in, Z represents the weighting coefficients; Z represents the number of pixels in the feature map; EP represents the weighting coefficients. τ ρ represents the probability corresponding to the output wettability category τ; τ is the output wettability category; l is the channel of the feature map; ρ is the width indicator factor. It is a high indicator factor; is the pixel value on the l-th feature map.

[0042] Furthermore, the formula for the class activation value is as follows:

[0043]

[0044] A tight reservoir wettability identification system based on an improved deep residual network includes:

[0045] The building unit is used to acquire an image sample set of rock samples and build a transfer learning model.

[0046] The pre-training unit is used to pre-train the transfer learning model using the ImageNet dataset to obtain the transfer network model;

[0047] The training unit is used to train the transfer network model using the training dataset to obtain the reservoir wettability identification model.

[0048] The prediction unit is used to input the test dataset into the reservoir wettability identification model to predict wettability;

[0049] The analysis unit is used to perform visual analysis of the decision region of the reservoir wettability identification model, and evaluate the accuracy of the reservoir wettability identification model by comparing the decision region, the predicted wettability category results and the actual wettability category.

[0050] Furthermore, the building unit is specifically used for:

[0051] To obtain a sample set of images of the microscopic distribution of oil and water with different pore structures and different minerals;

[0052] The image sample set is divided into a training dataset, a validation dataset, and a test dataset;

[0053] Artificially labeled boundaries for pore structure, oil, and water were created for both the training and validation datasets, and wettability categories of oil-wet, water-wet, and neutral were constructed.

[0054] The oil-wetting behavior of kaolinite was observed and marked as oil-wetting behavior in neutral wetting, while the water-wetting behavior of illite and feldspar was marked as water-wetting behavior in neutral wetting.

[0055] Furthermore, the pre-training unit is specifically used for:

[0056] The transfer learning model is divided into four parts: the first part is the spatial transformation network, the second part includes one input convolutional layer and one max pooling layer, the third part contains four convolutional layers, and the fourth part is the classification output part.

[0057] The transfer learning model was pre-trained using the ImageNet dataset to obtain the initialization learning parameters for the four segments of the transfer learning model.

[0058] Adjust the learning rate of the four segments of the transfer learning model;

[0059] The classification output part in the transfer learning model is deleted and replaced with a structure containing a fully connected layer with multiple output nodes, a new Softmax layer, and a category output layer.

[0060] The initial learning parameters for each segment of the transfer learning model are set, and the initial learning parameter for the replaced fourth segment classification output is μ, thus obtaining the transfer network model.

[0061] Furthermore, the training unit is specifically used for:

[0062] The image samples in the training dataset are mapped and transformed through a spatial transformation network to obtain optimized image sample data.

[0063] Divide the training dataset into N equal parts;

[0064] Import N training datasets into the transfer learning network model to generate initial reconstructed data;

[0065] Based on the initial reconstructed data, calculate the output reconstructed data of the transfer network model;

[0066] Calculate the reconstruction loss and accuracy for N training datasets and the output reconstructed data;

[0067] The weights, biases, and momentum parameters of the transfer network model are updated and iterated.

[0068] If the number of iterations exceeds the threshold, import the validation dataset;

[0069] Calculate the loss value and accuracy of the validation dataset. Stop training when the loss value no longer shows a decreasing trend, thus obtaining the reservoir wettability identification model.

[0070] Furthermore, the analysis unit is specifically used for:

[0071] An image is input into the reservoir wettability identification model to extract feature maps;

[0072] Calculate the weight coefficients for each channel of the feature map;

[0073] Based on the weighting coefficients, the output feature map is linearly weighted by channel, and the class activation value corresponding to the output wettability category is calculated.

[0074] A class activation heatmap is obtained based on the class activation value;

[0075] The size of the class activation heatmap is adjusted and overlaid on the input image. The predicted wettability category is compared with the actual wettability category to evaluate the accuracy of the reservoir wettability identification model.

[0076] Compared with the prior art, the present invention has at least the following advantages:

[0077] Based on deep transfer learning, this invention can accurately and quickly perform automatic identification of tight reservoir wettability, achieving good results. The invention is simple and easy to operate, eliminates the influence of human factors in traditional wettability measurement methods, reduces measurement errors, improves work efficiency, and truly realizes intelligent automatic identification of tight reservoir wettability.

[0078] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures pointed out in the description and the drawings. Attached Figure Description

[0079] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0080] Figure 1 A flowchart of a tight reservoir wettability identification method based on an improved deep residual network according to an embodiment of the present invention is shown;

[0081] Figure 2 A schematic diagram of the structure of a reservoir wettability identification model according to an embodiment of the present invention is shown. Detailed Implementation

[0082] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.

[0083] like Figure 1 As shown, the tight reservoir wettability identification method based on improved deep residual networks proposed in this invention includes the following steps:

[0084] Step S1: A sample set of images of the microscopic distribution of oil and water with different pore structures and different minerals was obtained by low-temperature electron scanning method, as follows:

[0085] 1a) Different rock samples were centrifuged to displace them to achieve saturation levels of residual oil saturation and bound water saturation, respectively. The samples were then rapidly frozen and plated with gold (or chromium, carbon).

[0086] 1b) Using secondary electron imaging mode, select the region of interest and distinguish the mineral phase, oil phase and water phase by backscattering electron images;

[0087] 1c) Elemental analysis was performed using X-ray diffraction to confirm each phase, with sulfur as an indicator of the oil phase and chlorine as an indicator of the aqueous phase, thereby obtaining a set of low-temperature scanning electron microscopy image samples.

[0088] 1d) Divide these image sample sets into training dataset, validation dataset, and test dataset, and use Photoshop to manually annotate the boundaries of pore structure, oil, and water in the training dataset and validation dataset respectively;

[0089] 1e) Using Photoshop, we observed that oil covered the mineral surface in the form of a thin film in the absence of clay, while water existed in the pores in the form of droplets. This was labeled as oil wetting (Pwetting), and the opposite phenomenon was labeled as water wetting (Wwetting).

[0090] 1f) Using Photoshop, the observed clay-containing conditions were labeled as neutral wetting (Nwetting). Further observation of the oil-wetting behavior of kaolinite was labeled as oil-wetting behavior in neutral wetting (Nwetting-P), and the water-wetting behavior of illite and feldspar was labeled as water-wetting behavior in neutral wetting (Nwetting-W). This can explain the origin of the neutral wetting of the core.

[0091] 1g) Since the reservoir wettability identification model used in this invention uses square images as input, all images must first be uniformly cropped into square images, and then the size of all images is uniformly adjusted according to the target resolution of the image expected by the user.

[0092] 1h) In order to prevent the reservoir wettability identification model from overfitting and to train a tight reservoir wettability identification model with better generalization ability, without changing the pore structure, oil and water original characteristics of the image, all image samples are desaturated, brightness or contrast adjusted, etc., in order to expand the sample. The grayscale image after image desaturation is calculated according to formula (1). Brightness represents the brightness of the image. The larger the values ​​of each component (R, G, B), the brighter the image. The brightness of the image can be adjusted by uniformly adjusting the values ​​of each component (R, G, B).

[0093] Y = 0.299R + 0.587G + 0.114B (1)

[0094] Where Y is the grayscale value, and R, G, and B are the color component values ​​for red, green, and blue, respectively.

[0095] Image contrast mainly refers to the contrast between light and dark pixels. In this invention, formula (2) is used to perform Gamma correction on each component value of the image in order to uniformly adjust the image contrast, thereby achieving the adjustment of image contrast.

[0096]

[0097] Where Fi and Fo are the input and output values ​​of each component, respectively, and β is the correction coefficient.

[0098] Step S2: Construct a transfer learning model;

[0099] A transfer learning model for a cryogenic scanning electron microscope image sample set is built using ResNet101_Wettability_AI, an improvement on ResNet101. Specifically, it includes:

[0100] 2a) The pre-trained ResNet101_Wettability_AI is used as the base feature extraction model. This model is based on ResNet101, which consists of 5 convolutional layers, 1 max pooling layer, 1 global average pooling layer, and 1 fully connected layer. The structure diagram is shown below. Figure 2 As shown;

[0101] 2b) ResNet101_Wettability_AI introduces the Center-Loss loss function based on ResNet101. The core of this function is "small intra-class distance and large inter-class distance", which can better utilize features to efficiently classify images. Its formula is (3). The Center-Loss loss function is combined with the Softmax-Loss loss function to obtain a new loss function, which is (4). By combining the two loss functions, the features extracted by the network can be used more effectively to classify images. The structure diagram of this model is as follows. Figure 2 As shown.

[0102]

[0103] Among them, L d The loss value is represented by ; i represents the i-th pixel, ranging from 0 to p, where p is the number of samples taken in each mini-batch; T i d represents the i-th feature vector before the fully connected layer; Si Indicates the Sth i Feature centers for each category.

[0104]

[0105] Where L is the new Softmax layer, i.e., Softmax_N; the first term of the Softmax-Loss loss function expression and the second term of the Center-Loss loss function expression; O is a set of results output by a fully connected layer of a neural network; For the first Categories O k This represents the k-th value of the fully connected layer; K is the number of categories.

[0106] 2c) The ResNet101_Wettability_AI transfer learning model introduces a spatial transformation network on top of ResNet101 as the first part of the entire network. The model structure diagram is as follows: Figure 2 As shown, the introduced spatial transformation network enables the new network model to not only solve the gradient vanishing problem caused by deep networks, but also to learn the spatial transformation parameters of images or features based on the task itself, aligning the input image or learned features in space without the need to label key points. This minimizes the impact of geometric transformations such as rotation, translation, scaling, and distortion of objects in space on tasks such as localization and classification. At the same time, it can also locate the region of interest in the image, obtain effective features, and improve the accuracy of image classification.

[0107] 2d) The spatial transformation network mainly consists of three modules: network localization module, mesh generation module, and sampling module;

[0108] Its structure is as follows Figure 2 As shown, the spatial transformation network embeds an attention mechanism module, which enables the spatial transformation network to learn the spatial transformation parameters of the image or features according to the task itself, and align the input image or learned features in space without the need to label key points. This minimizes the impact of geometric transformations such as rotation, translation, scale, and distortion of objects in space on tasks such as localization and classification. At the same time, it can also locate the region of interest in the image, obtain effective features, and improve the accuracy of image classification.

[0109] The network localization module consists of four convolutional layers and two fully connected layers, and its expression is (5).

[0110] θ=f IOC (U) (5)

[0111] Among them, f IOC (.) represents the network localization module, U is the input feature map, and θ is the output result, which is a 6-dimensional vector. The dimension of the input feature map is U∈Q. H*W*C Q is the set of dimensions of the feature map, U is the element of set Q, H is the height of the feature map, W is the width of the feature map, and C is the number of channels;

[0112] The grid generation module establishes a two-dimensional mapping function between the input image and the output image. It mainly constructs a sampling grid based on the predicted transformation parameters. A set of points in the input image are sampled and transformed through the mapping relationship to obtain the output image. The size of the output image is the same as the size of the input image. The mapping relationship expression is shown in (6):

[0113]

[0114] in, Here, represents the coordinates of each pixel in the input image, and the coefficient matrix γ represents the affine transformation coefficients. This is the coordinate of each pixel in the output image; i represents the i-th pixel.

[0115] The input feature map of the sampling module is provided by the grid generation module. The sampling grid of the input feature map is sampled by interpolation, and the sampled pixel values ​​are put into the corresponding coordinates in the output feature map. The specific expression is shown in (7):

[0116]

[0117] in, This represents the output feature map. This represents the pixel value at coordinates (n, m) in the input feature map; max(.) represents the sampling function; n is the nth pixel at the x-coordinate; m is the mth pixel at the y-coordinate; C is the number of channels; H is the height of the feature map; W is the width of the feature map. Let x be the x-coordinate of the i-th pixel in the input image; Let be the ordinate value of the i-th pixel in the input image;

[0118] Step S3: Pre-train the transfer learning model using the ImageNet dataset to obtain the transfer network model;

[0119] First, the ResNet101_Wettability_AI transfer learning model is pre-trained using the ImageNet dataset. Model transfer is then achieved by fine-tuning the network structure, with different learning rates set for the preceding and following network layers, resulting in the final transfer network model. Specifically, this includes:

[0120] 3a) Segmentation: The ResNet101_Wettability_AI transfer learning model is divided into four segments. The first segment is the spatial transformation network, the second segment contains a 7x7x64 input convolutional layer and a max pooling layer, the third segment contains four convolutional layers, and the fourth segment is the final classification output part, namely "fc1000", "softmax_1000" and "Classification Layer_1000".

[0121] 3b) Pre-training: The ResNet101_Wettability_AI transfer learning model was pre-trained using the ImageNet dataset to identify 1000 item categories. The softmax layer output nodes were 1000, thus obtaining the initial learning parameters for four segments.

[0122] 3c) Adjust the learning rate of each layer: Adjust the learning rate of the four segments of the ResNet101_Wettability_AI transfer learning model. Set the initial learning rate of the first segment to 0.01, the initial learning rate of the second segment to 0.001, the initial learning rate of the third segment to 0.005, and the initial learning rate of the fourth segment to 0.01.

[0123] 3d) Fine-tune the network structure: Remove the final classification output part of the ResNet101_Wettability_AI transfer learning model, which contains three layers: "fc1000", "softmax_1000" and "Classification Layer_1000". Replace it with a structure consisting of a fully connected layer with 7 output nodes, a new softmax layer (Softmax_N), and a class output layer.

[0124] 3e) Initialize learning parameters: The initial values ​​of the learning parameters for the first, second, and third segments of the ResNet101_Wettability_AI transfer learning model can be obtained from step 3b. The initial value μ of the initial learning parameters for the replaced fourth segment classification output can be obtained from a mean of 0 and a variance of 6 / (N). ot +N in The expression for the range of values ​​of a random sample taken from a uniform distribution is (8):

[0125]

[0126] Where, N ot and N in These represent the number of nodes in the output and input of the fourth classification output section after replacement, respectively. This yields the final ResNet101 transfer network model, specifically the ResNet101_Wettability_AI transfer network model. Learning parameters include weights, bias, momentum, learning rate, batch size, weight decay coefficient, and dropout ratio.

[0127] Step S4: Train the transfer network model using the training dataset to obtain the reservoir wettability identification model;

[0128] Deep transfer learning was employed, combining the ResNet101_Wettability_AI transfer network model to train the entire image sample set of the training dataset. To evaluate the recognition performance and generalization ability of the ResNet101_Wettability_AI transfer network model during training, and to stop network training before overfitting occurs, validation dataset images were imported after every 10 iterations. The prediction accuracy and loss function value of the validation ResNet101_Wettability_AI transfer network model were calculated. Network training was stopped when the loss function value of the validation dataset converged to its minimum, and the current model was saved, thus obtaining the tight reservoir wettability identification model. Since the input training dataset image samples of the ResNet101_Wettability_AI transfer network model are directly derived from the output of the spatial transformation network, no additional training supervision, artificial data augmentation (such as rotation, translation, scaling, skew, cropping), or data normalization techniques are required, thereby improving the robustness of the model. Specifically, this includes:

[0129] 4a) Image optimization processing: All image samples are processed through a spatial transformation network, and the transformation coefficients γ are continuously adjusted to perform mapping transformation on the image samples to obtain the optimal input image sample data;

[0130] 4b) Divide the training dataset into mini-batches: Divide all training datasets into N equal mini-batches.

[0131] 4c) Import data: Import N mini-batch training datasets into the ResNet101_Wettability_AI transfer network model to generate initial reconstruction data;

[0132] 4d) Calculate the network model output: Calculate the output reconstruction data of the ResNet101_Wettability_AI transfer network model;

[0133] 4e) Calculate mini-batch loss and accuracy: Calculate the reconstruction loss L of N mini-batch training datasets and output reconstructed data. os And accuracy, wherein, the present invention uses the cross-entropy loss function to calculate the mini-batch loss value. For tight reservoir wettability classification, the number of sample categories K=4, and the loss value L os The formula is (9):

[0134]

[0135] Where N is the number of mini-batch training datasets; a is the a-th class; r is the r-th mini-batch training dataset; B ar For label values; D ar These are predicted values.

[0136] 4f) Updating Network Parameters: The learning rate is iteratively decreased using an exponential decay method, decreasing by 10% every 10 training epochs. This gradually reduces the step size of network parameter updates, accelerating network optimization and enabling precise convergence. Simultaneously, stochastic gradient descent with momentum (SGDM) is employed to optimize the weights ψ and biases b of the ResNet101_Wettability_AI transfer learning network model. A momentum of 0.9 reduces the oscillation problem inherent in traditional stochastic gradient descent during optimization, accelerating the ResNet101_Wettability_AI transfer learning network model's approach to the optimal solution and improving optimization efficiency. L2 regularization is used to achieve weight decay, reducing network overfitting. After adding the regularization part, the loss value L... R The expression is (10):

[0137]

[0138]

[0139] Where λ is the regularization rate; q is the number of feature weights; h is the weight of the h-th feature; η is the learning rate; ψ h ψ is the weight value of the h-th feature; h-1 ψ is the weight value of the (h-1)th feature; h-2 b is the weight value of the (h-2)th feature; h b is the h-th partial value; h-1 b is the (h-1)th partial value; h-2 It is the (h-2)th partial value.

[0140] The method for updating network learning parameters is (11), each parameter update is one iteration, and when all training datasets participate in the iteration, it is one round of training;

[0141] 4g) Determine the number of iterations: If the number of iterations is less than or equal to 10, repeat 4c)-4f). If the number of iterations is greater than 10, import the verification dataset images. The purpose is to test the generalization ability and recognition effect of the model during training, so as to stop the network training in time before the network overfits.

[0142] 4h) Calculate the loss value and accuracy of the validation dataset: Observe the changes in the network prediction accuracy and loss value. When calculating the loss value of the validation dataset, use formula (9) to calculate. Stop network training when the loss value of the validation dataset no longer shows a downward trend, so as to obtain the tight reservoir wettability identification model.

[0143] Step S5: Input the image samples from the test dataset into the trained ResNet101_Wettability_AI reservoir wettability identification model for prediction, and use the category prediction result as the final result.

[0144] Step S6: Result visualization analysis. Gradient-weighted class activation mapping (Grad-CAM), a visualization tool for convolutional neural networks, is used to visualize and analyze the decision region of the ResNet101_Wettability_AI reservoir wettability identification model. By comparing the decision region, predicted wettability category results, and actual wettability category, the accuracy of the reservoir wettability identification model is evaluated. Specifically, this includes:

[0145] 6a) Calculate the weight coefficients of the feature image: First, input a low-temperature scanning electron microscope image into the trained ResNet101_Wettability_AI reservoir wettability identification model, extract many feature maps through multi-layer convolution, use the feature map output by the ReLU activation function before the global average pooling layer as the visualization target to calculate the estimated probability EP of each wettability category, take the estimated probability EP of each wettability category corresponding to the maximum value of EP, take the wettability category τ corresponding to the maximum value of EP as the wettability category τ output by the network, calculate the partial derivative of EP of this category with respect to each pixel of the feature map, and take global average pooling to obtain the weight coefficients of each channel of the feature map. The expression of the weight coefficients is (12):

[0146]

[0147] in, Z represents the weighting coefficients; Z represents the number of pixels in the feature map; EP represents the weighting coefficients. τ ρ represents the probability corresponding to the output wettability category τ; τ is the output wettability category; l is the channel of the feature map; ρ is the width indicator factor. It is a high indicator factor; is the pixel value on the l-th feature map.

[0148] 6b) Calculate the class activation value corresponding to the output wettability category: Based on the weight coefficients obtained in step 6a), the output feature map is linearly weighted by channel, and then a ReLU activation function is applied to calculate the class activation value corresponding to this wettability category τ. The expression for the class activation value is (13):

[0149]

[0150] 6c) Generate class activation heatmap: Color the two-dimensional numerical matrix according to the class activation values ​​obtained in step 6b) to obtain a class activation heatmap with the same size as the feature map. The larger the value of the class activation heatmap, the deeper the influence on the classification result.

[0151] 6d) Comparative analysis results: The class activation heatmap was uniformly adjusted to 224x224, consistent with the size of the image sample input to the network, and overlaid on the network input image with a transparency of 0.6. This makes it easier to compare and analyze the areas that have a significant impact on the classification results, compare whether the predicted wettability category and the actual wettability category are the same, and thus evaluate the accuracy of the tight reservoir wettability identification model (for example, a correct ratio of ≥90% is considered to be highly accurate).

[0152] Based on the above-mentioned tight reservoir wettability identification method based on improved deep residual networks, this embodiment proposes a tight reservoir wettability identification system based on improved deep residual networks, including:

[0153] The building unit is used to acquire an image sample set of rock samples and build a transfer learning model.

[0154] The pre-training unit is used to pre-train the transfer learning model using the ImageNet dataset to obtain the transfer network model;

[0155] The training unit is used to train the transfer network model using the training dataset to obtain the reservoir wettability identification model.

[0156] The prediction unit is used to input the test dataset into the reservoir wettability identification model to predict wettability;

[0157] The analysis unit is used to perform visual analysis of the decision region of the reservoir wettability identification model, and evaluate the accuracy of the reservoir wettability identification model by comparing the decision region, the predicted wettability category results and the actual wettability category.

[0158] Building units, specifically used for:

[0159] To obtain a sample set of images of the microscopic distribution of oil and water with different pore structures and different minerals;

[0160] The image sample set is divided into a training dataset, a validation dataset, and a test dataset;

[0161] Artificially labeled boundaries for pore structure, oil, and water were created for both the training and validation datasets, and wettability categories of oil-wet, water-wet, and neutral were constructed.

[0162] The oil-wetting behavior of kaolinite was observed and marked as oil-wetting behavior in neutral wetting, while the water-wetting behavior of illite and feldspar was marked as water-wetting behavior in neutral wetting.

[0163] Pre-trained units are specifically used for:

[0164] The transfer learning model is divided into four parts: the first part is the spatial transformation network, the second part includes one input convolutional layer and one max pooling layer, the third part contains four convolutional layers, and the fourth part is the classification output part.

[0165] The transfer learning model was pre-trained using the ImageNet dataset to obtain the initialization learning parameters for the four segments of the transfer learning model.

[0166] Adjust the learning rate of the four segments of the transfer learning model;

[0167] The classification output part in the transfer learning model is deleted and replaced with a structure containing a fully connected layer with multiple output nodes, a new Softmax layer, and a category output layer.

[0168] The initial learning parameters for each segment of the transfer learning model are set, and the initial learning parameter for the replaced fourth segment classification output is μ, thus obtaining the transfer network model.

[0169] The training unit is specifically used for:

[0170] The image samples in the training dataset are mapped and transformed through a spatial transformation network to obtain optimized image sample data.

[0171] Divide the training dataset into N equal parts;

[0172] Import N training datasets into the transfer learning network model to generate initial reconstructed data;

[0173] Based on the initial reconstructed data, calculate the output reconstructed data of the transfer network model;

[0174] Calculate the reconstruction loss and accuracy for N training datasets and the output reconstructed data;

[0175] The weights, biases, and momentum parameters of the transfer network model are updated and iterated.

[0176] If the number of iterations exceeds the threshold, import the validation dataset;

[0177] Calculate the loss value and accuracy of the validation dataset. Stop training when the loss value no longer shows a decreasing trend, thus obtaining the reservoir wettability identification model.

[0178] Analysis unit, specifically used for:

[0179] An image is input into the reservoir wettability identification model to extract feature maps;

[0180] Calculate the weight coefficients for each channel of the feature map;

[0181] Based on the weighting coefficients, the output feature map is linearly weighted by channel, and the class activation value corresponding to the output wettability category is calculated.

[0182] A class activation heatmap is obtained based on the class activation value;

[0183] The size of the class activation heatmap is adjusted and overlaid on the input image. The predicted wettability category is compared with the actual wettability category to evaluate the accuracy of the reservoir wettability identification model.

[0184] The tight reservoir wettability identification method and system proposed in this invention, based on an improved deep residual network, can accurately and quickly automatically identify the wettability of tight reservoirs based on deep transfer learning, achieving good results. This invention is simple and easy to operate, eliminates the influence of human factors in traditional wettability measurement methods, reduces measurement errors, improves work efficiency, and truly realizes intelligent automatic identification of tight reservoir wettability.

[0185] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying the wettability of tight reservoirs based on improved deep residual networks, characterized in that, include: Obtain an image sample set of rock samples and build a transfer learning model; The transfer learning model was pre-trained using the ImageNet dataset to obtain the transfer network model; The transfer network model was trained using the training dataset to obtain a reservoir wettability identification model; The test dataset is input into the reservoir wettability identification model to predict wettability; The decision region of the reservoir wettability identification model is visualized and analyzed. The accuracy of the reservoir wettability identification model is evaluated by comparing the decision region, the predicted wettability category results, and the actual wettability category. The process of acquiring the image sample set of the rock sample includes the following steps: To obtain a sample set of images of the microscopic distribution of oil and water with different pore structures and different minerals; The image sample set is divided into a training dataset, a validation dataset, and a test dataset; Artificially labeled boundaries for pore structure, oil, and water were created for both the training and validation datasets, and wettability categories of oil-wet, water-wet, and neutral were constructed. The oil-wetting behavior of kaolinite was observed and marked as oil-wetting behavior in neutral wetting, and the water-wetting behavior of illite and feldspar was marked as water-wetting behavior in neutral wetting. The transfer learning model includes a spatial transformation network, convolutional layers, max pooling layers, global flat pooling layers, and fully connected layers. The process of pre-training the transfer learning model using the ImageNet dataset to obtain the transfer network model includes the following steps: The transfer learning model is divided into four parts: the first part is the spatial transformation network, the second part includes one input convolutional layer and one max pooling layer, the third part contains four convolutional layers, and the fourth part is the classification output part. The transfer learning model was pre-trained using the ImageNet dataset to obtain the initialization learning parameters for the four segments of the transfer learning model. Adjust the learning rate of the four segments of the transfer learning model; The classification output part in the transfer learning model is deleted and replaced with a structure containing a fully connected layer with multiple output nodes, a new Softmax layer, and a category output layer. Set the initial learning parameters for each segment of the transfer learning model. The initial learning parameters for the replaced fourth segment's classification output are as follows: Thus, the migration network model is obtained; The The expression for the range of values ​​is as follows: Where, N ot and N in These represent the number of nodes in the output and input of the fourth segment of the classification output section after replacement, respectively. The step of training the transfer network model using a training dataset to obtain the reservoir wettability identification model includes the following steps: The image samples in the training dataset are mapped and transformed through a spatial transformation network to obtain optimized image sample data. Divide the training dataset into N equal parts; Import N training datasets into the transfer learning network model to generate initial reconstructed data; Based on the initial reconstructed data, calculate the output reconstructed data of the transfer network model; Calculate the reconstruction loss and accuracy for N training datasets and the output reconstructed data; The weights, biases, and momentum parameters of the transfer network model are updated and iterated. If the number of iterations exceeds the threshold, import the validation dataset; Calculate the loss value and accuracy of the validation dataset. Stop training when the loss value no longer shows a decreasing trend, thus obtaining the reservoir wettability identification model.

2. The tight reservoir wettability identification method based on improved deep residual networks according to claim 1, characterized in that, The visualization analysis of the decision region of the reservoir wettability identification model, and the evaluation of the accuracy of the reservoir wettability identification model by comparing the decision region, the predicted wettability category results, and the actual wettability category, includes the following steps: An image is input into the reservoir wettability identification model to extract feature maps; Calculate the weight coefficients for each channel of the feature map; Based on the weighting coefficients, the output feature map is linearly weighted by channel, and the class activation value corresponding to the output wettability category is calculated. A class activation heatmap is obtained based on the class activation value; The size of the class activation heatmap is adjusted and overlaid on the input image. The predicted wettability category is compared with the actual wettability category to evaluate the accuracy of the reservoir wettability identification model.

3. The tight reservoir wettability identification method based on improved deep residual networks according to claim 2, characterized in that, The formula for the weighting coefficient is as follows: in, is the weighting coefficient; Z is the number of pixels in the feature map; For output wettability category The corresponding probability; The output wettability category; For the channels of the feature map; Wide indicator factor; It is a high indicator factor; For the first Each feature map at location ( , Pixel values ​​on ).

4. The tight reservoir wettability identification method based on improved deep residual networks according to claim 2, characterized in that, The formula for the class activation value is as follows: 。 5. A tight reservoir wettability identification system based on an improved deep residual network, characterized in that, include: The building unit is used to acquire an image sample set of rock samples and build a transfer learning model. The pre-training unit is used to pre-train the transfer learning model using the ImageNet dataset to obtain the transfer network model; The training unit is used to train the transfer network model using the training dataset to obtain the reservoir wettability identification model. The prediction unit is used to input the test dataset into the reservoir wettability identification model to predict wettability; The analysis unit is used to perform visual analysis of the decision region of the reservoir wettability identification model, and evaluate the accuracy of the reservoir wettability identification model by comparing the decision region, the predicted wettability category results and the actual wettability category. The building unit is specifically used for: To obtain a sample set of images of the microscopic distribution of oil and water with different pore structures and different minerals; The image sample set is divided into a training dataset, a validation dataset, and a test dataset; Artificially labeled boundaries for pore structure, oil, and water were created for both the training and validation datasets, and wettability categories of oil-wet, water-wet, and neutral were constructed. The oil-wetting behavior of kaolinite was observed and marked as oil-wetting behavior in neutral wetting, and the water-wetting behavior of illite and feldspar was marked as water-wetting behavior in neutral wetting. The transfer learning model includes a spatial transformation network, convolutional layers, max pooling layers, global flat pooling layers, and fully connected layers. The pre-training unit is specifically used for: The transfer learning model is divided into four parts: the first part is the spatial transformation network, the second part includes one input convolutional layer and one max pooling layer, the third part contains four convolutional layers, and the fourth part is the classification output part. The transfer learning model was pre-trained using the ImageNet dataset to obtain the initialization learning parameters for the four segments of the transfer learning model. Adjust the learning rate of the four segments of the transfer learning model; The classification output part in the transfer learning model is deleted and replaced with a structure containing a fully connected layer with multiple output nodes, a new Softmax layer, and a category output layer. Set the initial learning parameters for each segment of the transfer learning model. The initial learning parameters for the replaced fourth segment's classification output are as follows: Thus, the migration network model is obtained; The The expression for the range of values ​​is as follows: Where, N ot and N in These represent the number of nodes in the output and input of the fourth segment of the classification output section after replacement, respectively. The training unit is specifically used for: The image samples in the training dataset are mapped and transformed through a spatial transformation network to obtain optimized image sample data. Divide the training dataset into N equal parts; Import N training datasets into the transfer learning network model to generate initial reconstructed data; Based on the initial reconstructed data, calculate the output reconstructed data of the transfer network model; Calculate the reconstruction loss and accuracy for N training datasets and the output reconstructed data; The weights, biases, and momentum parameters of the transfer network model are updated and iterated. If the number of iterations exceeds the threshold, import the validation dataset; Calculate the loss value and accuracy of the validation dataset. Stop training when the loss value no longer shows a decreasing trend, thus obtaining the reservoir wettability identification model.

6. The tight reservoir wettability identification system based on improved deep residual networks according to claim 5, characterized in that, The analysis unit is specifically used for: An image is input into the reservoir wettability identification model to extract feature maps; Calculate the weight coefficients for each channel of the feature map; Based on the weighting coefficients, the output feature map is linearly weighted by channel, and the class activation value corresponding to the output wettability category is calculated. A class activation heatmap is obtained based on the class activation value; The size of the class activation heatmap is adjusted and overlaid on the input image. The predicted wettability category is compared with the actual wettability category to evaluate the accuracy of the reservoir wettability identification model.