Skip to main content

Design of coal mine drilling detection model combining improved YOLOv5 and Gaussian filtering

Abstract

Coal is currently the most important energy source in most countries. With the advent of information intelligence, more and more intelligent technologies are being applied in coal mine detection. A new model for coal mine drilling detection, which combines improved YOLOv5 and Gaussian filtering, is proposed to address the low efficiency and poor accuracy in manual detection of coal mine drilling. This new model incorporates attention mechanism and multi-object detection model on the basis of traditional YOLOv5. Due to factors such as equipment vibration and electrical interference in drilling detection, random noise is often mixed into the image signal data obtained. In order to effectively reduce the impact of noise on data and improve signal-to-noise ratio, Gaussian filtering method is studied for data denoising. This new model’s border regression loss value was 0.004 lower than the YOLOv5 loss value. This new optimization method’s accuracy was improved from 0.966 to 0.982. This new model improved the detection accuracy of small cracks by about 0.05. The detection depth of the coal seam in this new model was 9.54 m, which was closer to the true value than other methods. Therefore, using the new model to detect coal mine boreholes can effectively improve the accuracy of borehole detection images, which has a good effect on the analysis of coal mine rock layers. This new model has a good guiding role in the detection images and rock analysis research of future coal mine boreholes. The research has good research value in oil drilling inspection, natural gas pipeline monitoring, and quality inspection of industrial automation systems. This provides important technical support for future coal mine drilling image detection and rock analysis research.

Introduction

During coal mining, drilling detection can help determine the distribution, thickness, and other important geological information of underground coal seams. These pieces of information are crucial for planning safe and effective mining. The traditional drilling detection method mainly relies on manual detection, so it has problems such as high labor cost, low efficiency, limited accuracy, high safety risk, and poor real-time performance. With the currently developing technologies, traditional drilling detection methods are gradually using more complex automation and intelligent technologies. These not only improve the efficiency of data collection, but also enhance the data analysing accuracy (Fan et al. 2024). The YOLOv5 deep learning method provides a new research direction for automatic analysis and feature extraction of coal mine drilling images. Deep learning can automatically process large amounts of data, improving detection efficiency. And deep learning models can analyze and process complex drilling data, achieving real-time data processing and monitoring. At the same time, this method can also automate data analysis and decision-making, adapt to different environments and conditions through training, and improve the universality of detection. YOLOv5 is widely used in multiple fields due to its efficient processing speed and excellent detection performance. Drilling images often contain complex background noise and variable lighting conditions, which may affect the performance of object detection models (Imam et al. 2023). To reduce the impact of redundant data on images, Gaussian filtering is introduced as a data processing step, which can effectively reduce image noise, improve image quality, and provide clearer and more accurate input data for the model. To ensure the safety of mine production, Dong et al. established a multi-dimensional information recognition technology for coal seam water channels, effectively preventing coal seam water inrush. By reasonably setting trajectories, target layers, and exploration areas, a multi-information identification index system was developed. Standards for dividing hydraulic conductivity were formulated. This technology successfully identified water conducting channels such as faults and karst fault zones and accurately evaluated their conductivity levels. This was very important for improving the identification and control of water channels (Dong et al. 2023). Lei et al. proposed a binocular vision drilling positioning method based on parameter adaptive adjustment to improve the automation level of bolt support for coal mine roadway roof. By combining predictive models with geometric constraints of anchor holes, precise positioning of anchor holes was achieved. This new method had a positioning accuracy of up to 95.2% and an absolute error of only 1.52 mm, significantly improving drilling accuracy and auxiliary efficiency (Lei et al. 2023). Zhang et al. aimed to guide the safe mining of deep coal seams and prevent geological disasters caused by the collapse and fracture of thin bedrock layers. Through on-site detection and theoretical analysis, the height of the goaf during layered mining and full height mining was obtained. The stress and failure characteristics of the coal rock structure under different mining conditions were simulated and tested. Layered mining technology significantly reduced the height of goaf and disturbance displacement of clay aquifer, reduced the maximum stress of clay layer, and effectively prevented water and sand inrush disasters in the mining face (Zhang et al. 2024). Wang implemented an intelligent real-time detection and positioning method based on deep learning models and depth cameras to address the safety hazards caused by inaccurate positioning of steel strip anchor holes in coal mine roadway support. This experiment utilized image preprocessing, improved YOLOv5s, and real-time depth map restoration. This new method was feasible in the unstructured environment of coal mines, significantly improving the accuracy and efficiency of anchor hole positioning (Wang et al. 2023). Luo et al. proposed an improved method based on YOLOv5 to quickly and effectively detect foreign objects mixed in the belt conveyor and ensure safe and smooth operation. Through data preprocessing and model optimization, a deep lightweight object detection network was implemented, significantly improving detection speed and accuracy. This new method achieved a detection accuracy of 94.9% on foreign object datasets, while reducing model parameters, inference time, and computational load (Luo et al. 2023).

In summary, most studies on coal mine drilling only analyze and explore the exploration and positioning of coal mines and rock layer mining. There is still relatively little exploration and positioning analysis of drilling images. Traditional drilling detection methods generally have some limitations, such as manual measurement and simple image processing techniques. Although these methods have solved some detection problems to a certain extent, they still suffer from time-consuming and laborious measurement, susceptibility to human factors, and unstable accuracy. And simple image processing techniques often have unsatisfactory performance when facing complex coal mining environments, making it difficult to meet practical application needs. Therefore, a new model for image detection and rock analysis using a jointly improved YOLOv5 and Gaussian filtering is studied. The innovation of the research lies in the first combination of the jointly improved YOLOv5 model with Gaussian filtering for the detection of drilling images and rock analysis. The study introduced attention mechanism and multi-target detection module, which not only enhanced the feature extraction ability of the model, but also significantly improved the detection ability of the boundary drilling area by adjusting the YOLOv5 model boundary and increasing the detection layer. To address the issue of noise in drilling images, Gaussian filtering is studied for image feature data processing, which reduces noise interference and improves the accuracy of image analysis. The study also used extreme variance method to partition drilling rock data, enhancing the accuracy of rock identification and improving the overall quality of drilling construction. Research the use of various data augmentation techniques such as image stitching, flipping, and rotation to increase the diversity of image data and model generalization ability. The study significantly improved the detection accuracy, rock recognition ability, and model generalization ability of drilling images by introducing an improved YOLOv5 model, attention mechanism, Gaussian filtering, and data augmentation techniques, providing more efficient and accurate technical support for coal mine drilling. Research traditionally has applied deep learning models such as YOLOv5 in coal mine drilling image detection, but the current study improved the YOLOv5 model by introducing an attention mechanism and a multi-target detection module. This not only enhances the feature extraction capability of the model, but also significantly improves the detection accuracy of the boundary drilling region by adjusting the model boundary and adding detection layers. Meanwhile most of the existing studies focus on the direct application of deep learning models for image detection and analysis, but the current study introduces Gaussian filtering technology on this basis for reducing the noise interference in drilling images. Finally other studies usually rely only on basic image processing methods without exploring the accuracy of data processing in depth, so the current study also used the extreme variance method to partition the drilling rock formation data, which further improves the accuracy of rock formation identification.

The research is mainly divided into four parts. The first part mainly elaborates and introduces the general research direction of the article. The second part is an explanation of the research methodology used. The third part is a description and analysis of the research methodology process. The fourth part is a summary of the research content of the article.

Methods

Coal mine drilling target detection method based on improved YOLOv5

The target detection method for coal mine drilling is to accurately analyze and judge the images transmitted from coal mine drilling, achieving image analysis of coal mine drilling data. There are two common object detection methods. One is to obtain the feature data of the image through active windows and image segmentation (Zhou et al. 2024). Another approach is to use the powerful data extraction ability of neural networks to obtain target data, which can then be used for image classification detection. Figure 1 shows the process of deep learning object detection.

Fig. 1
figure 1

Deep learning object detection process

From Fig. 1, after inputting the image target data, this algorithm will first build a regional framework for the image data. This framework will first filter and classify the initial image data to obtain the candidate regions that need to be filtered. Then, deep learning is used to extract data features from candidate regions and obtain the extracted image data. The image data are then classified and regressed to obtain the final data detection result of the image. The two-stage image detection method can be difficult to generate candidate regions and result in data loss and computational complexity during the data extraction stage. Therefore, YOLOv5 with one-stage object detection is studied. Figure 2 shows the YOLOv5 image processing model that includes multiple master data processing modules.

Fig. 2
figure 2

YOLOv5 image processing model

From Fig. 2, YOLOv5 includes modules for data input, processing, and output. The data input module will first perform image preprocessing, adjust the image size, normalize it, and finally enhance the image data to improve the model's generalization ability. In the data processing module, the network first performs data feature extraction and builds a data feature pyramid to capture features of different scales. Further improve the ability to obtain target data by predicting image borders and detecting image boundary data, in order to detect multiple different targets. The data output module mainly processes and analyzes the data obtained by the data processing module, and unifies the image bounding box correction, image category classification, and output format. The data input model can concatenate, flip, and rotate the input image data to enhance its effectiveness. The data processing module can slice images to convert high-dimensional data images into low-dimensional image data. The data output module will normalize the data, convolve the set through different data dimensions, and then output the data. Diversified analysis of data samples in coal mine drilling data processing can improve the accuracy of the model. For the fixed image orientation in coal mine drilling, it is necessary to flip and rotate images in different scenes, so that coal mine drilling images can be used as new samples for data training. To enhance the image data of drilling holes, the obtained drilling images are converted to brightness and pixels to improve the overall image clarity and reduce the impact of low clarity on image data training.

The study introduces an attention mechanism on traditional YOLOv5 to ensure its strong feature data processing ability when processing drilling image data (Wu et al. 2023b). By assigning different weights to different parts of the input data, the attention mechanism enables the model to focus on the features that contribute most to the task. And by strengthening the focus on key features, the attention mechanism significantly improves the detection accuracy of the model. By adding different spatial channels, the model's ability to retain information from drilling images and detect channel weights can be improved. The attention mechanism allows the model to focus on the most important areas in the image, ignoring irrelevant information to improve processing efficiency and accuracy (Chen 2023). Meanwhile, attention mechanisms can assign different weights to different spatial regions or channels, enhancing useful features and suppressing irrelevant ones. Secondly, the attention mechanism can capture global contextual information and provide richer semantic information for objects in the image. Attention mechanism can also reduce unnecessary calculations, improve the efficiency of model operation, and enable different datasets to perform better in different application scenarios. Therefore, studying the use of attention mechanisms to enhance model performance. Figure 3 shows the attention model.

Fig. 3
figure 3

Attention model structure

From Fig. 3, the attention mechanism consists of three main structures: image data compression, model data stimulation, and data attention. Image data compression is responsible for reducing the size of image data for storage and transmission. Data attention can focus the model on the most important areas in the image. Output image data includes enhanced or modified images. Image stimulation refers to the model applying some form of stimulation or stimulation to the input image in order to elicit or enhance responses to certain features.The data compression of images is represented by Eq. (1) (Li et al. 2023).

$$ z_{g} = \frac{1}{H*W}\sum\limits_{i = 1}^{h} {\sum\limits_{j = 1}^{W} {u_{g} (i,j)} } $$
(1)

In Eq. (1), \(z_{g}\) represents the \(g\)th element of data \(z\) in the image. \(H\) represents the image width. \(W\) represents height. \(u_{g} (i,j)\) represents the image’s element \((i,j)\) in the \(g\)th channel. \((i,j)\) represents the coordinates of a point, \(i\) represents the row index, and \(j\) represents the column index. When compressing an image, a portion of its feature data will be compressed from a product of length, width, and height into smaller product images. This makes the image data more globally receptive. The data activation operation is represented by Eq. (2) (Yanhao et al. 2024).

$$ s = F_{ex} (z,W) = \sigma (g(z,W)) = \sigma (W_{2} \delta (W,z)) $$
(2)

In Eq. (2), \(s\) represents an excitation channel. \(W\) represents the weight, \(z\) represents the input data, \(\sigma\) represents the activation function, and \(F_{ex} (z,W)\), \(g(z,W)\) and \(\delta (W,z)\) represent different functions. By using new parameter data to generate weights, \(s = F_{ex} (z,W)\) is obtained. Then, the activation function is used to normalize the data weights to obtain \(\sigma (g(z,W))\). Finally, relevant data channels are built to connect and obtain \(\sigma (W_{2} \delta (W,z))\). By using new parameter data to generate weights, and then normalizing the data weights through activation functions, relevant data channel connections are established. Equation (3) is the model attention formula.

$$ x^{\prime} = F_{{{\text{attention}}}} (u_{g} ,s_{g} ) = s_{g} *u_{g} $$
(3)

In Eq. (3), \(x{\prime}\) represents the output value after attention scaling. \(F_{{{\text{attention}}}}\) represents attention operation. \(u_{g}\) represents the \(g\)th channel’s input value. \(s_{g}\) represents the scaling factor in the \(g\)th channel, used to control the model scaling. In the attention mechanism, the data \(u_{g}\) is first inputted, and then the weight matrix \(F_{{{\text{attention}}}} (u_{g} ,s_{g} )\) is obtained through vector learning. The weight \(s_{g}\) is then weighted to obtain the final weighted data \(s_{g} *u_{g}\). The attention module is added after the image segmentation module of YOLOv5. Figure 4 shows the image data processing flow after adding the attention module.

Fig. 4
figure 4

Image data processing flow after adding attention module

From Fig. 4, after image segmentation in YOLOv5, the obtained image data are compressed, stimulated, and attended through attention mechanisms. An image with a size of 1*1 width and height is compressed onto the C/r channel through data compression and excitation. Then, the feature vectors of the image data are restored to the data transmission channel through an activation function. Finally, the normalized weights are obtained through the activation function and weighted. The attention module can enhance the data extraction ability and reduce the impact of non-detection areas on drilling image detection. In the attention mechanism, different channels or feature maps are assigned different weights. These weights reflect the contribution of each channel to the final output. The weighting process is to allocate image data reasonably. The weighted feature maps are further processed through the transport layer of the model. Finally, the activation function is used to introduce nonlinearity into the hidden layers of the network, enabling the model to learn and simulate more complex function mappings.

Multi-scale drilling detection method based on Gaussian filtering

After collecting data information through the improved YOLOv5, these basic data will have situations of data redundancy and deviation. Therefore, new data processing methods are needed to process and analyze the image data to enhance the drilling image data. In coal mine drilling work, the image signal data obtained may vary due to the different rock layers in the coal mine. These data signals are usually obtained through digital signal analysis methods to obtain the gamma signal of the image. The quantity and intensity of gamma signals can determine whether radioactive elements are present in the current area and determine the type and content of minerals in the current area. Therefore, in data signal processing, the judgment and processing of gamma rays are the key to analyzing drilling data. Figure 5 shows the main analysis of coal mine drilling.

Fig. 5
figure 5

Main analysis process of coal mine drilling

From Fig. 5, there are mainly two types of data in processing gamma ray signals from boreholes in different depths and regions. One type is the gamma ray signal of rock stratification. One type is the data video signal transmitted back from the borehole. The gamma ray signal of rock stratification is denoised and analyzed using Gaussian denoising method on the data. Video data signals are processed through data preprocessing and model analysis. The study goes through the steps of gamma ray detection, data preprocessing, algorithm analysis, data denoising, rock formation identification and data decision making to finally obtain accurate rock formation information. Among them, gamma rays are used as an important signal source for detecting and analyzing the underground rock formation structure, and determining the presence of underground minerals and their distribution. Data PreprocessingData preprocessing refers to the preliminary processing of raw rock formation data, including denoising, normalization and data format conversion. Data denoising is to reduce the random noise in the data and improve the signal-to-noise ratio. Rock formation identification is an important step in determining the distribution and characterization of rock formations. Finally, the decision, fusion, and synchronization of these two types of data are carried out to obtain the final coal mine drilling data signal. Gaussian filter is a linear filter. Compared with other noise reduction techniques such as median filter, it has better smoothing effect and separability, which can improve computational efficiency and effectively suppress noise (Lv et al. 2024). Gaussian filtering can effectively smooth images or signals, reduce noise while preserving the edges and main features of the image. Secondly, Gaussian filtering can assign different weights to pixels at different positions during neighborhood averaging. This helps to better preserve the details of the image. Finally, Gaussian filtering can effectively preserve edge information while smoothing the image. Therefore, the study chose Gaussian filtering method for data filtering processing. Drilling data often contain random noise introduced by factors such as equipment vibration and electrical interference. Gaussian filtering effectively reduces the impact of noise and improves the signal-to-noise ratio of data by weighting the data. Gaussian filtering is a smoothing filtering technique that smoothes out the high frequency noise in an image by performing a convolution operation on the image. At the same time, important low-frequency information is retained, which has a significant improvement effect on the complex background noise commonly found in drilling images. Gaussian filtering effectively reduces the image noise, enabling the model to identify target features more accurately. Therefore, this study uses Gaussian filtering for data filtering processing. Equation (4) is the calculation of Gaussian filtering (Yang et al. 2024).

$$ g(x) = \frac{1}{{\sqrt {2\pi \sigma } }}e^{{\frac{{x^{2} }}{{2x^{2} }}}} $$
(4)

In Eq. (4), \(g(x)\) represents parameter data \(x\)’s weight. \(\sigma\) represents parameters’ standard deviation, which can highlight the flatness of the data. After denoising the filtered data, the coal mine rock layers are divided based on the obtained gamma rays from the boreholes. Gaussian filtering is achieved by convolving a Gaussian function with an input image or signal. Meanwhile, Gaussian filtering can effectively reduce random noise in images or signals. Compared with other smoothing filters, Gaussian filtering can better preserve edge information while smoothing images. Therefore, Gaussian filtering is chosen for image data processing. The data theoretical analysis of coal mine rock layers is carried out through the division effect of rock layers, enhancing the statistical and judgment of coal mine rock layer data. Equation (5) is the division calculation of coal mine rock layers (Wu et al. 2023a).

$$ X_{i} = \frac{1}{{n_{j} }}\sum\limits_{j = 1}^{{n_{i} }} {X_{ij} } $$
(5)

In Eq. (5), \(X\) represents the data size at all sampling points. \(X_{i}\) represents a data of the \(i\)th sampling point in the coal mine layer. \(X_{ij}\) represents the test data size at the \(j\)th point in the \(i\)th sampling layer. \(n\) denotes the number of sampling points. Reducing intra-layer logging data variance and amplifying inter-layer variance through facies delineation. Equation (6) is the calculation of its average value (Tingjiang et al. 2023).

$$ \overline{X} = \frac{1}{N}\sum\limits_{i = 1}^{K} {\sum\limits_{j = 1}^{{n_{i} }} {X_{ij} } } = \frac{1}{N}\sum\limits_{i = 1}^{{n_{i} }} {n_{i} \overline{X}_{i} } $$
(6)

In Eq. (6), \(\overline{X}\) represents the average value of the sampled data points. \(K\) represents the total sampling layers. \(\overline{X}_{i}\) represents the average data of the \(i\)th sampling point in the coal mine layer. Where the equation is obtained from \(\frac{1}{N}\sum\nolimits_{i = 1}^{K} {\sum\nolimits_{j = 1}^{{n_{i} }} {X_{ij} } }\) by mathematical transformation of the equation to the corresponding equation \(\frac{1}{N}\sum\nolimits_{i = 1}^{{n_{i} }} {n_{i} \overline{X}_{i} }\). The data variance is represented by Eq. (7).

$$ R = \sum\limits_{I = 1}^{K} {\sum\limits_{J = 1}^{{n_{i} }} {(X_{ij} - \overline{X})^{2} } } $$
(7)

In Eq. (7), \(R\) represents the sum of data variances. Variance and are used to measure the degree of dispersion of the data points. The higher the variance, the greater the difference between the data points; the lower the variance, the closer the data points converge to the mean. By layering the drilling data, the final coal mine rock layering data can be obtained. Then, rough coal mine rock layering position information can be obtained through the extreme points in the data. By using the above method to perform secondary layering on the coarse layering data, fine coal mine rock layering information can be obtained. In the coal mine drilling target detection method, the final target detection effect is determined based on the border effect of the image data obtained from the drilling. When the obtained target border effect is closer to the real image border, the positioning effect of coal mine drilling is more accurate. If the border effect does not meet the real border effect, the positioning effect is poor. Therefore, the evaluation and judgment of the border effect are analyzed using a new IoU indicator, represented by Eq. (8) (Chen et al. 2023).

$$ L_{IoU} = 1 - IoU $$
(8)

In Eq. (8), \(L_{IoU}\) represents the border positioning length in IoU. IoU is a key metric that measures the degree of overlap between the predicted bounding box and the actual bounding box. The value of IoU is between 0 and 1. The closer the value is to 1, the higher the degree of overlap between the predicted bounding box and the real bounding box, and the more accurate the detection results. \(IoU\) represents the IoU indicator, represented by Eq. (9).

$$ IoU = \frac{A \cap B}{{A \cup B}} $$
(9)

In Eq. (9), \(A\) means a predicted image border. \(B\) means a real image border. \(A\) represents the result of the model's prediction of the location of the target object, reflecting the model's predictive ability. \(B\) is the bounding box of the target object that actually exists, reflecting the location and size of the actual target. From Eq. (9), the closer the real image is to the predicted image, the greater the \(IoU\). The distance and overlap of borders need to be analyzed through the loss function of indicators, represented by Eq. (10) (Singh et al. 2023).

$$ L_{CIOU} = 1 - IoU + \frac{{p^{2} (b,b^{gt} )}}{{c^{2} }} + av $$
(10)

In Eq. (10), \(L_{CIOU}\) denotes the loss value of \(IoU\), \(b\) denotes the Euclidean distance between the true and predicted frames, and \(b^{gt}\) denotes the bounding box. \(a\) means a judgment parameter. \(1 - IoU\) means the data loss. \(p\) means Euclidean distance. \(p^{2} (b,b^{gt} )\) means the deviation between the data border’s true distance and the predicted distance. \(c^{2}\) means the square of the diagonal length of the data border. \(a\) means weight factor. \(v\) means an aspect ratio between the real border and the predicted border. Equation (11) is the weight factor.

$$ a = \frac{v}{(1 - IoU) + v} $$
(11)

The larger the weight factor in Eq. (11), the smaller the deviation of the model. \(a\) is the weighting factor, which is used to adjust the effects between different terms in the loss function. It is calculated from the width and height of the real and predicted frames and is used to dynamically adjust the weight of each error term in the loss function. The indicator loss function judgment can analyze the image overlap loss, distance position loss, and length loss of parameters in the image, represented by Eq. (12) (Dornelas and Lima 2023).

$$ L_{IoU} = 1 - IoU + \frac{{p^{2} (b,b^{gt} )}}{{c^{2} }} + \frac{{p^{2} (w,w^{gt} )}}{{c_{w}^{2} }} + \frac{{p^{2} (h,h^{gt} )}}{{c_{h}^{2} }} $$
(12)

In Eq. (12), \(c_{w}^{2}\) represents an image’s minimum width. \(c_{h}^{2}\) represents an image’s minimum height. \(\frac{{p^{2} (b,b^{gt} )}}{{c^{2} }}\) denotes the categorical loss value, which measures the model's prediction error for the target category. \(\frac{{p^{2} (w,w^{gt} )}}{{c_{w}^{2} }}\) denotes the target loss value, which measures the model's prediction error for the presence or absence of the target. \(\frac{{p^{2} (h,h^{gt} )}}{{c_{h}^{2} }}\) denotes the localization loss value, which measures the model's prediction error for the location and size of the target \(L_{IoU}\) represents the image loss. When the drilling image is large, multiple data sampling can reduce the size of the image. When the image is 6 pixels, the improved YOLOv5 is difficult to parse the data through the image, resulting in data loss. Therefore, adding the target structure of data in the data frame enhances the analytical ability of drilling data images. Figure 6 shows the algorithm.

Fig. 6
figure 6

Object detection algorithm

As shown in Fig. 6, the algorithmic process requires first acquiring the raw image data obtained during coal mine drilling. Different levels of feature data are obtained through sampling layers. Then larger and more detailed feature data are obtained through the processing of the sampling layers. Next, the feature data of multiple sampling layers are superimposed to form a comprehensive feature data set. More and more detailed feature data is generated by overlaying the sampling layers. Then smaller images are detected on the larger feature data set. Finally output the image final output image result. The improved YOLOv5 algorithm structure is shown in Fig. 7.

Fig. 7
figure 7

Improved YOLOv5 algorithm structure

From Fig. 7, it can be seen that the addition of different modules is in the backbone network structure of the YOLOv5 algorithm. Firstly, the SENet module is compressed, then the module is stimulated and data analyzed, and attention mechanisms are added. New convolutional image data features are obtained through network convolution, which can compress fully connected channels into 1 * 1 channels. Finally, the weight of the model is obtained through a function, and all channels are weighted to obtain network channels and drilling data.

Results

Analysis of drilling image detection by combining improved YOLOv5 and Gaussian filtering

The model parameters used were set to analyze the detection performance of the improved model. The operating system used was Windows 10, the processor was Inter Core i7-8700, the memory size used was 32 GB, the image processor was NVIDIA GeForce GTX 2080Ti, and the language processor was Python 3.6. The research used the SGD optimization processor as the data optimization processor for the model, with a batch size of 32. The main data used in the study was image data captured at the construction site, using industrial cameras and high-resolution cameras to capture the actual drilling operation process and collect image data. The drilling image dataset included 400 data images, with the training and testing sets divided in a 7:3 ratio. A study was conducted on the recognition of drilling videos using computer vision technology, and Python programs were used to extract and process the drilling videos. A dataset of 6000 images of the roof strata on coal tunnels was created, including images of different lithologies of coal strata such as coal seams, mudstone layers, and sandstone layers. The data were collected from drilling videos of the roof strata on different coal tunnels. The study analyzed the regression loss and confidence loss of the drilling frame using a model. The regression loss situation represents the deviation between the drilling image and the real image. The confidence loss represents the confidence deviation between the measured image and the real image. A large loss value indicates a significant deviation from the real image. Comparative testing was conducted on the improved YOLOv5, YOLOv5, and YOLOv6 methods to investigate the actual measurement results in Fig. 8. The model gradually tends to stabilize after reaching 100 iterations.

Fig. 8
figure 8

Comparison of drilling image loss for different models

From Fig. 8a, the border regression loss curves of the three methods all decreased first and then gradually stabilized. However, the loss situation varied among different algorithms, with the improved YOLOv5 having the smallest stable loss value of 0.002. The maximum loss value was YOLOv5, with a value of 0.006, which was 0.004 higher than the improved algorithm's loss value. The improved YOLOv5 exhibits lower boundary loss values in larger sample sizes, indicating that the improved model is more accurate in predicting bounding boxes. From Fig. 8b, the change in confidence loss was basically consistent with the change in border regression loss. The improved YOLOv5 had the lowest loss degree, with a loss value of 0.001, while YOLOv5 had a loss value of 0.011. The loss value of the improved YOLOv5 was 0.01 lower than YOLOv5’s. The improved YOLOv5 may have optimized its loss function, allowing for better learning of accurate bounding boxes and confidence during the training process, thereby reducing boundary loss and confidence loss. Therefore, the improved model has better performance. The use of improved YOLOv5 effectively reduced the deviation of test images and improved the model’s image detection performance when detecting drilling images. In Table 1, drilling images’ detection performance between the research algorithm and traditional improved methods was compared. CSPDarknet53 was the backbone network of YOLOv5. The detected images were 400. The average accuracy was the detection accuracy value for all images. Accuracy refers to the ratio of the number of correct predictions made by a model on the test set to the total number of predictions. The higher the accuracy, the better the model. Average accuracy refers to the average correct prediction ratio across multiple test sets or runs.

Table 1 Comparison of detection effects of different improved networks

From Table 1, in the improvement of YOLOv5 using different methods, optimization methods B and C showed a decrease in detection accuracy, with optimization method C showing the largest decrease in accuracy, resulting in a decrease of 0.004 in model accuracy. Other optimization methods improved drilling images’ detection effect. This may be due to differences in the detection and improvement of drilling images using different optimization methods. Before using Gaussian filtering, the average accuracy was around 0.970. After adding Gaussian filtering, the average accuracy significantly improved, indicating that using Gaussian filtering effectively improved the average detection accuracy. This may be due to the fact that Gaussian filtering improves the feature data of drilling images. In comparison with the YOLOv8 model, the improved YOLOv5 model has better detection accuracy. Compared with the YOLOv8 model, the accuracy of the improved YOLOv5 model has increased by 0.005, and the average accuracy has increased by 0.002, indicating that the improved YOLOv5 model has better drilling detection performance. It can be seen that the improved YOLOv5 combines multiple optimization methods and exhibits better model performance in both accuracy and average accuracy. This indicates that using multiple methods for comprehensive optimization can maximize model performance. Comparing and analyzing the research model with more YOLOv series models, the results are shown in Table 2. Intersection over union (IoU) is an indicator that measures the degree of overlap between predicted bounding boxes and real bounding boxes. Recall refers to the ratio of the number of samples correctly identified as positive by the model to the total number of positive samples. F1 score comprehensively considers the indicators of accuracy and recall, balancing the trade-off between the two.

Table 2 Performance comparison of different types of models

From Table 2, it can be seen that the accuracy, IoU, F1 score, and recall of the model used in different model comparisons are significantly better than other algorithm models in the series. In comparison with the YOLOv8 model, it was found that the accuracy of the YOLOv8 model was 0.005, the IoU of the YOLOv8 model was 0.012 higher, the F1 value was 0.022 higher, and the recall rate was 0.008 higher. From this, it can be seen that the use of models in different model performance data parameters has better model performance compared to other models in this series. This may be due to the enhanced data processing ability of Gaussian filtering and the use of attention mechanisms. In Fig. 9, actual borehole images were detected using the model to obtain the actual effects.

Fig. 9
figure 9

Actual detection effect

The data parameters represented in the figure are the detection accuracy of the crack condition detected by the borehole probe. From Fig. 9a and b, the image detection effect of drilling holes was significantly improved before and after adding border regression to this model. The detection accuracy of cracks was increased from 0.94 to 0.99, with an overall improvement of 0.05 detection accuracy. The improved YOLOv5 model performs well in detecting small cracks in drilling images, with a crack detection accuracy of 0.99. This may be due to the introduction of attention mechanisms and multi-target detection modules. At the same time, boundary optimization further improves the accuracy of crack detection. The improved YOLOv5 used showed good performance in detecting borehole images. From Fig. 9c and d, the improved YOLOv5 detected finer cracks in detecting drilling images. Only using multi-object detection methods could not detect excess drilling images. Therefore, there was a significant improvement in the image detection performance of drilling holes after using the improved YOLOv5. This may be due to the addition of more detection methods in the improved YOLOv5. The improved YOLOv5 model can also detect multiple cracks, with crack detection accuracies of 0.85 and 0.89, respectively. This indicates that the improved YOLOv measurement method can accurately identify multiple cracks. The reason for choosing attention mechanism for research is that it provides a simple and effective method to enhance feature representation. By focusing on the most relevant parts of the image, the attention mechanism improves detection accuracy without significantly increasing computational complexity. The reason for choosing the multi-target detection module for research is that it allows the model to learn and detect various features in a single forward process. The reason for choosing Gaussian filtering for research is that it is both simple and effective in reducing noise while preserving important image features. Gaussian filtering is easier to implement in existing neural networks. The study chose the extreme variance method because it provides higher accuracy in depicting drilling rock data, thereby more accurately identifying rock formations. This is more effective in adapting to changes in data than fixed threshold methods.

Analysis of drilling rock layer detection by combining improved YOLOv5 and Gaussian filtering

The distribution of rock minerals and the structural characteristics of the current rock layers in the drilling image were determined by the processing effect of gamma ray data. The analysis of drilling rock layers was conducted using the analysis of variance method. The data used included natural and depth data obtained from coal mine rock layers. A failure square analysis was performed on the data information to determine the distribution of the current drilling rock layer. The data software in the above section was used to analyze the image. There were 5000 samples in the image data, with a 7:3 ratio used to distribute the test and training sets. Comparative analysis was conducted on drilling image data under different filtering treatments. The traditional median filtering and mean filtering processing methods were compared with the research method in Fig. 10.

Fig. 10
figure 10

Different filtering test results

From Fig. 10a, there were obvious data filtering ripples and significant data deviation values in the actual data filtering situation of the image in the initial data of the borehole. From Fig. 10b–d, after using Gaussian filtering, the fluctuation and numerical changes of the filtered data of the real data were smaller, and the data curves were smoother. After using median filtering, the data shows significant ripples and significant numerical deviations. The data curve obtained by mean filtering is smoother, but the key feature details are insufficient, which reduces the ability to detect small cracks. Gaussian filtering significantly reduces noise while preserving important edge details. The filtered data curve is smoother and less volatile, indicating an improvement in data quality. After using Gaussian filtering, the improved model effectively reduces the random noise introduced by device vibration and electrical interference, and improves the signal-to-noise ratio. Secondly, Gaussian filtering can preserve the edge details of the image, and the filtered data curve is smoother and more stable, indicating less data distortion and better preservation of the original features. Therefore, using Gaussian filtering could significantly improve the filtering effect of drilling image data, making data changes smoother and more suitable for processing and analyzing image data. In Fig. 11, the detection performance of the improved and unimproved YOLOv5 drilling probe was compared.

Fig. 11
figure 11

Detection situation of coal mine drilling probe

From Fig. 11a, in the exploration of coal mine boreholes, the true detection effect of rock layers is shown. The coal layer was located between 0 and 10.00 m in depth, the mudstone layer was located between 10.00 and 28.64 m, the silt layer was located between 28.64 and 33.58 m, and the remaining depth was the mudstone layer. This is very close to the real rock layer situation, indicating that the improved YOLOv5 model has high accuracy in detecting rock layer distribution. From Fig. 11b, when using the improved YOLOv5 for rock layer analysis, the coal layer was between 0 and 9.54 m, the mudstone layer was between 9.54 and 29.35 m, the silt layer was between 29.35 and 36.65 m, and the remaining depth was the mudstone layer. From Fig. 11c, when using YOLOv5 for rock layer analysis, the coal layer was between 0 and 4.68 m, the mudstone layer was between 4.68 and 25.23 m, the silt layer was between 25.23 and 34.58 m, and the remaining depth was the mudstone layer. The detection results of the original YOLOv5 model showed significant errors, especially in detecting rock depth. It can be seen that the improved YOLOv5 model has better actual detection performance, which may be due to the use of more advanced feature extraction techniques in the YOLOv5 model, which can more accurately detect and classify different rock layers. At the same time, the improved model uses attention mechanism to focus on the most relevant features, which improves the accuracy of rock detection. Gaussian filtering was also added to the model to reduce noise and provide clearer and more accurate detection results. In Table 3, the rock analysis results of drilling images under different models were compared.

Table 3 Analysis results of rock strata by different improved models

Due to the research mainly exploring coal mine boreholes and the distribution of coal mines, only the data of coal mine layers were analyzed. From Fig. 11, the actual depth of the coal seam was 10.00 m. From Table 3, YOLOv5 model, the total depth of the detected rock stratum is 8.68 m, the depth of the mudstone layer is 20.55 m, and the depth of the silt layer is 9.35 m. The stratum depth detected by the optimized A (CSPMarknet53 + SENet) method is 8.87 m in total coal seam depth, 20.44 m in mudstone layer depth and 9.65 m in silt layer depth. This may be due to SENet's improved feature extraction capability, but the improvement effect is limited. The total coal seam depth detected by optimization B (CSPMarknet53 + SENet + detection layer) method is 8.06 m, the mudstone layer depth is 21.65 m, and the silt layer depth is 9.35 m. This may be due to the additional detection layer enhancing the multi-target detection capability, but with a slight decrease in overall accuracy. The total coal seam depth detected by optimization C (CSPMarknet53 + Gaussian filter + detection layer) method is 8.98 m, the mudstone layer depth is 22.34 m, and the silt layer depth is 8.48 m. This may be due to Gaussian filtering improving data quality, but due to possible over smoothing, the overall accuracy slightly decreases. The total coal seam depth detected by the optimized D (CSPMarknet53 + SENet + Gaussian filter) method is 8.64 m, the mudstone layer depth is 21.42 m, and the silt layer depth is 8.68 m. This may be due to the significant improvement in feature extraction and noise reduction capabilities by combining SENet and Gaussian filtering, which enhances overall detection accuracy. The total coal seam depth detected by the improved YOLOv5 (CSPMarknet53 + SENet + Gaussian filter + detection layer) method is 9.54 m, the mudstone layer depth is 20.81 m, and the silt layer depth is 7.30 m. This may be due to the improved algorithm's multiple optimization methods, which provide the highest detection accuracy and the closest structure to the real rock layer. It can be seen that research on usage methods has better practical application effects.

Research on using an improved YOLOv5 model combined with Gaussian filtering techniques to more accurately detect cracks and small features in drilling images. This is crucial for preventing potential mine accidents and ensuring the safety of mine structures. This technology can effectively reduce image noise, improve the signal-to-noise ratio of data, and make real-time monitoring of drilling and rock conditions possible. Accurate detection data can help mine operators plan mining routes and strategies more reasonably, reduce unnecessary operations, optimize resource allocation, thereby reducing costs and improving production efficiency. In a coal mine project, improved YOLOv5 and Gaussian filtering techniques were applied to detect rock formations in boreholes. Through real-time monitoring and precise detection, multiple potential cracks and structural weaknesses were identified, successfully preventing a mine collapse accident that could lead to serious consequences.

The study enhanced the model's ability to focus on key features in images by using attention mechanisms. The improved YOLOv5 model shows that the boundary regression loss is reduced to 0.002 and the confidence loss is reduced to 0.001, indicating more accurate detection. The multi object detection module enables the model to more effectively detect multiple objects in a single image, and the multi object detection model improves the detection accuracy of the model by 0.05. Gaussian filtering can be used for high-frequency noise reduction. When using Gaussian filtering, the average accuracy of the model increases from around 0.970 to 0.983. The extreme variance method for rock data partitioning can more accurately identify different geological layers. The use of polar variance method has improved the accuracy of rock identification.

Conclusion

There is a problem of poor image processing effect of coal mine drilling probe information, which cannot effectively analyze coal mine rock layers. A coal mine drilling detection method combining improved YOLOv5 and Gaussian filtering was proposed. A new method to address the issue of false detections during the detection process has improved the feature extraction ability of the network model by incorporating an attention mechanism into the traditional YOLOv5 model. At the same time, in order to enhance the regression ability of the drilling image frame, a multi-objective detection module has been added to the YOLOv5 model to enhance the network model's crack detection ability for the drilling frame. Finally, in order to solve the noise problem in the data processing process, we studied the use of Gaussian filtering to improve the YOLOv5 model and enhance its denoising ability on the data. In comparing the loss of different image data, the improved YOLOv5 had the lowest border regression loss value of 0.002, which was 0.004 lower than the YOLOv5 loss value. The improved YOLOv5 had lower confidence loss value. In the comparison of different optimization methods, the addition of Gaussian filtering and multi-objective detection methods significantly improved the model performance, with accuracy being improved from 0.966 to 0.982. In comparison with different methods of detecting images, the improved YOLOv5 detected small cracks and improved detection accuracy by 0.05. After using Gaussian filtering, the data curve of the image becomes smoother and the data processing ability was significantly improved. In the analysis of the distribution of coal mine rock layers, the improved YOLOv5 detection resulted in a closer distribution of rock layers to the actual distribution. In the analysis and comparison of different rock layers in different models, the improved YOLOv5 had a coal seam detection depth of 9.54 m, which was 0.86 m more than the traditional YOLOv5 detection depth, and a deviation of 0.46 m from the actual rock layer depth. The improved YOLOv5 had better and closer depth detection to the real situation than other optimization methods. Therefore, the use of improved YOLOv5 can effectively enhance the image detection and data analysis capabilities of drilling. In the analysis of rock layers, it can better analyze and detect coal mine rock layers.

The research provides technical support for the development and application of intelligent mining systems by combining efficient detection algorithms with image processing technology, which helps to improve the operational efficiency and safety level of mines. In the oil and gas industry, this technology can be used for crack detection and monitoring in drilling, pipelines, and storage tanks to ensure the safe operation of facilities. The research model may face limitations in computing resources and other issues in practical applications. Therefore, the model needs to reduce the demand for computing resources while maintaining accuracy. In industrial applications such as coal mines, rapid response is crucial, so the detection speed of the model needs to be further improved. The experimental data used in the final study mainly came from drilling rock images in specific scenarios, which may lead to insufficient generalization ability of the model when facing different types of rock formations and environments. Research has shown that improving coal mine drilling detection technology can more accurately determine the location and thickness of coal seams, which can help improve coal mining efficiency and resource utilization. At the same time, this technology can also detect safety hazards such as gas and water hazards in coal mines in advance, effectively preventing mining accidents from occurring. Secondly, with the development of coal mine drilling detection technology, it helps to improve the efficiency of clean energy extraction such as coalbed methane, and supports the optimization and transformation of energy structure. And the research has also promoted the development of related fields such as automation and intelligent drilling equipment, as well as the advancement of geological science. Although some achievements have been made in the research, there are still some shortcomings. The analysis of drilling images only considers images’ accuracy and does not take into account the detection speed. This study only analyzes the depth of coal mine rock layers and also requires detection of the width of coal mine rock layers. The experimental data in the study mainly consists of images of drilling rock layers in specific scenarios. In subsequent research, different types of rock formations and environments will also be used for analysis. The improved YOLOv5 model still has some issues with computing resources and real-time performance in practical applications. Therefore, further optimization of the computational efficiency of the model is needed in the future. This high computational resource requirement of the improved YOLOv5 model may limit the scope of the model in practical applications. At the same time, it causes the response speed of the model to decrease, thus affecting the safety and productivity of the mine. Therefore the study also needs to reduce the computational complexity of the model through techniques such as model compression and knowledge distillation. In practice, if the model cannot process and output the results in a short time, it may lead to serious safety accidents. Therefore, the research also needs to further optimise the inference speed of the model for the real-time requirements of the mining environment, and accelerators need to be introduced into the hardware to enhance the real-time processing capability.

Availability of data and materials

The datasets generated or analyzed during this study are available from the corresponding author on reasonable request.

References

  • Chen B (2023) Research on mine dust and fire detection system based on recurrent neural network. In: 2023 5th international conference on robotics, intelligent control and artificial intelligence (RICAI), vol 1(11). pp 922–925

  • Chen T, Dong L, She X (2023) Research on automatic counting of drill pipes for underground gas drainage in coal mines based on YOLOv7-GFCA model. Appl Sci 13(18):10240–10241

    Article  Google Scholar 

  • Dong S, Li Z, Zheng S, Guo X, Wang Y (2023) Advanced drilling detection and multi-information identification of water-conducting channel of coal floor. Coal Sci Technol 51(7):15–23

    Google Scholar 

  • Dornelas RS, Lima DA (2023) Correlation filters in machine learning algorithms to select de-mographic and individual features for autism spectrum disorder diagnosis. J Data Sci Intell Syst 3(1):7–9

    Google Scholar 

  • Fan Y, Mao S, Li M, Wu Z, Kang J (2024) CM-YOLOv8: Lightweight YOLO for coal mine fully mechanized mining face. Sensors 24(6):1866–1867

    Article  Google Scholar 

  • Imam M, Baïna K, Tabii Y, Ressami EM, Adlaoui Y, Benzakour I, Abdelwahed EH (2023) The future of mine safety: a comprehensive review of anti-collision systems based on computer vision in underground mines. Sensors 23(9):4294–4295

    Article  Google Scholar 

  • Lei M, Zhang X, Dong Z, Wan J, Zhang C, Zhang G (2023) Locating anchor drilling holes based on binocular vision in coal mine roadways. Mathematics 11(20):4365–4366

    Article  Google Scholar 

  • Li W, Lu X, Wu R, Wang H (2023) Evolution analysis of research on disaster-causing mechanism and prevention technology of mine goaf disaster. Environ Sci Pollut Res 30(41):93388–93406

    Article  Google Scholar 

  • Luo B, Kou Z, Han C, Wu J, Liu S (2023) A faster and lighter detection method for foreign objects in coal mine belt conveyors. Sensors 23(14):6276–6277

    Article  Google Scholar 

  • Lv Y, Lin L, Guo H, Tong C, Liu Y, Zhang S, Suo S (2024) An adaptive hybrid surrogate model for FEA of telescopic boom of rock drilling jumbo. Eng Appl Artif Intell 130(1):107710–107711

    Article  Google Scholar 

  • Singh SK, Banerjee BP, Raval S (2023) A review of laser scanning for geological and geotechnical applications in underground mining. Int J Min Sci Technol 33(2):133–154

    Article  Google Scholar 

  • Tingjiang T, Changfang G, Guohua Z, Wenhua J (2023) Research and application of downhole drilling depth based on computer vision technique. Process Saf Environ Prot 174(6):531–547

    Article  Google Scholar 

  • Wang H, Zhang F, Wang H, Li Z, Wang Y (2023) Real-time detection and location of reserved anchor hole in coal mine roadway support steel belt. J Real Time Image Proc 20(5):89–90

    Article  Google Scholar 

  • Wu X, Yuan S, Hu Q, Wang X, She Y (2023a) Drill pipe counting method in coal mine based on improved object tracking. In: 2023 8th international conference on intelligent computing and signal processing (ICSP), vol 21(6). pp 1181–1184

  • Wu X, Wang C, Tian Z, Huang X, Wang Q (2023b) Research on belt deviation fault detection technology of belt conveyors based on machine vision. Machines 11(12):1039–1040

    Article  Google Scholar 

  • Yang Y, Liu Y, Liu L, Liu Z, Wu H (2024) Monitoring global cement plants from space. Remote Sens Environ 302(1):113954–113955

    Article  Google Scholar 

  • Yanhao N, Quanle Z, Yansong N, Bichuan Z (2024) Combined effect mechanism of linear loading and disturbance with different amplitudes on sandstone. Geomech Geophys Geoenergy Georesour 10(1):1–31

    Google Scholar 

  • Zhang Q, Guo J, Lu X, Ding K, Yuan R, Wang D (2024) Simulation and on-site detection of the failure characteristics of overlying strata under the mining disturbance of coal seams with thin bedrock and thick alluvium. Sensors 24(6):1748–1749

    Article  Google Scholar 

  • Zhou K, Lei D, Chun PJ, She Z, He J, Du W, Hong M (2024) Evaluation of BFRP strengthening and repairing effects on concrete beams using DIC and YOLO-v5 object detection algorithm. Constr Build Mater 411(1):134594–134595

    Article  Google Scholar 

Download references

Funding

This study not received any funding.

Author information

Authors and Affiliations

Authors

Contributions

Qiyong Feng: conceptualization, methodology, writing—original draft. Yanping Xue: data curation, writing—review and editing.

Corresponding author

Correspondence to Yanping Xue.

Ethics declarations

Ethics approval and Consent to participate

Not applicable.

Consent for publication

Not applicable.

Competing interest

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Feng, Q., Xue, Y. Design of coal mine drilling detection model combining improved YOLOv5 and Gaussian filtering. Energy Inform 7, 92 (2024). https://doi.org/10.1186/s42162-024-00387-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s42162-024-00387-3

Keywords