Coal mine shaft micro crack detection method, device and storage medium

By constructing a lightweight wellbore microcrack detection method and utilizing techniques such as deformable convolution and multi-scale attention feature fusion modules, the problems of feature extraction difficulties and noise interference in wellbore microcrack detection are solved, achieving efficient and accurate microcrack detection.

CN119107444BActive Publication Date: 2026-04-17ANHUI UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANHUI UNIV OF SCI & TECH
Filing Date
2024-08-23
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing methods for detecting microcracks in coal mine shafts are difficult to effectively extract feature information, are easily affected by noise, and are prone to false detections and missed detections.

Method used

A method for detecting microcracks in coal mine shafts is constructed. The method employs a deformable convolutional module CN-CBS, a deformable feature fusion module CN-C2f, a multi-scale attention feature fusion module EMA-C2f, and a spatial pyramid pooling module E-SPPFCSPC, combined with a spatial depth transformation convolutional module SPDI. A lightweight backbone network and a neck feature fusion network are designed, and the detection output is optimized using the FReLU activation function.

Benefits of technology

The model's ability to extract features from wellbore microcracks has been improved, noise interference has been reduced, detection accuracy and efficiency have been enhanced, computational load has been reduced, and a balance between model accuracy and lightweight design has been achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107444B_ABST
    Figure CN119107444B_ABST
Patent Text Reader

Abstract

This invention provides a method, equipment, and storage medium for detecting microcracks in coal mine shafts. The method includes: S1: constructing a dataset of microcracks in the shaft and dividing it into training, validation, and test sets; S2: constructing a microcrack detection model; S21: constructing a backbone network; S22: constructing a neck feature fusion network; S23: constructing a head network; S3: training the detection model using the training set and updating the model's parameters. This addresses the problems of existing detection methods, such as difficulty in effectively extracting feature information, susceptibility to noise interference, and the tendency for false positives and false negatives.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of target detection technology, and in particular relates to a method, equipment and storage medium for detecting microcracks in coal mine shafts. Background Technology

[0002] The appearance of cracks in the shaft wall is an early warning sign of structural failure. Because these cracks are relatively small in their initial stages, they do not usually lead to serious consequences. However, if cracks in the shaft wall are not monitored and preventative measures are not taken in a timely manner, they may develop into severe cracks, causing structural failure and threatening the stability and safe operation of the shaft. This could even result in significant loss of life and property. To prevent such situations, effective monitoring methods are needed to detect and control shaft wall damage, ensuring the safety of underground mining.

[0003] With the continuous development of computer technology, crack detection using algorithms based on wellbore images has become a popular research direction. The YOLO algorithm, due to its high real-time detection performance and simple structure, has become a popular algorithm in the field of deep learning. Researchers have studied defect detection using different strategies, such as increasing the receptive field, multi-scale feature fusion, and model lightweighting. However, wellbore cracks still face some challenges due to the special nature of their detection environment. For example, the shape and size of cracks vary greatly, making it difficult for models to effectively extract feature information; insufficient lighting under the wellbore results in low background differentiation for micro-cracks, making them susceptible to noise interference; and blurred crack image details easily lead to false positives and false negatives.

[0004] Therefore, there is an urgent need for a method for detecting microcracks in coal mine shafts that can enhance the model's feature representation capabilities while maintaining its lightweight nature, thus achieving a balance between model accuracy and lightweight design. Summary of the Invention

[0005] The purpose of this invention is to provide a method, equipment, and storage medium for detecting microcracks in coal mine shafts, in order to solve the problems of existing detection methods, such as difficulty in effectively extracting feature information, susceptibility to noise interference, and the tendency to produce false detections or missed detections.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0007] A method for detecting microcracks in coal mine shafts includes the following steps:

[0008] S1: Construct a dataset of wellbore microcracks and divide it into training, validation and test sets;

[0009] S2: Construct a wellbore microcrack detection model;

[0010] S21: Construct a backbone network;

[0011] S22: Construct a neck feature fusion network;

[0012] S23: Construct the head network;

[0013] S3: Train the detection model using the training set and update the model with new parameters.

[0014] Furthermore, S21 includes:

[0015] S211: Construct the basic convolutional module CBS; the basic convolutional module CBS consists of a convolutional layer Conv, a batch normalization layer BN, and an activation function SiLU in sequence;

[0016] S212: Construct a deformable convolutional module CN-CBS; the deformable convolutional module CN-CBS consists of a deformable convolutional layer DCNv2, a batch normalization layer BN, and an activation function SiLU in sequence; the three deformable convolutional modules CN-CBS form a parallel sub-network;

[0017] In the deformable convolutional layer DCNv2, the formula for calculating the deformable convolutional layer is:

[0018]

[0019] Where y(p) represents the feature value of the output feature map at position p, x represents the input feature map, and p represents the position of the output feature map. k Δp represents the initial position of the k-th sampling point relative to the center of the convolution kernel. k Δmk represents the position offset of the k-th sampling point, and w represents the feature adjustment coefficient of the k-th sampling point. k This represents the weight of the k-th sampling point, where k represents the index of the sampling point and K represents the total number of sampling points.

[0020] Furthermore, S21 also includes:

[0021] S213: Construct the deformable feature fusion module CN-C2f;

[0022] In the deformable feature fusion module CN-C2f, the input feature map is processed by the first basic convolutional module CBS for feature extraction and activation, and then by the Split layer for channel segmentation, dividing the feature map into two branches. The first branch passes through N D-Bottleneck modules in sequence, while the second branch does not pass through any D-Bottleneck modules. The outputs of all D-Bottleneck modules are then concatenated with the feature map of the second branch, and then passed through the second basic convolutional module CBS to obtain the output feature map of the deformable feature fusion module CN-C2f.

[0023] S214: Construct the multi-scale attention feature fusion module EMA-C2f; the multi-scale attention feature fusion module EMA-C2f consists of the basic convolutional module CBS, the BottleNeck module, and the efficient multi-scale attention mechanism module EMA.

[0024] In the multi-scale attention feature fusion module EMA-C2f, the input feature map is passed through the first basic convolutional module CBS, and then the output feature map of the first basic convolutional module CBS is divided into two branches using a split layer. The first branch is processed by N Bottleneck modules in sequence. The Bottleneck modules are constructed by convolution, residual structure, and SiLU activation function in sequence. The second branch is not processed by the Bottleneck modules. All the outputs of the Bottleneck modules are concatenated with the feature map of the second branch, and then passed through the second basic convolutional module CBS and the efficient multi-scale attention mechanism module EMA in sequence to obtain the output of the multi-scale attention feature fusion module EMA-C2f.

[0025] Furthermore, S21 also includes:

[0026] S215: Construct the Spatial Depth Transformation Convolutional Module (SPDI);

[0027] In the Spatial Depth Transformation Convolutional (SPDI) module, for an input feature map S1×S2×C1, where S1, S2, and C1 represent the height, width, and number of channels of the feature map, the input feature map size is first transformed to S1 / 2×S2 / 2×4C1, and then four sub-feature maps are obtained through slicing. Then, the four sub-feature maps are concatenated, passed through a convolutional layer, and then split into four branches using a split operation. Each of the four branches passes through a different depthwise separable convolutional layer (DWConv). The kernel sizes of the DWConv layers in the first three branches are 3x3, 1×11, and 11×1, respectively. No DWConv layer is used in the last branch. The outputs of each branch are then concatenated and fused together using a convolutional layer to generate the output feature map of the Spatial Depth Transformation (SPDI) convolutional module.

[0028] Furthermore, S21 also includes:

[0029] S216: Construct the spatial pyramid pooling module E-SPPFCSPC;

[0030] In the Spatial Pyramid Pooling Module (E-SPPFCSPC), the input feature map is divided into two branches after passing through the first basic convolutional module (CBS). The first branch inputs the obtained feature map into the SPP structure, which includes pooling layers of different sizes. The outputs of the different pooling layers are then concatenated before passing through the second basic convolutional module (CBS). The second branch inputs the obtained feature map into the third basic convolutional module (CBS). The output feature maps of the second and third basic convolutional modules (CBS) are concatenated, and then the output of E-SPPFCSPC is obtained by sequentially passing through the efficient multi-scale attention mechanism module (EMA) and the fourth basic convolutional module (CBS).

[0031] Furthermore, in the backbone network, the input image sequentially passes through the first basic convolutional module CBS, the second basic convolutional module CBS, the first spatial depth transformation convolutional module SPDI, the third basic convolutional module CBS, the second spatial depth transformation convolutional module SPDI, the first deformable feature fusion module CN-C2F, the fourth basic convolutional module CBS, the third spatial depth transformation convolutional module SPDI, the second deformable feature fusion module CN-C2F, the fifth basic convolutional module CBS, the multi-scale attention feature fusion module EMA-C2f, and the E-SPPFCSPC module. Simultaneously, the feature map obtained from the first spatial depth transformation convolutional module SPDI is input into the first deformable convolutional module CN-CBS through another branch; the feature map obtained from the first deformable convolutional module CN-CBS is divided into two... The network consists of three branches. The first branch enters the first deformable feature fusion module CN-C2F, and the second branch enters the second deformable convolution module CN-CBS. The feature map obtained from the second deformable convolution module CN-CBS is divided into two branches: the first branch enters the second deformable feature fusion module CN-C2F, and the second branch enters the third deformable convolution module CN-CBS. The feature map from the third deformable convolution module CN-CBS is then input into the multi-scale attention feature fusion module EMA-C2f for wellbore fracture surface feature extraction. The backbone network outputs three paths: the output of the first deformable feature fusion module CN-C2F, the output of the second deformable feature fusion module CN-C2F, and the output of the E-SPPFCSPC module. All three feature paths are simultaneously fed into the neck feature fusion network Neck.

[0032] Furthermore, the Neck feature fusion network consists of a basic convolutional module CBS, a multi-scale attention feature fusion module EMA-C2f, a deformable feature fusion module CN-C2F, and an upsampling layer;

[0033] In the neck feature fusion network, the output of the E-SPPFCSPC module in the head network is divided into two branches. A first upsampling operation is performed in the first branch, followed by a first concat concatenation operation between the upsampled feature map and the output feature map of the backbone network's second deformable feature fusion module CN-C2F. Then, the deformable feature fusion module CN-C2F divides the feature map into two branches. A second upsampling operation is performed in the first branch, followed by a second concat concatenation operation between the upsampled feature map and the output feature map of the backbone network's first deformable feature fusion module CN-C2F. The feature map obtained from the second concat concatenation operation is then passed through the first multi-scale attention feature fusion module EMA-C2f and divided into two branches. The first branch serves as the first output of the neck network, while the second branch is input to the first basic convolution of the neck network. In the CBS module, the feature map from the first basic convolutional module CBS is concatenated with the feature map from the second branch of the deformable feature fusion module CN-C2F using a third concat operation. The feature map obtained from the third concat operation is then input into the second multi-scale attention feature fusion module EMA-C2f. The output of the second multi-scale attention feature fusion module EMA-C2f is divided into two branches. The first branch serves as the second output of the neck network, and the feature map of the second branch is input into the second basic convolutional module CBS. Then, the feature map output from the second basic convolutional module CBS is concatenated with the feature map of the second branch output from the backbone network E-SPPFCSPC module using a fourth concat operation. The output of the fourth concat operation is then input into the third multi-scale attention feature fusion module EMA-C2f as the third output of the neck network.

[0034] Furthermore, the head network is composed of a detection output module; the detection output module receives the output of the neck network;

[0035] The detection output module consists of two branches. The first branch consists of the basic convolutional module CBS and Conv2d, and is then optimized using bounding box regression loss. The second branch consists of the basic convolutional module CBS and Conv2d, and is then optimized using class classification loss.

[0036] In the basic convolutional module CBS of the detection output module, FReLU is used as the activation function. The formula for FReLU is as follows:

[0037] f(x c,i,j ) = max(x c,i,j ,T(x c,i,j ))

[0038]

[0039] in,

[0040] f(x c,i,j T(x) represents the output of the feature value at position (i,j) on the c-th channel after passing through the FReLU activation function. c,i,j ) represents the spatial condition function; x c,i,j Let represent the original feature value at position (i,j) in the c-th channel. This represents the parameters shared in the c-th channel. Indicates in x c,i,j The result is obtained by performing pooling operations on the feature values ​​within a local pooling window of size kh×kw, where kh and kw represent the height and width of the local pooling window.

[0041] Another technical solution adopted in this invention is a coal mine shaft microcrack detection device, which uses the above-mentioned method to detect coal mine shaft microcracks.

[0042] Another technical solution adopted in this invention is a storage medium for detecting microcracks in coal mine shafts, which uses the above-mentioned method to detect microcracks in coal mine shafts.

[0043] The beneficial effects of this invention are

[0044] 1. The method of the present invention incorporates the deformable convolution module CN-CBS to construct a parallel sub-network, thereby improving the network's ability to extract feature information.

[0045] 2. The method of the present invention constructs a deformable feature fusion module CN-C2f, which performs feature transformation on the input data through two convolutional layers, which helps to extract features of different levels and abstraction in the input data.

[0046] 3. The method of this invention combines the advantages of the spatial-to-depth module SPDConv, the large kernel decomposition operation Inception, and the depthwise separable convolution DWConv to design SPDI. It avoids the information loss caused by strided convolutions in the backbone network of existing detection methods. By combining non-strided convolutions (i.e., convolutional layers with a stride of 1 in SPDI) and decomposing large convolutional kernels (i.e., combining different small-sized convolutions in parallel in the SPDI module) and then concatenating the outputs, the feature learning efficiency and global modeling ability of the model can be improved, thereby improving the detection efficiency.

[0047] 4. The method of this invention introduces an efficient multi-scale attention mechanism EMA, and constructs a multi-scale attention feature fusion module EMA-C2F and a spatial pyramid pooling module E-SPPFCSCP. The E-SPPFCSPC module can effectively avoid distortion after image cropping and scaling, and solve the problem of repeated feature extraction in convolutional neural networks. The EMA-C2F module and the E-SPPFCSPC module can improve the model's ability to represent microcracks and avoid noise interference. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a flowchart of an embodiment of the present invention.

[0050] Figure 2 This is a flowchart of the deformable feature fusion module CN-C2f according to an embodiment of the present invention.

[0051] Figure 3 This is a flowchart of the deformable convolution module CN-CBS according to an embodiment of the present invention.

[0052] Figure 4 This is a flowchart of the spatial pyramid pooling module E-SPPFCSPC according to an embodiment of the present invention.

[0053] Figure 5 This is a flowchart of the spatial depth transformation convolution module SPDI in an embodiment of the present invention.

[0054] Figure 6 This is a flowchart of the multi-scale attention feature fusion module EMA-C2f in an embodiment of the present invention.

[0055] Figure 7 This is a comparison chart of the detection results of the detection method of this invention and existing detection methods on a wellbore fracture dataset.

[0056] Figure 8 This is a comparison chart of the detection results of the detection method of this invention and existing detection methods on a public dataset. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] This invention provides a method, equipment, and storage medium for detecting microcracks in coal mine shafts. The complete steps are as follows:

[0059] S1: Construct a dataset of microcracks in the mine shaft; and preprocess the dataset by converting the images of coal mine shaft defects to the standard size required by the model, which is 640×640.

[0060] Because the number of crack images of various types in the dataset is unevenly distributed, data augmentation was used to increase the number of well wall crack images to avoid overfitting and affecting training results. To increase the sample size, some road crack images were incorporated to simulate well wall crack images; to mimic the dim shooting environment underground and the effects of dust and fog, the image brightness was adjusted, and salt-and-pepper noise and Gaussian noise were added; geometric transformations such as translation, flipping, and rotation were used to simulate images taken by the camera from different angles. A total of 2223 usable well wall crack images were generated using these methods, and were randomly divided into training, validation, and test sets in a 7:2:1 ratio.

[0061] S2: Construct a wellbore microcrack detection model (see below) Figure 1 The model consists of three modules: a backbone network, a neck feature fusion network, and a prediction output. The specific steps are described below:

[0062] S21: Constructing the backbone network. The backbone network consists of 5 basic convolutional modules (CBS), 3 deformable convolutional modules (CN-CBS), 3 spatial depth transformation convolutional modules (SPDI), 1 attention feature fusion module (EMA-C2F), 2 deformable feature fusion modules (CN-C2f), and 1 spatial pyramid pooling module (E-SPPFCSPC), which is responsible for enhancing the network's ability to extract micro-fracture feature information from the wellbore.

[0063] S211: Construct the CBS module. The CBS module consists of a convolutional layer (Conv), a batch normalization layer (BN), and an activation function (SiLU) in sequence. The CBS module integrates and compresses the channel information of the input feature map, aiming to extract more feature map features; in this embodiment, the size of the convolutional layer (Conv) is 3×3.

[0064] S212: Constructing the CN-CBS module. The backbone network incorporates deformable convolutions (ConvNets v2) to construct parallel sub-networks, in order to avoid excessive computation and preserve feature map information as much as possible. The parallel sub-networks consist of three CN-CBS modules. See also Figure 3 The CN-CBS module consists of a deformable convolutional layer DCNv2, a batch normalization layer BN, and an activation function SiLU in sequence. The deformable convolutional layer DCNv2 uses a 3×3 convolutional kernel.

[0065] In Deformable Convolution DCNv2, random sampling around the current location is achieved by adding an offset variable to each sampling point in the convolution kernel. By adjusting the magnitude of the input features at different spatial locations and the weight of each sampling point, the model's ability to focus on the target image region is enhanced. The formula for calculating deformable convolution is:

[0066]

[0067] Where y(p) represents the value of the output feature map at position p, x represents the input feature map, and p represents the position of the output feature map. k Δp represents the initial position of the k-th sampling point relative to the center of the convolution kernel. k Δmk represents the position offset of the k-th sampling point, and w represents the feature adjustment coefficient of the k-th sampling point. k This represents the weight of the k-th sampling point, where k represents the index of the sampling point and K represents the total number of sampling points.

[0068] S213: Constructing the Deformable Feature Fusion Module CN-C2f. To enhance model adaptability, the CN-C2f module was also designed. The CN-C2F module performs feature transformation on the input data through two convolutional layers, which helps extract features at different levels and levels of abstraction from the input data. See also... Figure 2 The CN-C2f module consists of a CBS module, a channel segmentation layer, and a deformable bottleneck module, D-Bottleneck. D-Bottleneck is formed by connecting two DCNv2 modules via residuals. D-Bottleneck is used to extract multi-scale crack feature information and improve the network's ability to model complex data.

[0069] In the CN-C2f module, the input feature map sequentially passes through the first CBS module for feature extraction and activation. This process helps the model capture more contextual information, thus enabling more accurate target recognition. In this CBS module, the convolutional layer Conv has a stride of 1 and outputs 1 channel. It then passes through a Split layer for channel segmentation, dividing the feature map into two branches. The first branch passes through N D-Bottleneck modules sequentially, while the second branch does not. The outputs of all D-Bottleneck modules are then concatenated with the feature map from the second branch, before passing through the second CBS module. This second CBS module enhances the expressive power of the features, preparing for subsequent feature fusion and dense connections. In this CBS module, the convolutional layer Conv has a stride of 1 and outputs 1 channel. This yields the output feature map of the CN-C2f module.

[0070] S214: Construct the multi-scale attention feature fusion module EMA-C2f. See also Figure 6 The EMA-C2f module consists of two CBS modules, a bottleneck module BottleNeck, and an EMA attention module.

[0071] In the EMA-C2f module, the input feature map passes through the first CBS module, and then a Split layer divides the output feature map from the first CBS module into two branches. The Split operation splits the convolutional feature map tensor into multiple smaller tensors, enabling parallel computation of the feature map and accelerating the training speed and efficiency of the model. The first branch is processed sequentially through N Bottleneck modules. The Bottleneck module is composed of residual structures, 3×3 convolutions, and the SiLU activation function. It achieves convolution operations through partial convolution, realizing efficient capture of spatial features and optimization of parameter calculation, thus improving the efficiency and performance of the model. The second branch does not pass through the Bottleneck module. Then, all the outputs of the Bottleneck modules are concatenated with the feature map of the second branch in the channel dimension, and then sequentially passed through the second CBS module and the EMA attention module to obtain the final EMA-C2f module output.

[0072] Among them, the Efficient Multi-Scale Attention (EMA) mechanism is a high-efficiency multi-scale attention mechanism that does not reduce dimensionality. It employs a parallel sub-network structure to improve feature extraction efficiency while maintaining low depth and low latency, reducing computational cost and parameter count. Global average pooling is used to generate channel statistics, where global spatial location information is compressed into channel descriptors. 1×1 and 3×3 convolutional kernels are placed in parallel sub-networks respectively. Without reducing channel dimensionality, local cross-channel interactions are established in each parallel sub-network. The output of the 1x1 branch encodes global spatial information through two-dimensional global average pooling, while the output of the 3x3 branch is directly converted to the corresponding dimensional shape. Finally, the feature outputs of the two parallel sub-networks are fused through cross-spatial learning. The formula for two-dimensional global average pooling is as follows:

[0073]

[0074] Among them, Z C Let represent the feature value of the feature map at position (i,j) in channel c after global average pooling, where i and j represent the x and y coordinates of the feature map in channel c, respectively. H represents the height of the feature map, W represents the width of the feature map, and X represents the height of the feature map. c (i,j) represents the feature value of the feature map at the (i,j)th position in channel c.

[0075] To facilitate hardware deployment and avoid the complex floating-point operations of the Sigmoid function, the Hard Sigmoid activation function is used for fitting, thereby improving computational efficiency.

[0076]

[0077] x represents the input to the Hard Sigmoid function, which is the output value of the previous layer of the neural network.

[0078] S215: Construct the SPDI module. See also Figure 5 The SPDI module is proposed by combining the advantages of the spatial-to-depth module SPDConv and the big kernel decomposition operation Inception. It improves the feature learning efficiency and global modeling ability of the model through non-stepping convolution and big kernel decomposition.

[0079] Non-staggered convolution is the convolutional layer with a stride of 1 in SPDConv. Existing detection methods have a large number of convolutional operations with a stride of 2 in their backbone networks, which are prone to losing feature information. SPDI is used to replace the straggered convolution with a stride of 2.

[0080] Using large-kernel depthwise convolutions can enhance the feature extraction performance of a model, but it increases the number of parameters and computational cost, and reduces detection speed. The idea behind the Inception architecture is to combine different small-sized convolutions in parallel, concatenating the processed results to form a deeper structure. The advantages of the Inception architecture are that it can efficiently expand the depth and width of the network, improving the accuracy of deep learning networks while preventing overfitting. It also aggregates information at different dimensions, facilitating feature extraction from different scales.

[0081] In the SPDI module, for an input feature map (S1, S2, C1), S1, S2, and C1 represent the height, width, and number of channels of the feature map, respectively. The input feature map is first converted to S1 / 2 × S2 / 2 × 4C1, which halves the spatial dimensions and doubles the number of channels. Then, a slicing operation is used to obtain four sub-feature maps. The four sub-feature maps are then concatenated along the channel dimension, followed by a standard convolutional layer (Conv2d K=1). A split operation is then used to divide the feature map into four branches along the channel dimension. Each branch passes through a different DWConv layer. The DWConv layers in the first three branches have different kernel sizes: 3x3, 1×11, and 11×1. No DWConv layer is used in the last branch. The outputs of each branch are then concatenated and merged using a standard convolutional layer (Conv2d K=1) to generate the final output feature map. The SPDI module enhances detection accuracy and learning efficiency by decomposing the parallel computation of large kernels and using non-staggered convolutional layers that do not lose feature information.

[0082] S216: Construct the E-SPPFCSPC module. See also Figure 4 The E-SPPFCSPC module consists of a Spatial Pyramid Pooling (SPP) module, a Cross-Stage Partial Network (CSP) module, and an EMA module. The E-SPPFCSPC module is a serial structure that effectively avoids distortion after image cropping and scaling, and solves the problem of repetitive feature extraction in convolutional neural networks. The parallel Maxpool structure improves network speed and reduces model computation. Multiple pooling kernels of different sizes connected in parallel help retain more detailed information in the feature maps, and the output of the EMA attention module allows the deep network to focus on the feature representation of minute cracks.

[0083] In the CSP module, the input feature map is used to extract features through the first CBS module, and then splits into two branches. The first branch inputs the obtained feature map into the SPP structure. The SPP (Spatial Pyramid Pooling) structure is a pooling operation used to extract features of different receptive field sizes. It includes multiple pooling layers, each with a different size, used to aggregate features of different ranges. In this embodiment, in the main branch, the feature map obtained from the first CBS module is divided into three branches, which are subjected to max pooling operations with sizes of 5×5, 9×9, and 13×13 respectively. The outputs of the three branches are then concatenated and passed through the second CBS module. The second branch inputs the obtained feature map into the third CBS module to reduce computation and memory consumption. The output feature map of the second CBS module in the first branch is partially concatenated with the output feature map of the third CBS module in the second branch to form a new feature map, which is then further processed through the EMA attention module and the fourth CBS module. By inserting the SPP and EMA modules into the CSP block, the receptive field of the model can be increased, improving the model's feature extraction capability and computational efficiency.

[0084] In the backbone network, the main branch is as follows: the input image sequentially passes through the first CBS module, the second CBS module, the first SPDI module, the third CBS module, the second SPDI module, the first CN-C2F module, the fourth CBS module, the third SPDI module, the second CN-C2F module, the fifth CBS module, the EMA-C2f module, and the E-SPPFCSPC module. Simultaneously, the feature map obtained from the first SPDI module is input to the first CN-CBS module through another branch. The feature map obtained from the first CN-CBS module is divided into two branches; the first branch enters the first CN-C2F module. In this module, the second branch enters the second CN-CBS module; the feature map obtained from the second CN-CBS module is divided into two branches, the first branch enters the second CN-C2F module, and the second branch enters the third CN-CBS module; the feature map from the third CN-CBS module is input into the EMA-C2f module; the surface feature extraction of the wellbore fracture is completed, and the backbone network outputs three paths: the output of the first CN-C2F module, the output of the second CN-C2F module, and the output of the E-SPPFCSPC module; the three shallow and deep features are simultaneously fed into the neck feature fusion module.

[0085] S22: Constructing the Neck Feature Fusion Network. The Neck feature fusion network consists of 2 CBS units, 3 EMA-C2f modules, 1 CN-C2F module, and multiple upsampling and splicing operations. It is responsible for improving the model's ability to extract multi-scale cracks and complex features, reducing the computational load of the model, and accelerating the network detection speed.

[0086] In the neck network, the output of the E-SPPFCSPC module in the head network is divided into two branches. A first upsampling operation is performed in the first branch, followed by a first concat concatenation operation between the feature map obtained from the first upsampling operation and the output feature map of the second CN-C2F module in the backbone network. Then, the CN-C2F module divides the feature map into two branches. A second upsampling operation is performed in the first branch, followed by a second concat concatenation operation between the feature map obtained from the second upsampling operation and the output feature map of the first CN-C2F module in the backbone network. The feature map obtained from the second concat concatenation operation is then passed through the first EMA-C2f module and divided into two branches. The first branch serves as the first output of the neck network, while the second branch is input to the neck... In the first CBS module of the network, the feature map passed through the first CBS module is concatenated with the feature map of the second branch passed through the CN-C2F module in a third concat operation. The feature map obtained from the third concat operation is input into the second EMA-C2f module. The output of the second EMA-C2f module is divided into two branches. The first branch serves as the second output of the neck network, and the feature map of the second branch is input into the second CBS module. Then, the feature map output from the second CBS module is concatenated with the feature map of the second branch output from the backbone network E-SPPFCSPC module in a fourth concat operation. The output of the fourth concat operation is input into the third EMA-C2f module as the third output of the neck network.

[0087] S23: Construct the head network. The head network consists of detection output modules.

[0088] In the head network, the detection output module predicts microcracks in the wellbore and outputs the classification detection results of surface defects in the wellbore.

[0089] See Figure 1 The detection output module receives three outputs from the neck network. The detection output module consists of two branches. The first branch consists of the CBS module, Conv2d, and is finally optimized using box regression loss (box-loss). The second branch consists of the CBS module, Conv2d, and is finally optimized using class classification loss (cls-loss).

[0090] Existing detection methods generally use SiLU as the activation function. This invention uses FReLU as the activation function in its detection output module. FReLU is an activation function specifically designed for visual tasks. By introducing spatial conditions, it extends ReLU and PReLU into 2D activation functions, solving the spatial insensitivity problem of general activation functions and making it more suitable for micro-crack detection. The formula for FReLU is as follows:

[0091] f(xc,i,j ) = max(x c,i,j ,T(x c,i,j ))

[0092]

[0093] in,

[0094] f(x c,i,j ) represents the output of the feature value at position (i,j) in the c-th channel after passing through the FReLU activation function.

[0095] T(x c,i,j The ) represents the spatial condition function. By introducing the spatial condition function, the activation function can consider the spatial relationships within the local region, which is particularly important for slender and potentially variable directional features such as microcracks; x c,i,j Let represent the original feature value at position (i,j) in the c-th channel. This represents the parameters shared in the c-th channel. This means that the activation values ​​at different positions are adjusted according to the same conditions, which helps maintain feature consistency and reduce the number of model parameters. Indicates in x c,i,j The result is obtained by performing pooling operations on the feature values ​​within a local pooling window of size kh×kw, where kh and kw represent the height and width of the local pooling window.

[0096] S3: Train the detection model using the training set and update the model with new parameters.

[0097] Test model:

[0098] To verify the detection effectiveness of the YOLO-DECT invention, a comparative experiment was conducted. A shaft detection simulation experimental platform was built at the Key Laboratory of Deep Coal Mine Mining Response and Disaster Prevention at Anhui University of Science and Technology for actual image capture. The test set images were categorized into three types: minor cracks, network cracks, and severe cracks. Minor cracks showed no spalling deformation or branch cracks. Network cracks had numerous branches, a large coverage area, and a long length. Severe cracks showed obvious crack blocks, large gaps, and significant spalling.

[0099] Six object detection networks were compared: Faster-RCNN, YOLOv5, YOLOv7, YOLOv8, YOLOv8-RD, and YOLOv8-based. The results of the comparative experiment are shown in Table 1, where bold text represents the best performance.

[0100] Table 1. Comparison of experimental results indicators between the method of this invention and different detection methods. As shown in Table 1, compared with the two-stage algorithm Faster R-CNN, the detection speed (FPS) of the method in this invention is somewhat lower. However, YOLO-DECT requires far fewer parameters and less computational power than Faster R-CNN, resulting in a 9.5% improvement in detection accuracy. Comparing YOLO-DECT with YOLOv5s, YOLOv7tiny, and YOLOv8n, Table 1 shows that YOLO-DECT, while maintaining detection speed, reduces floating-point operations by 53.1%, 43.2%, and 8.5%, respectively, and increases mAP by 15.2%, 10%, and 3%, respectively, achieving the best detection performance. YOLOv8-RD and YOLOv8-based are improved networks for road and steel defect detection, respectively. Compared with YOLOv8n, YOLOv8-RD has fewer parameters and lower floating-point operations. YOLOv8-based only introduces the SE attention mechanism, making the improvement relatively simple. For wellbore microcrack detection, their improvement effects are not significant. Although YOLOv5-DECT has a slightly higher detection speed than the method of this invention, its other three indicators are inferior to those of the method of this invention.

[0101] To more comprehensively demonstrate the performance of the YOLO-DECT network model in detecting microcracks in coal mine shafts, this paper... Figure 7 A detailed comparative analysis was conducted with Table 2. Figure 7 The image consists of four rows of images. In each row, the left side shows the detection results from the YOLOv8 network, and the right side shows the detection results from the method of this invention. The first row shows the detection results of the two methods for serious cracks; the second row shows the detection results of the two methods for reticulate cracks; and the third row shows the detection results of the two methods for slight cracks. In the image, each box represents a detected defect area, and the defect category and confidence level are labeled above each defect area. This detail increases the interpretability and practical value of the results. For all three types of defects, the YOLO-DECT algorithm shows higher detection accuracy. While the YOLOv8 algorithm exhibits some false positives and duplicate detections, the YOLO-DECT algorithm accurately identifies crack features.

[0102] The fourth row of images shows a heatmap of the slight crack detection process, with the defect category and confidence level labeled above the defect area. It can be seen that the method of this invention focuses more on key crack features, resulting in superior detection performance.

[0103] Table 2 Comparison of Detection Results of Different Detection Methods for Different Types of Cracks

[0104]

[0105] As shown in Table 2, the average detection accuracy of the method of the present invention is 6.2%, 1.3%, and 2.1% higher than that of the YOLOv8n network for three types of cracks: slight, reticulate, and serious. Among them, the detection effect of microcracks is the most significant, which is advantageous for detecting small targets such as microcracks.

[0106] To verify the generalization ability and robustness of the YOLO-DECT network, the GRDDC2020 dataset provided by the Global Road Damage Detection Challenge was used for validation. Due to the large size of this dataset and the fact that many images were collected from different countries, with a significant number lacking adequate annotations, 10,000 samples were selected from the Japanese category dataset for testing. There are five annotation classes: d00 (longitudinal crack); d10 (transverse crack); d20 (crazing); d40 (pothole); and d50 (manhole cover). The validation results are as follows: Figure 8 As shown, Figure 8 The image consists of four rows. In each row, the left side shows the detection results from the YOLOv8 network, and the right side shows the detection results from the method described in this invention. The results show that YOLO-DECT outperforms the YOLOv8 network in verifying various labeled cracks, exhibiting higher verification accuracy. This demonstrates that YOLO-DECT is not only effective on self-built datasets for detecting microcracks in wellbore systems, but also possesses a certain degree of general applicability.

[0107] In summary, the YOLO-DECT network demonstrates excellent detection performance for various surface defects in coal mine shafts, indicating its strong generalization ability and robustness. This is of great significance for maintaining environmental safety in coal mine shafts in practical applications.

[0108] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0109] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for detecting microcracks in coal mine shafts, characterized in that, Includes the following steps: S1: Construct a dataset of wellbore microcracks and divide it into training, validation and test sets; S2: Construct a wellbore microcrack detection model; S21: Construct a backbone network; S22: Construct a neck feature fusion network; S23: Construct the head network; S3: Train the detection model using the training set and update the model with new parameters; S21 includes: S211: Construct the basic convolutional module CBS; the basic convolutional module CBS consists of a convolutional layer Conv, a batch normalization layer BN, and an activation function SiLU in sequence; S212: Construct deformable convolutional modules CN-CBS; the deformable convolutional module CN-CBS consists of deformable convolutional layer DCNv2, batch normalization layer BN, and activation function SiLU in sequence; the three deformable convolutional modules CN-CBS form a parallel sub-network; In the deformable convolutional layer DCNv2, the formula for calculating the deformable convolutional layer is: ; Where y(p) represents the output feature map at position eigenvalues ​​at that location Indicates the input feature map, This indicates the location of the output feature map. Indicates the first The initial position of each sampling point relative to the center of the convolution kernel Indicates the first Position offset of each sampling point Indicates the first The feature adjustment coefficient for each sampling point Indicates the first The weight of each sampling point Indicates the sequence number of the sampling point. Indicates the total number of sampling points; S21 further includes: S213: Construct the deformable feature fusion module CN-C2f; In the deformable feature fusion module CN-C2f, the input feature map is processed by the first basic convolutional module CBS for feature extraction and activation, and then by the Split layer for channel segmentation, dividing the feature map into two branches. The first branch passes through N D-Bottleneck modules in sequence, while the second branch does not pass through any D-Bottleneck modules. The outputs of all D-Bottleneck modules are then concatenated with the feature map of the second branch, and then passed through the second basic convolutional module CBS to obtain the output feature map of the deformable feature fusion module CN-C2f. S214: Construct the multi-scale attention feature fusion module EMA-C2f; the multi-scale attention feature fusion module EMA-C2f consists of the basic convolutional module CBS, the BottleNeck module, and the efficient multi-scale attention mechanism module EMA. In the multi-scale attention feature fusion module EMA-C2f, the input feature map is passed through the first basic convolutional module CBS, and then the output feature map of the first basic convolutional module CBS is divided into two branches using a split layer. The first branch is processed by N Bottleneck modules in sequence. The Bottleneck modules are constructed by convolution, residual structure, and SiLU activation function in sequence. The second branch is not processed by the Bottleneck modules. All the outputs of the Bottleneck modules are concatenated with the feature map of the second branch, and then passed through the second basic convolutional module CBS and the efficient multi-scale attention mechanism module EMA in sequence to obtain the output of the multi-scale attention feature fusion module EMA-C2f.

2. The method for detecting microcracks in coal mine shafts according to claim 1, characterized in that, S21 further includes: S215: Construct the Spatial Depth Transformation Convolutional Module (SPDI); In the Spatial Depth Transformation Convolutional (SPDI) module, for the input feature map S1×S2× S1, S2, These represent the height, width, and number of channels of the feature map, respectively; first, the input feature map size is converted to S1 / 2×S2 / 2×4. Then, four sub-feature maps are obtained through slicing. Then, the four sub-feature maps are concatenated, passed through a convolutional layer, and then split into four branches using a split operation. Each branch passes through a different depthwise separable convolutional layer (DWConv). The kernel sizes of the DWConv layers in the first three branches are 3x3, 1×11, and 11×1, respectively. No DWConv layer is used in the last branch. The outputs of each branch are then concatenated and fused together using a convolutional layer to generate the output feature map of the Spatial Depth Transformation (SPDI) convolutional module.

3. The method for detecting microcracks in coal mine shafts according to claim 2, characterized in that, S21 further includes: S216: Construct the spatial pyramid pooling module E-SPPFCSPC; In the Spatial Pyramid Pooling Module (E-SPPFCSPC), the input feature map is divided into two branches after passing through the first basic convolutional module (CBS). The first branch inputs the obtained feature map into the SPP structure, which includes pooling layers of different sizes. The outputs of the different pooling layers are then concatenated before passing through the second basic convolutional module (CBS). The second branch inputs the obtained feature map into the third basic convolutional module (CBS). The output feature maps of the second and third basic convolutional modules (CBS) are concatenated, and then the output of E-SPPFCSPC is obtained by sequentially passing through the efficient multi-scale attention mechanism module (EMA) and the fourth basic convolutional module (CBS).

4. The method for detecting microcracks in coal mine shafts according to claim 3, characterized in that, In the backbone network, the input image sequentially passes through the first basic convolutional module (CBS), the second basic convolutional module (CBS), the first spatial depth transformation convolutional module (SPDI), the third basic convolutional module (CBS), the second spatial depth transformation convolutional module (SPDI), the first deformable feature fusion module (CN-C2F), the fourth basic convolutional module (CBS), the third spatial depth transformation convolutional module (SPDI), the second deformable feature fusion module (CN-C2F), the fifth basic convolutional module (CBS), the multi-scale attention feature fusion module (EMA-C2f), and the E-SPPFCSPC module. Simultaneously, the feature map obtained from the first spatial depth transformation convolutional module (SPDI) is input to the first deformable convolutional module (CN-CBS) through another branch. The feature map obtained from the first deformable convolutional module (CN-CBS) is then divided into two branches. The first branch enters the first deformable feature fusion module CN-C2F, and the second branch enters the second deformable convolution module CN-CBS. The feature map obtained through the second deformable convolution module CN-CBS is divided into two branches: the first branch enters the second deformable feature fusion module CN-C2F, and the second branch enters the third deformable convolution module CN-CBS. The feature map after passing through the third deformable convolution module CN-CBS is input into the multi-scale attention feature fusion module EMA-C2f for wellbore fracture surface feature extraction. The backbone network outputs three paths: the output of the first deformable feature fusion module CN-C2F, the output of the second deformable feature fusion module CN-C2F, and the output of the E-SPPFCSPC module. The three feature paths are simultaneously fed into the neck feature fusion network Neck.

5. The method for detecting microcracks in coal mine shafts according to claim 4, characterized in that, The Neck feature fusion network consists of a basic convolutional module CBS, a multi-scale attention feature fusion module EMA-C2f, a deformable feature fusion module CN-C2F, and an upsampling layer. In the neck feature fusion network, the output of the E-SPPFCSPC module in the head network is divided into two branches. A first upsampling operation is performed in the first branch, followed by a first concat concatenation operation between the upsampled feature map and the output feature map of the backbone network's second deformable feature fusion module CN-C2F. Then, the deformable feature fusion module CN-C2F divides the feature map into two branches. A second upsampling operation is performed in the first branch, followed by a second concat concatenation operation between the upsampled feature map and the output feature map of the backbone network's first deformable feature fusion module CN-C2F. The feature map obtained from the second concat concatenation operation is then passed through the first multi-scale attention feature fusion module EMA-C2f and divided into two branches. The first branch serves as the first output of the neck network, while the second branch is input to the first basic convolution of the neck network. In the CBS module, the feature map from the first basic convolutional module CBS is concatenated with the feature map from the second branch of the deformable feature fusion module CN-C2F using a third concat operation. The feature map obtained from the third concat operation is then input into the second multi-scale attention feature fusion module EMA-C2f. The output of the second multi-scale attention feature fusion module EMA-C2f is divided into two branches. The first branch serves as the second output of the neck network, and the feature map of the second branch is input into the second basic convolutional module CBS. Then, the feature map output from the second basic convolutional module CBS is concatenated with the feature map of the second branch output from the backbone network E-SPPFCSPC module using a fourth concat operation. The output of the fourth concat operation is then input into the third multi-scale attention feature fusion module EMA-C2f as the third output of the neck network.

6. The method for detecting microcracks in coal mine shafts according to claim 5, characterized in that, The head network is composed of a detection output module; the detection output module receives the output of the neck network. The detection output module consists of two branches. The first branch consists of the basic convolutional module CBS and Conv2d, and is then optimized using bounding box regression loss. The second branch consists of the basic convolutional module CBS and Conv2d, and is then optimized using class classification loss. In the basic convolutional module CBS of the detection output module, FReLU is used as the activation function. The formula for FReLU is as follows: ; ; in, Spatial condition function; Indicates the position on the c-th channel The original feature value at that location, This represents the parameters shared in the c-th channel. In x c,i,j The result is obtained by pooling the feature values ​​within a local pooling window of size kh×kw, where kh and kw represent the height and width of the local pooling window.

7. A microcrack detection device for coal mine shafts, characterized in that, The method described in any one of claims 1 to 6 is used to detect microcracks in coal mine shafts.

8. A storage medium for detecting microcracks in coal mine shafts, characterized in that, The method described in any one of claims 1 to 6 is used to detect microcracks in coal mine shafts.