Mine fracture segmentation detection method based on sample-free low-illumination enhancement
By adopting the sample-free low-illumination enhancement method in the detection of mine cracks, combined with the Attention-Skip Connection and ASPP structure, the problems of low brightness and insufficient data of mine caves are solved, and efficient and accurate crack detection is achieved.
Patent Information
- Application Number
- CN202411860315.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-11
AI Technical Summary
The low brightness of the mine cave image, lack of positive samples and limited data volume, lead to a decrease in the quality of crack detection.
The mine crack segmentation detection method based on sample-free low-illumination enhancement is adopted. Through the linkage of the low-illumination enhancement model and the segmentation detection model, the Attention-Skip Connection and ASPP structure are used for feature fusion and image enhancement, and the training process is optimized to improve detection accuracy.
Accurate detection of mine cracks under low light conditions is achieved, image quality and detection accuracy are improved, and dependence on large amounts of positive sample data is reduced. It is suitable for training in small data sets.
Smart Images

Figure CN119810441A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mine crack detection, and in particular relates to a mine crack segmentation detection method based on sample-free low-illumination enhancement. Background Art
[0002] Mine crack detection may be required in permit applications, environmental assessments, and safety reviews to ensure compliance with relevant laws and regulations. Mine cracks are a manifestation of geological structures or geological changes caused by mining activities in the mining area. These cracks may cause surface collapse, mine collapse, and other serious safety issues. Due to the dark, narrow, and closed characteristics of mines, the lighting conditions are limited, and it is difficult to obtain images with uniform and normal brightness when crack detection is performed. The image quality is low and the number is small, which brings considerable difficulties to crack detection.
[0003] Low-light enhancement is a technology used to improve image quality in low-light conditions. In low-light environments, images captured by cameras or human eyes are usually dim, blurry, noisy, and so on. Low-light enhancement technology aims to improve image brightness, contrast, and clarity through various methods, thereby improving image visibility and quality. Low-light enhancement technology is of great significance in applications such as night photography, monitoring systems, security, and unmanned driving. It can improve image visibility and enhance system performance and reliability.
[0004] At present, the mainstream low-light enhancement solutions are: increasing exposure time or improving ISO sensitivity, image enhancement algorithm, multi-frame image fusion and using special hardware devices. Increasing exposure time or improving ISO sensitivity is to increase the exposure time or increase the ISO sensitivity of the camera when shooting images to increase the brightness of the image. However, long exposure time may cause image blur, and high ISO sensitivity may introduce more noise; image enhancement algorithm is to enhance low-light images using image processing algorithms, and common algorithms include histogram equalization, contrast enhancement, nonlinear filtering, etc. These algorithms can adjust the brightness, contrast and color distribution of the image to improve the visual effect of the image; multi-frame image fusion is to improve the brightness and clarity of the image by fusing multiple low-exposure images taken in the same scene or images with different exposure times. This method can fuse images by averaging, weighted average, maximum value, etc., thereby reducing noise and improving image quality; using special hardware devices, such as low-light sensors, night vision cameras, etc., these devices can capture clearer images under low-light conditions, and are usually equipped with special image processing functions to further enhance image quality.
[0005] Crack detection refers to the detection of cracks or fissures on the surface of the ground or structure in an image or video. Image segmentation is a commonly used method in crack detection, and its goal is to divide the image into several semantically similar regions. Commonly used image segmentation methods for crack detection mainly include: edge detection, region-based segmentation, deep learning-based segmentation, and feature extraction and classification. Edge detection is a common image segmentation method, and its goal is to detect boundaries or contours in an image. Commonly used edge detection algorithms include Sobel, Prewitt, Canny, etc., which can detect places in the image where the grayscale value changes greatly, which often correspond to cracks; region-based segmentation divides the image into regions with similar features, such as color, texture, etc. Commonly used region-based segmentation methods include watershed algorithm, region growing, etc., which can take into account the similarity between adjacent pixels in the image, thereby realizing the detection of cracks; deep learning-based segmentation methods include semantic segmentation, instance segmentation, etc., which can learn the semantic and spatial relationship between different objects or regions in the image, thereby realizing accurate detection of cracks; another common method is to first extract features from the image, and then use a classifier to classify these features, thereby realizing the detection of cracks. Commonly used features include texture features, shape features, etc., and commonly used classifiers include support vector machines (SVM), random forests, etc.
[0006] In recent years, low-light image enhancement algorithms and image segmentation methods based on deep learning methods have shined in the fields of security monitoring, autonomous driving, medical imaging, drones and aerial photography, military and security, and have shown great potential and advantages. In the field of security monitoring, these algorithms can help the monitoring system capture key information more clearly and improve the accuracy and efficiency of monitoring. In terms of autonomous driving, the application of low-light image enhancement algorithms can enhance the night vision ability of vehicles and improve the safety and stability of driving systems. In addition, the development of drones and aerial photography has also benefited from the application of these algorithms, making aerial images clearer and more detailed. In summary, low-light image enhancement algorithms and image segmentation methods based on deep learning methods play an important role in various fields and have broader application prospects in the future.
[0007] Mine cracks are one of the potential dangers in mine structures. Timely and accurate detection of cracks can prevent geological disasters, improve mine safety, and monitor structural health to assess stability and strengthen engineering. In addition, crack detection helps optimize resource development plans, reduce environmental damage and pollution risks, and ultimately reduce the possibility of accidents and maintenance costs, ensuring the continued operation of mines. In actual operations, due to the narrow, closed, and slender characteristics of mines, affected by light sources, equipment conditions, etc., the photos collected in mines are often of poor quality and low brightness. Poor training data conditions may lead to a decrease in the generalization ability of the model, increase the difficulty of debugging and optimization, reduce the credibility of the model, and bring certain difficulties to the subsequent deep learning method to detect cracks. In addition, it is difficult to obtain a large number of positive sample images with normal brightness under mine conditions for low-light enhancement model training, which greatly affects the effect of image enhancement, resulting in a decrease in detection quality. Summary of the invention
[0008] The purpose of the present invention is to address the above-mentioned deficiencies in the prior art and provide a mine crack segmentation detection method based on sample-free low-illuminance enhancement to solve the problems of low brightness of mine images, lack of positive samples and limited data volume.
[0009] In order to achieve the above object, the technical solution adopted by the present invention is:
[0010] A mine crack segmentation detection method based on sample-free low-illumination enhancement comprises the following steps:
[0011] S1, obtaining an original image of a mine crack, inputting the original image into a low-light enhancement model, and outputting an enhanced mine crack image;
[0012] S2, inputting the enhanced mine crack image into the segmentation detection model, and outputting the mine crack segmentation detection result;
[0013] S3. Calculate the loss function of the segmentation detection model based on the mine crack segmentation detection results;
[0014] S4. Using the loss function value of the segmentation detection model as a weight, calculating the loss function of the low-light enhancement model, and then optimizing and training the low-light enhancement model.
[0015] Furthermore, S1 specifically includes:
[0016] The original image of the mine crack is downsampled once and 2D convolved twice to obtain a feature thumbnail;
[0017] The feature thumbnail is sent to 6 channel-by-channel separable convolutional layers, and Attention-Skip Connection is used between the 1st, 4th, 2nd, 5th, 3rd, and 6th layers of the 6 channel-by-channel separable convolutional layers for feature fusion. The Zero-DCE illumination enhancement curve is used to enhance the image after feature fusion, and then the enhanced mine crack image is output.
[0018] Furthermore, Attention-Skip Connection is used for feature fusion, including:
[0019] In the spatial attention mechanism, the fused feature map H×W×C output by the channel-by-channel separable convolution layer of the 1st, 4th, 2nd, 5th or 3rd, 6th layers is subjected to global maximum pooling and global average pooling in the channel dimension to obtain a H×W×1 feature map respectively. The two H×W×1 feature maps are concatenated into a H×W×2 feature map by channel, and then sent to the standard 7X7 convolution for parameter learning to obtain a H×W×1 feature map. Finally, the spatial attention weight matrix M is obtained through the Sigmoid activation function. s ;
[0020] In the channel attention mechanism, the fused feature map H×W×C output by the channel-by-channel separable convolutional layer of the 1st, 4th, 2nd, 5th or 3rd, 6th layers is average pooled and max pooled to obtain a 1×1×C feature map, and then the two 1×1×C feature maps are sequentially sent to a weight-sharing multi-layer perceptron. Finally, the output features of each are tensor accumulated and Sigmoid activated to obtain the channel attention weight matrix M. c ;
[0021] The spatial attention weight matrix M s and the channel attention weight matrix M c Tensor multiplication operations are performed on the fusion feature maps H×W×C respectively to obtain two weighted feature maps, and the two weighted feature maps are tensor added to obtain the optimized target feature map.
[0022] Furthermore, S2 specifically includes:
[0023] The enhanced mine crack image is input into the encoder from the right end of the U-Net-based segmentation detection model, and 5 layers of convolution operations are performed in sequence. The network layers are deepened downward through the MaxPool operation. At the same time, the feature maps after the first 4 layers of convolution are sent to the decoder on the left through the Attention-Skip Connection. The encoder and decoder are connected at the bottom of the network through the ASPP module. The left decoder is fused with the feature maps after the first 4 layers of convolution of the encoder after 4 layers of deconvolution upsampling, and the low-light enhanced mine crack segmentation detection result is output from the last layer of the left decoder of the segmentation detection model.
[0024] Furthermore, the method of connecting the encoder and the decoder of the ASPP module is:
[0025] The feature map output by the encoder is sent to four convolution branches in parallel, including: one 1×1 convolution branch with the number of output channels C1; three dilated convolution branches with dilated rates of 6, 12, and 18, with a convolution kernel size of 3×3 and the number of output channels C2;
[0026] The output feature maps of the four convolution branches are concatenated in the channel dimension. The number of channels of the concatenated feature map is C1+3×C2, and the size is H×W. A 1×1 convolution layer is connected after the concatenated feature map, and the number of output channels is C. f , and used as the input of the decoder.
[0027] Furthermore, in S3, the loss function of the segmentation detection model is calculated, including:
[0028]
[0029] Where Loss is the Dice loss function; y i is the category of pixel i in the true label, p i is the probability that pixel i in the mine crack segmentation detection result predicted by the segmentation detection model belongs to the target category; N is the total number of pixels.
[0030] Furthermore, in S4, the loss function of the low-light enhancement model is:
[0031] L total =W1L gsc +W2L gec
[0032] Where, L total is the total loss function of the low-light enhancement model; L gsc is the global homogeneity loss function; L gec is the global exposure control loss function; W1 and W2 are L gsc and L gec The weight of .
[0033] Furthermore, the global homogeneity loss function L gsc for:
[0034] L gsc =∑ i∈A ∑ j∈B(i) [(|Y i -Y j |-|X i -X j |) 2 -W gsc (|Y i -Y j |-|X i -X j |)]
[0035] Where A is the coordinate matrix of the pixel points in the mine crack image; B is the neighborhood pixel matrix with pixel j as the center and extending k pixels in one direction; X is the input value before brightening, Y is the pixel value after brightening, i is the traversal of the pixel, and W is the pixel value after brightening. gsc is the parameter; i , Y j , X i and X j They are the average pixel value after brightening point i in the neighborhood pixel matrix, the average pixel value after brightening point j, the input value before brightening point i in the neighborhood pixel matrix, and the average pixel value before brightening point j;
[0036] Among them, the parameter W gsc for:
[0037]
[0038] In the formula, s is the number of training steps, and b is the number of samples in the training setting; It means to find the derivative of the function with respect to the variable step; Loss is the Dice loss function.
[0039] Furthermore, the global exposure control loss function L gec for:
[0040]
[0041] Where M is the number of different overlapping local regions; ξ is the three color channels of the image, ξ = {R, G, B}; c is the traversal of the three channels R, G, B; Z k c is the average intensity value of the local area in the enhanced image; E is 0.7; ▽ x and y Represents the gradient operation in the horizontal and vertical directions respectively; W gec as a parameter.
[0042] The mine crack segmentation detection method based on sample-free low-illumination enhancement provided by the present invention has the following features:
[0043] Beneficial effects:
[0044] 1. The model of the present invention has the advantages of being lightweight, efficient, and not requiring a large number of samples for training. It can show strong robustness even when trained on a small data set, and can effectively solve problems such as low brightness of mine images, lack of positive samples, and limited data volume.
[0045] 2. According to the characteristics of crack data, this paper designs a set of global homogeneity loss functions and global exposure control loss functions, designs the Attention-Skip Connection method for feature fusion, and introduces the ASPP structure. During training, the dual model introduces the parameter W gsc and W gec The method is combined to achieve synchronous training of model fusion. When in use, the unsupervised low-light enhancement algorithm is first used to enhance the image to improve the image quality. The enhanced image is then input into the segmentation detection model to achieve accurate segmentation of cracks, solving the characteristics of low brightness, no positive samples and small number of mine images. The method is also relatively lightweight and can be deployed on mobile terminals, which is convenient for immediate processing after detection in mines.
[0046] 3. Compared with the traditional image enhancement detection network, the present invention designs a global homogeneity loss function and a global exposure control loss function, realizes sample-free low-light enhancement and model fusion, and solves the problem of difficulty in obtaining positive sample images in mines.
[0047] 4. The present invention cascades the low-light enhancement model and the segmentation detection model, so that the goal of the low-light enhancement model is transformed from a human perspective to a deep learning segmentation perspective, thereby optimizing the image enhancement direction and improving the robustness of the segmentation detection model.
[0048] 5. The present invention has newly designed the Attention-Skip Connection method to realize the fusion of front and back features and spatial channel features. The dual-channel fusion based on the front and back feature maps greatly improves the model's ability to extract crack features, realizes active background attention fading, greatly improves detection accuracy, and provides technical method support for crack detection in dim mines. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 The present invention is a flow chart of the mine crack segmentation detection method based on sample-free low-illumination enhancement.
[0050] Figure 2It is a structural schematic diagram of the mine crack segmentation detection method based on sample-free low-illumination enhancement of the present invention.
[0051] Figure 3 It is a schematic diagram of the Attention-Skip Connection method of the present invention.
[0052] Figure 4 It is a schematic diagram of the ASPP module structure of the present invention. DETAILED DESCRIPTION
[0053] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0054] Example 1
[0055] This embodiment provides a method for detecting cracks in a mine cave based on low-light enhancement without samples. Figure 1 and Figure 2 , which specifically includes the following steps:
[0056] Step S1, obtaining an original image of a mine crack, inputting the original image into a low-light enhancement model, and outputting an enhanced mine crack image;
[0057] Specifically, the original image of the mine crack is downsampled once and 2D convolved twice in sequence to obtain a feature thumbnail;
[0058] The feature thumbnail is sent to 6 channel-by-channel separable convolutional layers, and the activation function between each layer of the channel-by-channel separable convolutional layer is ReLU; Attention-SkipConnection is used for feature fusion between the 1st, 4th, 2nd, 5th, 3rd, and 6th layers of the 6 channel-by-channel separable convolutional layers, and the Zero-DCE illumination enhancement curve is used to enhance the image after feature fusion, and then the enhanced mine crack image is output.
[0059] This example uses Attention-Skip Connection for feature fusion. Figure 3 , the specific method is:
[0060] The front and back feature maps of the 1st, 4th, 2nd, 5th or 3rd, 6th layers are tensor accumulated point by point to obtain a fused feature map, which is then sent to the spatial attention mechanism and the channel attention mechanism in parallel.
[0061] In the spatial attention mechanism, the fused feature map H×W×C output by the channel-by-channel separable convolution layer of the 1st, 4th, 2nd, 5th or 3rd, 6th layers is subjected to global maximum pooling and global average pooling in the channel dimension to obtain a H×W×1 feature map respectively. The two H×W×1 feature maps are concatenated into a H×W×2 feature map by channel, and then sent to the standard 7X7 convolution for parameter learning to obtain a H×W×1 feature map. Finally, the spatial attention weight matrix M is obtained through the Sigmoid activation function. s ;
[0062] In the channel attention mechanism, the fused feature map H×W×C output by the channel-by-channel separable convolutional layer of the 1st, 4th, 2nd, 5th or 3rd, 6th layers is average pooled and max pooled to obtain a 1×1×C feature map, and then the two 1×1×C feature maps are sequentially sent to a weight-sharing multi-layer perceptron. Finally, the output features of each are tensor accumulated and Sigmoid activated to obtain the channel attention weight matrix M. c ;
[0063] Finally, the spatial attention weight matrix M s and the channel attention weight matrix M c Tensor multiplication operations are performed on the fusion feature maps H×W×C respectively to obtain two weighted feature maps, and the two weighted feature maps are tensor added to obtain the optimized target feature map.
[0064] This embodiment uses the illumination enhancement curve of Zero-DCE to enhance the image after feature fusion, specifically:
[0065] The basic lighting enhancement curve formula is:
[0066] LE(I(x);α)=I(x)+αI(x)(1-I(x))
[0067] Where x is the pixel coordinate, α∈[-1,1] is a learnable parameter, and LE(I(x);α) is the enhanced image of the input I(x) (the three color channels are processed separately).
[0068] To fit a more complex curve, we can iteratively nest this function to obtain:
[0069] LE1(x)=I(x)+α1I(x)(1-I(x))
[0070] LE2(x)=LE1(x)+α2LE1(x)(1-LE1(x))
[0071] …
[0072] LE n (x) = LEn-1 (x)+α n LE n-1 (x)(1-LE n-1 (x)
[0073] Each round of iteration has a new parameter α n , this algorithm sets the maximum n to 8, that is, calling the quadratic function 8 times. At the same time, each pixel has an independent α, and the final illumination enhancement curve is:
[0074] LE n (x) = LE n-1 (x)+A n (x)LE n-1 (x)(1-LE n-1 (x)
[0075] After multiple iterations, the purpose of enhancing the image after feature fusion can be achieved.
[0076] Step S2, inputting the enhanced mine crack image into the segmentation detection model, and outputting the mine crack segmentation detection result;
[0077] This embodiment is a segmentation detection model constructed based on the U-Net model, which is mainly composed of an encoder (Encoder), a decoder (Decoder), an Attention-Skip Connection, an ASPP and an output layer (OutputLayer).
[0078] The encoder consists of multiple convolutional layers and pooling layers. The function of the convolutional layers and pooling layers is to gradually reduce the size of the feature map and extract high-level features of the image.
[0079] The decoder is symmetrical to the encoder and consists of upsampling (deconvolution) and Attention-Skip Connection. The upsampling operation is used to gradually restore the size of the feature map, restoring the abstract features extracted in the encoder to the resolution of the input image;
[0080] At the bottom of the network, the ASPP module of DeepLab V2 is used to connect the encoder and decoder, which enables the network to obtain local details and global context information at the same time, thereby improving the accuracy of image segmentation.
[0081] In this paper, the convolution structure has a unified convolution kernel, padding is 0, and striding is 1. The output layer is the last layer of the decoder, which is a 1×1 convolution layer with the same size as the input image. Its output is the prediction result of the segmented image, that is, the mine crack segmentation detection result, and the sigmoid activation function is used to generate pixel-level classification probability or pixel-level binary segmentation result.
[0082] In the specific segmentation detection:
[0083] The enhanced mine crack image is input into the encoder from the right end of the U-Net-based segmentation detection model, and 5 layers of convolution operations are performed in sequence. The network layers are deepened downward through the MaxPool operation. At the same time, the feature maps after the first 4 layers of convolution are sent to the decoder on the left through the Attention-Skip Connection. The encoder and decoder are connected at the bottom of the network through the ASPP module. The left decoder is fused with the feature maps after the first 4 layers of convolution of the encoder after 4 layers of deconvolution upsampling, and the low-light enhanced mine crack segmentation detection result is output from the last layer of the left decoder of the segmentation detection model.
[0084] refer to Figure 4 , the ASPP module of this embodiment includes:
[0085] A pyramid pooling module to aggregate image information at different scales;
[0086] A set of parallel dilated convolutions expands the receptive field without increasing the number of network parameters, and is used to capture contextual information at different scales.
[0087] The method of connecting the encoder and decoder to the ASPP module is:
[0088] The feature map output by the encoder is sent to four convolution branches in parallel, including: one 1×1 convolution branch with the number of output channels C1; three dilated convolution branches with dilated rates of 6, 12, and 18, with a convolution kernel size of 3×3 and the number of output channels C2;
[0089] The output feature maps of the four convolution branches are concatenated in the channel dimension. The number of channels of the concatenated feature map is C1+3×C2, and the size is H×W. A 1×1 convolution layer is connected after the concatenated feature map, and the number of output channels is C. f , and used as the input of the decoder.
[0090] Step S3, based on the mine crack segmentation detection results, calculating the loss function of the segmentation detection model;
[0091] In this embodiment, the Dice loss function is used to measure the similarity between the actual segmentation result and the predicted segmentation result.
[0092] Dice loss is very effective in dealing with class imbalance. In crack segmentation detection, the number of pixels in the crack area is usually much less than the number of pixels in the normal background. Dice loss focuses more on the overlap of the two sets and can better handle this class imbalance.
[0093] The loss function of the segmentation detection model includes:
[0094]
[0095] Where Loss is the Dice loss function; y i is the category of pixel i in the true label, p i is the probability that pixel i in the mine crack segmentation detection result predicted by the segmentation detection model belongs to the target category; N is the total number of pixels, which is equal to the number of pixels in a single image multiplied by batchsize.
[0096] This embodiment uses the automatic differentiation library (specifically torch.autograd in PyTorch) to calculate the gradient of the loss function with respect to each parameter in the codec. At the beginning of back propagation, starting from the loss function, according to the chain rule, the derivative of each intermediate variable and parameter is calculated in turn.
[0097] According to the calculated gradients, stochastic gradient descent (SGD) is used to update the parameters of the encoder-decoder.
[0098] Step S4: using the loss function value of the segmentation detection model as a weight, calculating the loss function of the low-light enhancement model, and then optimizing and training the low-light enhancement model;
[0099] Calculate the global homogeneity loss function L gsc for:
[0100] L gsc =∑ i∈A ∑ j∈B(i) [(|Y i -Y j |-|X i -X j |) 2 -W gsc (|Y i -Y j |-|X i -X j |)]
[0101] Where A is the coordinate matrix of the pixel points in the mine crack image; B is the neighborhood pixel matrix with pixel i as the center and extending k pixels in one direction; X is the input value before brightening, Y is the pixel value after brightening, i is the traversal of the pixel, and W is the pixel value after brightening. gsc is the parameter; i , Y j , X i and X j They are respectively the average pixel value after brightening point i in the neighborhood pixel matrix, the average pixel value after brightening point j, the input value before brightening point i in the neighborhood pixel matrix, and the average pixel value before brightening point j.
[0102]
[0103] Where i = a mn ∈A, Min(m,n)≥k, that is, B (i) It is a 2k+1 order square matrix, and k is 8 in this paper.
[0104] Among them, the parameter W gsc for:
[0105]
[0106] In the formula, s is the number of training steps, and b is the number of samples in the training setting; It means to find the derivative of the function with respect to the variable step; Loss is the Dice loss function.
[0107] Global exposure control loss function L gec for:
[0108]
[0109] Where M is the number of different overlapping local regions; ξ is the three color channels of the image, ξ = {R, G, B}; c is the traversal of the three channels R, G, B; Z k c is the average intensity value of the local area in the enhanced image; E is 0.7; ▽ x and y Represents the gradient operation in the horizontal and vertical directions respectively; W gec as a parameter.
[0110] The loss function of the low-light enhancement model is:
[0111] L total =W1L gsc +W2L gec
[0112] W1=1,W2=100
[0113] Where, L total is the total loss function of the low-light enhancement model; L gsc is the global homogeneity loss function; L gec is the global exposure control loss function; W1 and W2 are L gsc and L gec The weight of .
[0114] Although the specific implementation of the invention is described in detail in conjunction with the drawings, it should not be understood as limiting the scope of protection of this patent. Within the scope described in the claims, various modifications and variations that can be made by those skilled in the art without creative work still fall within the scope of protection of this patent.
Claims
1. A mine crack segmentation detection method based on sample-free low-illumination enhancement, characterized in that: The following steps are involved: S1, obtaining an original image of a mine crack, inputting the original image into a low-light enhancement model, and outputting an enhanced mine crack image; S2, inputting the enhanced mine crack image into the segmentation detection model, and outputting the mine crack segmentation detection result; S3. Calculate the loss function of the segmentation detection model based on the mine crack segmentation detection results; S4. Using the loss function value of the segmentation detection model as a weight, calculating the loss function of the low-light enhancement model, and then optimizing and training the low-light enhancement model.
2. The method for detecting cracks in a mine cave based on sample-free low-illumination enhancement according to claim 1, characterized in that: The S1 specifically includes: The original image of the mine crack is downsampled once and 2D convolved twice to obtain a feature thumbnail; The feature thumbnail is sent to 6 channel-by-channel separable convolutional layers, and Attention-Skip Connection is used between the 1st, 4th, 2nd, 5th, 3rd, and 6th layers of the 6 channel-by-channel separable convolutional layers for feature fusion. The Zero-DCE illumination enhancement curve is used to enhance the image after feature fusion, and then the enhanced mine crack image is output.
3. The method for detecting cracks in a mine cave based on sample-free low-illumination enhancement according to claim 1, characterized in that: Attention-Skip Connection is used for feature fusion, including: In the spatial attention mechanism, the fused feature map H×W×C output by the channel-by-channel separable convolution layer of the 1st, 4th, 2nd, 5th or 3rd, 6th layers is subjected to global maximum pooling and global average pooling in the channel dimension to obtain a H×W×1 feature map respectively. The two H×W×1 feature maps are concatenated into a H×W×2 feature map by channel, and then sent to the standard 7X7 convolution for parameter learning to obtain a H×W×1 feature map. Finally, the spatial attention weight matrix M is obtained through the Sigmoid activation function. s ; In the channel attention mechanism, the fused feature map H×W×C output by the channel-by-channel separable convolutional layer of the 1st, 4th, 2nd, 5th or 3rd, 6th layers is average pooled and max pooled to obtain a 1×1×C feature map, and then the two 1×1×C feature maps are sequentially sent to a weight-sharing multi-layer perceptron. Finally, the output features of each are tensor accumulated and Sigmoid activated to obtain the channel attention weight matrix M. c ; The spatial attention weight matrix M s and the channel attention weight matrix M c Tensor multiplication operations are performed on the fusion feature maps H×W×C respectively to obtain two weighted feature maps, and the two weighted feature maps are tensor added to obtain the optimized target feature map.
4. The method for detecting cracks in a mine cave based on sample-free low-illumination enhancement according to claim 1, characterized in that: The S2 specifically includes: The enhanced mine crack image is input into the encoder from the right end of the U-Net-based segmentation detection model, and 5 layers of convolution operations are performed in sequence. The network layers are deepened downward through the MaxPool operation. At the same time, the feature maps after the first 4 layers of convolution are sent to the decoder on the left through the Attention-Skip Connection. The encoder and decoder are connected at the bottom of the network through the ASPP module. The left decoder is fused with the feature maps after the first 4 layers of convolution of the encoder after 4 layers of deconvolution upsampling, and the low-light enhanced mine crack segmentation detection result is output from the last layer of the left decoder of the segmentation detection model.
5. The method for detecting cracks in a mine cave based on sample-free low-illumination enhancement according to claim 4, characterized in that: The method of connecting the encoder and the decoder of the ASPP module is: The feature map output by the encoder is sent to four convolution branches in parallel, including: one 1×1 convolution branch with the number of output channels C1; three dilated convolution branches with dilated rates of 6, 12, and 18, with a convolution kernel size of 3×3 and the number of output channels C2; The output feature maps of the four convolution branches are concatenated in the channel dimension. The number of channels of the concatenated feature map is C1+3×C2, and the size is H×W. A 1×1 convolution layer is connected after the concatenated feature map, and the number of output channels is C. f , and used as the input of the decoder.
6. The method for detecting cracks in a mine cave based on sample-free low-illumination enhancement according to claim 1, characterized in that: In S3, the loss function of the segmentation detection model is calculated, including: Where Loss is the Dice loss function; y i is the category of pixel i in the true label, p i is the probability that pixel i in the mine crack segmentation detection result predicted by the segmentation detection model belongs to the target category; N is the total number of pixels.
7. The method for detecting cracks in a mine cave based on sample-free low-illumination enhancement according to claim 1, characterized in that: In S4, the loss function of the low illumination enhancement model is: L total =W1L gsc +W2L gec Where, L total is the total loss function of the low-light enhancement model; L gsc is the global homogeneity loss function; L gec is the global exposure control loss function; W1 and W2 are L gsc and L gec The weight of .
8. The method for detecting cracks in a mine cave based on sample-free low-illumination enhancement according to claim 7, characterized in that: Global homogeneity loss function L gsc for: L gsc =∑ i∈A ∑ j∈B(i) [(Y i -Y j -X i -X j ) 2 -W gsc (Y i -Y j -X i -X j )] Where A is the coordinate matrix of the pixel points in the mine crack image; B is the neighborhood pixel matrix with pixel j as the center and extending k pixels in one direction; X is the input value before brightening, Y is the pixel value after brightening, i is the traversal of the pixel, and W is the pixel value after brightening. gsc is the parameter; i , Y j , X i and X j They are the average pixel value after brightening point i in the neighborhood pixel matrix, the average pixel value after brightening point j, the input value before brightening point i in the neighborhood pixel matrix, and the average pixel value before brightening point j; Among them, the parameter W gsc for: In the formula, s is the number of training steps, and b is the number of samples in the training setting; It means to find the derivative of the function with respect to the variable step; Loss is the Dice loss function.
9. The method for detecting cracks in a mine cave based on sample-free low-illumination enhancement according to claim 8, characterized in that: Global exposure control loss function L gec for: Where M is the number of different overlapping local regions; ξ is the three color channels of the image, ξ = {R, G, B}; c is the traversal of the three channels R, G, B; Z k c is the average intensity value of the local area in the enhanced image; E is 0.7; ▽ x and y Represents the gradient operation in the horizontal and vertical directions respectively; W gec as a parameter.