Construction method of tight sandstone core natural fracture characteristic parameter characterization model

By constructing the Frac-YOLOv8 deep learning network model, using CARAFE and BiFPN structures, the problems of insufficient accuracy and incomplete quantification in the detection of core fractures of dense sandstones were solved, efficient fracture segmentation and quantification were achieved, and application potential in fields such as oil exploration was enhanced.

CN120147642AActive Publication Date: 2025-06-13CHENGDU UNIVERSITY OF TECHNOLOGY

Patent Information

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

AI Technical Summary

Technical Problem

The prior art has problems of insufficient accuracy and imperfect crack quantification and crack quantification processing in the detection of dense sandstone core cracks, especially in the crack extraction and quantification processing under complex geological backgrounds.

Method used

Based on the convolutional neural network algorithm of YOLOv8m, the Frac-YOLOv8 deep learning network model is constructed, and the lightweight CARAFE module and a new BiFPN structure are adopted to realize the morphological segmentation of natural fractures of dense sandstone cores and the adaptive quantification of geometric parameters.

Benefits of technology

The accuracy of crack segmentation identification was improved, the segmentation time was shortened by 16.39%, the quantitative results were highly consistent with the actual, and the correlation was 0.9908, 0.9515, 0.9399 and 0.9652.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147642A_ABST
    Figure CN120147642A_ABST
Patent Text Reader

Abstract

The invention provides a construction method of a compact sandstone core natural fracture characteristic parameter characterization model. The construction method specifically comprises the following steps: step 100, self-making a compact sandstone core natural fracture image data set; step 200, establishing an efficient self-adaptive Frac-YOLOv8 rock core natural fracture segmentation network; step 300, training the network by using the data set to obtain a rock core natural fracture segmentation model; step 400, inputting a core image to be segmented into the model, and segmenting cracks; step 500, generating a binary crack data set; step 600, applying a crack skeletonization extraction algorithm to quantify the crack length; step 700, using a pixel statistical algorithm to quantify the actual area of the crack and calculating the average width of the crack; and finally, calculating the maximum width pixel value of the crack by using a crack variable circle algorithm, and quantifying the maximum width through the diameter of an inscribed circle. The method provides an effective basis for evaluation and analysis of natural rock core cracks of tight sandstone.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of oil exploration, and particularly relates to a method for constructing a characterization model of natural fracture characteristic parameters of tight sandstone cores. Background Art

[0002] In the past few decades, natural cores, especially tight sandstones, as key research objects for underground engineering and energy extraction, have received extensive attention. Tight sandstones play an important role in the storage of oil, natural gas and water resources. However, due to their high compaction degree and low permeability, fractures often occur during the exploitation process due to stress changes, temperature fluctuations and geological effects. These fractures will change the fluid permeability characteristics of the rock mass, affecting the exploitation efficiency and safety of the reservoir. Research shows that the presence of fractures is an important sign for evaluating the reservoir structure, which 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 economy of reservoir development.

[0003] Traditional methods for detecting fractures in tight sandstone cores mainly rely on manual operations, such as visual inspection and analysis with a magnifying glass. Although simple, they have low accuracy and are difficult to identify tiny fractures. With the development of technology, handheld flaw detectors have gradually replaced manual recording, providing higher detection accuracy. However, these methods still rely on humans, are highly subjective, and are inefficient and costly when dealing with a large number of core samples, especially prone to errors when the fracture distribution is complex. To solve these problems, modern fracture detection has started to adopt digital imaging and automation technologies, such as high-resolution CT scanning and electron microscope scanning, combined with computer image processing technology for automated analysis. These advanced technologies not only improve the detection accuracy but also can quantitatively evaluate parameters such as the depth, width and length of fractures. Early digital image technologies used color interval conversion and gray threshold for fracture detection, mainly applied to the intelligent identification of road and bridge and material fractures. Common methods include threshold algorithms, edge algorithms and region algorithms, etc. These technologies can record the location and shape of fractures. However, these methods are less applied and have cumbersome steps in the detection of fractures in tight sandstone reservoir drilling cores, resulting in easy omission and error during the detection process, affecting the measurement accuracy and efficiency.

[0004] Deep learning, especially convolutional neural networks (CNNs), is driving the development of the computer vision field, overcoming the limitations of traditional digital image processing techniques in crack detection, particularly the inability to efficiently and accurately identify crack patterns in complex backgrounds. CNNs learn the features of data layer by layer through multi-layer non-linear mapping, performing effective feature extraction and excelling in image segmentation tasks. Several advanced CNN segmentation models, such as Mask R-CNN, YOLO, Fully Convolutional Network (FCN), U-net, and DeepLab-v3+, can extract shallow and deep features from pixel-level data, significantly improving the accuracy of segmentation. However, despite the progress made by these technologies in crack segmentation, there are still problems of insufficient accuracy and imperfect crack quantification processing, especially challenges in quantifying the geometric features of cracks (such as length and width). YOLOv8, as an efficient and accurate object detection technology, performs well in crack segmentation. In the field of oil exploration, with its fast inference and strong adaptability, it significantly improves the segmentation efficiency and accuracy. However, YOLOv8 still has room for optimization, especially in crack extraction and quantification processing in complex geological backgrounds. Further optimizing the accuracy and adaptability of YOLOv8 is of great significance for improving the effect of automatic crack identification and applications in related fields such as oil exploration.

[0005] Technical solution of the first prior art: Currently, in the detection of natural core cracks, mainly the natural core cracks are segmented without further quantitative analysis of the cracks.

[0006] Image segmentation is a key task in computer vision, divided into instance segmentation and semantic segmentation. In core crack detection, semantic segmentation is usually more appropriate. Yang et al. proposed a transfer learning method based on DCNN, which performed excellently on three datasets but failed to achieve crack quantification. Mei et al. proposed a deep learning-based method for pavement crack detection, considering pixel connectivity but not involving crack quantification and unable to provide reliable pavement evaluation. 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 the reservoir property analysis and seepage characteristic prediction in oil and gas exploration. Ji et al. proposed an integrated method based on DeepLabv3+ for crack detection and proposed a crack quantification algorithm. Although high-precision quantification was carried out on five indicators, its segmentation performance was low, with an accuracy of only 73.31%. Among them, the crack extraction effect is as follows Figure 2 shown.

[0007] Disadvantages of the first prior art: At present, in the field of natural fracture identification in tight sandstone, traditional methods and existing research work face many challenges. Traditional methods have complex steps and rely on manual operations, which are not only inefficient but also vulnerable to subjective factors, resulting in poor generalization of results and difficulty in adapting to the fracture characteristics of tight sandstone in different regions and types. First of all, the detection and classification of fractures is a difficult task, and it is difficult to determine geometric features. Therefore, fracture segmentation should be achieved to obtain more detailed fracture information. Semantic segmentation can more accurately identify fractures by identifying the type of each pixel. Secondly, many researchers only detect natural core fractures and do not conduct further quantitative research. It cannot provide reliable guidance for actual pavement evaluation. Summary of the Invention

[0008] The purpose of the present invention is to solve the defects existing in the above-mentioned prior art and provide a method for constructing a characterization model of natural fracture characteristic parameters of tight sandstone cores.

[0009] Based on the original YOLOv8m convolutional neural network algorithm, the present invention constructs a new deep learning network model Frac-YOLOv8 suitable for natural fracture morphology segmentation and fracture geometric parameter adaptive quantization of tight sandstone cores. The model Frac-YOLOv8 can automatically segment and identify the number, length, width (average value, maximum value), area, and line density of natural fractures in tight sandstone core photos at the pixel level and obtain quantitative data. Specifically, there are three improvements in this recognition model method: First, the upsampling module originally in the neck of YOLOv8m is replaced with the lightweight calculation ZARAFE module, so that the neck network can make full use of the semantics of the feature map during feature fusion; Secondly, the original YOLOv8m neck adopts the FPN mode for feature fusion in the feature fusion stage. The model Frac-YOLOv8 of the present invention proposes a new Neck network structure BiFPN, with enhanced feature fusion ability, the network can learn cross-layer feature information, and achieve efficient aggregation of multi-scale features, making the improved network more efficient and accurate in identifying natural fractures in tight sandstone cores; Finally, based on the automatic segmentation and recognition results of natural fractures in tight sandstone by the constructed model Frac-YOLOv8, an adaptive quantization framework is developed, which can realize automatic quantitative analysis of natural fracture geometric parameters, and the results include the number of fractures, fracture length, fracture width (average value, maximum value), fracture area, and fracture line density at the pixel level.

[0010] Based on the fracture photos of tight sandstone cores in the Bozidabei block of the Tarim Basin, this invention uses LabelImg to calibrate the dataset for segmenting natural fractures in tight sandstone cores, which is used to train the model and verify the accuracy of the automatically segmented recognition of fracture geometric parameters by the constructed model Frac-YOLOv8. The results show that the mAP 0.5 of the constructed model Frac-YOLOv8 for fracture segmentation and recognition reaches 84.8%, showing a significant improvement in accuracy compared to the original YOLOv8; at the same time, the recognition and segmentation time is saved by 16.39% compared to the traditional YOLOv8m network, improving the network's segmentation speed; in addition, based on the segmentation results of fractures by this model Frac-YOLOv8, fracture geometric parameters are further extracted, and the verification shows that the quantification results are in good agreement with the actual situation. In summary, the new deep learning network model Frac-YOLOv8, which is applicable to the segmentation of natural fracture morphology and the adaptive quantification of fracture geometric parameters in tight sandstone cores, performs well, helps in the segmentation detection and quantitative evaluation of natural fractures in tight sandstone, and has great application potential and prospects in aspects such as the evaluation of tight oil and gas reservoirs, the selection of geological sweet spots, and production capacity prediction.

[0011] The present invention adopts the following technical solutions: A method for constructing a model for characterizing natural fracture characteristic parameters of tight sandstone cores, comprising: Step 100. Self-made dataset of natural fracture images of tight sandstone cores.

[0012] Based on the fracture photos of the cores, use LabelImg to calibrate the dataset for segmenting natural fractures in tight sandstone cores. After making the dataset of natural fractures in tight sandstone cores using LabelImg, input the dataset of natural fractures in tight sandstone cores into the network, allowing the network to learn the natural fractures in the tight sandstone cores in the dataset and segment the natural fractures in the tight sandstone cores. Through the input images at the input end, the input image size of the Frac-YOLOv8 natural fracture segmentation network for tight sandstone cores is 640*640, usually including the image preprocessing stage, that is, scaling the input image to the input size of the network and normalizing it. In the network training stage, the Frac-YOLOv8 natural fracture segmentation network for tight sandstone cores uses Mosaic data augmentation.

[0013] Step 200. Establish an efficient adaptive Frac-YOLOv8 natural fracture segmentation network for cores.

[0014] Redesign the YOLOv8m network. For the neck feature fusion network, replace the upsampling module in the original neck of YOLOv8m with the lightweight computing CARAFE module. Considering the characteristics of large size differences in natural fractures of tight sandstone cores, a new Neck network structure BiFPN is proposed in the neck of YOLOv8.

[0015] Step 300: Use the dataset of core natural fracture images to train the Frac-YOLOv8 segmentation network to obtain a core natural fracture segmentation model.

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

[0017] The YOLOv8 segmentation model usually uses cross-entropy loss and Dice Loss to train the segmentation task.

[0018] Step 500: Generate a binary fracture dataset from the segmented mask image.

[0019] After the Frac-YOLOv8 generates the predicted segmentation results according to Step 100, digital image processing techniques are used to obtain quantitative indicators.

[0020] Step 600: Use the fracture skeletonization extraction algorithm to extract the fracture skeleton in the binary image and quantify the length of the fracture.

[0021] Evaluate the fracture coverage area in the image by the pixel values, convert the digital matrix of the binary image from the predicted segmentation results, and traverse by pixel. The total number of pixels with a value of 1 represents the fracture area The calculation is as follows:

[0022] where represents the geometric calibration index, represents the finite small area of the fracture unit.

[0023] Step 700: Use the pixel statistical algorithm to calculate the number of pixels occupied by the fracture, quantify the actual area of the fracture, and calculate the average width of the fracture through the fracture length.

[0024] Step 800: Use the fracture variable circle algorithm to calculate the maximum width pixel value of the fracture, and quantify the maximum width through the pixel value of the inscribed circle diameter.

[0025] The variable circle algorithm starts with a circle with an initial diameter value, and then appropriately changes the diameter until the circle domain is tangent to the fracture boundary. In this method, the maximum inscribed circle diameter of the fracture with a point on the fracture edge as the tangent point is regarded as the fracture width at that point. First, traverse each connected domain and determine the maximum fracture width of each domain. Then, regard the maximum value as the maximum fracture width of the connected domain. By traversing each fracture connected domain, a series of inscribed circles can be obtained. Finally, compare the maximum diameters of a series of inscribed circles is selected as the maximum width of the fracture in the entire image.

[0026] Further, in step 200, CAREAF consists of two cores: an upsampling kernel prediction module and a feature recombination module. In the upsampling kernel prediction stage, first, a 1×1 convolution operation is used to reduce the number of channels of the input feature map to . Then, through convolution operations, the number of channels is further transformed into , successively implementing the content encoding process. Subsequently, the channels are expanded in the spatial dimension, and the generated upsampling kernel is subjected to softmax normalization to ensure that the sum of its weights is 1. Entering the feature recombination stage, the position of each output feature map is inversely mapped to the input feature map, and a dot product operation is performed with the original feature map in the region centered at this point and the corresponding predicted upsampling kernel. Different channels share the same upsampling kernel at the same position, thereby generating the final new feature map.

[0027] Further, the Neck network structure BiFPN has the following design changes: (1). Connect nodes with the same feature map size.

[0028] (2). When the original input node and the output node are in the same layer, establish a new path to connect the original input node and the output node.

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

[0030] Among them, the learning of weights in the weighted feature fusion mechanism adopts the Fast Normalized Fusion method, which has a faster training speed and higher efficiency compared with other methods. As shown in Formula 1, in the formula, is the number of fused feature maps at the node; is the input feature map at the node; , are the weights attached to the input feature map, and the initial values of the weights are randomly selected between 0 and 1; ε is a constant used to make the denominator non-zero. This method scales the weight range to [0,1], and after multiple trainings, the optimal weights are obtained to represent the importance of each input at the fusion node.

[0031] Further, the efficient Frac-YOLOv8 tight sandstone core natural fracture segmentation network 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 new Neck network structure BiFPN; the segmentation unit includes: a segmentation head module.

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

[0033] Further, step 600 also includes obtaining a core fracture skeleton with 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 the pixel value of points in the foreground region is 1 and the pixel value of points in the background region is 0. The implementation steps of the Zhang-Suen algorithm are divided into two steps:

[0034] In the first step, according to the conditions in formula 7, the status of the point to be measured is determined. If the eight-neighborhood of the point satisfies the conditions in formula 7, the status of the point is set to the to-be-deleted status. If the conditions are not satisfied, it is temporarily retained. During the judgment process, the points that meet the conditions are not deleted immediately, but are first marked, and when each iteration ends, all the marked points are deleted uniformly. The conditions that the eight-neighborhood of the point to be measured needs to meet are:

[0035] In the formula, represents the pixel values of the point to be measured in the image and the points within its eight-neighborhood, and the value of is 0 or 1. represents the number of points with pixel value 1 within the eight-neighborhood of the point. represents the number of times the pixel value changes from 0 to 1 when cycling clockwise around the point in the eight-neighborhood template of the point for one week, starting from

[0036] In the second step, according to the conditions in formula 8, the status of the point to be measured is determined. Similar to the first step, the points to be measured that meet the judgment conditions are marked and not deleted temporarily. When this iteration ends, that is, after traversing all pixel points in the image, the marked foreground points are deleted uniformly. Keep looping and iterating until all pixel points in the image no longer meet the above conditions, then the loop ends.

[0037] 。

[0038] Furthermore, step 700 includes: obtaining a crack skeleton with a single-pixel width using the Zhang-Suen thinning algorithm. The total length Irregular cracks are calculated by the method of summing up part by part. The length is equal to the number of pixels with a statistical value of 1 in the skeleton and is evaluated according to the following relationship:

[0039] wherein, represents the infinitesimal finite length of the skeleton unit; the average width of the crack can be evaluated as follows: 。

[0040] Furthermore, step 800 includes the calculation of the maximum width of cracks in tight sandstone natural cores. First, convert the segmentation result (referred to as SR) of the model into a grayscale image. Subsequently, search for and identify all connected domains, a total of N, and obtain the circumscribed rectangle of each connected domain according to the result, referred to as RectA. Next, grid RectA to obtain a series of coordinate points, represented in Point_List. It is also necessary to select the combination of all points located in the connected domain. Secondly, traverse the coordinate points obtained in the previous step, draw a circle centered on each coordinate, and increase the radius until the circle is tangent to the crack edge. At this time, the radius is represented as Piont_R, and 2 times Piont_R is used as the crack width corresponding to this point, and the crack width values of all points can be calculated. Then, take the maximum value as the maximum radius of this connected domain, that is, R. Record R in the corresponding R_List, then change the connected domain, and operate according to the above process. Finally, select the largest one from R_List, that is, the maximum radius in each connected domain, and use twice the maximum value as the maximum crack width of this image.

[0041] Advantages of the present invention: 1. The present invention proposes Frac-YOLOv8 for the detection of natural core cracks. A dataset of natural crack images of tight sandstone cores is made to establish an efficient YOLOv8 tight sandstone core natural crack segmentation network Frac-YOLOv8; using the dataset of natural crack images of tight sandstone cores, train the Frac-YOLOv8 core crack segmentation network to obtain a core crack segmentation model; input the natural crack image of the tight sandstone core to be segmented into the efficient Frac-YOLOv8 segmentation model to segment the natural crack of the tight sandstone core. Generate a binary crack dataset from the segmented mask image.

[0042] 2. Based on the crack segmentation results, an adaptive quantization framework was developed, using digital image processing technology to obtain quantitative indicators for quantitatively analyzing the main geometric parameters, including the crack area, crack length, quantity, line density, average crack width, and maximum crack width at the pixel level. Using the crack skeletonization extraction algorithm, the core crack skeleton in the binary image was extracted, and the number of skeleton pixel points was calculated to quantify the crack length. Using the pixel statistical algorithm, the number of pixels occupied by the crack was calculated to quantify the actual area of the crack, and the average width of the crack was obtained through numerical calculation using the area and length pixel values. Using the crack variable circle algorithm, the maximum width pixel value of the crack was calculated, and the maximum width was quantified through the pixel value of the inscribed circle diameter.

[0043] 3. In the segmentation results, the designed efficient YOLOv8 dense sandstone core natural crack segmentation model improved the mean average precision of the baseline segmentation model YOLOv8m mask by 1.4%. The mean average precision value of the present invention in the dense sandstone core natural crack test set mask reached 84.8%. At the same time, compared with the basic YOLOv8m network, the segmentation time was reduced by 16.39%, improving the segmentation speed of the network. Efficient segmentation of dense sandstone core natural cracks was achieved. In the quantization results, according to the comparison of the actual quantization indicators and the predicted indicators, the correlations of the crack area, length, average width, and maximum width reached 0.9908, 0.9515, 0.9399, and 0.9652 respectively. It was confirmed that the crack quantization results were close to reality. Overall, the proposed method performed well, contributed to crack segmentation and quantization, and had great practical application potential. Description of the Drawings

[0044] Figure 1 The detection result diagram of the method proposed by Mei et al.; (a) is crack picture I, (b) is the segmentation effect of crack picture I; (c) is crack picture II, (d) is the segmentation effect of crack picture II; Figure 2 The crack extraction effect diagram studied by Ji et al.; Figure 3 The steps of manual annotation and format conversion of specific core cracks; Figure 4 The structure of the CARAFE upsampling operator; Figure 5 Several different feature fusion networks; Figure 6 The efficient Frac-YOLOv8 dense sandstone core natural crack segmentation network; Figure 7 Using digital image processing technology to obtain quantitative indicators; Figure 8Schematic diagram of the eight-neighborhood of the point to be measured; Figure 9 Effect diagram of the skeleton thinning of the core fracture. (a) is the original picture of the core fracture, (b) is the segmentation effect of the core fracture, and (c) is the pixel-level segmentation effect of the enlarged core fracture; Figure 10 Schematic diagram of the variable circle algorithm; Figure 11 Effect diagram of extracting the maximum fracture width of the core; Figure 12 Flow chart for evaluating the maximum fracture width; Figure 13 Segmentation effect diagram of the Frac-YOLOv8 natural core fracture segmentation network; Figure 14 Comparison of fracture measurement indexes, where (a) is the area, (b) is the length, (c) is the average width, and (d) is the maximum width; Figure 15 Fracture segmentation and quantitative results of the test sample; Figure 16 Statistical fracture results of Frac-YOLOv8; Figure 17 Flow chart of the steps of the present invention. Detailed implementation manners

[0045] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0046] The present invention proposes an algorithm called Frac-YOLOv8 for detecting natural core fractures. A dataset of natural fracture images of tight sandstone cores is made; an efficient YOLOv8 tight sandstone core natural fracture segmentation network Frac-YOLOv8 is established; using the dataset of natural fracture images of tight sandstone cores, the Frac-YOLOv8 core fracture segmentation network is trained to obtain a core fracture segmentation model; the natural fracture image of the tight sandstone core to be segmented is input into the efficient Frac-YOLOv8 segmentation model to segment the natural fracture of the tight sandstone core. The segmented mask image is used to generate a binary fracture dataset.

[0047] Based on the crack segmentation results, an adaptive quantization framework was developed. Digital image processing techniques were used to obtain quantization metrics for quantitatively analyzing the main geometric parameters, including the number of cracks at the pixel level, crack area, crack length, average crack width, maximum crack width, and crack line density. On the basis of segmentation, the number of cracks was counted using the segmented crack mask, and the crack line density was calculated. Using the crack skeletonization extraction algorithm, the core crack skeleton in the binary image was extracted, and the number of skeleton pixel points was calculated to quantify the crack length. The number of pixels occupied by the cracks was calculated using the pixel statistics algorithm to quantify the actual area of the cracks, and the average width of the cracks was obtained through numerical calculation methods using the area and length pixel values. The maximum width pixel value of the cracks was calculated using the crack variable circle algorithm, and the maximum width was quantified by the pixel value of the diameter of the inscribed circle.

[0048] Among them, in the segmentation results, the designed efficient YOLOv8 tight sandstone core natural crack segmentation model improved the mean average precision (mAP) of the mask by 1.4% compared with the baseline segmentation model YOLOv8m. The mAP of the natural crack test set mask of the present invention reached 84.8%. At the same time, compared with the basic YOLOv8m network, the segmentation time was reduced by 16.39%, improving the segmentation speed of the network. Efficient segmentation of natural cracks in tight sandstone cores was achieved. In the quantization results, according to the comparison of the actual quantization metrics and the predicted metrics, the correlations of the crack area, length, average width, and maximum width reached 0.9908, 0.9515, 0.9399, and 0.9652, respectively. It was confirmed that the crack quantization results were close to reality. Generally speaking, the proposed method performed well, contributed to crack segmentation and quantization, and had great practical application potential.

[0049] As Figure 1 、 Figure 17 shown, a method for constructing a characterization model of natural crack characteristic parameters of a tight sandstone core of the present invention includes: Step 100. Self - make a dataset of natural crack images of tight sandstone cores.

[0050] Based on the core crack photos in the Bozidabei block of the Tarim Basin, the LabelImg was used to calibrate the dataset for the segmentation of natural core cracks in tight sandstone. LabelImg is a graphic image annotation tool. The annotations are saved as.json files in the used format, and then the.json files are converted into.txt files in the coco format using the format modification algorithm. The specific steps of manual annotation and format conversion of core cracks are as Figure 3As shown in the figure. After creating a dataset of natural fractures in tight sandstone cores using LabelImg, the dataset of natural fractures in tight sandstone cores is input into the network, enabling the network to learn the natural fractures in tight sandstone cores in the dataset and segment the natural fractures in tight sandstone cores. Through the images input at the input end, the input image size of the efficient Frac-YOLOv8 natural fracture segmentation network for tight sandstone cores is 640*640, usually including the image preprocessing stage, that is, scaling the input image to the input size of the network and normalizing it, etc. In the network training stage, the efficient Frac-YOLOv8 natural fracture segmentation network for tight sandstone cores uses Mosaic data augmentation to improve the training speed and network accuracy of the model.

[0051] Step 200. Establish an efficient adaptive Frac-YOLOv8 natural fracture segmentation network for cores; Redesign the YOLOv8m network. For the neck feature fusion network, replace the upsampling module in the original neck of YOLOv8m with the CARAFE module for lightweight computing, enabling the neck network to improve the segmentation speed and enhance the segmentation accuracy of jagged fractures at the edges. After adopting a lightweight model in the neck network, the segmentation speed can be improved. Considering the characteristics of large differences in size of natural fractures in tight sandstone cores, a new Neck network structure BiFPN is proposed in the neck of YOLOv8 to enhance the feature extraction ability of the network, achieve efficient aggregation of multi-scale features, and strengthen the segmentation ability of the network for complex natural fractures in tight sandstone cores.

[0052] The present invention integrates the CARAFE module, which is a new technology, to address the limitations of segmenting jagged natural core fractures. The improvement method is to replace the upsampling module in the neck network structure with the CARAFE upsampling operator. The CARAFE upsampling operator is a novel upsampling method. It makes full use of the semantics of the feature map and can effectively perform lightweight computing. Therefore, the upsampling algorithm of YOLOv8m is optimized using the CARAFE module structure, increasing the receptive field of the network while maintaining lightweight upsampling and obtaining a better high-resolution feature map. The advantages of this operator are less redundancy, strong feature fusion ability, and fast operation speed. Abandoning the single-kernel sampling method for samples using the nearest neighbor interpolation method, a new method based on multi-core data is proposed, that is: adopting a new method based on multi-core data to generate an adaptive content-aware sampling method. In Figure 4 the CARAFE upsampling operator structure is given.

[0053] The upsampling algorithm of YOLOv8m is optimized using the CARAFE module structure, increasing the receptive field of the network while maintaining lightweight.

[0054] CAREAF consists of two cores: an upsampling kernel prediction module and a feature recombination module. In the upsampling kernel prediction stage, first, a 1×1 convolution operation is used to reduce the number of channels of the input feature map to . Then, through convolution operations, the number of channels is further transformed into to sequentially implement the content encoding process. Subsequently, the channels are spatially expanded, and the generated upsampling kernel is subjected to softmax normalization to ensure that the sum of its weights is 1. Entering the feature recombination stage, the position of each output feature map is inversely mapped to the input feature map, and a dot product operation is performed with the original feature map in the region centered at this point and the corresponding predicted upsampling kernel. It should be noted that different channels share the same upsampling kernel at the same position, resulting in the final new feature map.

[0055] Compared with the nearest neighbor interpolation upsampling technique, the CARAFE method significantly enhances the semantic richness of the recombined feature map. This method is achieved by emphasizing key points within the local region. In the case of dense natural small fractures in tight sandstone cores, the ability of CARAFE to enhance spatial details helps the model distinguish small fractures that are very close to each other, thereby potentially reducing the number of merged segments. It also helps improve the localization accuracy of the model in the segmentation of natural fractures in tight sandstone cores. In addition, CARAFE has a wider observation range, proficient content processing, and a lightweight design, ultimately enabling fast calculation.

[0056] In summary, the feature map obtained by CARAFE upsampling is finer, with less detail lost, and is more suitable for the segmentation of multi-scale natural fractures in tight sandstone cores.

[0057] In the initial network structure, high-level pyramid features are directly extracted from the backbone network for prediction. This structure lacks feature fusion, resulting in relatively low segmentation accuracy. With the in-depth study of the network structure, the FPN network based on the idea of feature fusion was proposed, and its structure is as shown in Figure 5 Figure (a). A new top-down path is created for feature fusion. The connected feature map obtains more abundant semantic information, and prediction can improve the accuracy to a certain extent. However, the FPN network is essentially a top-down structure. Due to the limitation of unidirectional information transmission, the accuracy is still difficult to meet the requirements. In recent years, the PANet network with the highest usage frequency is used. YOLOv8m uses it as the Neck, and its structure is as shown in Figure 5As shown in (b), a bottom-up path is established on the basis of FPN to make up for the defect that the FPN network has only a unidirectional information flow structure. The feature maps at the high level have stronger semantic information, which is beneficial to object classification and segmentation. The feature maps at the low level have stronger position information, which is beneficial to object localization. Such a structure can greatly improve the accuracy of the target segmentation task.

[0058] At the same time, the recently proposed NAS-FPN structure has the following specific structure Figure 5 As shown in (c), the popular NAS (Neural Architecture Search) technology is used to search for the best network structure. Although the effect of this structure is the best, the network obtained based on the search is irregular, difficult to interpret and modify, and the use of NAS technology is time-consuming and labor-intensive, so it has not been widely used.

[0059] Based on this, a new Neck network structure BiFPN is proposed, as Figure 5 shown in (d). Compared with the PANet structure, the design changes of BiFPN are as follows: (1). Connect nodes with the same feature map size. For example, in the backbone network, nodes in the p3 layer and p5 layer with the same size as the feature maps of the neck network are spliced. The remaining nodes in the backbone network do not have inputs from other directions to jointly perform feature fusion. Then these nodes are not connected in the network structure with multi-scale fusion, which simplifies the bidirectional network structure.

[0060] (2). When the original input node and the output node are in the same layer, a new path is established to connect the original input node and the output node. Such a structure can fully fuse more feature information at the cost of a small amount of increase.

[0061] (3). Introduce the weighted feature fusion mechanism. Traditional feature fusion often simply uses Concat or Shortcut to connect feature maps, and does not distinguish the feature maps added at the same time. However, the input feature maps have different resolutions, and their contributions to fusing the input feature maps are also different. Therefore, simply adding or superimposing them is not the best operation. So a simple and efficient weighted feature fusion mechanism is proposed, adding additional weights to each input, mainly to learn the importance of different input features and fuse different input features in a distinguishable way.

[0062] In the weighted feature fusion mechanism, the learning of weights adopts the Fast Normalized Fusion method, which has a faster training speed and higher efficiency compared with other methods. As shown in Formula 1, where, in the formula, is the number of fused feature maps at the node; is the input feature map at the node; and are the weights attached to the input feature map, and the initial values of the weights are randomly selected between 0 and 1; is a constant used to make the denominator non-zero. This method scales the weight range to [0,1]. After multiple trainings, the optimal weights are obtained to represent the importance of each input at the fusion node.

[0063] In summary, as Figure 6 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); The feature extraction unit includes: a convolution module, a C2f module, and an SPPF module; The feature fusion unit (Neck) includes: a convolution module, a splicing module, a CARAFE module, and a new Neck network structure BiFPN; The segmentation unit includes: a segmentation head module (YOLO Head); Step 300: Use the dataset of core natural fracture images to train the Frac-YOLOv8 segmentation network to obtain a core natural fracture segmentation model; The hardware platform configuration parameters for model training are as follows: NVIDIA GeForce RTXA5000 GPU graphics card; Software configuration: 64-bit windows11 operating system, detectron2 framework based on pytorch, CUDA11.3, OpenCV2 library, and PyCharm integrated development environment.

[0064] Step 400: Input the tight sandstone core natural fracture image to be segmented into the core natural fracture segmentation model to segment the core natural fracture.

[0065] Using a dataset of natural fracture images of tight sandstone cores, an efficient Frac-YOLOv8 core natural fracture segmentation network is trained to obtain a core natural fracture segmentation model. Segmentation is the ultimate output. For different segmentation algorithms, the number of branches at the output end varies. The YOLOv8 segmentation model usually uses Cross Entropy Loss and Dice Loss to train the segmentation task. Cross Entropy Loss is used for pixel classification tasks to measure the degree of misclassification of each pixel. Dice Loss is often used to measure the overlap between the predicted region and the ground truth region in the segmentation task. Especially in the case of imbalanced data, Dice Loss can effectively improve the segmentation accuracy. YOLOv8 can output a pixel-level mask (mask) of the target within each detection box. The types and confidence levels of the natural fractures in the core are obtained through the efficient Frac-YOLOv8 core natural fracture segmentation network model, and the fracture region is mapped through the mask.

[0066] Step 500: Generate a binary fracture dataset from the segmented mask image.

[0067] In step 100, based on the core fracture photos in the Bozidabei block of the Tarim Basin, we use LabelImg to calibrate the dataset for tight sandstone natural core fracture segmentation. The tight sandstone core natural fracture dataset is input into the network, allowing the network to learn the tight sandstone natural core fractures in the dataset and segment the tight sandstone natural core fractures. The quantification of tight sandstone natural core fractures is an important step in fracture detection and a key part of fracture evaluation. After Frac-YOLOv8 generates the predicted segmentation results, digital image processing techniques are used to obtain quantitative indicators, as shown in Figure 7 . Starting from the fracture recognition image, this framework can achieve a fully automated quantification process without being interfered by other human factors and improve the recognition accuracy to a certain extent.

[0068] Step 600: Use the fracture skeletonization extraction algorithm to extract the fracture skeleton in the binary image and quantify the length of the fracture.

[0069] Evaluate the coverage area of the fracture in the image through the pixel values, convert the digital matrix of the binary image from the predicted segmentation results, and traverse by pixel. The total number of pixels with a value of 1 represents the fracture region The calculation is as follows:

[0070] where represents the geometric calibration index, represents the finite small region of the fracture unit.

[0071] The present invention uses the Zhang-Suen thinning algorithm to obtain the core fracture skeleton with single-pixel width. The Zhang-Suen algorithm is a traditional core fracture image thinning algorithm, which has the characteristics of fast operation speed and maintaining image connectivity. In the Zhang-Suen algorithm, the image is divided into a foreground region and a background region. The pixel value of the points in the foreground region is 1, and the pixel value of the points in the background region is 0. The idea of this algorithm is to find the foreground points that meet specific conditions through continuous iteration, mark them, and uniformly delete them to achieve the purpose of image thinning. Figure 8 Represents a certain foreground point Schematic diagram of the eight-neighborhood. The implementation steps of the Zhang-Suen algorithm are divided into two steps:

[0072] In the first step, according to the conditions in Formula 7, the state of the point to be measured is determined. If the eight-neighborhood of the point meets the conditions in Formula 7, the state of the point is set to the state to be deleted. If the conditions are not met, it is temporarily retained. During the judgment process, the points that meet the conditions are not deleted, but are first marked. When each iteration ends, all the marked points are uniformly deleted. The conditions that the eight-neighborhood of the point to be measured needs to meet are:

[0073] In the formula, represents the pixel values of the point to be measured in the image and the points within its eight-neighborhood, and the value of is 0 or 1. represents the number of points with pixel value 1 within the eight-neighborhood of point. represents in the eight-neighborhood template of point, starting from point and cycling clockwise around point for one week, the cumulative number of times the pixel value changes from 0 to 1 appears.

[0074] In the second step, according to the conditions in Formula 8, the state of the point to be measured is determined. Similar to the first step, the points to be measured that meet the judgment conditions are marked and not deleted temporarily. When this iteration ends, that is, after traversing all the pixel points in the image, the marked foreground points are uniformly deleted. Continuously perform cyclic iteration until all the pixel points in the image do not meet the above conditions, then the loop ends.

[0075] Figure 9 The present invention uses the Zhang-Suen algorithm for core fracture skeleton thinning, and the experimental results are as

[0076] Step 700: Calculate the number of pixels occupied by the crack using the pixel statistical algorithm, quantify the actual area of the crack, and calculate the average width of the crack based on the crack length.

[0077] According to the experimental results, when using the Zhang-Suen algorithm for crack thinning, the overall structure of the crack can be well preserved, and there is no crack fracture. The extracted crack skeleton has good connectivity. The present invention uses the Zhang-Suen thinning algorithm to obtain a crack skeleton with a single-pixel width. The total length Irregular cracks can also be calculated by the method of summing up each part. The length is equal to the number of pixels with a statistical value of 1 in the skeleton and is evaluated according to the following relationship:

[0078] where represents the infinitesimal finite length of the skeleton unit.

[0079] The average width of the crack can be evaluated as follows: Step 800: Calculate the maximum width pixel value of the crack using the crack variable circle algorithm and quantify the maximum width through the pixel value of the inscribed circle diameter.

[0080] Assume that the crack is a planar space filled with multiple circles, and its shape is specified by the connecting line of its tangent points. To determine the width of the pixel circle, in the present invention, a variable circle algorithm is proposed. In this algorithm, start with a circle having an initial diameter value, and then appropriately change the diameter until the circle domain is tangent to the crack boundary. 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, traverse each connected domain and determine the maximum crack width of each domain. Then take the maximum value as the maximum crack width of the connected domain, as shown in Figure 10 shown. By traversing each crack connected domain, a series of inscribed circles can be obtained. Finally, compare the maximum diameters of a series of inscribed circles is selected as the maximum width of the crack in the entire image.

[0081] As Figure 12As shown, first, convert the segmentation result of the model (referred to as SR) into a grayscale image. Subsequently, search for and identify all connected domains, a total of N, and obtain the bounding rectangle of each connected domain according to the result, called RectA. Next, grid RectA to obtain a series of coordinate points, as represented in Point_List. It is also necessary to select combinations of all points located within the connected domains. Secondly, traverse the coordinate points obtained in the previous step, draw a circle centered on each coordinate, and increase the radius until the circle is tangent to the crack edge. At this time, the radius is represented as Piont_R, and 2 times Piont_R is used as the crack width corresponding to this point, and the crack width values of all points can be calculated. Then, take the maximum value as the maximum radius of this connected domain, that is, R. Record R in the corresponding R_List, then change the connected domain, and operate according to the above process. Finally, select the largest one from R_List, that is, the maximum radius in each connected domain, and use twice the maximum value as the maximum crack width of this image. The present invention uses a variable circle algorithm to calculate the maximum crack width, and the experimental results are as Figure 11 shown.

[0082] The method adopted by the present invention is compared and demonstrated with the prior art as follows: Accuracy is the proportion of the number of samples correctly predicted as positive by the model among all samples predicted as positive; recall is the proportion of the number of samples correctly predicted as positive by the model among all actual positive samples, evaluating the relative performance of the model when dealing with positive and negative classes. The accuracy and recall formulas are Considering that accurate contour and position information are crucial for measurement, the present invention selects the mAP of the bounding box and the mAP of the mask as evaluation indicators. The IOU threshold is set to 0.5. If the overlap with the annotation surface exceeds the IOU threshold, the predicted bounding box will be recognized as a true positive. Otherwise, it will be classified as a false positive. Similarly, when the IOU of the predicted mask is lower than the specified threshold, the mask marked as such will be regarded as a false negative. The mean average precision (mAP) measures the overall performance at different confidence thresholds. Finally, these indicators can be defined as follows:

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

[0084] The average precision of multiple categories takes into account the precision of each category and averages them to comprehensively evaluate the performance of the model. The formula for calculating the average precision of multiple categories is

[0085] 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 operation method based on the CARAFE operator greatly reduces the inference speed of the model. To study the impact of the improvement of the CARAFE operator for network upsampling on the performance of core natural fracture segmentation, among them, the resolution of the core fracture dataset images provided for network learning is 2560×1920, and 1 type of fracture is selected and named fracture. There are 341 sample images in the dataset, 273 images are divided into the training set, 34 images are divided into the test set, and 34 images are divided into the validation set, with a ratio of 8:1:1. The first two are used to construct the optimized Frac-YOLOv8, and the latter is used to test the model performance. During the training process, the test set does not participate in the calculation and is only used to evaluate the generalization ability of the model. For the proposed model, the test set is a completely unseen dataset. To verify the effectiveness of the efficient Frac-YOLOv8 core natural fracture segmentation network method in the tight sandstone core natural fracture dataset, the experimental effect was evaluated. In the following experimental values, P, R, the average accuracy of the mask at, Time, and the number of parameters are used as indicators to evaluate the model. In the experiment, the YOLOv8m model was used as the baseline segmentation performance, with the default epochs = 500 and batch_size = 32. Use Tensorboard to view the training results of the algorithm model. The obtained prediction results were compared with the basic YOLOv8m network. Table 1 shows the comparison of the model segmentation performance before and after the improvement of the CARAFE operator for upsampling.

[0086] Table 1 Segmentation performance before and after the improvement of the CARAFE operator for upsampling of the neck network As shown in Table 1, the segmentation accuracy of the basic YOLOv8m algorithm is 83.4%. After using the CARAFE operator for upsampling in the neck network, the accuracy drops to 89.6%, but the recall rate increases by 1.2% to reach 73.6%, and at the same time the mAP increases by 0.5% to reach 83.9%. In terms of the segmentation time, it is found that after using the CARAFE operator for upsampling in the neck network, the model reduces the memory consumption, and the segmentation time is reduced from 12.2 milliseconds to 9.9 milliseconds, and the segmentation speed is increased by about 18.85%, showing a huge improvement in the segmentation speed.

[0087] After adopting the upsampling CARAFE operator in the neck network, the recall rate and mAP are improved, but the improvement effect of mAP is very small. When the feature information extracted from the neck network is limited, an improvement is proposed for the feature fusion part of the neck to achieve the efficient aggregation of multi-scale feature information output by the backbone network, thereby improving segmentation. Therefore, a new BiFPN structure is proposed. To verify the effectiveness of the improved feature pyramid fusion structure, training and validation are carried out on the same dataset, and the accuracy, recall rate, segmentation performance, and segmentation time of YOLOv8m, YOLOv8-C—Frac, and YOLOv8-C-BIFPN-Frac (Frac-YOLOv8) are compared.

[0088] Table 2 Model parameters and segmentation performance before and after improving feature fusion As shown in the results of Table 2, when PANet is improved to the new BiFPN structure, the experimental results show that the fusion of the new BiFPN and YOLOv8m, the network structure learns the importance of different input features at the feature fusion nodes, and without adding too much cost, it strengthens the degree of feature aggregation and improves the segmentation performance of the model. Frac-YOLOv8 performs best in terms of recall rate, reaching 77%, which indicates that it has the strongest ability to segment all cracks. At the same time, it also leads in the Map0.5 index, which is 84.8%, reflecting its optimal overall performance in the crack segmentation task. Although the segmentation speed of the Frac-YOLOv8 network increases by 0.3 milliseconds compared to the YOLOv8-C-Frac network, it can still meet the real-time segmentation requirements for deployment.

[0089] Compared with YOLOv8m, the recall rate and mAP of Frac-YOLOv8 are increased by 4.6% and 1.4% respectively, and the segmentation time is reduced by 16.39%. It still maintains an advantage in segmentation time and enhances the real-time segmentation ability of the network. This shows that adding the upsampling operator CARAFE to the neck network of the benchmark YOLOv8m and improving PANet to the new BiFPN structure can greatly improve the performance of the network in capturing all core cracks, ensuring the comprehensiveness and efficiency of the network.

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

[0091] Table 3 Comparison of the performance of each model The comparison of performance is shown in Table 3. In the crack segmentation task, the Frac-YOLOv8 model demonstrates significant advantages. This model performs excellently in multiple key performance indicators, especially in terms of precision and Map0.5. The precision value of Frac-YOLOv8 is 86.4%, although slightly lower than 94.3% of YOLOv8s, but it achieves a recall rate of 77%, which is the highest among all the compared models, indicating that it is more comprehensive in segmenting crack instances.

[0092] In terms of metrics, Frac-YOLOv8, with an excellent segmentation performance of 84.8%, outperforms YOLOv9e, whose parameter quantity is 2.24 times that of Frac-YOLOv8. This reflects the overall superior performance of Frac-YOLOv8 in the crack segmentation task, especially when dealing with complex crack scenarios.

[0093] The processing time of Frac-YOLOv8 is 10.2 milliseconds, which is comparable to YOLOv8m. Considering its excellent performance in precision and recall, this processing time is acceptable. In addition, the parameter quantity of Frac-YOLOv8 is 24.83M, which indicates that it has good model complexity and efficiency while maintaining high performance. Finally, the efficient Frac-YOLOv8 core natural crack segmentation network effect is as Figure 13 shown.

[0094] 30 images were randomly selected from the test machine for testing. Figure 11 The results of segmented cracks in 4 test sets are shown. It can be seen that the Frac-YOLOv8 core natural crack segmentation network shows excellent detection performance under most circumstances, especially for images with complex backgrounds, where the crack morphology can still be highlighted. In addition, Frac-YOLOv8 can capture the characteristic information of small cracks in the core. It can be seen that Frac-YOLOv8 can well segment the crack geometry and retain as much detail as possible. A careful observation of the small cracks and the overall shape of the cracks in the images also shows that Frac-YOLOv8 retains as many edge details as possible.

[0095] Here, we obtained the skeleton of the segmentation results predicted by Frac-YOLOv8 and further estimated quantitative indicators such as crack area, crack length, average width, and maximum width. The prediction results have been demonstrated in Figure 14 where all units are in pixels. The scatter points of different colors represent the indicators corresponding to SR, and the black line represents the indicators associated with SR, which is equivalent to the GT indicators. Figure 14 In (a) of [reference], the comparison of the crack area based on GT and the predicted crack area by the proposed model is provided. The predicted crack areas of the scatter points fluctuate at 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 true expected value, suggesting that the overall performance, prediction results, and recognition ability of the model are better.

[0096] Figure 14 In (c), the relationship between the average width of cracks between GT and SR is shown, and the corresponding correlation coefficient . Since the average width of the cracks is calculated by numerical methods, there will be some deviations in some images, which may be caused by various factors, such as errors in skeleton details and calculation errors of crack lengths. And given that the skeleton length has a certain volatility, the volatility of the average crack width will somehow lie between the volatility of the crack area and the crack length.

[0097] Figure 14 In (d), the relationship between the maximum crack widths based on GT and SR is shown. The corresponding calculated value is 0.9652. The obtained results show that there is a strong correlation between GT and SR, and the segmentation results of Frac-YOLOv8 can correctly reflect the actual shape of the cracks.

[0098] The above results indicate that Frac-YOLOv8 can better restore the geometric shape of the cracks, especially the area of the cracks, which is a key indicator in engineering applications. The estimation results are also very close to the true values of the crack area, which confirms the strong segmentation ability of the proposed model.

[0099] In Figure 15 , the quantization results of the test images F1 - F4 after segmentation by the Frac-YOLOv8 model are introduced in detail. For sample F1, the widths of the cracks are uneven, and one of the cracks is very similar to the background, causing greater interference, but the network can still accurately depict the shape of the cracks. Regarding sample F2, there is a small crack with an uneven "C"-shaped bend and extremely rough edges for the whole crack. Therefore, it is easy to have a low segmentation accuracy. The error in the estimated crack area of sample F2 is about 5.4%. This may be due to inaccurate crack segmentation, but this error is within the allowable range. In sample F3, the sample is a filled crack in a dense sandstone core, which is a large-scale crack. Since the upper and lower ends of this crack are slender and the middle part is wider, the error in the estimated crack area of sample F3 is about 8.5%, and the thinner part of the crack is not depicted very meticulously. However, the predicted length and average width of the crack in sample F3 are close to GT.

[0100] In sample F4, there is a shear crack in the core. As can be seen from sample F4, the shear crack contained in the crack can be successfully identified. The prediction results are closer to GT. Figure 15 In (b) and Figure 15The display results in (d) show that the segmentation results of all core fractures are close to the marked morphology. The results of these predicted segmentations confirm that the proposed model has strong adaptability to actual scenarios.

[0101] The line density of fractures (the number of fractures per unit length) directly affects the permeability and recoverability of tight sandstone reservoirs. Therefore, by quantifying the line density of fractures, the permeability of the reservoir, the fluid transmission capacity, and the potential production can be evaluated more accurately. Based on the segmentation of fractures by Frac-YOLOv8, the fractures identified by the network are counted to obtain the number of fractures, and further the line density of fractures is obtained. The algorithm was used to count 341 core fracture pictures, with the core length being 68.2 meters and a total of 817 fractures. Through numerical calculation, the line density of fractures can be obtained as 11.979 fractures / meter. The results of Frac-YOLOv8 counting fractures are as Figure 16 shown.

[0102] The efficient segmentation and quantification of fractures in tight sandstone natural cores are crucial for ensuring the safety and economy of tight sandstone reservoir development. The main contribution of this invention is to propose a new paradigm for the segmentation and quantification of fractures in tight sandstone natural cores. Specifically, it includes:

[0103] (1). The proposed model is based on deep learning and designs a network architecture. In terms of the network architecture: Aiming at the problems of low segmentation efficiency and cumbersome steps of traditional methods for 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 the YOLOv8-C-Frac network model; on this basis, a new type of BiFPN structure is proposed as the feature fusion network. The new type of BiFPN structure is an improvement of the BiFPN structure, and at the same time, combined with the weighted fusion mechanism, the segmentation performance of the algorithm for natural fractures in cores is improved.

[0104] (2) To quantify the fractures, according to the segmentation results, this invention uses the skeleton algorithm to calculate the length, area, and average width of the fractures. On this basis, a new variable circle algorithm is proposed to solve the maximum width problem. By comparing the inscribed circles in all connected domains, the diameter of the largest inscribed circle is selected as the maximum width of the fracture. Finally, the line density of the fractures is calculated by counting the number of fractures. The proposed fracture quantification algorithm also appropriately predicts the key geometric parameters of the fractures, including the number, line density, area, length, average width, and maximum width. The results of semantic segmentation of fractures in tight sandstone natural cores can be applied to the process of evaluating the structural condition of core fractures, improving the reliability and scientificity of the evaluation results.

[0105] (3)In the segmentation results, the mean average precision of the improved Frac-YOLOv8 reached 84.8%. At the same time, compared with the basic YOLOv8m network, the segmentation time was reduced by 16.39%, improving the network's segmentation speed, meeting the real-time requirements for deployment to embedded and mobile devices, and ensuring the performance of core natural fracture segmentation. In the quantization results, according to the comparison of actual quantization indicators and prediction indicators, the correlations of the fracture area, length, average width, and maximum width reached 0.9908, 0.9515, 0.9399, and 0.9652 respectively. This confirmed that the fracture quantization results were close to reality. Overall, the proposed method performed well, contributed to fracture segmentation and quantization, and had great practical application potential.

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

[0107] [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.

[0108] [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.

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for constructing a natural fracture characteristic parameter characterization model for a dense sandstone core, characterized in that: include: Step 100. Prepare a dataset of natural fracture images of dense sandstone cores; Based on the core fracture photos, LabelImg is used to calibrate the dataset of natural core fracture segmentation of dense sandstone. After using LabelImg to make the natural fracture dataset of dense sandstone core, the dataset of natural fracture of dense sandstone core is input into the network to let the network learn the natural fracture of dense sandstone core in the dataset and segment the natural fracture of dense sandstone core. Step 200. Establish an efficient adaptive Frac-YOLOv8 core natural fracture segmentation network; The upsampling module in the original neck of YOLOv8m is replaced with the lightweight CARAFE module, and a new neck network structure BiFPN is proposed in the neck of YOLOv8; Step 300, using the data set of natural fracture images of the core, training the Frac-YOLOv8 segmentation network to obtain a natural fracture segmentation model of the core; Step 400, inputting the natural fracture image of the dense sandstone core to be segmented into the natural fracture segmentation model of the core to segment the natural fractures of the core; The YOLOv8 segmentation model uses cross entropy loss and Dice Loss to train the segmentation task; Step 500, generating a binary crack data set from the segmented mask image; After Frac-YOLOv8 generates the predicted segmentation result according to step 100, digital image processing technology is used to obtain quantitative indicators; Step 600, using a crack skeleton extraction algorithm to extract the crack skeleton in the binary image and quantify the length of the crack; The coverage area of ​​the cracks in the image is evaluated by the pixel values, and the digital matrix of the binary image is converted from the predicted segmentation result and traversed pixel by pixel. The total number of pixels with a statistical value of 1 represents the crack area. The calculation is as follows: in represents the geometric calibration index, represents a finite small area of ​​a fracture element; Step 700, using a pixel statistical algorithm to calculate the number of pixels occupied by the crack, quantify the actual area of ​​the crack, and calculate the average width of the crack by the length of the crack; Step 800, using the crack variable circle algorithm to calculate the maximum width pixel value of the crack, and quantifying the maximum width through the pixel value of the inscribed circle diameter; Variable circle algorithm: Start with a circle with an initial diameter value, then change the diameter appropriately until the crack boundary of the circle domain is 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, traverse each connected domain and determine the maximum crack width of each domain, then the maximum value is regarded as the maximum crack width of the connected domain. By traversing each crack connection domain, a series of inscribed circles are obtained. Finally, the maximum diameters of a series of inscribed circles are compared. The maximum width of the cracks chosen for the entire image.

2. The method according to claim 1, characterized in that Step 100 includes: the image input through the input end, the input image size of the efficient Frac-YOLOv8 dense sandstone core natural fracture segmentation network is 640*640, and it usually includes an image preprocessing stage, that is, the input image is scaled to the input size of the network and normalized. In the network training stage, the efficient Frac-YOLOv8 dense sandstone core natural fracture segmentation network uses Mosaic data enhancement.

3. The method according to claim 2, characterized in that An efficient Frac-YOLOv8 natural fracture segmentation network for dense 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 cores: 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 transform the input The number of channels in the feature map is reduced to Then, through convolution operation, the number of channels is further converted into , and the content encoding process is realized in sequence. Then, the spatial dimension of the channel is expanded, and the generated upsampling kernel is subjected to softmax normalization to ensure that the sum of its weights is 1. Then, the feature reorganization stage is entered, and the position of each output feature map is reversely mapped to the input feature map, which is centered at the point. The original feature map of the region and the corresponding predicted upsampling kernel are subjected to dot product operation. Different channels share the same upsampling kernel at the same position, thus generating the final New feature map; Neck network structure BiFPN, BiFPN has the following design changes: (1) Connect nodes with the same feature graph size; (2) When the original input node and the output node are in the same layer, a new path is established to connect the original input node and the output node; (3) Introducing weighted feature fusion mechanism; Among them, the learning of weights in the weighted feature fusion mechanism adopts a fast normalization method, as shown in Formula 1, where, is the number of fused feature maps at the node; is the feature map input at the node; , To attach weights to the input feature map, randomly select initial weight values ​​between 0 and 1; A constant used to make the denominator non-zero. This method scales the weight range to [0,1]. After multiple trainings, the optimal weight is obtained to 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 the model training in step 300 are as follows: NVIDIA GeForce RTXA5000 GPU graphics card; software configuration: 64-bit windows11 operating system, pytorch-based detectron2 framework, CUDA11.3, OpenCV2 library and PyCharm integrated development environment.

6. The method according to claim 1, characterized in that The step 600 also includes using the Zhang-Suen thinning algorithm to obtain a core fracture skeleton with a single pixel width. In the Zhang-Suen algorithm, the image is divided into a foreground area and a background area. The pixel value of the midpoint in the foreground area is 1, and the pixel value of the midpoint in the background area is 0. The implementation steps of the Zhang-Suen algorithm are divided into two steps: The first step is to determine the test point according to the conditions in formula 7. The state is determined if If the eight neighborhoods of a point meet the conditions in formula 7, the state of the point is set to be deleted. If the conditions are not met, the point is temporarily retained. During the judgment process, the points that meet the conditions will not be deleted, but marked first. At the end of each iteration, all marked points will be deleted uniformly. The conditions that the eight neighborhoods of the test point need to meet are: In the formula, Represents the pixel value of the point to be tested and its eight neighborhoods in the image, The value of is 0 or 1. express The number of points with pixel value 1 in the eight-neighborhood of the point, Indicated in In the eight-neighborhood template of the point, Click to start Take the point as the center and circle clockwise for one cycle, accumulating the number of times the pixel value changes from 0 to 1; The second step is to determine the test point according to the conditions in formula 8. The state is judged. As in the first step, the points to be tested that meet the judgment conditions are marked and not deleted temporarily. When this iteration ends, that is, after traversing all the pixels in the image, the marked foreground points are uniformly deleted, and the loop iteration is continuously performed until all the pixels in the image do not meet the above conditions, then 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 Irregular cracks are calculated by summing up the parts, and the length is equal to the number of pixels in the skeleton whose statistic is 1 and is evaluated according to the following relationship: in, represents the infinitesimal finite length of the skeleton unit; Average crack width The evaluation is performed as follows: 。 8. The method according to claim 1, characterized in that Step 800 includes calculating the maximum width of cracks in natural cores of dense sandstone: first, the segmentation result of the model is converted into a gray image, then, all connected domains are searched and identified, a total of N, and the circumscribed rectangle of each connected domain is obtained according to the result, called RectA, next, RectA is gridded to obtain a series of coordinate points, represented in Point_List, and a combination of all points located in the connected domain needs to be selected, secondly, the coordinate points obtained in the previous step are traversed, a circle is drawn with each coordinate as the center, and the radius is increased until the circle is tangent to the edge of the crack, at this time, the radius is represented as Piont_R, and 2 times Point_R is used as the crack width corresponding to the point, and the crack width values ​​of all points are calculated, and then the maximum value is used as the maximum radius of the connected domain, that is, R, and R is recorded in the corresponding R_List, and then the connected domain is changed and the above process is performed, and finally, the largest one is selected from R_List, that is, the maximum radius in each connected domain, and twice the maximum value is used as the maximum crack width of the image.

Citation Information

Patent Citations

  • Rock core fracture extraction method and system

    CN108364278A

  • Method for identifying crack type based on core photograph

    CN113222923A

  • Crack-considered core-grade pore network model construction method

    CN117152373A

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

    CN119251714A

Cited By

  • Rock mass joint roughness real-time detection method based on improved YOLOv10 and augmented reality

    CN121304523A

  • Rock core photograph automatic correction and cutting method based on YOLOv8-seg and perspective transformation

    CN121707887A

  • Mask layout generation method, device and equipment and readable storage medium

    CN122154567A