A method for identifying fractures in a borehole drilled in coal and rock in a mine

CN122967246APending Publication Date: 2026-10-23XIAN UNIV OF SCI & TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611143433.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]本发明所要解决的技术问题在于针对上述现有技术中的不足,提供一种井下煤岩钻孔裂隙识别方法,通过图像增强预处理、双分支特征融合与感知复合损失函数的多维度协同优化,解决细小裂隙漏检、断续裂隙断裂、全局特征表征能力不足的问题,实现复杂井下裂隙高精度完整识别

Benefits of technology

1、本发明解决井下钻孔裂隙精准识别难度大的问题,实现复杂井下裂隙高精度完整识别。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122967246A_ABST
    Figure CN122967246A_ABST
Patent Text Reader

Abstract

The application discloses a kind of coal rock borehole fissure identification methods underground, comprising the following steps: one, the coal mine roadway borehole image under mining disturbance is collected, and original image dataset is constructed;Two, obtain original image from original image dataset, and get enhanced image by probabilistic anti-interference image enhancement;Three, the original image and enhanced image are processed by SAM model, and fissure label binary mask chart is obtained;Four, local and global feature fusion UNet model is constructed;Five, training image is input and trained using perception composite loss function, and local and global feature fusion UNet model trained is obtained;Six, subsequent borehole image is identified using local and global feature fusion UNet model trained, and fissure identification chart is obtained.The application realizes fissure high-precision identification by multidimensional collaborative optimization of image enhancement preprocessing, double-branch feature fusion and perception composite loss function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of borehole image recognition technology, specifically relating to a method for identifying fractures in underground coal and rock boreholes. Background Technology

[0002] As coal mining gradually shifts to deeper strata, the coal and rock mass, under the coupled effects of mining disturbance and complex seepage fields, experiences continuous expansion and interconnection of primary fractures, joints, and weak structural surfaces, forming a mining-induced fracture network. This leads to a decrease in the bearing capacity of the surrounding rock, easily inducing roadway deformation, roof falls, spalling, and other disasters. Therefore, accurately understanding the development patterns of mining-induced fractures has become a core aspect of safe mining, surrounding rock stability assessment, and disaster prevention in deep coal mines. While borehole imaging technology can directly acquire fracture images and is an important method for fracture analysis, the underground environment presents challenges such as uneven lighting, noise interference, and complex coal and rock textures. Furthermore, its global feature representation capability is insufficient, small fractures are easily missed, and the identification of discontinuous fractures is inconsistent, severely affecting the accuracy of fracture identification. Therefore, a fracture identification visualization method with strong anti-interference capabilities is urgently needed. First, to address issues such as uneven illumination, noise interference, and complex coal and rock textures in downhole borehole images, an image enhancement workflow was developed to improve the distinction between fracture areas and background areas. Second, based on the UNet encoding and decoding architecture, the network bottleneck layer was designed as a dual-branch feature fusion structure with local and global branches. The former strengthens the expression of fracture boundaries and texture details, while the latter represents the long-distance connectivity of slender fractures. Finally, considering the challenges of low foreground proportion in fracture images, easy omission of small fractures, and inconsistent identification of discontinuous fractures, a perceptual composite loss function was constructed to enhance the model's ability to constrain the connectivity of overlapping fracture areas and the skeleton, thereby achieving anti-interference recognition of borehole images. Summary of the Invention

[0003] The technical problem to be solved by this invention is to address the shortcomings of the prior art by providing a method for identifying fractures in underground coal and rock boreholes. Through multi-dimensional collaborative optimization of image enhancement preprocessing, dual-branch feature fusion and perceptual composite loss function, this method solves the problems of missed detection of small fractures, discontinuous fractures, and insufficient global feature representation capabilities, thereby achieving high-precision and complete identification of complex underground fractures.

[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for identifying fractures in underground coal and rock boreholes, the method comprising the following steps: Step 1: Collect borehole images of the surrounding rock in the coal mine roadway under mining disturbance and construct the original image dataset; Step 2: Obtain the original image from the original image dataset and perform probabilistic anti-interference image enhancement to obtain the enhanced image; Step 3: Process the original image and the enhanced image using the SAM model to obtain a binary mask image of the crack annotation; Step 4: Construct a UNet model that fuses local and global features; Step 5: Input the training images and train them using the perceptual composite loss function to obtain a trained UNet model that fuses local and global features; Step 6: Use the trained local and global feature fusion UNet model to identify subsequent borehole images and obtain a fracture identification map.

[0005] The aforementioned method for identifying fractures in underground coal and rock boreholes further includes a UNet model for local and global feature fusion in step four, comprising an encoder, a bottleneck layer local and global dual-branch feature fusion module, a decoder, and a fracture segmentation output layer. The bottleneck layer local and global dual-branch feature fusion module includes a local feature extraction branch, a global feature extraction branch, and a dimensionality reduction convolutional layer. The local feature extraction branch includes a first local convolutional branch and a second local convolutional branch. The first local convolutional branch uses a 3×3 convolution with 512 kernels; the second local convolutional branch uses a 1×1 convolution with 512 kernels. The global feature extraction branch includes a flattening layer, a Mamba module, and a reshaping layer. The dimensionality reduction convolutional layer uses a 1×1 convolution kernel, and the number of convolution kernels is 512. The gap segmentation output layer includes an output convolutional layer and a Sigmoid activation function. The output convolutional layer uses a 1×1 convolution with a kernel size of 1.

[0006] The above-mentioned method for identifying fractures in underground coal and rock boreholes, further, includes the following specific steps in step two: 30% of the original image dataset was randomly selected as the original images; 10% of the original image dataset is randomly selected and processed using the Retinex algorithm to obtain the first enhanced image set; 15% of the original image dataset is randomly selected and processed sequentially using the Retinex algorithm and the CLAHE method to obtain the second enhanced image set; 20% of the original image dataset is randomly selected and processed sequentially using the Retinex algorithm, the CLAHE method, and the Gabor filter to obtain the third enhanced image set; 25% of the original image dataset was randomly selected and processed sequentially using the Retinex algorithm, the CLAHE method, the Gabor filter, and bilateral filtering to obtain the fourth enhanced image set.

[0007] The above-mentioned method for identifying fractures in underground coal and rock boreholes, further, includes the following specific steps in step three: Step 301: Draw lines at the cracks in the original image to obtain the original image after drawing lines; Step 302: Process the original image after drawing lines using the SAM model to obtain the initial binary mask image of the crack; Step 303: Manually verify the initial binary mask image of the cracks based on the original image until all crack areas are labeled, and obtain the final binary mask image of crack labeling; Step 304: Following the methods in steps 301 to 303, the enhanced image is processed using the SAM model to obtain a binary mask image of the crack annotation.

[0008] The above-mentioned method for identifying fractures in underground coal and rock boreholes, further includes the following specific steps in step five: Step 501: Input the training image into the UNet model that fuses local and global features to obtain a binary image of the crack segmentation output; Step 502: Compare the binary mask image of the crack annotation with the binary image of the crack segmentation output, and then... The focus Tversky loss is obtained. ;in, For focusing coefficient, TP , FP and FN These represent true positives, false positives, and false negatives, respectively. ε As a smoothing factor, α and β These represent the penalty weights for false positives and false negatives, respectively. α and β The values ​​are all between 0 and 1. α + β= 1 and β > α ; Step 503: Use the morphological skeleton extraction method to extract the binary mask image of the crack annotation and the binary image of the crack segmentation output to obtain the predicted skeleton. S P and real skeleton S G Based on real skeleton S G Obtain the predicted skeleton S P Skeleton accuracy T prec and skeleton recall rate T sens ; Step 504, according to The skeleton consistency loss is obtained. ; Step 505, according to The perceptual composite loss function is obtained.L ;in, The weighting coefficients for the first loss are... The weighting coefficients for the second loss. and The value range is 0 to 1, and + =1; Step 506: The computer uses the Adam optimizer and utilizes the perceptual composite loss function. L The UNet model that fuses local and global features is trained until all training images are trained, thus completing one iteration of training. Step 507: Repeat steps 501 to 506 multiple times, iterating until the set number of rounds is met, to obtain the trained UNet model that fuses local and global features.

[0009] The above-mentioned method for identifying fractures in underground coal and rock boreholes is further refined in the following steps: Step 5011: Obtain original and enhanced images of multiple sampling times from multiple coal mine roadway surrounding rock boreholes as training images; and process any training image through an encoder to obtain the encoder output feature map Fb. Step 5012: Pass the encoder output feature map Fb through the first local convolution branch to obtain the first local branch feature map F1; The encoder output feature map Fb is passed through the second local convolution branch to obtain the second local branch feature map F2; Step 5013: According to Fz=W1×F1+W2×F2, the local branch feature map Fz is obtained; where W1 is the first gating coefficient, W2 is the second gating coefficient, the values ​​of W1 and W2 are both 0 to 1, and W1+W2=1; Step 5014: Pass the encoder output feature map Fb through the global feature extraction branch to obtain the global feature map Fg; and concatenate the local branch feature map Fz and the global feature map Fg along the channel dimension to obtain the concatenated feature map; Step 5015: Pass the spliced ​​feature map through a dimension reduction convolutional layer to obtain a lightweight fused feature map Fr; Step 5016: Obtain the feature fusion map Fm according to Fm=Fz+Fr; Step 5017: Pass the feature fusion map Fm through the decoder to obtain the decoder output feature map; Step 5018: Pass the decoder output feature map through the gap segmentation output layer to obtain the gap segmentation output mask map. Set the pixel values ​​with a probability value greater than 0.5 in the gap segmentation output mask map to 1, and otherwise set them to 0 to obtain the gap segmentation output binarized map.

[0010] The above-mentioned method for identifying fractures in underground coal and rock boreholes further includes the following process for obtaining the first gating coefficient W1 in step 5013: Step A1: Concatenate the first local branch feature map F1 and the second local branch feature map F2 along the channel dimension to obtain a local concatenated feature map; Step A2: Pass the local stitched feature map through a 1×1 convolution with 1 channel and global average pooling in sequence to obtain the feature value f; Step A3: Pass the feature value f through the Sigmoid activation function to obtain the first gating coefficient W1.

[0011] The above-mentioned method for identifying fractures in underground coal and rock boreholes is further refined in the following steps: Step B1: The encoder output feature map Fb is processed through a flattening layer to obtain sequence features; Step B2: Process the sequence features through the Mamba module to obtain the output sequence features; Step B3: Pass the output sequence features through a reshaping layer to obtain the global feature map Fg.

[0012] Compared with the prior art, the present invention has the following advantages: 1. This invention solves the problem of the difficulty in accurately identifying downhole borehole fractures, and achieves high-precision and complete identification of complex downhole fractures.

[0013] 2. This invention addresses the problems of harsh underground environments, uneven image illumination, noise interference, and complex textures by enhancing images and improving the distinction between fracture areas and background areas; it constructs a probabilistic anti-interference image enhancement strategy as training images and retains the original image input for training to improve the robustness of the network model. To address the issues that existing convolutional networks can only extract local features, making it difficult to effectively extract and characterize long-distance connectivity relationships in cracks, and resulting in insufficient expression of fine textures and distortion in the recognition of discontinuous cracks, a local and global dual-branch feature fusion module is constructed. To address the issues of existing general loss functions being unable to adapt to the characteristics of samples with small cracks and discontinuous structures, as well as the problems of missed crack detection and the inability to guarantee the connectivity of the crack skeleton, a perceptual composite loss function is constructed to improve recognition accuracy and meet the engineering application needs of deep coal mine surrounding rock analysis and disaster prevention.

[0014] 3. This invention uses line prompts processed by the SAM model to generate crack regions by combining image features and prompt information. Then, the initial binary crack mask image is manually verified based on the original image to supplement the annotation of small cracks, weak boundary cracks, and discontinuous cracks until all crack regions are annotated. This improves the efficiency and quality of crack annotation. This method changes the manual operation from large-scale pixel-by-pixel drawing to targeted correction, which improves annotation efficiency and helps reduce the omission of small cracks, mis-annotation of background textures, and subjective differences between different annotators. This provides more reliable pixel-level crack labels for model training.

[0015] 4. This invention sets up a local feature extraction branch, which consists of a first local convolution branch and a second local convolution branch. The first local convolution branch, i.e., the 3×3 convolution branch, extracts spatial structure information such as crack edges, local texture abrupt changes, fine branches, and weak boundaries through neighborhood space aggregation. The second local convolution branch, i.e., the 1×1 convolution branch, reorganizes, filters, and linearly maps different channel features, enhancing the channel response with crack discrimination function without changing the feature map spatial size. Therefore, the 3×3 convolution branch and the 1×1 convolution branch form a local feature extraction structure, which improves the model's adaptability to local features of different types of cracks. In addition, an adaptive gating coefficient is set, generating an adaptive gating coefficient with a value between 0 and 1 based on the two local features. This allows for dynamic weighted fusion of the two types of local features, enabling the model to automatically adjust the contribution ratio of spatial neighborhood features and channel discrimination features according to the current image content. Compared to using a single 3×3 convolution or a fixed-ratio fusion method, this invention can form different combinations of local features for small cracks, wide cracks, weak boundary cracks, and complex texture backgrounds, reducing the insufficient feature representation caused by a single convolution operation.

[0016] 5. This invention sets up local feature extraction branches and global feature extraction branches in parallel at the bottleneck layer. The local branches enhance the expression of crack edges, textures and fine structures, while the global branches continuously gather historical context information formed at previous positions at the current spatial position through spatial serialization and selective state updates, thereby realizing the representation of long-distance dependencies of cracks. This achieves the coordinated unity of crack local detail expression and long-distance connectivity representation, and improves the ability to represent the extension relationship of slender cracks spanning a large spatial range, the potential connection relationship between discontinuous cracks, and the overall morphological representation of branch cracks. In addition, after concatenating local and global features along the channel dimension, cross-channel information interaction and channel compression are completed through a dimension reduction convolutional layer. Lightweight fusion feature maps are used to connect and supplement local branch feature maps to obtain a feature fusion map Fm. This can take into account both the details of small crack edges and the overall extension trend of long and thin cracks, and reduce the crack breakage, branch loss, direction shift and morphological distortion problems that are easy to occur in traditional convolutional networks.

[0017] 6. This invention constructs a perceptual composite loss function, combining the focus Tversky loss and the skeleton consistency loss. The focus Tversky loss adjusts the penalty weights for false positives and negatives and reduces the impact of easily classifiable background pixels on model optimization, making the model pay more attention to difficult-to-distinguish samples such as fine cracks, weak boundary cracks, and discontinuous cracks. The skeleton consistency loss constrains the consistency between predicted cracks and real cracks in terms of centerline position, structural coverage, and spatial connectivity. The combination of these two loss functions expands the training objective from single-pixel classification to a collaborative optimization of region overlap accuracy, difficult-to-disseminate crack identification, and skeleton topological consistency. This helps reduce the breakage of fine cracks, insufficient coverage of discontinuous cracks, and incorrect connections in non-crack regions, and provides more complete and stable segmentation results for subsequent crack skeleton extraction and structural parameter calculation, thus improving the accuracy of crack region segmentation.

[0018] 7. The present invention subsequently utilizes the trained local and global feature fusion UNet model to identify subsequent borehole images, thereby obtaining a fracture identification map. This achieves end-to-end output, with the output end directly obtaining the fracture distribution location on the borehole image, providing reliable technical support for the stability analysis of surrounding rock in deep coal mines and early warning of mining-induced disasters.

[0019] In summary, this invention addresses the issues of missed detection of small fractures, discontinuous fracture fractures, and insufficient global feature representation capabilities through multi-dimensional collaborative optimization of image enhancement preprocessing, dual-branch feature fusion, and perceptual composite loss function, thereby achieving high-precision and complete identification of complex downhole fractures.

[0020] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0021] Figure 1 This is a flowchart of the method of the present invention.

[0022] Figure 2 This is a schematic diagram of the structure of the bottleneck layer local and global dual-branch feature fusion module of the present invention.

[0023] Figure 3 The image is for the probabilistic anti-interference image enhancement of this invention.

[0024] Figure 4 This is the original image and the binary mask image of the crack in this invention.

[0025] Figure 5 These are subsequent borehole images and fracture identification diagrams for this invention. Detailed Implementation

[0026] like Figure 1The method for identifying fractures in underground coal and rock boreholes, as shown, includes the following steps: Step 1: Collect borehole images of the surrounding rock in the coal mine roadway under mining disturbance and construct the original image dataset; Step 2: Obtain the original image from the original image dataset and perform probabilistic anti-interference image enhancement to obtain the enhanced image; Step 3: Process the original image and the enhanced image using the SAM model to obtain a binary mask image of the crack annotation; Step 4: Construct a UNet model that fuses local and global features; Step 5: Input the training images and train them using the perceptual composite loss function to obtain a trained UNet model that fuses local and global features; Step 6: Use the trained local and global feature fusion UNet model to identify subsequent borehole images and obtain a fracture identification map.

[0027] like Figure 2 As shown in this embodiment, the UNet model for local and global feature fusion in step four includes an encoder, a bottleneck layer local and global dual-branch feature fusion module, a decoder, and a gap segmentation output layer. The bottleneck layer local and global dual-branch feature fusion module includes a local feature extraction branch, a global feature extraction branch, and a dimensionality reduction convolutional layer. The local feature extraction branch includes a first local convolutional branch and a second local convolutional branch. The first local convolutional branch uses a 3×3 convolution with 512 kernels; the second local convolutional branch uses a 1×1 convolution with 512 kernels. The global feature extraction branch includes a flattening layer, a Mamba module, and a reshaping layer. The dimensionality reduction convolutional layer uses a 1×1 convolution kernel, and the number of convolution kernels is 512. The gap segmentation output layer includes an output convolutional layer and a Sigmoid activation function. The output convolutional layer uses a 1×1 convolution with a kernel size of 1.

[0028] In this embodiment, the specific process of step two is as follows: 30% of the original image dataset was randomly selected as the original images; 10% of the original image dataset is randomly selected and processed using the Retinex algorithm to obtain the first enhanced image set; 15% of the original image dataset is randomly selected and processed sequentially using the Retinex algorithm and the CLAHE method to obtain the second enhanced image set; 20% of the original image dataset is randomly selected and processed sequentially using the Retinex algorithm, the CLAHE method, and the Gabor filter to obtain the third enhanced image set; 25% of the original image dataset was randomly selected and processed sequentially using the Retinex algorithm, the CLAHE method, the Gabor filter, and bilateral filtering to obtain the fourth enhanced image set.

[0029] In this embodiment, the specific process of step three is as follows: Step 301: Draw lines at the cracks in the original image to obtain the original image after drawing lines; Step 302: Process the original image after drawing lines using the SAM model to obtain the initial binary mask image of the crack; Step 303: Manually verify the initial binary mask image of the cracks based on the original image until all crack areas are labeled, and obtain the final binary mask image of crack labeling; Step 304: Following the methods in steps 301 to 303, the enhanced image is processed using the SAM model to obtain a binary mask image of the crack annotation.

[0030] In this embodiment, the specific process of step five is as follows: Step 501: Input the training image into the UNet model that fuses local and global features to obtain a binary image of the crack segmentation output; Step 502: Compare the binary mask image of the crack annotation with the binary image of the crack segmentation output, and then... The focus Tversky loss is obtained. ;in, For focusing coefficient, TP , FP and FN These represent true positives, false positives, and false negatives, respectively. ε As a smoothing factor, α and β These represent the penalty weights for false positives and false negatives, respectively. α and β The values ​​are all between 0 and 1. α + β= 1 and β > α ; Step 503: Use the morphological skeleton extraction method to extract the binary mask image of the crack annotation and the binary image of the crack segmentation output to obtain the predicted skeleton. S P and real skeleton S G Based on real skeleton S G Obtain the predicted skeleton S P Skeleton accuracy T prec and skeleton recall rate Tsens ; Step 504, according to The skeleton consistency loss is obtained. ; Step 505, according to The perceptual composite loss function is obtained. L ;in, The weighting coefficients for the first loss are... The weighting coefficients for the second loss. and The value range is 0 to 1, and + =1; Step 506: The computer uses the Adam optimizer and utilizes the perceptual composite loss function. L The UNet model that fuses local and global features is trained until all training images are trained, thus completing one iteration of training. Step 507: Repeat steps 501 to 506 multiple times, iterating until the set number of rounds is met, to obtain the trained UNet model that fuses local and global features.

[0031] In this embodiment, the specific process of step 501 is as follows: Step 5011: Obtain original and enhanced images of multiple sampling times from multiple coal mine roadway surrounding rock boreholes as training images; and process any training image through an encoder to obtain the encoder output feature map Fb. Step 5012: Pass the encoder output feature map Fb through the first local convolution branch to obtain the first local branch feature map F1; The encoder output feature map Fb is passed through the second local convolution branch to obtain the second local branch feature map F2; Step 5013: According to Fz=W1×F1+W2×F2, the local branch feature map Fz is obtained; where W1 is the first gating coefficient, W2 is the second gating coefficient, the values ​​of W1 and W2 are both 0 to 1, and W1+W2=1; Step 5014: Pass the encoder output feature map Fb through the global feature extraction branch to obtain the global feature map Fg; and concatenate the local branch feature map Fz and the global feature map Fg along the channel dimension to obtain the concatenated feature map; Step 5015: Pass the spliced ​​feature map through a dimension reduction convolutional layer to obtain a lightweight fused feature map Fr; Step 5016: Obtain the feature fusion map Fm according to Fm=Fz+Fr; Step 5017: Pass the feature fusion map Fm through the decoder to obtain the decoder output feature map; Step 5018: Pass the decoder output feature map through the gap segmentation output layer to obtain the gap segmentation output mask map. Set the pixel values ​​with a probability value greater than 0.5 in the gap segmentation output mask map to 1, and otherwise set them to 0 to obtain the gap segmentation output binarized map.

[0032] In this embodiment, the specific process for obtaining the first gating coefficient W1 in step 5013 is as follows: Step A1: Concatenate the first local branch feature map F1 and the second local branch feature map F2 along the channel dimension to obtain a local concatenated feature map; Step A2: Pass the local stitched feature map through a 1×1 convolution with 1 channel and global average pooling in sequence to obtain the feature value f; Step A3: Pass the feature value f through the Sigmoid activation function to obtain the first gating coefficient W1.

[0033] In this embodiment, the specific process of step 5014 is as follows: Step B1: The encoder output feature map Fb is processed through a flattening layer to obtain sequence features; Step B2: Process the sequence features through the Mamba module to obtain the output sequence features; Step B3: Pass the output sequence features through a reshaping layer to obtain the global feature map Fg.

[0034] In this embodiment, when implemented, borehole imaging devices, borehole viewing equipment, or roadway surrounding rock situation perception equipment are deployed at monitoring points of coal mine roadways to continuously collect borehole images under mining disturbances around the clock. The image resolution is standardized, and borehole images containing working conditions such as reflection, shadow, dust interference, and complex textures are collected in batches to construct an original image dataset.

[0035] In this embodiment, each original image is randomly selected according to a preset probability and processed according to the four enhancement methods in step two. The enhanced images are obtained through different enhancement methods, such as... Figure 3 As shown.

[0036] In this embodiment, the Retinex algorithm's illumination correction is mainly used to reduce the brightness variations caused by borehole wall surface imaging and non-uniform illumination, making the overall grayscale distribution of the image more balanced; the CLAHE method enhances the contrast of local areas of the image by limiting contrast adaptive histogram equalization, thereby improving the grayscale difference between weak fractures and the coal and rock background; the Gabor filter can enhance the linear texture response in different directions, which is beneficial to highlighting the slender shape and directional structural features of the fractures; the bilateral filter is used to perform edge-preserving denoising on the enhanced image, suppressing random noise and some non-fracture texture interference while preserving fracture boundary information as much as possible.

[0037] In this embodiment, lines are used as prompts. The original image after drawing the lines is processed by the SAM model. The areas corrected by the drawn lines can be manually reviewed, and small gaps that were missed can be filled to obtain a binary mask image of the gap annotations. Figure 4 As shown.

[0038] In this embodiment, the UNet model for fusing local and global features is based on the UNet encoding and decoding architecture. A local and global dual-branch feature fusion module is constructed at the network bottleneck layer. The local convolutional branch is used to extract the detailed texture features of the crack, and the global feature extraction branch is used to realize the long-distance representation of the crack. The dual-branch features are fused to complete the model training. The encoder is used to extract multi-scale local texture features and deep semantic features of the borehole image. The bottleneck layer local and global dual-branch feature fusion module is used to simultaneously extract local detail features and global connectivity features of the crack. The decoder is used to restore the image spatial resolution and output pixel-level crack segmentation results.

[0039] In this embodiment, two convolutional paths, 3×3 and 1×1, are set up so that the 3×3 convolution is used to extract crack edges, textures and neighborhood spatial structures, and the 1×1 convolution is used for channel recombination and feature selection. Then, Sigmoid is used to generate adaptive weights to perform weighted fusion of the two features, which is richer than a single 3×3 convolution, while retaining the ability to extract spatial features and select channels.

[0040] In this embodiment, the Mamba module (a novel sequence modeling architecture based on a state-space model) is set up so that input features at different spatial locations can affect the current state's retention, updating of historical information, and output response. When the sequence location corresponds to effective features such as fracture boundaries, slender fractures, or discontinuous structures, the model can enhance the transmission of contextual information; when it corresponds to coal and rock textures, local noise, or background interference areas, its influence on subsequent states can be weakened to some extent.

[0041] In this embodiment, the image size is width × height × number of channels.

[0042] In this embodiment, the training image is 1024×1024×3 in size. After being processed by the encoder, it outputs multi-scale feature maps of 1024×1024×32, 512×512×64, 256×256×128, 128×128×256 and 64×64×512 in sequence. Among them, the 64×64×512 feature map is used as the encoder output feature map Fb. The size of the local branch feature map Fz is 64×64×512, the size of the global feature map Fg is 64×64×512, and the size of the spliced ​​feature map is 64×64×1024; the size of the lightweight fusion feature map is 64×64×512, the size of the feature fusion map Fm is 64×64×512, and the size of the crack segmentation output feature map is 1024×1024×1.

[0043] In this embodiment, ε As a smoothing factor, ε The value is

[10] -7 10 -5 [] is used to avoid the denominator being zero. For borehole fracture identification tasks, the fracture area is small, and small fractures and weak boundary fractures are easily misclassified as background by the model. That is, false negatives have a greater impact on the final identification result. Therefore, [] is set to [] β > α Preferred α =0.3, β =0.7.

[0044] In this embodiment, The Tversky coefficient is used as a basis for further introducing the focus concept, which reduces the loss contribution of easily classified samples and enhances the model's attention to difficult samples. The focusing coefficient is used to adjust the model's attention to hard-to-differentiate samples. When =1, the loss function degenerates to 1. The linear form of the Tversky coefficients; when When the value is greater than 1, the loss value decreases faster as the Tversky coefficient increases, and the constraint on highly overlapping samples is relatively weakened; when When the value is less than 1, the loss decreases relatively slowly, maintaining a certain constraint even when the prediction results already have a high degree of regional overlap but still have detail errors. Therefore, the preferred value is... =0.75, which enables the model to maintain strong attention to difficult-to-distinguish samples such as small cracks, weak boundary cracks, and discontinuous cracks during the training process.

[0045] In addition, compared with Dice loss, the focus Tversky loss can alleviate the class imbalance problem of small foreground region and large background region in cracks. It can also reduce the dominant role of easily classified background pixels in the training process, thereby improving the model's ability to learn difficult crack samples and reducing problems such as missed detection of small cracks and incomplete identification of weak boundary cracks.

[0046] In this embodiment, optimizing the segmentation results solely from the perspective of regional overlap is still insufficient to fully guarantee the continuity of the fracture structure. If a fracture breaks locally, it will directly affect subsequent skeleton extraction, fracture length calculation, and connectivity analysis. This invention further introduces skeleton consistency loss to constrain the prediction results from the perspective of fracture centerline structure, thereby enhancing the consistency between the predicted fracture and the actual fracture in terms of centerline morphology and topological connectivity.

[0047] In this embodiment, a skeleton consistency loss is set. This allows the model to simultaneously focus on the segmentation accuracy of the crack region and the continuity of the centerline structure during training. T prec It is used to measure whether the predicted skeleton accurately falls within the actual fracture region, and mainly suppresses the erroneous skeleton response in non-fracture regions. T sens It is used to measure whether the actual fracture skeleton is adequately covered by the prediction results, and mainly constrains the structural integrity of slender fractures and discontinuous fractures. Additionally, skeleton consistency loss L skel From skeleton accuracy T prec and skeleton recall rate T sens A joint decision. When T prec and T sens At the same time, when the value is high, the corresponding skeleton consistency loss is low, indicating that the predicted skeleton can not only accurately fall within the actual fracture region, but also fully cover the actual fracture skeleton structure. If T prec higher and T sens A lower value indicates fewer false positives in the predicted skeleton, but may indicate gaps, breaks, or insufficient coverage, leading to increased loss of skeleton consistency; if T sens higher and T prec A lower value indicates that the prediction results may contain more erroneous skeleton responses in non-crack regions, which will also lead to an increase in skeleton consistency loss.

[0048] In this embodiment, considering the imbalance of crack region categories, the difficulty in identifying pixels, and the constraint of crack structure continuity, a perceptual composite loss function is finally constructed. L Preferred =0.7、 =0.3. The focal Tversky loss, with a significant weight in the total loss, primarily improves pixel-level segmentation accuracy of cracks and alleviates issues such as small foreground crack area proportions, easy omission of small cracks, and insufficient identification of weak boundary cracks. The skeleton consistency loss, as a structural constraint term, mainly enhances the model's ability to preserve the structure and spatial connectivity of crack centerlines. Through joint optimization of these two factors, the model improves the accuracy of crack region identification and reduces problems such as breakage of slender cracks, thus providing a more reliable segmentation foundation for subsequent crack skeleton extraction and calculation of geometric parameters such as length, width, and area.

[0049] In this embodiment, the number of rounds is set to 200, and the network parameters are iteratively optimized to ensure the recognition effect.

[0050] In this embodiment, it should be noted that the subsequent drilling images can be either the original images or the enhanced images.

[0051] In this embodiment, as Figure 5 As shown, the subsequent borehole images, after being processed by a trained UNet model that fuses local and global features, yielded fracture identification images. The identification results demonstrate that the model can extract fracture regions relatively completely even under conditions of complex coal and rock surface textures and weak fracture grayscale differences. The main fracture extending laterally in the middle of the original image, the inclined fracture in the upper right, and multiple branch fractures on the left are all clearly identified. The extension direction, intersection relationships, and local bifurcation morphology of the fractures are basically consistent with the original image. Furthermore, the model exhibits good response capabilities to small, discontinuous, and weakly boundary fractures, maintaining the continuity of the fracture structure. The identification results demonstrate good boundary localization ability and background interference suppression capability.

[0052] In summary, this invention addresses the issues of missed detection of small fractures, discontinuous fracture fractures, and insufficient global feature representation capabilities through multi-dimensional collaborative optimization of image enhancement preprocessing, dual-branch feature fusion, and perceptual composite loss function, thereby achieving high-precision and complete identification of complex downhole fractures.

[0053] The above description is merely a preferred embodiment of the present invention and does not constitute any limitation on the present invention. Any simple modifications, alterations, or equivalent structural changes made to the above embodiments based on the technical essence of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for identifying fractures in underground coal and rock boreholes, characterized in that, The method includes the following steps: Step 1: Collect borehole images of the surrounding rock in the coal mine roadway under mining disturbance and construct the original image dataset; Step 2: Obtain the original image from the original image dataset and perform probabilistic anti-interference image enhancement to obtain the enhanced image; Step 3: Process the original image and the enhanced image using the SAM model to obtain a binary mask image of the crack annotation; Step 4: Construct a UNet model that fuses local and global features; Step 5: Input the training images and train them using the perceptual composite loss function to obtain a trained UNet model that fuses local and global features; Step 6: Use the trained local and global feature fusion UNet model to identify subsequent borehole images and obtain a fracture identification map.

2. The method for identifying fractures in underground coal and rock boreholes according to claim 1, characterized in that: The UNet model for local and global feature fusion in step four includes an encoder, a bottleneck layer local and global dual-branch feature fusion module, a decoder, and a gap segmentation output layer. The bottleneck layer local and global dual-branch feature fusion module includes a local feature extraction branch, a global feature extraction branch, and a dimensionality reduction convolutional layer. The local feature extraction branch includes a first local convolutional branch and a second local convolutional branch. The first local convolutional branch uses a 3×3 convolution with 512 kernels; the second local convolutional branch uses a 1×1 convolution with 512 kernels. The global feature extraction branch includes a flattening layer, a Mamba module, and a reshaping layer. The dimensionality reduction convolutional layer uses a 1×1 convolution kernel, and the number of convolution kernels is 512. The gap segmentation output layer includes an output convolutional layer and a Sigmoid activation function. The output convolutional layer uses a 1×1 convolution with a kernel size of 1.

3. The method for identifying fractures in underground coal and rock boreholes according to claim 1, characterized in that: The specific process of step two is as follows: 30% of the original image dataset was randomly selected as the original images; 10% of the original image dataset is randomly selected and processed using the Retinex algorithm to obtain the first enhanced image set; 15% of the original image dataset is randomly selected and processed sequentially using the Retinex algorithm and the CLAHE method to obtain the second enhanced image set; 20% of the original image dataset is randomly selected and processed sequentially using the Retinex algorithm, the CLAHE method, and the Gabor filter to obtain the third enhanced image set; 25% of the original image dataset was randomly selected and processed sequentially using the Retinex algorithm, the CLAHE method, the Gabor filter, and bilateral filtering to obtain the fourth enhanced image set.

4. The method for identifying fractures in underground coal and rock boreholes according to claim 1, characterized in that: The specific process of step three is as follows: Step 301: Draw lines at the cracks in the original image to obtain the original image after drawing lines; Step 302: Process the original image after drawing lines using the SAM model to obtain the initial binary mask image of the crack; Step 303: Manually verify the initial binary mask image of the cracks based on the original image until all crack areas are labeled, and obtain the final binary mask image of crack labeling; Step 304: Following the methods in steps 301 to 303, the enhanced image is processed using the SAM model to obtain a binary mask image of the crack annotation.

5. A method for identifying fractures in underground coal and rock boreholes according to claim 2, characterized in that: The specific process of step five is as follows: Step 501: Input the training image into the UNet model that fuses local and global features to obtain a binary image of the crack segmentation output; Step 502: Compare the binary mask image of the crack annotation with the binary image of the crack segmentation output, and then... The focus Tversky loss is obtained. ;in, For focusing coefficient, TP , FP and FN These represent true positives, false positives, and false negatives, respectively. ε As a smoothing factor, α and β These represent the penalty weights for false positives and false negatives, respectively. α and β The values ​​are all between 0 and 1. α + β= 1 and β > α ; Step 503: Use the morphological skeleton extraction method to extract the binary mask image of the crack annotation and the binary image of the crack segmentation output to obtain the predicted skeleton. S P and real skeleton S G Based on real skeleton S G Obtain the predicted skeleton S P Skeleton accuracy T prec and skeleton recall rate T sens ; Step 504, according to The skeleton consistency loss is obtained. ; Step 505, according to The perceptual composite loss function is obtained. L ;in, The weighting coefficients for the first loss are... The weighting coefficients for the second loss. and The value range is 0 to 1, and + =1; Step 506: The computer uses the Adam optimizer and utilizes the perceptual composite loss function. L The UNet model that fuses local and global features is trained until all training images are trained, thus completing one iteration of training. Step 507: Repeat steps 501 to 506 multiple times, iterating until the set number of rounds is met, to obtain the trained UNet model that fuses local and global features.

6. The method for identifying fractures in underground coal and rock boreholes according to claim 5, characterized in that: The specific process of step 501 is as follows: Step 5011: Obtain original and enhanced images of multiple sampling times from multiple coal mine roadway surrounding rock boreholes as training images; and process any training image through an encoder to obtain the encoder output feature map Fb. Step 5012: Pass the encoder output feature map Fb through the first local convolution branch to obtain the first local branch feature map F1; The encoder output feature map Fb is passed through the second local convolution branch to obtain the second local branch feature map F2; Step 5013: According to Fz=W1×F1+W2×F2, the local branch feature map Fz is obtained; where W1 is the first gating coefficient, W2 is the second gating coefficient, the values ​​of W1 and W2 are both 0 to 1, and W1+W2=1; Step 5014: Pass the encoder output feature map Fb through the global feature extraction branch to obtain the global feature map Fg; and concatenate the local branch feature map Fz and the global feature map Fg along the channel dimension to obtain the concatenated feature map; Step 5015: Pass the spliced ​​feature map through a dimension reduction convolutional layer to obtain a lightweight fused feature map Fr; Step 5016: Obtain the feature fusion map Fm according to Fm=Fz+Fr; Step 5017: Pass the feature fusion map Fm through the decoder to obtain the decoder output feature map; Step 5018: Pass the decoder output feature map through the gap segmentation output layer to obtain the gap segmentation output mask map. Set the pixel values ​​with a probability value greater than 0.5 in the gap segmentation output mask map to 1, and otherwise set them to 0 to obtain the gap segmentation output binarized map.

7. A method for identifying fractures in underground coal and rock boreholes according to claim 6, characterized in that: The specific process for obtaining the first gating coefficient W1 in step 5013 is as follows: Step A1: Concatenate the first local branch feature map F1 and the second local branch feature map F2 along the channel dimension to obtain a local concatenated feature map; Step A2: Pass the local stitched feature map through a 1×1 convolution with 1 channel and global average pooling in sequence to obtain the feature value f; Step A3: Pass the feature value f through the Sigmoid activation function to obtain the first gating coefficient W1.

8. A method for identifying fractures in underground coal and rock boreholes according to claim 6, characterized in that: The specific process of step 5014 is as follows: Step B1: The encoder output feature map Fb is processed through a flattening layer to obtain sequence features; Step B2: Process the sequence features through the Mamba module to obtain the output sequence features; Step B3: Pass the output sequence features through a reshaping layer to obtain the global feature map Fg.