Tight sandstone reservoir pore type identification and surface porosity calculation method, system and equipment

Through improved YOLOv8 model and image processing technology, the pore types of tight sandstone reservoirs are quickly and accurately identified and the face rate is calculated, which solves the problems of cumbersome identification process and low accuracy in the existing technology, and achieves efficient pore type recognition and face rate calculate.

CN119295893AActive Publication Date: 2025-01-10CHONGQING UNIVERSITY OF SCIENCE AND TECHNOLOGY

Patent Information

Application Number
CN202411310630.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-01-10
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

The prior art has cumbersome and low accuracy in dense sandstone reservoirs, and has large errors in face rate calculation, making it difficult to quickly and accurately identify and calculate pore types.

Method used

The improved YOLOv8 model is used to identify the pore types of tight sandstone reservoirs, combine image processing technology to calculate the face rate, feature extraction and fusion is performed through backbone network, feature fusion network and detection head network, and similarity perceptual attention mechanism and multi-head detection are used. The head improves the recognition accuracy and calculates the pore area and face rate through image processing technology.

Benefits of technology

The fast and accurate identification of the pore types of tight sandstone reservoirs and the quantitative calculation of face rate are achieved, which solves the problems of cumbersome identification process and low accuracy in the prior art, and reduces experimental error and workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295893A_ABST
    Figure CN119295893A_ABST
Patent Text Reader

Abstract

The invention discloses a compact sandstone reservoir pore type identification and surface porosity calculation method, system and device, and relates to the field of deep learning image processing, and the method comprises the steps: obtaining a target image, inputting the target image into a compact sandstone reservoir pore type identification model, and outputting a pore type identification image; the pore type identification image is marked with a pore contour, a pore type prediction value and a corresponding pore type identification confidence prediction value; the compact sandstone reservoir pore type identification model is obtained by training an improved YOLOv8 model by adopting a training sample; the training sample comprises a compact sandstone casting body slice image sample, a corresponding pore type sample value and a pore type identification confidence coefficient sample value; and calculating the surface porosity in the pore type identification image by adopting an image processing technology. According to the method, the accuracy of identifying the pore type in the tight sandstone reservoir and the efficiency of calculating the surface porosity can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of deep learning image processing technology, and in particular to a method, system and device for identifying pore types and calculating surface surface ratios in tight sandstone reservoirs. Background Art

[0002] There are various types of pores in tight sandstone reservoirs, including primary pores, secondary pores, and microcracks. Primary pores are formed during the sedimentation process, while secondary pores are caused by later diagenesis, such as dissolution. Microcracks are usually caused by tectonic activities, and they play an important role in improving reservoir properties. The pores vary greatly in size, from nanometers to micrometers, and in various shapes, which poses a great challenge to the identification and recognition of pore types in tight sandstone reservoirs.

[0003] The current research on pore types in tight sandstone reservoirs is mainly carried out through thin section identification, scanning electron microscopy, constant rate mercury injection testing, nuclear magnetic resonance, and CT scanning imaging. Although conventional methods have a certain degree of accuracy in identifying pore types in tight sandstone reservoirs, the methods are not flexible and fast enough, and the cost in manpower and financial resources is relatively high. Therefore, it is necessary to use deep learning to identify pore types in tight sandstone reservoirs. At present, it is mainly through thin section microscopic observation, but it is limited by the experience of interpreters and the boring and numerous manual picking operations, which brings great difficulties to the identification of pore types in tight sandstone reservoirs.

[0004] The quantitative calculation of pores in tight sandstone reservoirs currently includes porosity test, manual identification under cast thin section microscope, etc. Among them, porosity test cannot distinguish different pore types, has high requirements for the test environment, and is affected by factors such as sample integrity, resulting in large experimental limitations. The manual identification method under cast thin section microscope is limited by factors such as interpreter operation technology, strong subjectivity in pore type identification, and insufficient speed and accuracy in surface ratio calculation, resulting in large errors in experimental results, which brings great difficulties to the quantitative calculation of pore types in tight sandstone reservoirs. Summary of the invention

[0005] The purpose of this application is to provide a method, system and equipment for identifying pore types and calculating surface surface ratio in tight sandstone reservoirs, so as to solve the problems of complicated operation process and low accuracy in the existing pore type identification and quantitative calculation in tight sandstone reservoirs.

[0006] To achieve the above objectives, this application provides the following solutions:

[0007] In a first aspect, the present application provides a method for identifying pore types and calculating surface surface ratio in a tight sandstone reservoir, comprising:

[0008] Acquire a target image; the target image is a thin section image of a dense sandstone casting;

[0009] The target image is input into a tight sandstone reservoir pore type identification model, and a pore type identification image is output; the pore type identification image is marked with pore contours, pore type prediction values, and corresponding pore type identification confidence prediction values; the tight sandstone reservoir pore type identification model is obtained by training an improved YOLOv8 model using training samples; the training samples include cast thin section image samples of tight sandstone, corresponding pore type sample values, and pore type identification confidence sample values;

[0010] Image processing techniques are used to calculate the face ratio in the pore type identification image.

[0011] Optionally, the improved YOLOv8 model includes a backbone network, a feature fusion network, and a detection head network connected in sequence;

[0012] The backbone network is used to extract features from the target image to obtain a feature map;

[0013] The feature fusion network is used to perform feature fusion on the feature map to obtain a fused feature map;

[0014] The detection head network is used to predict the fused feature map to obtain a pore type recognition image.

[0015] Optionally, the backbone network includes a first convolutional layer, a second convolutional layer, a first feature fusion module, a third convolutional layer, a second feature fusion module, a fourth convolutional layer, a third feature fusion module, a fifth convolutional layer, a fourth feature fusion module, an SPPF layer, and a similarity-aware attention mechanism subnetwork connected in sequence;

[0016] Among them, the similarity-aware attention mechanism sub-network includes an input layer, an embedding layer, a Dropout layer, a multi-layer similarity-aware attention mechanism layer, a fully connected layer, a Softmax layer and an output layer connected in sequence.

[0017] Optionally, the first feature fusion module, the second feature fusion module, the third feature fusion module and the fourth feature fusion module are all embedded with a spatial and channel reconstruction convolution module.

[0018] Optionally, the feature fusion network includes a first feature fusion sub-network, a second feature fusion sub-network and a third feature fusion sub-network;

[0019] The first feature fusion subnetwork includes a first splicing layer, a first upsampling layer, a second splicing layer, a second upsampling layer, a first multi-head detection head, a third splicing layer, a third upsampling layer and a second multi-head detection head connected in sequence; wherein the first splicing layer is connected to the first feature fusion module, the second splicing layer is connected to the second feature fusion module, the third splicing layer is connected to the third feature fusion module, and the second multi-head detection head is connected to the similarity-aware attention mechanism subnetwork;

[0020] The second feature fusion sub-network includes a third multi-head detection head and a sixth convolutional layer; wherein the third multi-head detection head is connected to the first upsampling layer, and the sixth convolutional layer is connected to the first multi-head detection head;

[0021] The third feature fusion subnetwork includes a fourth multi-head detection head, a seventh convolutional layer, a fourth splicing layer, a fifth multi-head detection head, an eighth convolutional layer, a fifth splicing layer, a sixth multi-head detection head, a ninth convolutional layer, a sixth splicing layer and a seventh multi-head detection head connected in sequence; wherein, the fourth splicing layer is connected to the third multi-head detection head, the fifth splicing layer is connected to the first multi-head detection head, and the sixth splicing layer is respectively connected to the sixth convolutional layer and the second multi-head detection head.

[0022] Optionally, the detection head network includes a first target detection head, a second target detection head, a third target detection head and a fourth target detection head;

[0023] Among them, the first target detection head is connected to the fourth multi-head detection head, the second target detection head is connected to the fifth multi-head detection head, the third target detection head is connected to the sixth multi-head detection head, and the fourth target detection head is connected to the seventh multi-head detection head.

[0024] Optionally, the training process of the tight sandstone reservoir pore type identification model specifically includes:

[0025] Obtaining a casting thin section image sample of dense sandstone, and marking the pore types in the casting thin section image sample of dense sandstone, to obtain a marked casting thin section image sample of dense sandstone;

[0026] The labeled thin-section image samples of the dense sandstone casting are format-converted, and the thin-section image samples of the dense sandstone casting after the format conversion are used as training samples;

[0027] Inputting the training sample into the improved YOLOv8 model, and outputting a pore type identification image;

[0028] A loss function is constructed according to the pore type sample values ​​and the pore type prediction values ​​in the pore type identification image, and the network parameters of the improved YOLOv8 model are adjusted by the loss function to obtain the tight sandstone reservoir pore type identification model.

[0029] Optionally, the face ratio in the pore type identification image is calculated using an image processing technique, specifically comprising:

[0030] Removing the pore type prediction value and the corresponding pore type recognition confidence level marked on the pore type recognition image, and obtaining a pore type recognition image marked with pore contours;

[0031] Converting the pore type identification image marked with pore outlines into a grayscale image to obtain a pore type identification grayscale image marked with pore outlines;

[0032] The pore type identification grayscale image marked with pore outlines is filtered and denoised using Gaussian fuzzy filtering technology to obtain a filtered pore type identification grayscale image marked with pore outlines;

[0033] Setting a preset threshold, and converting the filtered grayscale image for pore type identification marked with pore outlines into a black-and-white image for pore type identification marked with pore outlines based on the preset threshold;

[0034] The findContours function is used to detect the pore types marked with pore contours to identify the contours of each pore in the black and white image, and the contourArea function is used to calculate the area of ​​each detected contour to determine the pore area calculation result;

[0035] The calculated results of different types of pore areas are added together to obtain the total pore areas of different types;

[0036] The total area of ​​the pore type identification black and white image marked with the pore outline is calculated, and the surface ratio of different types of pores is determined according to the total area of ​​the pore type identification black and white image marked with the pore outline and the total area of ​​different types of pores.

[0037] In a second aspect, the present application provides a system for identifying pore types and calculating surface surface ratio in a tight sandstone reservoir, comprising:

[0038] A target image acquisition module is used to acquire a target image; the target image is a thin section image of a dense sandstone casting;

[0039] A pore type identification image determination module is used to input the target image into a tight sandstone reservoir pore type identification model and output a pore type identification image; the pore type identification image is marked with pore contours, pore type prediction values ​​and corresponding pore type identification confidence prediction values; the tight sandstone reservoir pore type identification model is obtained by training an improved YOLOv8 model using training samples; the training samples include cast thin section image samples of tight sandstone, corresponding pore type sample values ​​and pore type identification confidence sample values;

[0040] The face rate calculation module is used to calculate the face rate in the pore type identification image by using image processing technology.

[0041] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for identifying pore types and calculating surface surface ratio of tight sandstone reservoirs described in any one of the above.

[0042] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0043] The present application provides a method, system, and device for identifying pore types and calculating surface ratios of tight sandstone reservoirs. The improved YOLOv8 segmentation model is trained to obtain a pore type identification model for tight sandstone reservoirs, which realizes the rapid and accurate identification of pore types in tight sandstone thin-section images. At the same time, image processing technology is used to quantitatively calculate surface ratios, which solves the problems of large errors and cumbersome workload in the quantitative calculation of thin-section surface ratios in the past. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 This is an application environment diagram of a method for identifying pore types and calculating surface surface ratio of a tight sandstone reservoir in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of a flow chart of a method for identifying pore types and calculating surface surface ratio in a tight sandstone reservoir provided in one embodiment of the present application;

[0047] Figure 3 A schematic diagram of a target image provided by an embodiment of the present application;

[0048] Figure 4 A schematic diagram of a pore type identification image provided by another embodiment of the present application;

[0049] Figure 5 A schematic diagram of the functional modules of an improved YOLOv8 model provided in one embodiment of the present application;

[0050] Figure 6 A schematic diagram of a pore type identification image with pore outlines marked after removing the pore type prediction value and confidence level;

[0051] Figure 7 A schematic diagram of functional modules of a system for identifying pore types and calculating surface surface ratio in a tight sandstone reservoir provided by another embodiment of the present application;

[0052] Figure 8 A schematic diagram of the structure of a computer device provided in one embodiment of the present application.

[0053] Reference numerals:

[0054] Terminal-102, server-104, backbone network-1, feature fusion network-2, first feature fusion sub-network-21, second feature fusion sub-network-22, third feature fusion sub-network-23, detection head network-3, target image acquisition module-4, pore type recognition image determination module-5, face rate calculation module-6. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0056] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0057] Glossary:

[0058] Face ratio: the ratio of pore area to the total image area.

[0059] YOLOv8:

[0060] As a SOTA (State-of-the-Art) model, the deep learning model YOLOv8 is built on the basis of the deep learning model YOLO series. This application integrates the experience of previous versions and introduces innovative features and improvements to further improve its performance and flexibility, making it the first choice for many tasks such as object detection, image segmentation, and pose estimation.

[0061] The method for identifying pore types and calculating surface porosity of tight sandstone reservoirs provided in the embodiments of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the target image to the server 104. After the server 104 receives the target image, for the target image, the server 104 inputs the target image into the pore type recognition model of the tight sandstone reservoir and outputs the pore type recognition image; the pore type recognition image is marked with pore contours, pore type prediction values ​​and corresponding pore type recognition confidence prediction values; the tight sandstone reservoir pore type recognition model is obtained by training the improved YOLOv8 model with training samples; the training samples include cast thin section image samples of tight sandstone, corresponding pore type sample values ​​and pore type recognition confidence sample values; the face rate in the pore type recognition image is calculated using image processing technology. The server 104 can feedback the obtained pore type prediction value and face rate to the terminal 102. In addition, in some embodiments, the method for identifying the pore type and calculating the surface ratio of the tight sandstone reservoir can also be implemented independently by the server 104 or the terminal 102. For example, the terminal 102 can directly perform the pore type identification and surface ratio calculation of the tight sandstone reservoir on the target image, or the server 104 can obtain the target image from the data storage system and perform the pore type identification and surface ratio calculation of the tight sandstone reservoir on the target image.

[0062] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0063] In an exemplary embodiment, Figure 2As shown, a method for identifying pore types and calculating surface ratio of tight sandstone reservoirs is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S1 to S3. Among them:

[0064] Step S1, obtaining a target image; the target image is a thin section image of a dense sandstone casting, and the schematic diagram of the target image is as follows: Figure 3 shown.

[0065] Step S2, inputting the target image into a tight sandstone reservoir pore type identification model, and outputting a pore type identification image; Figure 4 As shown, the pore type recognition image is marked with pore contours, pore type prediction values ​​and corresponding pore type recognition confidence prediction values. Figure 4 The contour corresponding to the red area in is the pore contour; the tight sandstone reservoir pore type recognition model is obtained by training the improved YOLOv8 model with training samples; the training samples include cast thin section image samples of tight sandstone, corresponding pore type sample values ​​and pore type recognition confidence sample values.

[0066] Step S3, using image processing technology to calculate the face ratio in the pore type recognition image.

[0067] As an optional implementation, Figure 5 As shown, the improved YOLOv8 model includes a backbone network 1, a feature fusion network 2, and a detection head network 3 which are connected in sequence.

[0068] The backbone network 1 is used to extract features from the target image to obtain a feature map.

[0069] The feature fusion network 2 is used to perform feature fusion on the feature map to obtain a fused feature map.

[0070] The detection head network 3 is used to predict the fused feature map to obtain a pore type recognition image.

[0071] As an optional implementation, Figure 5As shown, the backbone network 1 includes a first convolutional layer, a second convolutional layer, a first feature fusion module, a third convolutional layer, a second feature fusion module, a fourth convolutional layer, a third feature fusion module, a fifth convolutional layer, a fourth feature fusion module, an SPPF layer, and a similarity-aware attention mechanism subnetwork, which are connected in sequence. The similarity-aware attention mechanism subnetwork includes an input layer, an embedding layer, a Dropout layer, a multi-layer similarity-aware attention mechanism layer, a fully connected layer, a Softmax layer, and an output layer, which are connected in sequence.

[0072] Specifically, a similarity-aware attention mechanism (SimAM) is added to the backbone network 1 of the deep learning model YOLOv8. SimAM is a lightweight self-attention mechanism. Its network structure is similar to that of Transformer, but it uses linear layers instead of dot products when calculating attention weights. SimAM can help CNN focus more on key areas in the image, thereby improving the performance of the model. Advantages: ① Lightweight and efficient: The biggest feature of SimAM is its parameter-free design, which means that no additional parameters are introduced when calculating attention. This is different from many other attention mechanisms, which usually require learning parameters to generate attention weights. Since SimAM uses a similarity-based calculation method, its calculation process can be accelerated by analytical solutions, avoiding complex numerical optimization processes, thereby greatly improving calculation efficiency; when processing long sequence data, the traditional attention mechanism will cause a sharp increase in calculation amount due to the increase in sequence length, while SimAM's lightweight design reduces this calculation burden, making it more advantageous when actually applied to large-scale data. ② Global information consideration: SimAM can consider the information of all elements in the input sequence, rather than being limited to local areas, so that the model can better capture global dependencies when processing data such as images. SimAM can dynamically adjust the attention weights according to the characteristics of the input data. This adaptive performance enables it to perform well on different tasks and data sets. In general: SimAM has the advantages of lightweight, high efficiency, global information consideration, parallel computing capabilities, long-term dependency modeling, improved model performance, strong ability to process long sequences, flexibility and versatility, and improved image quality.

[0073] As an optional implementation, Figure 5 As shown, the first feature fusion module, the second feature fusion module, the third feature fusion module and the fourth feature fusion module are all embedded with a spatial and channel reconstruction convolution (SCConv) module.

[0074] Specifically, the SCConv module is integrated into the improved feature fusion module C2f of YOLOv8. SCConv aims to effectively limit feature redundancy, which not only reduces the number of model parameters and floating-point operations FLOPs, but also enhances the ability of feature representation. Advantages: SCConv provides a new perspective on the feature extraction process of convolutional neural networks CNNs, and proposes a method to more effectively utilize spatial and channel redundancy, thereby improving model performance while reducing redundant features. Experimental results show that the model embedded with the spatial and channel reconstruction convolution module SCConv can achieve better performance by significantly reducing complexity and computational cost and reducing redundant features.

[0075] As an optional implementation, Figure 5 As shown, the feature fusion network 2 includes a first feature fusion sub-network 21, a second feature fusion sub-network 22 and a third feature fusion sub-network 23.

[0076] The first feature fusion subnetwork 21 includes a first splicing layer, a first upsampling layer, a second splicing layer, a second upsampling layer, a first multi-head detection head, a third splicing layer, a third upsampling layer and a second multi-head detection head connected in sequence; wherein, the first splicing layer is connected to the first feature fusion module, the second splicing layer is connected to the second feature fusion module, the third splicing layer is connected to the third feature fusion module, and the second multi-head detection head is connected to the similarity-aware attention mechanism subnetwork.

[0077] The second feature fusion subnetwork 22 includes a third multi-head detection head and a sixth convolutional layer; wherein the third multi-head detection head is connected to the first upsampling layer, and the sixth convolutional layer is connected to the first multi-head detection head.

[0078] The third feature fusion subnetwork 23 includes a fourth multi-head detection head, a seventh convolutional layer, a fourth splicing layer, a fifth multi-head detection head, an eighth convolutional layer, a fifth splicing layer, a sixth multi-head detection head, a ninth convolutional layer, a sixth splicing layer and a seventh multi-head detection head connected in sequence; wherein the fourth splicing layer is connected to the third multi-head detection head, the fifth splicing layer is connected to the first multi-head detection head, and the sixth splicing layer is respectively connected to the sixth convolutional layer and the second multi-head detection head.

[0079] As an optional implementation, Figure 5 As shown, the detection head network 3 includes a first target detection head, a second target detection head, a third target detection head and a fourth target detection head.

[0080] Among them, the first target detection head is connected to the fourth multi-head detection head, the second target detection head is connected to the fifth multi-head detection head, the third target detection head is connected to the sixth multi-head detection head, and the fourth target detection head is connected to the seventh multi-head detection head.

[0081] Specifically, the multi-head detection head CSP is integrated into the feature fusion network 2 of the deep learning model YOLOv8. The application of the multi-head detection head CSP structure in the field of target detection is mainly reflected in its ability to effectively improve the model's detection ability for targets of different scales. The multi-head detection head CSP structure achieves efficient fusion of low-level detail information and high-level semantic information by splitting and merging feature maps of different levels, which not only enhances the model's feature expression ability, but also improves the detection accuracy of small targets. In the deep learning model YOLOv8, by introducing the multi-head detection head CSP, targets of different scales can be specially processed, so that the model can respond to scale changes more flexibly, thereby improving the generalization ability and detection performance of the model. The added detection head targets the underlying features, which have higher resolution and are more sensitive to small targets.

[0082] In this way, the model can more effectively handle targets with large scale differences, especially in the detection of small targets. The deep learning model YOLOv8 uses a multi-head detection head CSP to add a small target detection layer to the multi-head detection head CSP and adaptively adjust the network width and depth to further improve the detection effect of small targets. This improvement strategy is simple and effective. Although it increases the amount of calculation, it significantly improves the detection performance of small targets. The application of the multi-head detection head CSP structure also involves the optimization of the loss function. For example, the use of Wasserstein distance loss reduces the model's sensitivity to small target position deviations and improves the performance of small target detection.

[0083] As an optional implementation manner, the training process of the tight sandstone reservoir pore type identification model specifically includes:

[0084] Step S21, obtaining a sample of a casting thin section image of a dense sandstone, and annotating the pore types in the sample of the casting thin section image of the dense sandstone, to obtain annotated sample of the casting thin section image of the dense sandstone, wherein the labeling tool Labelme is used to label the sample of the casting thin section image of the dense sandstone, and polygonal labeling is created for instance segmentation. The labeling of the pore types is divided into primary pores, secondary dissolution pores and cracks, such as: 0: dissolution pores (secondary porosity), 1: primary pores (primary porosity) and 2: cracks (cracks).

[0085] Step S22, convert the format of the labeled thin-section image samples of the dense sandstone casting, and use the converted thin-section image samples of the dense sandstone casting as training samples. After the labeling is completed, the .json file is converted into a .txt file for use in the deep learning model YOLOv8 training.

[0086] Step S23, inputting the training sample into the improved YOLOv8 model, and outputting a pore type identification image.

[0087] Step S24, constructing a loss function according to the pore type sample value and the pore type prediction value in the pore type identification image, and adjusting the network parameters of the improved YOLOv8 model by the loss function to obtain the tight sandstone reservoir pore type identification model. The tight sandstone reservoir pore type identification model can identify and locate pores in the image.

[0088] As an optional implementation, the face ratio in the pore type recognition image is calculated using image processing technology, specifically including:

[0089] Step S31, remove the pore type prediction value and the corresponding pore type recognition confidence marked on the pore type recognition image to obtain a pore type recognition image marked with pore contours, such as Figure 6 shown.

[0090] Step S32, converting the pore type identification image marked with pore contours into a grayscale image to obtain a pore type identification grayscale image marked with pore contours; grayscale images are easier to perform edge detection and contour extraction, thereby simplifying subsequent processing.

[0091] Step S33, using Gaussian blur filtering technology to filter and denoise the pore type identification grayscale image marked with pore contours, to obtain a filtered pore type identification grayscale image marked with pore contours; this helps to improve the accuracy of edge detection.

[0092] Step S34, setting a preset threshold, and converting the filtered grayscale image for pore type identification marked with pore outlines into a black-and-white image for pore type identification marked with pore outlines based on the preset threshold, so as to clearly distinguish the object from the background.

[0093] Step S35, using the findContours function in OpenCV to detect the pore types marked with pore contours to identify the contours of each pore in the black and white image, and using the contourArea function to calculate the area of ​​each detected contour to determine the pore area calculation result.

[0094] Step S36, adding the calculation results of different types of pore areas to obtain the total areas of different types of pores.

[0095] Step S37, calculating the total area of ​​the pore type identification black and white image marked with the pore outline, and determining the surface ratio of different types of pores according to the total area of ​​the pore type identification black and white image marked with the pore outline and the total area of ​​different types of pores.

[0096] Among them, contour detection and extraction use the findContours function in OpenCV to detect pore contours in binary images and identify boundary lines belonging to the same object; select contours of interest as needed and filter them by geometric properties of contours such as area or perimeter; use contourArea function to directly calculate the area of ​​each contour, and add the areas of all relevant contours in the current image to obtain the total area of ​​the irregular figure to obtain the pore area calculation result; add the areas of different types of pores to obtain the total area of ​​different types of pores; obtain the total area of ​​the entire current image by multiplying the width and height (in pixels) of the current image, and then obtain the surface ratio of different types of pores by dividing the total areas of different types of pores by the total area of ​​the current image.

[0097] Beneficial effects of this application:

[0098] This application improves the YOLOv8 model and trains the improved YOLOv8 model to obtain a tight sandstone reservoir pore type recognition model, which achieves rapid and accurate recognition of pore types in tight sandstone thin section images. At the same time, image processing technology is used to quantitatively calculate the surface ratio, solving the problems of large errors and cumbersome workload in the previous quantitative calculation of thin section surface ratio. The specific improvements include the following:

[0099] 1) A similarity-aware attention mechanism is added to the backbone network to improve the computational efficiency and thus achieve rapid identification of pore types in dense sandstone thin section images.

[0100] 2) Fusing the SCConv module in the feature fusion module C2f effectively limits feature redundancy and significantly reduces complexity and computational cost.

[0101] 3) Integrate the multi-head detection head CSP into the feature fusion network of the deep learning model YOLOv8, effectively improving the model's detection ability for targets of different scales and improving the model's recognition accuracy for targets.

[0102] Based on the same inventive concept, the embodiment of the present application also provides a system for identifying pore type and calculating face ratio of a tight sandstone reservoir for realizing the method for calculating pore type and face ratio of a tight sandstone reservoir involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the system for identifying pore type and calculating face ratio of a tight sandstone reservoir provided below can refer to the limitations of the method for calculating pore type and face ratio of a tight sandstone reservoir above, and will not be repeated here.

[0103] In an exemplary embodiment, Figure 7 As shown, a system for identifying pore types and calculating surface surface ratio of tight sandstone reservoirs is provided, comprising: a target image acquisition module 4, a pore type identification image determination module 5 and a surface surface ratio calculation module 6.

[0104] The target image acquisition module 4 is used to acquire a target image; the target image is a thin section image of a dense sandstone casting.

[0105] The pore type identification image determination module 5 is used to input the target image into the tight sandstone reservoir pore type identification model and output a pore type identification image; the pore type identification image is marked with pore contours, pore type prediction values ​​and corresponding pore type identification confidence prediction values; the tight sandstone reservoir pore type identification model is obtained by training an improved YOLOv8 model using training samples; the training samples include cast thin section image samples of tight sandstone, corresponding pore type sample values ​​and pore type identification confidence sample values.

[0106] The face rate calculation module 6 is used to calculate the face rate in the pore type identification image by using image processing technology.

[0107] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 8As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store target image processing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for identifying pore types and calculating surface ratios of tight sandstone reservoirs is implemented.

[0108] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0109] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0110] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0111] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0112] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0113] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for identifying pore types and calculating surface porosity in tight sandstone reservoirs, characterized in that: The method for identifying pore types and calculating surface surface ratio of tight sandstone reservoirs includes: Acquire a target image; the target image is a thin section image of a dense sandstone casting; The target image is input into a tight sandstone reservoir pore type identification model, and a pore type identification image is output; the pore type identification image is marked with pore contours, pore type prediction values, and corresponding pore type identification confidence prediction values; the tight sandstone reservoir pore type identification model is obtained by training an improved YOLOv8 model using training samples; the training samples include cast thin section image samples of tight sandstone, corresponding pore type sample values, and pore type identification confidence sample values; Image processing techniques are used to calculate the face ratio in the pore type identification image.

2. The method for identifying pore types and calculating surface surface ratio of tight sandstone reservoirs according to claim 1, characterized in that: The improved YOLOv8 model includes a backbone network, a feature fusion network and a detection head network connected in sequence; The backbone network is used to extract features from the target image to obtain a feature map; The feature fusion network is used to perform feature fusion on the feature map to obtain a fused feature map; The detection head network is used to predict the fused feature map to obtain a pore type recognition image.

3. The method for identifying pore types and calculating surface surface ratio of tight sandstone reservoirs according to claim 2, characterized in that: The backbone network includes a first convolutional layer, a second convolutional layer, a first feature fusion module, a third convolutional layer, a second feature fusion module, a fourth convolutional layer, a third feature fusion module, a fifth convolutional layer, a fourth feature fusion module, an SPPF layer, and a similarity-aware attention mechanism subnetwork, which are connected in sequence; Among them, the similarity-aware attention mechanism sub-network includes an input layer, an embedding layer, a Dropout layer, a multi-layer similarity-aware attention mechanism layer, a fully connected layer, a Softmax layer and an output layer connected in sequence.

4. The method for identifying pore types and calculating surface surface ratio of tight sandstone reservoirs according to claim 3, characterized in that: The first feature fusion module, the second feature fusion module, the third feature fusion module and the fourth feature fusion module are all embedded with a spatial and channel reconstruction convolution module.

5. The method for identifying pore types and calculating surface surface ratio of tight sandstone reservoirs according to claim 4, characterized in that: The feature fusion network includes a first feature fusion sub-network, a second feature fusion sub-network and a third feature fusion sub-network; The first feature fusion subnetwork includes a first splicing layer, a first upsampling layer, a second splicing layer, a second upsampling layer, a first multi-head detection head, a third splicing layer, a third upsampling layer and a second multi-head detection head connected in sequence; wherein the first splicing layer is connected to the first feature fusion module, the second splicing layer is connected to the second feature fusion module, the third splicing layer is connected to the third feature fusion module, and the second multi-head detection head is connected to the similarity-aware attention mechanism subnetwork; The second feature fusion sub-network includes a third multi-head detection head and a sixth convolutional layer; wherein the third multi-head detection head is connected to the first upsampling layer, and the sixth convolutional layer is connected to the first multi-head detection head; The third feature fusion subnetwork includes a fourth multi-head detection head, a seventh convolutional layer, a fourth splicing layer, a fifth multi-head detection head, an eighth convolutional layer, a fifth splicing layer, a sixth multi-head detection head, a ninth convolutional layer, a sixth splicing layer and a seventh multi-head detection head connected in sequence; wherein, the fourth splicing layer is connected to the third multi-head detection head, the fifth splicing layer is connected to the first multi-head detection head, and the sixth splicing layer is respectively connected to the sixth convolutional layer and the second multi-head detection head.

6. The method for identifying pore types and calculating surface surface ratio of tight sandstone reservoirs according to claim 5, characterized in that: The detection head network includes a first target detection head, a second target detection head, a third target detection head and a fourth target detection head; Among them, the first target detection head is connected to the fourth multi-head detection head, the second target detection head is connected to the fifth multi-head detection head, the third target detection head is connected to the sixth multi-head detection head, and the fourth target detection head is connected to the seventh multi-head detection head.

7. The method for identifying pore types and calculating surface porosity of tight sandstone reservoirs according to claim 1, characterized in that: The training process of the tight sandstone reservoir pore type identification model specifically includes: Obtaining a casting thin section image sample of dense sandstone, and marking the pore types in the casting thin section image sample of dense sandstone, to obtain a marked casting thin section image sample of dense sandstone; The labeled thin-section image samples of the dense sandstone casting are format-converted, and the thin-section image samples of the dense sandstone casting after the format conversion are used as training samples; Inputting the training sample into the improved YOLOv8 model, and outputting a pore type identification image; A loss function is constructed according to the pore type sample values ​​and the pore type prediction values ​​in the pore type identification image, and the network parameters of the improved YOLOv8 model are adjusted by the loss function to obtain the tight sandstone reservoir pore type identification model.

8. The method for identifying pore types and calculating surface surface ratio of tight sandstone reservoirs according to claim 1, characterized in that: The face ratio in the pore type identification image is calculated using image processing technology, specifically including: Removing the pore type prediction value and the corresponding pore type recognition confidence level marked on the pore type recognition image, and obtaining a pore type recognition image marked with pore contours; Converting the pore type identification image marked with pore outlines into a grayscale image to obtain a pore type identification grayscale image marked with pore outlines; The pore type identification grayscale image marked with pore outlines is filtered and denoised using Gaussian fuzzy filtering technology to obtain a filtered pore type identification grayscale image marked with pore outlines; Setting a preset threshold, and converting the filtered grayscale image for pore type identification marked with pore outlines into a black-and-white image for pore type identification marked with pore outlines based on the preset threshold; The findContours function is used to detect the pore types marked with pore contours to identify the contours of each pore in the black and white image, and the contourArea function is used to calculate the area of ​​each detected contour to determine the pore area calculation result; The calculated results of different types of pore areas are added together to obtain the total pore areas of different types; The total area of ​​the black-and-white image is identified by the pore type marked with the pore outline, and the face ratio of the different types of pores is determined according to the total area of ​​the black-and-white image and the total areas of the different types of pores.

9. A system for identifying pore types and calculating surface porosity in tight sandstone reservoirs, characterized in that: The tight sandstone reservoir pore type identification and surface surface ratio calculation system comprises: A target image acquisition module is used to acquire a target image; the target image is a thin section image of a dense sandstone casting; A pore type identification image determination module is used to input the target image into a tight sandstone reservoir pore type identification model and output a pore type identification image; the pore type identification image is marked with pore contours, pore type prediction values ​​and corresponding pore type identification confidence prediction values; the tight sandstone reservoir pore type identification model is obtained by training an improved YOLOv8 model using training samples; the training samples include cast thin section image samples of tight sandstone, corresponding pore type sample values ​​and pore type identification confidence sample values; The face rate calculation module is used to calculate the face rate in the pore type identification image by using image processing technology.

10. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for identifying pore types and calculating surface surface ratio of tight sandstone reservoirs described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method for judging pore type of carbonate rock based on scanned image

    CN107133630A

  • High-porosity sandstone slice pore identification method based on deep learning

    CN116797929A

  • Deep learning-based intelligent analysis method and system for pore structure of rock slice

    CN117115639A

  • Gesture recognition method based on improved YOLOv5 network

    CN118116033A

  • Intelligent detection method for openness of fresh flowers in scenting of jasmine tea

    CN118587530A

Cited By

  • Intelligent segmentation model and system for natural fractures of tight sandstone core

    CN120147649A

  • GIS equipment infrared target fault analysis method and system based on deep learning

    CN120598955A