Core quantitative analysis method and system based on visual base model adaptive migration

CN122391225BActive Publication Date: 2026-08-21STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610846059.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-08-21
Estimated Expiration
2046-06-12

AI Technical Summary

Technical Problem

1.复杂岩性下的高精度岩芯实例分割问题:解决模型在黄粘土、红粘土、灰岩与页岩等多类岩性条件下,受复杂纹理和断裂边界干扰导致分割不准的问题

Benefits of technology

1.本发明在预训练网络(ViT)的自注意力层内部嵌入低秩适配模块,并在前馈神经网络层后串行嵌入残差适配模块,同时结合多尺度特征金字塔进行跨尺度融合。在极低算力成本下(微调过程仅增加约1.31M参数),成功将视觉基础模型的全局感知能力由通用语义空间定向迁移至岩芯断口与岩体结构边界的特定感知空间。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391225B_ABST
    Figure CN122391225B_ABST
Patent Text Reader

Abstract

The application discloses a core quantitative analysis method and system based on visual basic model adaptive migration. The method first acquires a drilling core image with a physical scale parameter, and uses a fine-tuning visual basic model embedded with a low-rank adaptive and residual adaptive module and containing a multi-scale feature pyramid to analyze the preprocessed image, thereby generating a preliminary core instance mask set. Subsequently, by matching the centroid and the circumscribed rectangle projection on the reference horizontal axis, overlapping occlusion is eliminated and an effective core instance mask set is obtained. The effective mask is fitted with a minimum circumscribed rectangle to determine the real principal axis direction, and a real boundary intersection is extracted by bidirectional pixel-by-pixel sampling along the principal axis, and the effective pixel length is calculated. Finally, the effective length threshold is used for screening and summarizing after the physical real length is converted, and the rock quality index is output, thereby realizing the full-process automation from small sample large model migration to physical quantification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of computer vision and engineering geological exploration, and more specifically, to a method and system for core quantitative analysis based on adaptive migration of a visual basic model. Background Technology

[0002] Core logging is a crucial step in rock mass quality evaluation during underground engineering and engineering geological exploration. Among numerous evaluation indicators, RQD (Rock Quality Designation) is widely used to characterize the degree of rock mass fragmentation due to its clear definition and ease of calculation. Therefore, accurately obtaining rock mass structural information and effectively characterizing its engineering integrity is a key issue affecting engineering safety and economy.

[0003] Currently, the main technical means for acquiring core image information and RQD indicators include manual logging, traditional image processing methods, conventional deep learning methods, and general-purpose visual models. However, these existing technologies all have significant limitations when facing complex practical engineering applications. Specifically, traditional manual logging relies on manual identification of core fractures and length measurement for statistical analysis. In engineering contexts with a large number of boreholes and a fast construction pace, subjective differences among different personnel in fracture identification and length measurement can easily introduce systematic errors. To overcome the shortcomings of manual logging, traditional image processing methods have been introduced, using low-level visual features such as grayscale, edges, or shadows to separate the core from the background and then calculate the length. However, because actual cores often exhibit complex surface textures, uneven fracture development, and uncertain imaging lighting and placement, these low-level feature-dependent methods have weak generalization ability and are difficult to maintain stability. With the development of artificial intelligence, conventional deep learning methods based on convolutional neural networks (CNNs) are widely used in core image segmentation and detection. At the same time, general-purpose visual models such as SAM (SegmentAnything Model) guide the model to segment targets by introducing prompts. However, existing CNN models have limited adaptability to changes in core scale, areas with dense fractures, and regions with blurred boundaries. They lack cross-lithological validation, and their training heavily relies on manual annotation, making rapid deployment difficult. General-purpose large-scale vision models (such as SAM) suffer from adaptation issues for specialized scenarios. These general-purpose models are trained for natural scenes and are easily affected by non-target areas such as the core box background, labels, and characters on the core surface during core analysis, making it difficult to directly output single-core entity segmentation results that meet engineering precision.

[0004] In addition, existing technologies generally lack effective automated quantification mechanisms for RQD, which can easily lead to statistical errors when the rock core is broken and in contact with each other. Furthermore, directly using a horizontal bounding box to calculate the length will introduce systematic errors when the rock core is tilted, making it difficult to meet the high-precision engineering requirements.

[0005] Therefore, there is an urgent need in this field for a core analysis scheme that is highly generalizable, highly automated, and capable of accurate measurement, in order to overcome the many limitations of existing technologies and meet the urgent need of modern engineering geological exploration for high-precision evaluation of rock mass quality. Summary of the Invention

[0006] This invention proposes a core quantitative analysis method and system based on adaptive migration of a visual fundamental model, mainly addressing the following engineering and technical problems: 1. High-precision core segmentation problem under complex lithology: Solve the problem of inaccurate segmentation caused by complex textures and fracture boundaries in models under various lithological conditions such as yellow clay, red clay, limestone and shale.

[0007] 2. Statistical error caused by overlapping rock cores: This addresses the problem that in actual shooting, rock cores may come into contact with or overlap each other due to breakage or improper placement, thus affecting the accuracy of RQD calculation.

[0008] 3. Distortion in length measurement when cores are tilted: This addresses the systematic measurement error caused by local rotation or tilting of the core when extracting length using a horizontal bounding box, a traditional method.

[0009] To achieve the above-mentioned objectives, the present invention adopts the following technical solution.

[0010] In a first aspect, this invention discloses a core quantitative analysis method based on adaptive transfer of a visual fundamental model, comprising: Acquire the borehole core images to be processed and obtain the physical scale parameters; The borehole core images are preprocessed, and a visual foundation model finely tuned using a low-rank adaptation self-attention mechanism is used to extract and parse features from the preprocessed core images, generating a preliminary set of core instance masks. The visual foundation model includes a pre-trained network and a multi-scale feature pyramid. The pre-trained network embeds a low-rank adaptation module and a residual adaptation module. The multi-scale feature pyramid is used for cross-scale fusion based on the features output by the pre-trained network. Calculate the geometric centroid of each preliminary core instance mask and project it onto the reference horizontal axis. Based on the matching relationship of the projection intervals of adjacent preliminary core instance masks on the reference horizontal axis, determine and eliminate overlapping masks to obtain a set of valid core instance masks. For each valid core instance mask in the set of valid core instance masks, fit the minimum bounding rectangle to determine the true principal axis direction, determine the intersection point with the true boundary of the valid core instance mask along the true principal axis direction, and calculate the effective pixel length between the two intersection points of the true boundary. Using the physical scale parameter, the length of each effective pixel is converted into the physical true length, and an effective length threshold is set. The physical true lengths of all cores that are greater than or equal to the effective length threshold are summarized, and the quantitative analysis results corresponding to the borehole core image are calculated.

[0011] Preferably, obtaining physical scale parameters specifically includes: Identify the standard reference object contained in the borehole core image and obtain the actual physical length of the standard reference object; Boundary recognition is performed on the borehole core image to obtain the pixel length of the standard reference object in the image; The physical scale parameter is calculated based on the ratio between the actual physical length and the corresponding pixel length.

[0012] Preferably, the pre-trained network is a pre-trained Vision Transformer network containing multiple encoder blocks, each of which contains a self-attention layer and a feedforward neural network layer; The low-rank adaptation module is embedded in the self-attention layer and is used to perform low-rank decomposition and update the projection matrix inside the self-attention layer. During the feature forward propagation process, the current input features pass through the original fixed weight path and the low-rank weight path of the low-rank adaptation module in parallel and are added together. The residual adaptation module is embedded serially after the feedforward neural network layer. The residual adaptation module constructs a bottleneck structure by sequentially connecting a dimension-reducing linear mapping, a nonlinear activation function, and a dimension-upgrading linear mapping, performs local perturbation processing on the features, and adds the residuals of the processed features and the unprocessed features.

[0013] Preferably, a multi-scale feature pyramid is constructed based on the features obtained from the pre-trained network for cross-scale fusion, specifically including: Extract the final layer feature map generated by the pre-trained network, reshape and downsample the final layer feature map to construct the multi-scale feature pyramid; the multi-scale feature pyramid contains multiple layers of feature maps with progressively increasing resolution from top to bottom; Between adjacent levels of the multi-scale feature pyramid, an upsampling operation is used to enlarge the low-resolution feature map to the size of the adjacent high-resolution feature map. Figure 1 The scaled-up low-resolution feature map is then combined with the high-resolution feature map using feature addition and convolution smoothing.

[0014] Preferably, the geometric centroid of each preliminary core instance mask is calculated and projected onto a reference horizontal axis. Based on the matching relationship of the projection intervals of adjacent preliminary core instance masks on the reference horizontal axis, overlapping masks are determined and eliminated to obtain a set of valid core instance masks. Specifically, this includes: The length extension direction of the core box in the borehole core image is determined as the reference horizontal axis; Calculate the geometric centroid of each of the preliminary core instance masks, and project the geometric centroid onto the reference horizontal axis to obtain the centroid projection point. At the same time, extract the maximum circumscribed rectangular projection range of each of the preliminary core instance masks on the reference horizontal axis. Compare the horizontal projection lengths of adjacent preliminary core sample masks on the reference horizontal axis and distinguish them into long core masks and short core masks; The positional relationship determination logic is as follows: if the centroid projection point of the short core mask falls within the maximum circumscribed rectangular projection range of the adjacent long core mask, then it is determined that the two overlap. Extract the overlapping projection intervals of the short core mask and the long core mask that are determined to be overlapping. Subtract the length of the overlapping projection interval from the horizontal projection length of the short core mask to obtain the effective pixel span. If the physical effective length calculated based on the effective pixel span is less than a preset length threshold, the corresponding short core mask is removed. The retained preliminary core instance masks and the core instance masks after deducting the overlapping area are summarized to obtain the effective core instance mask set.

[0015] Preferably, the intersection point of the real boundary with the mask of the effective core sample is determined along the real principal axis direction, and the effective pixel length between the two real boundary intersection points is calculated, specifically including: Obtain the center coordinates and the direction angle of the long side of the minimum bounding rectangle, and define the extension direction along the direction angle of the long side as the true principal axis direction; Starting from the center coordinates, pixel-by-pixel step sampling is performed along the real principal axis direction and the opposite direction of the real principal axis direction, respectively. During the step sampling process in each direction, the pixel value of the current coordinate point is extracted. When the pixel value is detected to change abruptly from the mask-covered area to the non-mask-covered area, the coordinates of the abrupt change position are recorded as the intersection of the real boundaries, thereby obtaining the two intersections of the real boundaries at both ends of the real main axis. Calculate the Euclidean distance between the two intersection points of the real boundaries, and use the Euclidean distance as the effective pixel length.

[0016] Preferably, the calculation of the quantitative analysis results corresponding to the borehole core image specifically includes: Obtain the total borehole footage length corresponding to the borehole core image; divide the sum of the total physical lengths by the total borehole footage length to calculate the quantitative analysis result.

[0017] Secondly, this invention also discloses a core quantitative analysis system based on adaptive transfer of a visual fundamental model, which runs the core quantitative analysis method based on adaptive transfer of a visual fundamental model described in the first aspect, including: The data acquisition module is used to acquire borehole core images to be processed and to obtain physical scale parameters; A deep learning intelligent interpretation module is used to preprocess the borehole core images. It utilizes a visual foundation model finely tuned based on a low-rank adaptation self-attention mechanism to extract and parse features from the preprocessed borehole core images, generating a preliminary set of core instance masks. The visual foundation model includes a pre-trained network and a multi-scale feature pyramid. The pre-trained network embeds a low-rank adaptation module and a residual adaptation module. The multi-scale feature pyramid is used for cross-scale fusion based on the features output by the pre-trained network. The overlapping core elimination module is used to calculate the geometric centroid of each preliminary core instance mask and project it onto the reference horizontal axis. Based on the matching relationship of the projection intervals of adjacent preliminary core instance masks on the reference horizontal axis, it determines and eliminates overlapping masks to obtain a set of valid core instance masks. The true length extraction module is used to fit the minimum bounding rectangle to each effective core instance mask in the effective core instance mask set to determine the true principal axis direction, determine the true boundary intersection point with the effective core instance mask along the true principal axis direction, and calculate the effective pixel length between the two true boundary intersection points; The index calculation and output module is used to convert the length of each effective pixel into the physical true length using the physical scale parameter, set an effective length threshold, summarize the physical true length of all cores that are greater than or equal to the effective length threshold, and calculate the quantitative analysis result corresponding to the borehole core image.

[0018] Thirdly, the present invention discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the processor executes the program, it implements the steps of the core quantitative analysis method based on visual basic model adaptive migration as described in the first aspect.

[0019] Fourthly, the present invention discloses a computer-readable storage medium storing computer program instructions, which, when read and executed by a processor, implement the core quantitative analysis method steps based on adaptive migration of a visual fundamental model as described in the first aspect.

[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention embeds a low-rank adaptation module within the self-attention layer of a pre-trained network (ViT) and sequentially embeds a residual adaptation module after the feedforward neural network layer, while simultaneously combining a multi-scale feature pyramid for cross-scale fusion. With extremely low computational cost (the fine-tuning process adds only about 1.31M parameters), it successfully transfers the global perception capability of the visual base model from the general semantic space to the specific perception space of core fractures and rock mass structure boundaries.

[0021] 2. To address the physical overlap of core samples caused by compression and collision within the core tray, this invention proposes a decision logic that projects the geometric centroid of the initial core sample mask onto a reference horizontal axis and matches its positional relationship with the maximum circumscribed rectangular projection interval of its adjacent masks. Simultaneously, an effective length threshold (e.g., 10cm) is introduced as a filtering condition into the elimination process, achieving precise removal of overlapping masks and adaptive extraction of effective masks.

[0022] 3. This invention employs a method of fitting the minimum bounding rectangle of an effective core sample mask to determine the true principal axis direction, and then extracting the true boundary intersection points by bidirectional step sampling along this principal axis. This design accurately solves the problem of pixel span measurement distortion caused by irregular placement and local rotation of the core within the box, obtaining a high-precision effective pixel length.

[0023] Based on the above-mentioned core structural and logical innovations, this method achieves the following comprehensive performance in practical engineering applications: This method has achieved stable segmentation in various complex lithologies such as yellow clay, red clay, limestone and shale, and has excellent performance in comprehensive evaluation index (MIoU reaches 0.881 and AP reaches 0.882 under the optimal configuration), which solves the problem of poor cross-lithology generalization of traditional methods.

[0024] By employing adaptive overlap resolution and principal axis length extraction, the impact of short fragment core boundaries and placement tilt on statistics is effectively reduced. Compared to manual measurements, this method demonstrates extremely high consistency in RQD calculations, eliminating systematic errors caused by subjective human judgment.

[0025] Low computational resource consumption and easy engineering deployment: Compared with the full-parameter fine-tuning model, the parameter efficient fine-tuning strategy (PEFT) adopted in this solution greatly reduces the number of training parameters while ensuring extremely high accuracy, significantly reducing hardware requirements and facilitating rapid iteration and deployment in engineering sites and edge devices. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the visual basic model architecture provided in an embodiment of the present invention; Figure 2This is a schematic diagram of overlapping core calculation provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the length measurement principle provided in an embodiment of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.

[0028] Example 1: This invention proposes a core quantification analysis method based on adaptive transfer of a visual fundamental model. By performing lightweight task transfer on a pre-trained large visual model and combining it with geometric morphological post-processing, high-precision interpretation is achieved. The specific scheme is as follows: S1: Obtain the borehole core image to be processed and obtain the physical scale parameters.

[0029] In S1, the physical scale parameters are obtained, specifically including: Identify the standard reference object contained in the borehole core image and obtain the actual physical length of the standard reference object; Boundary recognition is performed on the borehole core image to obtain the pixel length of the standard reference object in the image; The physical scale parameter is calculated based on the ratio between the actual physical length and the corresponding pixel length.

[0030] Specifically, an industrial camera or other high-resolution imaging device is used to acquire RGB images of the core surface under natural light or auxiliary light source conditions as the borehole core image. To establish the mapping relationship between pixel scale and true physical scale, this invention eliminates the need for complex environmental calibration. Instead, it directly utilizes known core diameter information or standard markings on the core tray, or, when the core integrity is high, directly uses known core diameter information as a standard reference. By performing edge detection (such as the Canny operator) or contour extraction on the acquired images, the lateral boundaries of the core or the tray markings are identified, thereby obtaining the lateral pixel length occupied by the standard reference in the image. Combined with the actual known physical diameter or actual physical length of the borehole to which the core belongs. Then the physical scale parameters are calculated as follows:

[0031] Where K is the physical scale parameter, and the unit is millimeters per pixel.

[0032] In the process of processing a large number of images of the same drilling project or core samples of the same specification, since the camera distance and the physical diameter of the core remain constant, the scale parameter K can be obtained through a single calibration and used as a fixed conversion coefficient globally. This eliminates the tedious step of calibrating each image individually, significantly improving the efficiency of automatic processing of large numbers of core images at the engineering site. The physical scale parameter is used to convert the pixel-level prediction results output by the subsequent visual model into a true physical quantitative indicator, that is, to calculate the true effective length of the core, thereby providing accurate data support for the final RQD index quantification.

[0033] S2: As Figure 1 As shown, the borehole core images are preprocessed, and a visual foundation model finely tuned using a low-rank adaptation self-attention mechanism is used to extract and parse features from the preprocessed borehole core images, generating a preliminary core instance mask set. The visual foundation model includes a pre-trained network and a multi-scale feature pyramid. The pre-trained network embeds a low-rank adaptation module and a residual adaptation module. The multi-scale feature pyramid is used for cross-scale fusion based on the features output by the pre-trained network.

[0034] In S2, the specific operating logic of the pre-trained network and each adaptation module includes: The pre-trained network is a pre-trained Vision Transformer network containing multiple encoder blocks, each of which contains a self-attention layer and a feedforward neural network layer. The low-rank adaptation module is embedded in the self-attention layer and is used to perform low-rank decomposition and update the projection matrix inside the self-attention layer. During the feature forward propagation process, the current input features pass through the original fixed weight path and the low-rank weight path of the low-rank adaptation module in parallel and are added together. The residual adaptation module is embedded serially after the feedforward neural network layer. The residual adaptation module constructs a bottleneck structure by sequentially connecting a dimension-reducing linear mapping, a nonlinear activation function, and a dimension-upgrading linear mapping, performs local perturbation processing on the features, and adds the residuals of the processed features and the unprocessed features.

[0035] Specifically, the borehole core images acquired in S1 are preprocessed and then input into a visual base model fine-tuned based on a low-rank adaptation self-attention mechanism to extract and output a preliminary set of core instance masks. The visual base model uses a pre-trained Vision Transformer (ViT) network and achieves transfer to the field of rock engineering by introducing parameter efficient fine-tuning (PEFT) technology. (1) Fine-tuning of self-attention mechanism based on low-rank adaptation (LoRA): To address the issue that pre-trained weights in natural images tend to favor contrast regions, thus weakening the sensitivity to fracture surfaces in real rock cores, this invention implements low-rank updates for the query (Q), key (K), and value (V) projection matrices in the encoder. Considering the high dimensionality of the attention matrix, direct full-parameter fine-tuning is prone to overfitting. Based on the assumption that task feature changes typically reside in low-dimensional subspaces, a low-rank decomposition method is used to update the weights. The update formula is as follows:

[0036] in, This is the updated final weight matrix. The weight matrix is ​​a pre-trained fixed weight matrix with a dimension of d×k; A ∈R d×r and B ∈R r×k Let be a learnable low-rank matrix, where d is the dimension of the original input features; k is the dimension of the output features; and r is the set low-rank size, satisfying r min(d,k).

[0037] In actual forward propagation, the current input features pass through the original fixed-weight path in parallel. With low-rank weighted pathways The features are then summed. This strategy is equivalent to applying a rank constraint perturbation to the attention distribution, which enhances the model's sensitivity to core end faces and regions of structural abrupt changes without compromising its original global modeling capabilities.

[0038] (2) Residual adapter feature space offset: To further suppress background noise from different lithologies, a lightweight residual adapter module is embedded in each Transformer encoder block of the pre-trained network. Specifically, the residual adapter module is embedded serially after the feedforward neural network (FFN or MLP) layers. This module employs a bottleneck structure, and its forward propagation expression is:

[0039] in, For the current input features, P down ∈R m×d To compress the original d-dimensional features into a lower-dimensional space m, a dimension-reduced linear mapping (m... d), It is a non-linear activation function. P up ∈R d×mTo restore the linear mapping to the original dimension, a small number of trainable parameters are introduced to achieve local perturbation of the feature space. This effectively avoids the instability of large-scale parameter updates under limited sample size, causing the feature distribution to shift directionally towards the rock mass structure space.

[0040] (3) Construction of a single-branch multi-scale pyramid based on the features of the last layer: Based on the features obtained from the pre-trained network, a multi-scale feature pyramid is constructed for cross-scale fusion, specifically including: Extract the final layer feature map generated by the pre-trained network, reshape and downsample the final layer feature map to construct the multi-scale feature pyramid; the multi-scale feature pyramid contains multiple layers of feature maps with progressively increasing resolution from top to bottom; Between adjacent levels of the multi-scale feature pyramid, an upsampling operation is used to enlarge the low-resolution feature map to the size of the adjacent high-resolution feature map. Figure 1 The scaled-up low-resolution feature map is then combined with the high-resolution feature map using feature addition and convolution smoothing.

[0041] Specifically, considering the significant differences in single-unit lengths in core images (including complete long cores and short fragments), relying solely on single-layer feature segmentation can easily lead to missed detections or incomplete boundaries. Unlike traditional methods that extract multi-layer features, a multi-scale feature system is constructed based on the last layer features output by the pre-trained network. A top-down fusion approach is used to achieve cross-scale information transfer, expressed as:

[0042] in, Representing the The feature map output by the feature pyramid is used for subsequent identification of core instances at different scales; The spatial resolution of the pre-trained network's final layer features, after reshaping and downsampling / smoothing, is equal to that of the original input image. The feature map to be fused is multiplied by 100; The top-level low-resolution feature map serves as the initial input for top-down fusion. This represents a 3x3 convolution operation, used for feature extraction and channel smoothing. This represents an upsampling operation. In this embodiment, the upsampling specifically employs the bilinear interpolation method to enlarge the low-resolution feature map to match adjacent high-resolution features. Figure 1 The design achieves consistent dimensions, thereby aligning and fusing semantic information. While ensuring the overall structural integrity of long cores, it enhances the ability to identify the boundaries of short, fragmented cores, thus reducing the statistical error of RQD (Rock Quality Index) caused by scale mismatch.

[0043] The fused multi-scale features are input into a pre-defined instance segmentation decoder (e.g., a decoder based on Mask2Former or Mask R-CNN architecture). Through a dual branch of bounding box regression and mask prediction, or through instance identifier assignment, mutually independent preliminary core instance mask sets are generated.

[0044] (4) Design of joint loss function for core structure combining boundary awareness and topological connectivity During the model training phase, to address the shortcomings of general instance segmentation loss functions (such as standard cross-entropy or Dice loss) that are not sensitive enough to fracture edges in core samples and are prone to misjudging and cutting long core samples, this invention constructs a joint loss function tailored to the special morphology of core samples. This guides the model to focus on the precision of fracture boundaries and the overall physical connectivity of the core sample. Its expression is:

[0045] in, Basic instance segmentation loss (such as Mask Loss and Bounding Box Loss); and These are dynamic weight hyperparameters used to balance the gradient contributions of various losses.

[0046] Boundary distance penalty loss To specifically penalize prediction errors at fracture edges, edge extraction is first performed on a real core mask, and a distance transformation map is calculated. Let... For pixels in the image Construct an exponentially decaying edge weight matrix W at the Euclidean distance to the nearest real core boundary, and assign weights to each element within it. The calculation is as follows:

[0047] in, It is an exponential function with the natural constant e as its base; The scale parameter controls the range of Gaussian decay. This weight matrix assigns a higher penalty weight to pixels near the true boundaries. Combined with the binary cross-entropy loss, the boundary-aware loss is defined as:

[0048] In the formula, N is the total number of pixels involved in the calculation; The binary cross-entropy loss function; For pixels The true label, This represents the predicted probability of the model. This loss forces the model to produce a sharper and more accurate segmentation response at complex boundaries where core fractures overlap.

[0049] Main axis topological connectivity loss To prevent the same long core sample from being incorrectly segmented into multiple discrete fragments during prediction due to surface mud cake or local cracks, a morphological skeleton constraint is introduced. First, a morphological thinning algorithm is used to extract the single-pixel-wide topological skeleton of the actual core mask. Define the prediction mask. For real skeleton The coverage rate is the topological recall rate, which is then converted into a penalty term:

[0050] In the formula, skeleton Total number of pixels contained To predict the activation probability of the mask at the skeleton pixel location. If the model misidentifies a long rock core, the continuous skeleton at the fracture point will not be covered by the predicted mask, resulting in a large topological loss penalty. This design effectively ensures the physical continuity of the model output mask in the principal axis direction, providing lossless data input for subsequent principal axis extraction and effective length calculation.

[0051] During the model evaluation phase, the average intersection-over-union ratio (MIoU), average precision (AP), and average recall (AR) are used to optimize and solidify the model parameters, thus completing the fine-tuning training.

[0052] S3: Calculate the geometric centroid of each preliminary core instance mask and project it onto the reference horizontal axis. Based on the matching relationship of the projection intervals of adjacent preliminary core instance masks on the reference horizontal axis, determine and eliminate overlapping masks to obtain a set of valid core instance masks, specifically including: The length extension direction of the core box in the borehole core image is determined as the reference horizontal axis; Calculate the geometric centroid of each of the preliminary core instance masks, and project the geometric centroid onto the reference horizontal axis to obtain the centroid projection point. At the same time, extract the maximum circumscribed rectangular projection range of each of the preliminary core instance masks on the reference horizontal axis. Compare the horizontal projection lengths of adjacent preliminary core sample masks on the reference horizontal axis and distinguish them into long core masks and short core masks; The positional relationship determination logic is as follows: if the centroid projection point of the short core mask falls within the maximum circumscribed rectangular projection range of the adjacent long core mask, then it is determined that the two overlap. Extract the overlapping projection intervals of the short core mask and the long core mask that are determined to be overlapping. Subtract the length of the overlapping projection interval from the horizontal projection length of the short core mask to obtain the effective pixel span. If the physical effective length calculated based on the effective pixel span is less than a preset length threshold, the corresponding short core mask is removed. The retained preliminary core instance masks and the core instance masks after deducting the overlapping area are summarized to obtain the effective core instance mask set.

[0053] Specifically, the initial core sample mask output by S2 has an overlap and occlusion problem caused by the core being squeezed and broken within the box. The following logic is executed to determine this: ① Projection Matching: First, the length extension direction of the core box is determined as the reference horizontal axis. In a preferred embodiment, to eliminate projection errors caused by the overall tilt during image capture, a direction alignment operation is performed on the input core image before calculating the projection; for example, the straight boundary of the core box or the edge of the core groove is identified by an edge detection algorithm, and the overall tilt angle of the image is calculated accordingly for rotation correction, so that the length extension direction of the core box is strictly parallel to the horizontal coordinate axis (i.e., the X-axis) of the image. The geometric centroid of each preliminary core instance mask is calculated. The geometric centroid is obtained by averaging the pixel coordinates in the preliminary core instance mask. Then, the centroid coordinates are projected onto the horizontal axis (i.e., the length extension direction of the core box) to obtain the horizontal projection point of the centroid of each instance. .

[0054] Simultaneously, the maximum circumscribed rectangular projection range of the mask for each preliminary core sample is extracted on the horizontal axis. .in, This represents the left boundary position of the instance on the horizontal axis. This represents the right boundary position of the core instance on the horizontal axis. This projection range describes the spatial extent of the core instance along the length of the core box.

[0055] ② Resolution Logic: Based on the maximum circumscribed rectangular projection range of each core instance mask extracted in step ① on the reference horizontal axis. Calculate the horizontal projection length of each adjacent core sample. When determining whether adjacent core samples overlap, it is necessary to first compare their horizontal projection lengths. This clearly distinguishes between longer core masks and shorter core masks. Then, the positional relationship judgment logic is executed: if the centroid projection point of the shorter core mask... The projection range of the adjacent long rock core If the short core and the long core are found to be vertically overlapping in physical space, it is determined that they are physically overlapping.

[0056] Combination Figure 2 As shown, with two spatially adjacent lengths respectively and Taking the rock core as an example, we calculated and obtained its geometric centroid. and Determine the short rock chip segment (corresponding to...) The center of mass of ) Whether the long core sample falls in the horizontal direction (corresponding to) If the projection falls within the bounded rectangle of the first rectangle, it is determined that there is an overlap between the two, and the subsequent overlapping interval deduction operation is performed.

[0057] ③ Threshold Filtering: For short core masks determined to be overlapping, at the pixel level, the overlapping areas of the short core mask and the long core mask are subtracted (or Boolean difference) to generate an updated short core mask after deducting the overlapping area. Simultaneously, the effective pixel span of this updated short core mask on the horizontal axis is extracted and multiplied by the physical scale parameter in S1 to obtain the effective physical length. If the effective length is less than 10cm (the engineering statistics threshold), the fragment instance is removed from the statistical queue to avoid duplicate counting or false alarms. When the effective length is greater than or equal to the threshold, the short core mask is retained for subsequent core length statistics and quality index calculations. Finally, the retained preliminary core instance masks and the core instance masks after deducting the overlapping area are summarized to obtain the set of effective core instance masks used for the final output.

[0058] S4: Fit the minimum bounding rectangle for each valid core instance mask in the set of valid core instance masks to determine the true principal axis direction, determine the true boundary intersection point with the valid core instance mask along the true principal axis direction, and calculate the effective pixel length between the two true boundary intersection points.

[0059] Determine the intersection point of the true boundary with the mask of the effective core instance along the true principal axis direction, and calculate the effective pixel length between the two intersection points of the true boundaries, specifically including: Obtain the center coordinates and the direction angle of the long side of the minimum bounding rectangle, and define the extension direction along the direction angle of the long side as the true principal axis direction; Starting from the center coordinates, pixel-by-pixel step sampling is performed along the real principal axis direction and the opposite direction of the real principal axis direction, respectively. During the step sampling process in each direction, the pixel value of the current coordinate point is extracted. When the pixel value is detected to change abruptly from the mask-covered area to the non-mask-covered area, the coordinates of the abrupt change position are recorded as the intersection of the real boundaries, thereby obtaining the two intersections of the real boundaries at both ends of the real main axis. Calculate the Euclidean distance between the two intersection points of the real boundaries, and use the Euclidean distance as the effective pixel length.

[0060] Specifically, the set of valid core sample masks retained after filtering in step S3 is subjected to geometric morphological processing to eliminate measurement errors caused by the tilted placement of cores within the core box, and physical indicators are obtained using geometric morphological methods: ① Fitting the circumscribed rectangle: Fit the minimum circumscribed rectangle for each identified valid core sample mask to determine its true principal axis direction. The center coordinates of this minimum circumscribed rectangle can be obtained. , Circumscribed rectangle's long side direction angle The lengths of the major and minor axes of the circumscribed rectangle are defined. The direction of the long side of the circumscribed rectangle is defined as the true principal axis direction of this core sample.

[0061] ②Major axis pixel extraction: Based on the center coordinates of the minimum bounding rectangle obtained from the fitting... Angle with the long side of the circumscribed rectangle A geometric equation for the central axis extending along the true principal axis direction is established. To obtain the intersection point of this axis with the true boundary of the core sample mask, this embodiment specifically employs a pixel-based bidirectional traversal method: using the center coordinates... Starting from the principal axis, the angles are calculated along the true principal axis. and its opposite direction ( Perform pixel-by-pixel step sampling.

[0062] At each step, the pixel value of the current coordinate point within the mask of the effective core instance is extracted. When a pixel value abruptly changes from inside the core mask (i.e., the effective core area) to a non-mask-covered area (i.e., the non-core area), the coordinates of this abrupt change location are recorded as the intersection of the true boundary. Through this bidirectional traversal, the coordinates of the two endpoints of the principal axis are obtained. and The pixel distance P between endpoints is calculated using the Euclidean distance formula, which is as follows:

[0063] This distance P represents the effective pixel length of the principal axis of this core sample. Combined with... Figure 3 As shown, this invention fits the minimum bounding rectangle for each core example (as shown in the white box in the figure). After bidirectionally traversing along its true principal axis to obtain the boundary intersection points, the calculated distance P is... Figure 3 The span of the white lines inside each core sample.

[0064] S5: Using the physical scale parameter, convert the length of each effective pixel into the physical true length, set an effective length threshold, summarize the physical true lengths of all cores that are greater than or equal to the effective length threshold, and calculate the quantitative analysis results corresponding to the borehole core image.

[0065] The calculation yields the quantitative analysis results corresponding to the borehole core images, specifically including: Obtain the total borehole footage length corresponding to the borehole core image; divide the sum of the total physical lengths by the total borehole footage length to calculate the quantitative analysis result; The effective length threshold is set to 10cm, or 100mm.

[0066] Specifically, using the physical scale parameter K in S1, the effective pixel length extracted by S4 is converted into the physical true length L. The conversion formula is as follows:

[0067] Based on the actual physical length of all valid core segments, the RQD index (i.e., the quantitative analysis result) is calculated and output. The calculation formula is as follows:

[0068] in, This refers to the total drilling length in a single operation. For the i-th segment to satisfy the effective length threshold (i.e.) The physical true length of the core, where n is the total number of valid core segments that meet the threshold condition.

[0069] like Figure 3 As shown in the figure to The diagram visually illustrates the actual physical length of each effective core segment after threshold screening (i.e., the length in the formula). The horizontal span at the bottom of the diagram indicates the total drilling length. The above formula enables intelligent RQD quantization from 2D images to 3D physical space.

[0070] Example 2: The core quantitative analysis system based on visual fundamental model adaptive transfer operates the core quantitative analysis method based on visual fundamental model adaptive transfer as described in Example 1, including: The data acquisition module is used to acquire borehole core images to be processed and to obtain physical scale parameters; A deep learning intelligent interpretation module is used to preprocess the borehole core images. It utilizes a visual foundation model finely tuned based on a low-rank adaptation self-attention mechanism to extract and parse features from the preprocessed borehole core images, generating a preliminary set of core instance masks. The visual foundation model includes a pre-trained network and a multi-scale feature pyramid. The pre-trained network embeds a low-rank adaptation module and a residual adaptation module. The multi-scale feature pyramid is used for cross-scale fusion based on the features output by the pre-trained network. The overlapping core elimination module is used to calculate the geometric centroid of each preliminary core instance mask and project it onto the reference horizontal axis. Based on the matching relationship of the projection intervals of adjacent preliminary core instance masks on the reference horizontal axis, it determines and eliminates overlapping masks to obtain a set of valid core instance masks. The true length extraction module is used to fit the minimum bounding rectangle to each effective core instance mask in the effective core instance mask set to determine the true principal axis direction, determine the true boundary intersection point with the effective core instance mask along the true principal axis direction, and calculate the effective pixel length between the two true boundary intersection points; The index calculation and output module is used to convert the length of each effective pixel into the physical true length using the physical scale parameter, set an effective length threshold, summarize the physical true length of all cores that are greater than or equal to the effective length threshold, and calculate the quantitative analysis result corresponding to the borehole core image.

[0071] This embodiment uses the core logging of a large-scale water conservancy and hydropower project as its application background, and specifically includes: 1. Data Acquisition and Preprocessing First, the core samples placed in a standard core box were vertically photographed using a high-resolution camera (or mobile device). The images covered a variety of typical lithologies, including yellow clay, red clay, limestone, and shale. After acquisition, the images were denoised using median filtering and then uniformly adjusted to a standardized input format of 512×512 pixels.

[0072] 2. Core Algorithm Deployment and Inference Process Model construction: The pre-trained Vision Transformer (ViT-B / 16) is used as the pre-trained network. A LoRA (low-rank adaptation) module with a rank of 8 is embedded in the projection matrix of the self-attention layer, and a residual adaptation module is embedded serially after the feedforward neural network layer. At the same time, multi-scale feature pyramids are combined for cross-scale fusion.

[0073] Feature extraction and segmentation: After the preprocessed image is input into the model, the pre-trained network and each adaptation module capture key geological features such as core edges, fracture surfaces and texture abrupt changes through efficient parameter fine-tuning; the multi-scale feature pyramid further integrates deep and shallow semantics, and finally interprets and generates an independent preliminary core instance mask set, accurately separating each core instance from the complex background (core box, label, mud and water stains).

[0074] 3. RQD Automated Quantization Steps Overlap Removal: The geometric centroids of adjacent preliminary core sample masks are calculated and projected onto a reference horizontal axis. If physical overlap of core segments is detected, the effective span of the non-overlapping region is determined and extracted according to the removal logic proposed in this invention. If the calculated effective physical length is less than 10cm, it is automatically discarded to ensure that it is not included in the effective RQD value, and finally, a set of effective core sample masks is obtained.

[0075] High-precision length measurement: Fit the minimum bounding rectangle for each segment of the mask in the effective core instance mask set, determine the true principal axis direction by the direction angle of the long side of the rectangle, traverse bidirectionally along the true principal axis direction to extract the true boundary intersection points, and calculate the effective pixel length P between the two intersection points.

[0076] Output: Based on the physical scale parameter K determined by the camera focal length and shooting distance, calculate the physical true length L = P × K. Count the total length of all core samples with L ≥ 10 cm, divide it by the total drilling length of that run, and obtain the quantitative analysis result (i.e., RQD value) for that section of the borehole.

[0077] 4. Statistical Analysis of Experimental Results Tested on real engineering datasets, this implementation method achieves an average intersection-to-union (MIoU) ratio of 0.881 on complex lithology datasets. Compared with traditional manual logging results, the RQD calculation error is less than 5%, and the processing time for a single core box is reduced to the second level, significantly improving the objectivity and efficiency of geological logging.

[0078] 5. Description of Alternative Solutions Algorithm framework equivalent replacement: Although the ViT model is preferred in this embodiment, those skilled in the art will understand that using Swin Transformer or other deep learning frameworks with attention mechanisms as the pre-trained network, combined with the low-rank adapter or residual adapter structure described in this invention, can also achieve the technical objectives of this invention, and should all be included in the protection scope of this invention.

[0079] Morphological logic equivalent replacement: For the overlap resolution logic, if the centroid projection matching is replaced with other equivalent two-dimensional geometric morphological projection processing logic, but the minimum bounding rectangle and the true principal axis length measurement logic described in this invention are still used in the quantization stage, it also falls within the protection scope of this invention.

[0080] Application platform expansion: The solution of this invention can be deployed as an automated processing system on a cloud server, or it can be transformed into a lightweight embedded plug-in and integrated into terminal devices such as UAV aerial survey base stations or handheld geological loggers.

[0081] Example 3: An electronic device includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the processor executes the program, it implements the steps of the core quantitative analysis method based on visual fundamental model adaptive migration as described in Embodiment 1.

[0082] Example 4: A computer-readable storage medium storing computer program instructions, which, when read and executed by a processor, implement the steps of the core quantitative analysis method based on adaptive migration of a visual basic model as described in Embodiment 1.

[0083] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0084] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0085] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0086] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0087] 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 it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A core quantitative analysis method based on adaptive transfer of visual fundamental model, characterized in that, include: Acquire the borehole core images to be processed and obtain the physical scale parameters; The borehole core images are preprocessed, and a visual foundation model finely tuned using a low-rank adaptation self-attention mechanism is used to extract and parse features from the preprocessed core images, generating a preliminary set of core instance masks. The visual foundation model includes a pre-trained network and a multi-scale feature pyramid. The pre-trained network embeds a low-rank adaptation module and a residual adaptation module. The multi-scale feature pyramid is used for cross-scale fusion based on the features output by the pre-trained network. The pre-trained network is a pre-trained Vision Transformer network containing multiple encoder blocks, each of which contains a self-attention layer and a feedforward neural network layer. The low-rank adaptation module is embedded in the self-attention layer and is used to perform low-rank decomposition and update the projection matrix inside the self-attention layer. During the feature forward propagation process, the current input features pass through the original fixed weight path and the low-rank weight path of the low-rank adaptation module in parallel and are added together. The residual adaptation module is embedded serially after the feedforward neural network layer. The residual adaptation module constructs a bottleneck structure by sequentially connecting a dimension-reducing linear mapping, a nonlinear activation function, and an increasing-dimensional linear mapping, performs local perturbation processing on the features, and adds the residuals of the processed features and the features before processing. Calculate the geometric centroid of each preliminary core instance mask and project it onto the reference horizontal axis. Based on the matching relationship of the projection intervals of adjacent preliminary core instance masks on the reference horizontal axis, determine and eliminate overlapping masks to obtain a set of valid core instance masks. For each valid core instance mask in the set of valid core instance masks, fit the minimum bounding rectangle to determine the true principal axis direction, determine the intersection point with the true boundary of the valid core instance mask along the true principal axis direction, and calculate the effective pixel length between the two intersection points of the true boundary. Using the physical scale parameter, the length of each effective pixel is converted into the physical true length, and an effective length threshold is set. The physical true lengths of all cores that are greater than or equal to the effective length threshold are summarized, and the quantitative analysis results corresponding to the borehole core image are calculated.

2. The core quantitative analysis method based on adaptive transfer of visual fundamental model according to claim 1, characterized in that, Obtaining physical scale parameters specifically includes: Identify the standard reference object contained in the borehole core image and obtain the actual physical length of the standard reference object; Boundary recognition is performed on the borehole core image to obtain the pixel length of the standard reference object in the image; The physical scale parameter is calculated based on the ratio between the actual physical length and the corresponding pixel length.

3. The core quantitative analysis method based on adaptive transfer of visual fundamental model according to claim 2, characterized in that, Based on the features obtained from the pre-trained network, a multi-scale feature pyramid is constructed for cross-scale fusion, specifically including: Extract the final layer feature map generated by the pre-trained network, reshape and downsample the final layer feature map to construct the multi-scale feature pyramid; the multi-scale feature pyramid contains multiple layers of feature maps with progressively increasing resolution from top to bottom; Between adjacent levels of the multi-scale feature pyramid, an upsampling operation is used to enlarge the low-resolution feature map to the same size as the adjacent high-resolution feature map, and the enlarged low-resolution feature map is then combined with the high-resolution feature map by feature addition and convolution smoothing.

4. The core quantitative analysis method based on adaptive transfer of visual fundamental model according to claim 1, characterized in that, Calculate the geometric centroid of each preliminary core instance mask and project it onto a reference horizontal axis. Based on the matching relationship of the projection intervals of adjacent preliminary core instance masks on the reference horizontal axis, determine and eliminate overlapping masks to obtain a set of valid core instance masks, specifically including: The length extension direction of the core box in the borehole core image is determined as the reference horizontal axis; Calculate the geometric centroid of each of the preliminary core instance masks, and project the geometric centroid onto the reference horizontal axis to obtain the centroid projection point. At the same time, extract the maximum circumscribed rectangular projection range of each of the preliminary core instance masks on the reference horizontal axis. Compare the horizontal projection lengths of adjacent preliminary core sample masks on the reference horizontal axis and distinguish them into long core masks and short core masks; The positional relationship determination logic is as follows: if the centroid projection point of the short core mask falls within the maximum circumscribed rectangular projection range of the adjacent long core mask, then it is determined that the two overlap. Extract the overlapping projection intervals of the short core mask and the long core mask that are determined to be overlapping. Subtract the length of the overlapping projection interval from the horizontal projection length of the short core mask to obtain the effective pixel span. If the physical effective length calculated based on the effective pixel span is less than a preset length threshold, the corresponding short core mask is removed. The retained preliminary core instance masks and the core instance masks after deducting the overlapping area are summarized to obtain the effective core instance mask set.

5. The core quantitative analysis method based on adaptive transfer of visual fundamental model according to claim 1, characterized in that, Determine the intersection point of the true boundary with the mask of the effective core instance along the true principal axis direction, and calculate the effective pixel length between the two intersection points of the true boundaries, specifically including: Obtain the center coordinates and the direction angle of the long side of the minimum bounding rectangle, and define the extension direction along the direction angle of the long side as the true principal axis direction; Starting from the center coordinates, pixel-by-pixel step sampling is performed along the real principal axis direction and the opposite direction of the real principal axis direction, respectively. During the step sampling process in each direction, the pixel value of the current coordinate point is extracted. When the pixel value is detected to change abruptly from the mask-covered area to the non-mask-covered area, the coordinates of the abrupt change position are recorded as the intersection of the real boundaries, thereby obtaining the two intersections of the real boundaries at both ends of the real main axis. Calculate the Euclidean distance between the two intersection points of the real boundaries, and use the Euclidean distance as the effective pixel length.

6. The core quantitative analysis method based on adaptive transfer of visual fundamental model according to claim 1, characterized in that, The calculation yields the quantitative analysis results corresponding to the borehole core images, specifically including: Obtain the total borehole footage length corresponding to the borehole core image; divide the sum of the total physical lengths by the total borehole footage length to calculate the quantitative analysis result.

7. A core quantitative analysis system based on adaptive transfer of visual fundamental model, running the core quantitative analysis method based on adaptive transfer of visual fundamental model as described in any one of claims 1 to 6, characterized in that, include: The data acquisition module is used to acquire borehole core images to be processed and to obtain physical scale parameters; A deep learning intelligent interpretation module is used to preprocess the borehole core images. It utilizes a visual foundation model finely tuned based on a low-rank adaptation self-attention mechanism to extract and parse features from the preprocessed borehole core images, generating a preliminary set of core instance masks. The visual foundation model includes a pre-trained network and a multi-scale feature pyramid. The pre-trained network embeds a low-rank adaptation module and a residual adaptation module. The multi-scale feature pyramid is used for cross-scale fusion based on the features output by the pre-trained network. The overlapping core elimination module is used to calculate the geometric centroid of each preliminary core instance mask and project it onto the reference horizontal axis. Based on the matching relationship of the projection intervals of adjacent preliminary core instance masks on the reference horizontal axis, it determines and eliminates overlapping masks to obtain a set of valid core instance masks. The true length extraction module is used to fit the minimum bounding rectangle to each effective core instance mask in the effective core instance mask set to determine the true principal axis direction, determine the true boundary intersection point with the effective core instance mask along the true principal axis direction, and calculate the effective pixel length between the two true boundary intersection points; The index calculation and output module is used to convert the length of each effective pixel into the physical true length using the physical scale parameter, set an effective length threshold, summarize the physical true length of all cores that are greater than or equal to the effective length threshold, and calculate the quantitative analysis result corresponding to the borehole core image.

8. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the processor executes the program, it implements the steps of the core quantitative analysis method based on the adaptive migration of the visual basic model as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when read and executed by a processor, implement the steps of the core quantitative analysis method based on adaptive migration of a visual fundamental model as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Low-rank adaptation-based few-sample coronal mass ejection segmentation method and system

    CN121616830A

  • Auxiliary rock core geological logging method based on drilling parameters

    CN121858905A