A method for constructing a characterization model of natural fracture parameters in tight sandstone cores

By improving the neck network structure and feature fusion capabilities of YOLOv8m, a Frac-YOLOv8 model was constructed, which solved the problems of insufficient accuracy and incomplete quantization in the detection of fractures in tight sandstone cores. This model achieved efficient fracture segmentation and quantization, improving detection efficiency and accuracy.

CN120147642BActive Publication Date: 2025-11-14CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510291350.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-11-14
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient detection accuracy and incomplete crack quantification in the detection of cracks in tight sandstone cores. Traditional methods rely on manual operation, which is inefficient and easily affected by subjective factors. Existing deep learning models such as YOLOv8 face challenges in crack extraction and quantification in complex backgrounds.

Method used

A deep learning network model, Frac-YOLOv8, suitable for dense sandstone cores, was constructed. By improving the neck network structure of YOLOv8m, using the lightweight computational ZARAFE module and the novel Neck network structure BiFPN, and combining digital image processing technology, automatic crack segmentation and geometric parameter quantization were achieved.

Benefits of technology

It improves the accuracy and speed of crack segmentation and identification, achieving a crack segmentation mAP of 84.8% with a segmentation time of 16.39% compared to the traditional YOLOv8m network. The quantization results show a high degree of agreement with the actual results, demonstrating efficient crack segmentation and quantization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147642B_ABST
    Figure CN120147642B_ABST
Patent Text Reader

Abstract

This invention provides a method for constructing a characteristic parameter model of natural fractures in tight sandstone cores, specifically including the following steps: Step 100. Creating a self-made image dataset of natural fractures in tight sandstone cores; Step 200. Establishing an efficient adaptive Frac-YOLOv8 network for segmenting natural fractures in cores; Step 300. Training the network using this dataset to obtain a segmentation model for natural fractures in cores; Step 400. Inputting the core image to be segmented into the model to segment the fractures; Step 500. Generating a binary fracture dataset; Step 600. Applying a fracture skeletonization extraction algorithm to quantify the fracture length; Step 700. Using a pixel statistics algorithm to quantify the actual area of ​​the fracture and calculate the average width of the fracture; Finally, using a variable circle fracture algorithm to calculate the maximum width pixel value of the fracture, and quantifying the maximum width by the diameter of the inscribed circle. This method provides an effective basis for the evaluation and analysis of natural fractures in tight sandstone cores.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of petroleum exploration technology, and in particular relates to a method for constructing a characterization model of natural fracture parameters in tight sandstone cores. Background Technology

[0002] Over the past few decades, natural rock cores, especially tight sandstone, have received widespread attention as a key research subject for underground engineering and energy extraction. Tight sandstone plays an important role in oil, natural gas, and water resource reserves, but due to its high compaction and low permeability, it often develops fractures during extraction due to stress changes, temperature fluctuations, and geological processes. These fractures alter the fluid permeability characteristics of the rock mass, affecting reservoir extraction efficiency and safety. Studies have shown that the presence of fractures is an important indicator for assessing reservoir structure and is directly related to the stability of underground engineering and the sustainability of resource extraction. Therefore, accurate and efficient fracture segmentation and quantification are crucial for ensuring the safety and economic viability of reservoir development.

[0003] Traditional methods for detecting fractures in tight sandstone cores primarily rely on manual operation, such as visual observation and analysis with a magnifying glass. While simple, these methods have low accuracy and struggle to identify minute fractures. With technological advancements, handheld flaw detectors have gradually replaced manual recording, offering higher detection accuracy. However, these methods still depend on manual labor, are highly subjective, and are inefficient and costly when processing large numbers of core samples, especially prone to errors when fracture distribution is complex. To address these issues, modern fracture detection employs digital imaging and automation technologies, such as high-resolution CT scanning and electron microscopy, combined with computer image processing for automated analysis. These advanced technologies not only improve detection accuracy but also quantitatively assess parameters such as fracture depth, width, and length. Early digital imaging techniques utilized color range conversion and grayscale thresholding for fracture detection, primarily applied to intelligent identification of fractures in road and bridge construction and materials. Commonly used methods include thresholding algorithms, edge algorithms, and region algorithms, which can record the location and shape of fractures. However, these methods are less frequently used in fracture detection in tight sandstone reservoir drilling cores due to their cumbersome procedures, leading to omissions and errors during the detection process, affecting measurement accuracy and efficiency.

[0004] Deep learning, particularly convolutional neural networks (CNNs), is driving the development of computer vision, overcoming the limitations of traditional digital image processing techniques in crack detection, especially in efficiently and accurately identifying crack morphology in complex backgrounds. CNNs learn data features layer by layer through multi-layer nonlinear mapping, enabling effective feature extraction and resulting in outstanding performance in image segmentation tasks. Several advanced CNN segmentation models, such as Mask R-CNN, YOLO, fully convolutional networks (FCN), U-net, and DeepLab-v3+, can extract shallow and deep features from pixel-level data, significantly improving segmentation accuracy. However, despite these advancements in crack segmentation, they still face challenges in accuracy and crack quantization, especially in quantifying crack geometric features (such as length and width). YOLOv8, as an efficient and accurate target detection technique, performs well in crack segmentation. In the oil exploration field, its fast inference and strong adaptability have significantly improved segmentation efficiency and accuracy. However, YOLOv8 still has room for optimization, especially in crack extraction and quantization in complex geological backgrounds. Further optimization of YOLOv8's accuracy and adaptability is of great significance for improving the effectiveness of automatic fracture identification and its application in oil exploration and other related fields.

[0005] The technical solution of existing technology 1:

[0006] Currently, the detection of cracks in natural rock cores mainly involves segmenting the cracks without further quantitative analysis.

[0007] Image segmentation is a key task in computer vision, divided into instance segmentation and semantic segmentation. In core crack detection, semantic segmentation is often more suitable. Yang et al. proposed a transfer learning method based on DCNN, which performed well on three datasets but failed to quantize cracks. Mei et al. proposed a deep learning-based pavement crack detection method that considers pixel connectivity but does not address crack quantization, thus failing to provide reliable pavement assessment. To improve crack detection accuracy and achieve quantitative analysis, it is necessary to balance network parameters and detection performance, and combine image processing methods to support reservoir analysis and seepage characteristic prediction in oil and gas exploration. Ji et al. proposed an ensemble method based on DeepLabv3+ for crack detection and proposed a crack quantization algorithm. Although it achieved high-precision quantization on five indicators, its segmentation performance was low, with an accuracy of only 73.31%. The crack extraction results are as follows: Figure 2 As shown.

[0008] Disadvantages of existing technology 1:

[0009] Currently, traditional methods and existing research face numerous challenges in the field of natural crack identification in tight sandstone. Traditional methods are complex, rely on manual operation, are inefficient, and are susceptible to subjective influences, resulting in poor generalization and difficulty in adapting to the crack characteristics of tight sandstone from different regions and types. First, crack detection and classification is a challenging task, as determining geometric features is difficult. Therefore, crack segmentation should be implemented to obtain more detailed crack information. Semantic segmentation can more accurately identify cracks by recognizing the type of each pixel. Second, many researchers have only detected natural core cracks without further quantitative studies, failing to provide reliable guidance for practical pavement assessment. Summary of the Invention

[0010] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method for constructing a characterization model of natural fracture parameters in tight sandstone cores.

[0011] This invention, based on the original YOLOv8m convolutional neural network algorithm, constructs a novel deep learning network model, Frac-YOLOv8, suitable for natural fracture morphology segmentation and adaptive quantization of fracture geometric parameters in tight sandstone cores. This model, Frac-YOLOv8, automatically segments and identifies the number, length, width (average and maximum), area, and line density of natural fractures in tight sandstone core images at the pixel-level and obtains quantified data. Specifically, this identification model method has three improvements: First, the original upsampling module of the neck of YOLOv8m is replaced with the lightweight computational ZARAFE module, enabling the neck network to fully utilize the semantics of the feature map during feature fusion. Second, the original YOLOv8m neck uses FPN mode for feature fusion, while the Frac-YOLOv8 model of this invention proposes a novel Neck network structure, BiFPN, which enhances feature fusion capabilities and allows the network to learn cross-layer feature information, achieving efficient aggregation of features at multiple scales. This makes the improved network more efficient and accurate in identifying natural fractures in tight sandstone cores. Finally, based on the automatic segmentation and identification results of natural fractures in tight sandstone using the constructed Frac-YOLOv8 model, an adaptive quantization framework is developed to achieve automatic quantitative analysis of the geometric parameters of natural fractures. The results include pixel-level fracture count, fracture length, fracture width (average and maximum), fracture area, and fracture line density.

[0012] This invention uses core fracture images of tight sandstone from the Bozi Dabei Block in the Tarim Basin as its data foundation. LabelImg is used to calibrate the dataset of natural fracture segmentation in the tight sandstone cores, which is then used to train a model and to verify the accuracy of the constructed model, Frac-YOLOv8, in automatically segmenting and identifying fracture geometric parameters. The results show that the constructed model, Frac-YOLOv8, achieves a high mAP (maximum accuracy) for fracture segmentation and identification. 0.5 The accuracy reached 84.8%, a significant improvement compared to the original YOLOv8. Simultaneously, the segmentation time was reduced by 16.39% compared to the traditional YOLOv8m network, improving the network's segmentation speed. Furthermore, based on the segmentation results of the Frac-YOLOv8 model, fracture geometric parameters were further extracted, and the quantified results showed a high degree of agreement with actual values. In summary, the novel deep learning network model Frac-YOLOv8, suitable for natural fracture morphology segmentation and adaptive quantification of fracture geometric parameters in tight sandstone cores, performs well. It is helpful for the segmentation, detection, and quantitative evaluation of natural fractures in tight sandstone, and has significant application potential and prospects in tight oil and gas reservoir evaluation, geological sweet spot selection, and production prediction.

[0013] The present invention adopts the following technical solution:

[0014] A method for constructing a characterization model of natural fracture parameters in tight sandstone cores includes:

[0015] Step 100. Create a dataset of natural crack images from dense sandstone cores.

[0016] Based on core fracture photographs, a dataset for segmenting natural fractures in tight sandstone cores was calibrated using LabelImg. After creating the dataset of natural fractures in tight sandstone cores using LabelImg, it was input into the network, allowing the network to learn and segment the natural fractures in the dataset. The input images to the Frac-YOLOv8 tight sandstone core natural fracture segmentation network were 640*640 pixels, typically including an image preprocessing stage, which involves scaling the input images to the network's input size and normalizing them. During the network training phase, the Frac-YOLOv8 tight sandstone core natural fracture segmentation network used Mosaic data augmentation.

[0017] Step 200. Establish an efficient adaptive Frac-YOLOv8 core natural fracture segmentation network.

[0018] The YOLOv8m network was redesigned, and for the neck feature fusion network, the original upsampling module in the YOLOv8m neck was replaced with the lightweight computational CARAFE module. Considering the large size variations of natural fractures in dense sandstone cores, a novel Neck network structure, BiFPN, was proposed for the YOLOv8 neck.

[0019] Step 300: Using the dataset of natural crack images from rock cores, train the Frac-YOLOv8 segmentation network to obtain a natural crack segmentation model for rock cores.

[0020] Step 400: Input the image of the natural fractures in the dense sandstone core to be segmented into the core natural fracture segmentation model to segment the natural fractures in the core.

[0021] YOLOv8 segmentation models typically use cross-entropy loss and Dice loss to train segmentation tasks.

[0022] Step 500: Generate a binarized crack dataset from the segmented mask image.

[0023] After generating the predicted segmentation results in Frac-YOLOv8 according to step 100, digital image processing techniques are used to obtain quantitative indicators.

[0024] Step 600: Using the crack skeletonization extraction algorithm, extract the crack skeleton from the binary image and quantify the crack length.

[0025] The area covered by cracks in an image is evaluated using pixel values. The binary image's numerical matrix is ​​converted from the predicted segmentation result and iterated pixel by pixel. The total number of pixels with a statistical value of 1 represents the crack area. The calculation is as follows:

[0026]

[0027] in Indicates the geometric calibration index. This represents a finite small region of a crack element.

[0028] Step 700: Calculate the number of pixels occupied by the crack using a pixel statistics algorithm, quantify the actual area of ​​the crack, and calculate the average width of the crack using the crack length.

[0029] Step 800: Calculate the maximum width pixel value of the crack using the crack variable circle algorithm, and quantize the maximum width using the pixel value of the inscribed circle diameter.

[0030] The variable circle algorithm starts with a circle having an initial diameter value and then appropriately changes the diameter until the crack boundaries of the circular domains are tangent. In this method, the maximum inscribed circle diameter of the crack with a point on the crack edge as the tangent point is considered the crack width at that point. First, each connected domain is traversed and the maximum crack width of each domain is determined. Then, the maximum value is considered the maximum crack width of that connected domain. By traversing each crack-connected domain, a series of inscribed circles can be obtained. Finally, the maximum diameters of the series of inscribed circles are compared. The maximum width of the crack selected for the entire image.

[0031] Furthermore, in step 200, CAREAF consists of two core components: an upsampling kernel prediction module and a feature reconstruction module. In the upsampling kernel prediction stage, a 1×1 convolution operation is first applied to the input... The number of channels in the feature map is reduced to Next, through convolution operations, the number of channels is further transformed into... The content encoding process is then implemented sequentially. Subsequently, the channel spatial dimension is expanded, and softmax normalization is performed on the generated upsampling kernel to ensure that the sum of its weights is 1. Entering the feature reorganization stage, the position of each output feature map is back-mapped to the input feature map, centered on that point. The original feature map of the region and its corresponding predicted upsampling kernel are multiplied by a dot product. Different channels share the same upsampling kernel at the same location, thus producing the final result. New feature map.

[0032] Furthermore, the Neck network architecture, BiFPN, features the following design changes:

[0033] (1) Connect nodes with the same size feature map.

[0034] (2) When the original input node and the output node are at the same level, establish a new path to connect the original input node and the output node.

[0035] (3) Introduce a weighted feature fusion mechanism.

[0036] In the weighted feature fusion mechanism, the weights are learned using the Fast Normalized Fusion method, which is faster and more efficient than other methods. As shown in Equation 1, where... The number of fused feature maps at the node; The feature mapping input at the node; , The initial weights are randomly selected between 0 and 1 to be assigned to the input feature map; ε is a constant used to ensure the denominator is not zero. This method shrinks the weight range to [0,1] and, after multiple training iterations, obtains the optimal weights, which represent the importance of each input at the fusion node.

[0037]

[0038] Furthermore, the efficient Frac-YOLOv8 tight sandstone core natural fracture segmentation network includes: feature extraction unit, feature fusion unit, and segmentation unit;

[0039] The feature extraction unit includes: a convolution module, a C2f module, and an SPPF module;

[0040] The feature fusion unit includes: a convolution module, a splicing module, a CARAFE module, and a novel Neck network structure BiFPN; the segmentation unit includes: a segmentation head module.

[0041] Furthermore, the hardware platform configuration parameters for model training are as follows: NVIDIA GeForce RTXA5000 GPU graphics card; software configuration: based on a 64-bit Windows 11 operating system, the detectron2 framework based on PyTorch, based on CUDA 11.3, OpenCV2 library and PyCharm integrated development environment.

[0042] Furthermore, step 600 also includes obtaining a core fracture skeleton with a single-pixel width using the Zhang-Suen thinning algorithm. In the Zhang-Suen algorithm, the image is divided into a foreground region and a background region, where pixels in the foreground region have a pixel value of 1, and pixels in the background region have a pixel value of 0. The implementation of the Zhang-Suen algorithm consists of two steps:

[0043] The first step is to determine the measurement point based on the conditions in Formula 7. The state is determined. If If a point's eight neighbors satisfy the conditions in Formula 7, then the point's state is set to "to be deleted." If the conditions are not met, the point is temporarily retained. During the judgment process, points that meet the conditions are not deleted; instead, they are marked first. At the end of each iteration, all marked points are deleted uniformly. The conditions that the eight neighbors of the point to be tested must satisfy are:

[0044]

[0045] In the formula, This represents the pixel value of the point to be measured in the image and its eight neighboring points. The value can be 0 or 1. express The number of pixels with a value of 1 in the eight neighborhood of a point. Indicates in In the eight-neighbor template of the point, from Click to start The pixel value changes from 0 to 1 once in a clockwise circular motion around the center point.

[0046] The second step is to determine the measurement point according to the conditions in Formula 8. The state of the foreground points is determined. Similar to the first step, the test points that meet the judgment conditions are marked but not deleted temporarily. When the current iteration ends, that is, after traversing all pixels in the image, the marked foreground points are deleted uniformly. This loop is continued until all pixels in the image no longer meet the above conditions, at which point the loop ends.

[0047] .

[0048] Further, step 700 includes: obtaining a crack skeleton with a single pixel width using the Zhang-Suen thinning algorithm. Total length Irregular cracks were calculated using a part-by-part summation method. Length This is equal to the number of pixels in the skeleton with a statistical value of 1, and is evaluated according to the following relationship:

[0049]

[0050] in, Represents an infinitesimally small finite length of a skeleton unit;

[0051] Average width of crack The evaluation can be conducted in the following manner:

[0052] .

[0053] Further, step 800 includes calculating the maximum width of fractures in the dense sandstone natural core. First, the segmentation results of the model (referred to as SR) are converted into a grayscale image. Then, all connected domains, totaling N, are searched and identified, and the bounding rectangle of each connected domain, called RectA, is obtained based on the results. Next, RectA is meshed to obtain a series of coordinate points, represented in Point_List. A combination of all points located within the connected domains also needs to be selected. Next, the coordinate points obtained in the previous step are traversed, and a circle is drawn centered on each coordinate, with the radius increased until the circle is tangent to the fracture edge. At this point, the radius is represented as Point_R, and twice Point_R is used as the fracture width corresponding to that point. The fracture width value for all points can then be calculated. Then, the maximum value is used as the maximum radius of the connected domain, i.e., R. R is recorded in the corresponding R_List, and then the connected domains are changed, following the above process. Finally, from R_List, i.e., the maximum radius in each connected domain, the largest one is selected, and twice the maximum value is used as the maximum fracture width of the image.

[0054] The beneficial effects of this invention are:

[0055] 1. This invention proposes Frac-YOLOv8 for detecting natural fractures in rock cores. A dataset of natural fracture images from tight sandstone cores is created to establish an efficient YOLOv8 network for segmenting natural fractures in tight sandstone cores, named Frac-YOLOv8. Using this dataset, the Frac-YOLOv8 network is trained to obtain a fracture segmentation model. The image of the natural fracture in the tight sandstone core to be segmented is then input into the efficient Frac-YOLOv8 segmentation model to segment the natural fractures. The segmented mask image is used to generate a binary fracture dataset.

[0056] 2. Based on the fracture segmentation results, an adaptive quantization framework was developed. Digital image processing techniques were used to obtain quantitative indicators for quantitative analysis of key geometric parameters, including pixel-level fracture area, fracture length, number, line density, average fracture width, and maximum fracture width. A fracture skeletonization extraction algorithm was used to extract the core fracture skeleton from the binary image, and the number of skeleton pixels was calculated to quantify the fracture length. A pixel statistics algorithm was used to calculate the number of pixels occupied by the fracture, quantifying the actual fracture area. The average fracture width was then calculated numerically using the area and length pixel values. Finally, a variable circle fracture algorithm was used to calculate the maximum fracture width pixel value, which was quantized using the pixel value of the inscribed circle diameter.

[0057] 3. In the segmentation results, the designed efficient YOLOv8 model for segmenting natural fractures in tight sandstone cores showed a 1.4% improvement in average accuracy compared to the baseline YOLOv8m mask model. The average accuracy of the mask on the tight sandstone core natural fracture test set reached 84.8%. Simultaneously, the segmentation time was reduced by 16.39% compared to the basic YOLOv8m network, improving the network's segmentation speed. This achieved efficient segmentation of natural fractures in tight sandstone cores. In the quantization results, based on the comparison of actual and predicted quantification indicators, the correlations between fracture area, length, average width, and maximum width reached 0.9908, 0.9515, 0.9399, and 0.9652, respectively. This confirms that the fracture quantification results are close to reality. Overall, the proposed method performs well, contributing to fracture segmentation and quantification, and has significant practical application potential. Attached Figure Description

[0058] Figure 1 The images show the detection results of the method proposed by Mei et al.: (a) is crack image I, (b) is the segmentation effect of crack image I, (c) is crack image II, and (d) is the segmentation effect of crack image II.

[0059] Figure 2 This is an image showing the crack extraction effect studied by Ji et al.

[0060] Figure 3 Steps for manually marking and formatting specific core fractures;

[0061] Figure 4 For the CARAFE upsampling operator structure;

[0062] Figure 5 For several different feature fusion networks;

[0063] Figure 6 For efficient Frac-YOLOv8 dense sandstone core natural fracture segmentation network;

[0064] Figure 7 To obtain quantitative indicators using digital image processing techniques;

[0065] Figure 8 This is a schematic diagram of the eight neighborhoods of the point to be measured;

[0066] Figure 9 The images show the refined skeleton of the rock core fractures: (a) is the original image of the rock core fractures, (b) is the segmentation effect of the rock core fractures, and (c) is the pixel-level segmentation effect of the rock core fractures magnified.

[0067] Figure 10 This is a schematic diagram of the variable circle algorithm;

[0068] Figure 11Image showing the effect of extracting the maximum crack width from the core sample;

[0069] Figure 12 This is a flowchart used to evaluate the maximum width of the crack;

[0070] Figure 13 Image showing the segmentation effect of the Frac-YOLOv8 core natural fracture segmentation network;

[0071] Figure 14 For the comparison of crack measurement indicators, (a) is area, (b) is length, (c) is average width, and (d) is maximum width;

[0072] Figure 15 To test the crack segmentation and quantitative results of the sample;

[0073] Figure 16 Statistical analysis of cracks using Frac-YOLOv8;

[0074] Figure 17 This is a flowchart of the steps of the present invention. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention are described clearly and completely below. Obviously, the described embodiments are only some embodiments of this invention, not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0076] This invention proposes an algorithm, called Frac-YOLOv8, for detecting natural fractures in rock cores. A dataset of natural fracture images from tight sandstone cores is created; an efficient YOLOv8 network for segmenting natural fractures in tight sandstone cores, Frac-YOLOv8, is established; the Frac-YOLOv8 network is trained using the dataset of natural fracture images from tight sandstone cores to obtain a core fracture segmentation model; the natural fracture images of the tight sandstone cores to be segmented are input into the efficient Frac-YOLOv8 segmentation model to segment the natural fractures in the tight sandstone cores. The segmented mask images are then used to generate a binary fracture dataset.

[0077] Based on the fracture segmentation results, an adaptive quantization framework was developed, using digital image processing techniques to obtain quantization indicators for quantitative analysis of key geometric parameters, including pixel-level fracture count, fracture area, fracture length, average fracture width, maximum fracture width, and fracture line density. Based on segmentation, the number of fractures is counted using the segmented fracture mask, and the fracture line density is calculated. A fracture skeletonization extraction algorithm is used to extract the core fracture skeleton from the binary image, and the number of skeleton pixels is calculated to quantize the fracture length. A pixel statistics algorithm is used to calculate the number of pixels occupied by the fracture, quantizing the actual fracture area. The average fracture width is then derived numerically using the area and length pixel values. Finally, a variable circle fracture algorithm is used to calculate the maximum fracture width pixel value, which is quantized using the pixel value of the inscribed circle diameter.

[0078] In the segmentation results, the designed efficient YOLOv8 model for segmenting natural fractures in tight sandstone cores improved the average accuracy by 1.4% compared to the baseline YOLOv8m mask. The average accuracy of the mask on the tight sandstone core natural fracture test set reached 84.8%. Simultaneously, the segmentation time was reduced by 16.39% compared to the basic YOLOv8m network, improving the network's segmentation speed. This achieved efficient segmentation of natural fractures in tight sandstone cores. In the quantization results, based on the comparison of actual and predicted quantification indicators, the correlations between fracture area, length, average width, and maximum width reached 0.9908, 0.9515, 0.9399, and 0.9652, respectively. This confirms that the fracture quantification results are close to reality. Overall, the proposed method performs well, contributing to fracture segmentation and quantification, and has significant practical application potential.

[0079] like Figure 1 , Figure 17 As shown, the present invention provides a method for constructing a characterization model of natural fracture parameters in tight sandstone cores, comprising:

[0080] Step 100. Create a dataset of natural crack images from dense sandstone cores.

[0081] Based on core fracture photographs from the Bozi Dabei Block in the Tarim Basin, a dataset of natural core fracture segments in tight sandstone was labeled using LabelImg. LabelImg is a graphical image annotation tool. Annotations were saved as .json files according to the used format, and then converted into .txt files in Cocoa format using a format modification algorithm. The specific steps for manual annotation and format conversion of core fractures are as follows: Figure 3As shown, after creating a dataset of natural fractures in tight sandstone cores using LabelImg, this dataset is input into the network, allowing the network to learn and segment the natural fractures in the tight sandstone cores. The input image size for the efficient Frac-YOLOv8 tight sandstone core natural fracture segmentation network is 640*640 pixels, typically including an image preprocessing stage, such as scaling the input image to the network's input size and normalizing it. During the network training stage, the efficient Frac-YOLOv8 tight sandstone core natural fracture segmentation network uses Mosaic data augmentation to improve the model's training speed and network accuracy.

[0082] Step 200. Establish an efficient adaptive Frac-YOLOv8 core natural fracture segmentation network;

[0083] The YOLOv8m network was redesigned, and for the neck feature fusion network, the original upsampling module in the YOLOv8m neck was replaced with the lightweight CARAFE module, which improves the segmentation speed and accuracy of jagged cracks at the edges. Adopting a lightweight model for the neck network increases segmentation speed. Considering the large size variations of natural cracks in dense sandstone cores, a novel Neck network structure, BiFPN, was proposed for the YOLOv8 neck to enhance the network's feature extraction capabilities, achieve efficient aggregation of multi-scale features, and strengthen the network's ability to segment natural cracks in complex dense sandstone cores.

[0084] This invention integrates the CARAFE module, a novel technique to address the limitations of segmenting serrated natural rock core fractures. The improvement involves replacing the upsampling module in the neck network structure with the CARAFE upsampling operator. The CARAFE upsampling operator is a novel upsampling method. It fully utilizes the semantics of the feature map and can perform efficient, lightweight computation. Therefore, the upsampling algorithm of YOLOv8m is optimized using the CARAFE module structure, increasing the network's receptive field while maintaining lightweight upsampling, resulting in better high-resolution feature maps. The advantages of this operator are low redundancy, strong feature fusion capability, and fast computation speed. Abandoning the single-kernel sampling method of nearest neighbor interpolation, a new method based on multi-kernel data is proposed: an adaptive content-aware sampling method is generated using a new multi-kernel data-based approach. Figure 4 The structure of the CARAFE upsampling operator is given in the paper.

[0085] The upsampling algorithm of YOLOv8m is optimized using the CARAFE module structure, which increases the receptive field of the network while maintaining its lightweight nature.

[0086] CAREAF consists of two core components: an upsampling kernel prediction module and a feature reconstruction module. In the upsampling kernel prediction stage, a 1×1 convolution operation is first used to reconstruct the input... The number of channels in the feature map is reduced to Next, through convolution operations, the number of channels is further transformed into... The content encoding process is then implemented sequentially. Subsequently, the channel spatial dimension is expanded, and softmax normalization is performed on the generated upsampling kernel to ensure that the sum of its weights is 1. Entering the feature reorganization stage, the position of each output feature map is back-mapped to the input feature map, centered on that point. The original feature map of the region and its corresponding predicted upsampling kernel are multiplied by a dot product. It is worth noting that different channels share the same upsampling kernel at the same location, thus producing the final result. New feature map.

[0087] Compared to nearest-neighbor interpolation upsampling techniques, the CARAFE method significantly enhances the semantic richness of the reconstructed feature map. This is achieved by emphasizing key points within local regions. In the case of densely packed natural small fractures in tight sandstone cores, CARAFE's ability to enhance spatial details helps the model distinguish closely spaced small fractures, potentially reducing the number of merged segments. It also helps improve the model's localization accuracy in natural fracture segmentation of tight sandstone cores. Furthermore, CARAFE's broader observation range, sophisticated content processing, and lightweight design ultimately enable fast computation.

[0088] In summary, the feature maps obtained by CARAFE upsampling are more refined, with less lost details, and are more suitable for segmenting multi-scale natural fractures in dense sandstone cores.

[0089] In early network architectures, high-level pyramid features were extracted directly from the backbone network for prediction. This structure lacked feature fusion, resulting in relatively low segmentation accuracy. With further research into network architectures, the Feature Fusion Network (FPN) was proposed, with a structure as follows: Figure 5 (a) Establishing a new top-down path for feature fusion results in a more comprehensive semantic information in the connected feature map, improving prediction accuracy. However, the FPN network, being a top-down structure, suffers from limited accuracy due to its unidirectional information transmission. In contrast, the PANet network, which has been widely used in recent years and is used in YOLOv8m as its neck, has the following structure: Figure 5As shown in b), it establishes a bottom-up path on the basis of FPN, which makes up for the defect that FPN network only has a unidirectional information flow structure. The feature maps of the higher level have stronger semantic information, which is beneficial to object classification and segmentation, while the feature maps of the lower level have stronger positional information, which is beneficial to object localization. Such a structure can greatly improve the accuracy of target segmentation tasks.

[0090] Meanwhile, the recently proposed NAS-FPN architecture has the following specific structure. Figure 5 As shown in c), the optimal network structure is searched using the popular NAS (Neural Architecture Search) technique. Although this structure performs best, the resulting network is irregular, difficult to interpret and modify, and the use of NAS technology is time-consuming and labor-intensive, thus it is not widely adopted.

[0091] Based on this, a novel Neck network architecture, BiFPN, is proposed, such as... Figure 5 As shown in d), compared with the PANet structure, BiFPN has the following design changes:

[0092] (1) Connect nodes with the same feature map size. For example, if the p3 and p5 layers in the backbone network have nodes with the same feature map size as the neck network, they are spliced ​​together. Since the remaining nodes in the backbone network do not have input from other directions to perform feature fusion, these nodes are not connected in the multi-scale fusion network structure, which simplifies the bidirectional network structure.

[0093] (2) When the original input node and the output node are at the same layer, establish a new path to connect the original input node and the output node. This structure can fully integrate more feature information with a small increase in cost;

[0094] (3) Introducing a weighted feature fusion mechanism. Traditional feature fusion often simply connects feature maps using concat or shortcut, without distinguishing between the input feature maps. However, the input feature maps have different resolutions, and their contributions to the fusion input feature map are also different. Therefore, simply adding or superimposing them is not the optimal operation. So, a simple and efficient weighted feature fusion mechanism is proposed, which adds extra weights to each input, mainly to learn the importance of different input features and to fuse them in a discriminative way.

[0095] The weights in the weighted feature fusion mechanism are learned using the Fast Normalized Fusion method, which is faster and more efficient than other methods. As shown in Equation 1, where, The number of fused feature maps at the node; The feature mapping input at the node; , The initial weight values ​​are randomly selected between 0 and 1 to be assigned to the input feature map. A constant is used to ensure the denominator is not zero. This method shrinks the weight range to [0,1] and, after multiple training iterations, obtains the optimal weights, which represent the importance of each input at the fusion node.

[0096]

[0097] In summary, as Figure 6 As shown, the efficient Frac-YOLOv8 tight sandstone core natural fracture segmentation network includes: a feature extraction unit (Backbone), a feature fusion unit (Neck), and a segmentation unit (Head).

[0098] The feature extraction unit includes: a convolution module, a C2f module, and an SPPF module;

[0099] The feature fusion unit (Neck) includes: a convolutional module, a splicing module, a CARAFE module, and a novel Neck network structure, BiFPN.

[0100] The segmentation unit includes: a segmentation head module (YOLO Head);

[0101] Step 300: Using the dataset of natural crack images from rock cores, train the Frac-YOLOv8 segmentation network to obtain a natural crack segmentation model for rock cores.

[0102] The hardware platform configuration parameters for model training are as follows: NVIDIA GeForce RTXA5000 GPU graphics card; software configuration: based on 64-bit Windows 11 operating system, PyTorch-based detectron2 framework, CUDA 11.3, OpenCV2 library and PyCharm integrated development environment.

[0103] Step 400: Input the image of the natural fractures in the dense sandstone core to be segmented into the core natural fracture segmentation model to segment the natural fractures in the core.

[0104] Using a dataset of natural fracture images from dense sandstone cores, a high-efficiency Frac-YOLOv8 core fracture segmentation network was trained to obtain a core fracture segmentation model. Segmentation is the ultimate output objective. The number of branches at the output varies depending on the segmentation algorithm. The YOLOv8 segmentation model typically uses cross-entropy loss and Dice loss for training. Cross-entropy loss is used for pixel classification tasks to measure the degree of misclassification of each pixel. Dice loss is commonly used to measure the overlap between predicted and ground truth regions in segmentation tasks, especially in cases of imbalanced data, where Dice loss can effectively improve segmentation accuracy. YOLOv8 can output a pixel-level mask for each target within a detection box. The types and confidence levels of natural fractures in the cores obtained through the efficient Frac-YOLOv8 core fracture segmentation network model are then mapped using masks to represent fracture regions.

[0105] Step 500: Generate a binarized crack dataset from the segmented mask image.

[0106] In step 100, we used core fracture images from the Bozi Dabei Block in the Tarim Basin as the data basis and used LabelImg to calibrate the dataset for segmenting natural fractures in tight sandstone cores. The dataset of natural fractures in tight sandstone cores was input into the network, allowing the network to learn and segment the natural fractures in the dataset. Quantification of natural fractures in tight sandstone cores is a crucial step in fracture detection and a key part of fracture assessment. After Frac-YOLOv8 generates predicted segmentation results, digital image processing techniques are used to obtain quantitative indicators, see [link to relevant documentation]. Figure 7 This framework starts with crack recognition images and can achieve a fully automated quantization process without interference from other human factors, thereby improving the recognition accuracy to a certain extent.

[0107] Step 600: Using the crack skeletonization extraction algorithm, extract the crack skeleton from the binary image and quantify the crack length.

[0108] The area covered by cracks in an image is evaluated using pixel values. The binary image's numerical matrix is ​​converted from the predicted segmentation result and iterated pixel by pixel. The total number of pixels with a statistical value of 1 represents the crack area. The calculation is as follows:

[0109]

[0110] in Indicates the geometric calibration index. This represents a finite small region of a crack element.

[0111] This invention employs the Zhang-Suen thinning algorithm to obtain a core fracture skeleton with a single pixel width. The Zhang-Suen algorithm is a traditional core fracture image thinning algorithm characterized by its fast computation speed and preservation of image connectivity. In the Zhang-Suen algorithm, the image is divided into foreground and background regions, with pixels in the foreground region having a pixel value of 1 and pixels in the background region having a pixel value of 0. The algorithm's core idea is to iteratively identify foreground points that meet specific conditions, mark them, and then uniformly delete them, thereby achieving image thinning. Figure 8 Indicates a certain foreground point Eight-neighbor diagram. The Zhang-Suen algorithm is implemented in two steps:

[0112] The first step is to determine the measurement point based on the conditions in Formula 7. The state is determined. If If a point's eight neighbors satisfy the conditions in Formula 7, then the point's state is set to "to be deleted." If the conditions are not met, the point is temporarily retained. During the judgment process, points that meet the conditions are not deleted; instead, they are marked first. At the end of each iteration, all marked points are deleted uniformly. The conditions that the eight neighbors of the point to be tested must satisfy are:

[0113]

[0114] In the formula, This represents the pixel value of the point to be measured in the image and its eight neighboring points. The value can be 0 or 1. express The number of pixels with a value of 1 in the eight neighborhood of a point. Indicates in In the eight-neighbor template of the point, from Click to start The pixel value changes from 0 to 1 once in a clockwise circular motion around the center point.

[0115] The second step is to determine the measurement point according to the conditions in Formula 8. The state of the foreground points is determined. Similar to the first step, the test points that meet the judgment conditions are marked but not deleted temporarily. When the current iteration ends, that is, after traversing all pixels in the image, the marked foreground points are deleted uniformly. This loop is continued until all pixels in the image no longer meet the above conditions, at which point the loop ends.

[0116]

[0117] This invention employs the Zhang-Suen algorithm for core fracture skeleton refinement, and the experimental results are as follows: Figure 9 As shown.

[0118] Step 700: Calculate the number of pixels occupied by the crack using a pixel statistics algorithm, quantify the actual area of ​​the crack, and calculate the average width of the crack using the crack length.

[0119] Experimental results show that the Zhang-Suen algorithm effectively preserves the overall structure of cracks during crack refinement, without any crack breakage, and the extracted crack skeleton exhibits good connectivity. This invention uses the Zhang-Suen refinement algorithm to obtain a crack skeleton with a single pixel width. (Total length...) Irregular cracks can also be calculated using a part-by-part summation method. Length This is equal to the number of pixels in the skeleton with a statistical value of 1, and is evaluated according to the following relationship:

[0120]

[0121] in, This represents the infinitesimally small finite length of a skeleton unit.

[0122] Average width of crack The evaluation can be conducted in the following manner:

[0123]

[0124] Step 800: Calculate the maximum width pixel value of the crack using the crack variable circle algorithm, and quantize the maximum width using the pixel value of the inscribed circle diameter.

[0125] Assume a crack is a planar space filled with multiple circles, its shape specified by the connecting lines of their tangent points. To determine the width of the pixel circles, a variable circle algorithm is proposed in this invention. In this algorithm, a circle with an initial diameter value is started, and then the diameter is appropriately changed until the crack boundaries of the circular domains are tangent. In this method, the maximum inscribed circle diameter of the crack with a point on the crack edge as the tangent point is regarded as the crack width at that point. First, each connected domain is traversed and the maximum crack width of each domain is determined. Then, the maximum value is regarded as the maximum crack width of that connected domain, see... Figure 10 As shown. By traversing each crack connection domain, a series of inscribed circles can be obtained. Finally, the maximum diameter of the series of inscribed circles is compared. The maximum width of the crack selected for the entire image.

[0126] like Figure 12As shown, the segmentation result of the model (referred to as SR) is first converted into a grayscale image. Then, all connected domains, totaling N, are searched and identified, and the bounding rectangle of each connected domain, called RectA, is obtained based on the results. Next, RectA is meshed to obtain a series of coordinate points, as represented in Point_List. It is also necessary to select a combination of all points located within the connected domains. Next, the coordinate points obtained in the previous step are traversed, and a circle is drawn centered on each coordinate, with the radius increased until the circle is tangent to the crack edge. At this point, the radius is represented as Point_R, and twice Point_R is used as the crack width corresponding to that point. The crack width value for all points can be calculated. Then, the maximum value is used as the maximum radius of the connected domain, i.e., R. R is recorded in the corresponding R_List, and then the connected domains are changed, following the above process. Finally, from R_List, i.e., the maximum radius in each connected domain, the largest one is selected, and twice the maximum value is used as the maximum crack width of the image. This invention uses a variable circle algorithm to calculate the maximum crack width, and the experimental results are as follows. Figure 11 As shown.

[0127] The method used in this invention is compared and demonstrated with the prior art below:

[0128] Accuracy is the proportion of samples correctly predicted as positive out of all samples predicted as positive; recall is the proportion of samples correctly predicted as positive out of all actual positive samples. Accuracy and recall are used to evaluate the relative performance of the model when handling positive and negative classes. Considering that accurate contour and location information are crucial for measurement, this invention selects the mAP of bounding boxes and the mAP of masks as evaluation metrics. The IOU threshold is set to 0.5. If the overlap with the labeled surface exceeds the IOU threshold, the predicted bounding box will be identified as a true positive. Otherwise, it will be classified as a false positive. Similarly, when the IOU with the predicted mask is below a specified threshold, the mask labeled as such will be considered a false negative. The mean precision (mAP) measures the overall performance at different confidence thresholds. Ultimately, these metrics can be defined as follows:

[0129]

[0130]

[0131] In the above relationship, TP (True Positive) represents the number of correctly classified positive samples, FP (False Positive) represents the number of misclassified positive samples, TN (True Negative) represents the number of correctly classified negative samples, and FN (False Negative) represents the number of misclassified negative samples.

[0132] The average precision across multiple classes considers the precision of each class and averages them to comprehensively evaluate the model's performance. The formula for calculating the average precision across multiple classes is as follows:

[0133]

[0134]

[0135] The upsampling of the YOLOv8m neck network was improved from upsampling to the CARAFE operator, forming the YOLOv8-C-Frac natural fracture segmentation model. The CARAFE operator significantly reduces the model's inference speed. To investigate the impact of the improved CARAFE operator on the performance of core natural fracture segmentation, the core fracture dataset provided for network training had an image resolution of 2560×1920. One fracture category was selected and named "fracture." The dataset contained 341 sample images: 273 images for the training set, 34 images for the test set, and 34 images for the validation set (8:1:1 ratio). The first two sets were used to construct the optimized Frac-YOLOv8, while the latter was used to test the model's performance. During training, the test set was not used for computation but only for evaluating the model's generalization ability. For the proposed model, the test set was a completely unseen dataset. To verify the effectiveness of the efficient Frac-YOLOv8 core natural fracture segmentation network method on the tight sandstone core natural fracture dataset, experimental results were evaluated. In the following experimental values, P, R, average accuracy of the time mask, Time, and the number of parameters are used as metrics to evaluate the model. In the experiments, the YOLOv8m model was used as the baseline segmentation performance, with a default epochs=500 and batch_size=32. Tensorboard was used to view the algorithm model training results. The prediction results were compared with the basic YOLOv8m network; Table 1 shows the comparison of model segmentation performance before and after the improvement using the upsampling CARAFE operator.

[0136] Table 1. Segmentation performance of the CARAFE operator before and after improvement on the neck network.

[0137]

[0138] As shown in Table 1, the basic YOLOv8m algorithm achieves a segmentation accuracy of 83.4%. After applying the upsampling CARAFE operator to the neck network, the accuracy decreases to 89.6%, but the recall increases by 1.2% to 73.6%, while the mAP increases by 0.5% to 83.9%. Regarding segmentation time, applying the upsampling CARAFE operator to the neck network reduces memory consumption, lowering the segmentation time from 12.2 milliseconds to 9.9 milliseconds, representing a significant 18.85% improvement in segmentation speed.

[0139] After applying the upsampling CARAFE operator to the neck network, recall and mAP were improved, but the improvement in mAP was minimal. When the feature information extracted from the neck network is limited, an improvement to the feature fusion part of the neck network is proposed to achieve efficient aggregation of multi-scale feature information output by the backbone network, thereby improving segmentation. Therefore, a novel BiFPN structure is proposed. To verify the effectiveness of the improved feature pyramid fusion structure, training and validation were performed on the same dataset, and YOLOv8m, YOLOv8-C-Frac, and YOLOv8-C-BIFPN-Frac (Frac-YOLOv8) were compared in terms of accuracy, recall, segmentation performance, and segmentation time.

[0140] Table 2. Model parameters and segmentation performance before and after improved feature fusion

[0141]

[0142] Table 2 shows that by improving PANet to a novel BiFPN structure, experimental results demonstrate that the fusion of the novel BiFPN with YOLOv8m enhances the feature aggregation level and improves the model's segmentation performance without significantly increasing cost. Frac-YOLOv8 exhibits the best recall rate at 77%, indicating its superior ability to segment all cracks. It also leads in the Map0.5 metric at 84.8%, reflecting its optimal overall performance in crack segmentation. Although the Frac-YOLOv8 network increases segmentation speed by 0.3 milliseconds compared to the YOLOv8-C-Frac network, it still meets the requirements for real-time segmentation deployment.

[0143] Compared to YOLOv8m, Frac-YOLOv8 improves recall and mAP by 4.6% and 1.4% respectively, while reducing segmentation time by 16.39%, maintaining its advantage in segmentation time and enhancing the network's real-time segmentation capabilities. This demonstrates that adding the upsampling operator CARAFE to the neck network of the benchmark YOLOv8m and improving PANet to a novel BiFPN structure can significantly improve the network's performance in capturing all core fractures, ensuring the network's comprehensiveness and efficiency.

[0144] To further verify the superiority of the improved network in segmenting multi-scale natural fractures in tight sandstone cores, classic one-stage network models, such as the YOLOv8, YOLOv9, and YOLOv11 series, were compared. The segmentation performance comparison of each model is shown in Table 3.

[0145] Table 3 Performance Comparison of Each Model

[0146]

[0147] The performance comparison is shown in Table 3. In the crack segmentation task, the Frac-YOLOv8 model demonstrated significant advantages. This model performed excellently across several key performance metrics, particularly in accuracy and Map0.5. While Frac-YOLOv8's accuracy of 86.4% is slightly lower than YOLOv8s' 94.3%, its recall of 77% was the highest among all compared models, indicating its more comprehensive performance in segmenting crack instances.

[0148] In terms of metrics, Frac-YOLOv8 achieved an excellent segmentation performance of 84.8%, surpassing YOLOv9e, which has 2.24 times the number of parameters. This reflects the superior overall performance of Frac-YOLOv8 in crack segmentation tasks, especially when handling complex crack scenarios.

[0149] The processing time of Frac-YOLOv8 is 10.2 milliseconds, comparable to YOLOv8m, but this is acceptable considering its excellent performance in accuracy and recall. Furthermore, Frac-YOLOv8 has 24.83M parameters, indicating that it maintains good model complexity and efficiency while keeping performance high. The final efficient Frac-YOLOv8 core natural fracture segmentation network effect is shown in the image. Figure 13 As shown.

[0150] Thirty images were randomly selected from the test machine for testing. Figure 11The results of fracture segmentation are shown in four test sets. It can be seen that the Frac-YOLOv8 core natural fracture segmentation network exhibits excellent detection performance in most scenarios, especially in images with complex backgrounds, where it still effectively highlights the fracture morphology. Furthermore, Frac-YOLOv8 can capture the feature information of small fractures in the core, demonstrating its ability to segment fracture geometry well and preserve as much detail as possible. Close observation of the small fractures and the overall fracture shape in the images also indicates that Frac-YOLOv8 retains as much edge detail as possible.

[0151] Here, we obtain the skeleton of the segmentation results predicted by Frac-YOLOv8 and further estimate quantitative indicators such as crack area, crack length, average width, and maximum width. The prediction results have been... Figure 14 This has been proven, where all units are in pixels. Different colored scatter points represent the metrics corresponding to SR, and the black line represents the metrics associated with SR, equivalent to the GT metric. Figure 14 Figure (a) provides a comparison between the crack area predicted by the ground truth (GT) and the crack area predicted by the proposed model. The predicted crack area of ​​the scatter plot fluctuates between the left and right ends of the black line, and... The coefficient of determination is 0.9908. This indicates that the number of area pixels predicted by the model is close to the actual expected value, suggesting that the model's overall performance, prediction results, and recognition ability are all better.

[0152] Figure 14 Figure (c) shows the relationship between the average crack widths of GT and SR, and the corresponding correlation coefficients. Since the average crack width is calculated numerically, some images may show some deviations. This could be due to various factors, such as errors in skeleton details and calculation errors in crack length. Furthermore, given the inherent variability in skeleton length, the fluctuation in average crack width will somehow fall somewhere between the fluctuations in crack area and crack length.

[0153] Figure 14 Figure (d) shows the relationship between the maximum crack width based on GT and SR. The calculated value is 0.9652. The results show that there is a strong correlation between GT and SR, and the segmentation results of Frac-YOLOv8 can accurately reflect the actual shape of the crack.

[0154] The results above demonstrate that Frac-YOLOv8 can better recover the geometry of cracks, especially the crack area, which is a key indicator in engineering applications. The estimated results also closely approximate the true crack area, confirming the powerful segmentation capability of the proposed model.

[0155] exist Figure 15 The paper details the quantization results of test images F1-F4 after segmentation using the Frac-YOLOv8 model. For sample F1, the crack width is uneven, with one crack closely resembling the background, causing significant interference; however, the network still accurately depicts the crack morphology. For sample F2, there is a small, unevenly wide "C"-shaped crack with extremely rough edges, making low segmentation accuracy highly likely. The estimated crack area error for sample F2 is approximately 5.4%. This may be due to inaccurate crack segmentation, but this error is within acceptable limits. In sample F3, a large-scale crack filling in a dense sandstone core, the estimated crack area error is approximately 8.5% due to its slender upper and lower ends and wider middle section, indicating less detailed characterization of the finer parts of the crack. However, the predicted crack length and average width in sample F3 are close to the ground truth (GT).

[0156] In sample F4, a shear fracture is present in the core. Sample F4 demonstrates that the shear fracture contained within the fracture can be successfully identified. The predicted result is closer to the GT (Gross Tolerance). Figure 15 (b) and Figure 15 The results shown in (d) indicate that the segmentation of all core fractures closely approximates the marked morphology. These predicted segmentation results confirm that the proposed model has strong adaptability to real-world scenarios.

[0157] The linear density of fractures (the number of fractures per unit length) directly affects the permeability and exploitability of tight sandstone reservoirs. Therefore, quantifying the linear density of fractures allows for a more accurate assessment of reservoir permeability, fluid transport capacity, and potential production. Based on fracture segmentation using Frac-YOLOv8, the number of fractures identified by the network is counted to obtain the fracture density. The algorithm was used to analyze 341 core fracture images, with a core length of 68.2 meters and a total of 817 fractures. Numerical calculations yielded a linear density of 11.979 fractures / meter. The fracture statistics from Frac-YOLOv8 are shown below. Figure 16 As shown.

[0158] Efficient segmentation and quantification of natural fractures in tight sandstone cores are crucial for ensuring the safety and economic viability of tight sandstone reservoir development. The main contribution of this invention is the proposal of a new paradigm for the segmentation and quantification of natural fractures in tight sandstone cores. Specifically, it includes:

[0159] (1) The proposed model is based on deep learning and a network architecture was designed. In terms of network architecture: In view of the problem that the traditional method has low efficiency and cumbersome steps in segmenting natural fractures in tight sandstone cores, an efficient Frac-YOLOv8 network method for segmenting natural fractures in tight sandstone cores is proposed. First, by constructing the lightweight upsampling operator CARAFE module, the CARAFE module is selected to replace the upsampling operation in the feature fusion network to form a YOLOv8-C-Frac network model; on this basis, a novel BiFPN structure is proposed as the feature fusion network. The novel BiFPN structure is an improvement on the BiFPN structure, and at the same time, it is combined with a weighted fusion mechanism to improve the performance of the algorithm in segmenting natural fractures in the core.

[0160] (2) To quantify cracks, this invention uses a skeleton algorithm to calculate the length, area, and average width of cracks based on the segmentation results. On this basis, a novel variable circle algorithm is proposed to solve the maximum width problem. By comparing the tangent circles in all connected domains, the diameter of the largest tangent circle is selected as the maximum crack width. Finally, the linear density of cracks is calculated by counting the number of cracks. The proposed crack quantification algorithm also appropriately predicts the key geometric parameters of cracks, including the number, linear density, area, length, average width, and maximum width. The semantic segmentation results of cracks in dense sandstone natural cores can be applied to the assessment of core crack structure, improving the reliability and scientific rigor of the assessment results.

[0161] (3) In the segmentation results, the improved Frac-YOLOv8 achieved an average accuracy of 84.8%, while reducing the segmentation time by 16.39% compared to the basic YOLOv8m network, thus improving the network's segmentation speed and meeting the real-time requirements for deployment in embedded and mobile devices, while ensuring the performance of segmenting natural fractures in core samples. In the quantization results, based on the comparison between actual and predicted quantification indicators, the correlations between fracture area, length, average width, and maximum width reached 0.9908, 0.9515, 0.9399, and 0.9652, respectively. This confirms that the fracture quantification results are close to reality. Overall, the proposed method performs well, contributing to fracture segmentation and quantification, and has great potential for practical application.

[0162] References:

[0163] [1]Yang Q, Shi W, Chen J, et al.Deep convolution neural network-basedtransfer learning method for civil infrastructure crack detection[J]. Automation in Construction, 2020,116.

[0164] [2] Mei Q, Gül M, Azim R M. Densely connected deep neural network considering connectivity of pixels for automatic crack detection[J]. Automation in Construction, 2020, 110103018-103018.

[0165] [3] Ji A, Xue X, Wang Y, et al. An integrated approach to automatic pixel-level crack detection and quantification of asphalt pavement[J]. Automation in Construction, 2020, 114.

[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; 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 constructing a characterization model of natural fracture parameters in tight sandstone cores, characterized in that, include: Step 100. Create a dataset of natural fracture images from dense sandstone cores; Based on core fracture images, LabelImg was used to calibrate the dataset of natural fractures in tight sandstone cores. After creating the dataset of natural fractures in tight sandstone cores using LabelImg, the dataset was input into the network, allowing the network to learn and segment the natural fractures in the dataset. Step 200. Establish an efficient adaptive Frac-YOLOv8 core natural fracture segmentation network; The original upsampling module in the neck of YOLOv8m was replaced with the lightweight computational CARAFE module, and a novel Neck network structure, BiFPN, was proposed for the YOLOv8 neck. Step 300: Using the dataset of natural crack images from rock cores, train the Frac-YOLOv8 segmentation network to obtain a natural crack segmentation model for rock cores. Step 400: Input the image of the natural fractures in the dense sandstone core to be segmented into the natural fracture segmentation model to segment the natural fractures in the core. The YOLOv8 segmentation model uses cross-entropy loss and Dice Loss to train the segmentation task; Step 500: Generate a binarized crack dataset from the segmented mask image; After generating the predicted segmentation results in Frac-YOLOv8 according to step 100, digital image processing technology is used to obtain quantitative indicators. Step 600: Using the crack skeletonization extraction algorithm, extract the crack skeleton from the binary image and quantify the crack length. The crack coverage area in the image is evaluated by pixel values. The binary image is converted into a numerical matrix from the predicted segmentation result, and the crack area is represented by the total number of pixels with a value of 1. The calculation is as follows: in Indicates the geometric calibration index. Represents a finite small region of crack elements; Step 700: Calculate the number of pixels occupied by the crack using a pixel statistics algorithm, quantify the actual area of ​​the crack, and calculate the average width of the crack using the crack length. Step 800: Calculate the maximum width pixel value of the crack using the crack variable circle algorithm, and quantize the maximum width using the pixel value of the inscribed circle diameter; The variable circle algorithm starts with a circle having an initial diameter value and then appropriately changes the diameter until the crack boundaries of the circular domains are tangent. In this method, the maximum inscribed circle diameter of the crack with a point on the crack edge as the tangency point is considered as the crack width at that point. First, each connected domain is traversed and the maximum crack width of each domain is determined. Then, the maximum value is considered as the maximum crack width of that connected domain. By traversing each crack-connected domain, a series of inscribed circles are obtained. Finally, the maximum diameters of the series of inscribed circles are compared. The maximum width of the crack selected for the entire image.

2. The method according to claim 1, characterized in that, Step 100 includes: inputting images via the input terminal. The input image size for the efficient Frac-YOLOv8 tight sandstone core natural fracture segmentation network is 640*640. This typically includes an image preprocessing stage, which involves scaling the input image to the network's input size and normalizing it. During the network training stage, the efficient Frac-YOLOv8 tight sandstone core natural fracture segmentation network uses Mosaic data augmentation.

3. The method according to claim 2, characterized in that, A high-efficiency Frac-YOLOv8 network for segmenting natural fractures in tight sandstone cores includes: a feature extraction unit, a feature fusion unit, and a segmentation unit; the feature extraction unit includes a convolution module, a C2f module, and an SPPF module. The feature fusion unit includes a convolution module, a splicing module, a CARAFE module, and a novel Neck network structure, BiFPN; the segmentation unit includes a segmentation head module.

4. The method according to claim 1, characterized in that, Step 200, CAREAF consists of two core components: an upsampling kernel prediction module and a feature reconstruction module. In the upsampling kernel prediction stage, a 1×1 convolution operation is first used to reconstruct the input kernel... The number of channels in the feature map is reduced to Next, through convolution operations, the number of channels is further transformed into... The content encoding process is performed sequentially. Then, the channels are expanded in spatial dimension, and the generated upsampling kernels are normalized using softmax to ensure that the sum of their weights is 1. The process then proceeds to the feature reorganization stage, where the position of each output feature map is back-mapped to the input feature map, centered on that point. The original feature map of the region and its corresponding predicted upsampling kernel are multiplied by a dot product. Different channels share the same upsampling kernel at the same location, thus generating the final result. New feature map; The Neck network architecture, BiFPN, features the following design changes: (1) Connect nodes with the same feature map size; (2). When the original input node and the output node are at the same level, establish a new path to connect the original input node and the output node; (3) Introduce a weighted feature fusion mechanism; In the weighted feature fusion mechanism, the weights are learned using a fast normalization method, as shown in Formula 1, where, The number of fused feature maps at the node; The feature mapping input at the node; , The initial weight values ​​are randomly selected between 0 and 1 to be assigned to the input feature map. The constant used to ensure the denominator is not zero. This method shrinks the weight range to [0,1] and, after multiple training iterations, obtains the optimal weights, which represent the importance of each input at the fusion node.

5. The method according to claim 1, characterized in that, The hardware platform configuration parameters for model training in step 300 are as follows: NVIDIA GeForce RTX A5000 GPU graphics card; software configuration: based on a 64-bit Windows 11 operating system, based on the PyTorch detectron2 framework, based on CUDA 11.3, OpenCV2 library and PyCharm integrated development environment.

6. The method according to claim 1, characterized in that, Step 600 further includes obtaining a core fracture skeleton with a single-pixel width using the Zhang-Suen thinning algorithm. In the Zhang-Suen algorithm, the image is divided into a foreground region and a background region. The pixel value of a point in the foreground region is 1, and the pixel value of a point in the background region is 0. The implementation steps of the Zhang-Suen algorithm are divided into two steps: The first step is to determine the measurement point based on the conditions in Formula 7. The state is determined, if If the eight neighbors of a point satisfy the conditions in Formula 7, then the state of that point is set to the state to be deleted. If the conditions are not met, the point is temporarily retained. During the judgment process, points that meet the conditions are not deleted, but are first marked. At the end of each iteration, all marked points are deleted uniformly. The conditions that the eight neighbors of the point to be tested must satisfy are: In the formula, This represents the pixel value of the point to be measured in the image and its eight neighboring points. The value can be 0 or 1. express The number of pixels with a value of 1 in the eight neighborhood of a given point. Indicates in In the eight-neighbor template of the point, from Click to start The pixel value changes from 0 to 1 once in a clockwise circular motion, centered on the point. The second step is to determine the measurement point according to the conditions in Formula 8. The state is determined, similar to the first step. Points that meet the judgment conditions are marked but not deleted temporarily. When the current iteration ends, i.e., after traversing all pixels in the image, the marked foreground points are deleted. This loop continues until all pixels in the image no longer meet the above conditions, at which point the loop ends.

7. The method according to claim 1, characterized in that, Step 700 includes: using the Zhang-Suen thinning algorithm to obtain a crack skeleton with a single pixel width and a total length of Irregular cracks were calculated using a part-by-part summation method; the length was... This is equal to the number of pixels in the skeleton with a statistical value of 1, and is evaluated according to the following relationship: in, Represents an infinitesimally small finite length of a skeleton unit; Average width of crack The evaluation should be conducted as follows:

8. The method according to claim 1, characterized in that, Step 800 includes calculating the maximum width of the crack in the dense sandstone natural core: First, the segmentation results of the model are converted into a grayscale image. Then, all connected domains are searched and identified, totaling N, and the bounding rectangle of each connected domain is obtained based on the results, called RectA. Next, RectA is meshed to obtain a series of coordinate points, represented in Point_List. It is also necessary to select a combination of all points located in the connected domains. Then, the coordinate points obtained in the previous step are traversed, and a circle is drawn with each coordinate as the center, and the radius is increased until the circle is tangent to the crack edge. At this time, the radius is represented as Point_R. Twice Point_R is used as the crack width corresponding to the point. The crack width value of all points is calculated. Then, the maximum value is used as the maximum radius of the connected domain, i.e., R, and R is recorded in the corresponding R_List. Then, the connected domains are changed, and the above process is repeated. Finally, from R_List, i.e., the maximum radius in each connected domain, the largest one is selected, and twice the maximum value is used as the maximum crack width of the image.

Citation Information

Patent Citations

  • Method for identifying crack type based on core photograph

    CN113222923A

  • Dangerous rock body risk assessment method based on fracture density analysis

    CN119251714A