Drilling rod counting method and system based on drilling video intelligent analysis
By using a method based on intelligent analysis of drilling video, the counting of drill pipes has been automated and achieved with high precision, solving the problems of low efficiency and poor adaptability of traditional methods, and making it suitable for complex underground coal mine environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-04-10
AI Technical Summary
Traditional drill pipe counting methods are inefficient, susceptible to human error, and existing instrument counting methods are prone to damage in the underground coal mine environment, resulting in high maintenance costs and poor adaptability.
By employing a method based on intelligent analysis of drilling videos, real-time video acquisition, data preprocessing, target detection model training, and multi-target tracking algorithms are combined with spatiotemporal attention mechanisms and multi-dimensional feature extraction to achieve automated and high-precision drill pipe counting.
It improves the reliability and efficiency of drill pipe counting, reduces labor costs, significantly reduces missed detections and misjudgments, and adapts to the complex underground environment of coal mines.
Smart Images

Figure CN121837993A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of coal mining equipment, specifically relating to a drill rod counting method and system based on intelligent analysis of drilling video. Background Technology
[0002] In the coal mining industry, traditional drill pipe counting methods have revealed numerous drawbacks in practical applications. Manual counting is not only inefficient, requiring dedicated personnel to constantly monitor the drilling process and consuming significant manpower, but it is also highly susceptible to human fatigue and distraction, leading to counting errors. For example, during prolonged drilling operations, manual counting may result in omissions or overcounts, leading to misjudgments of borehole depth and impacting gas extraction efficiency. While some instrumental counting methods improve automation to some extent, their equipment is prone to damage in the harsh underground coal mine environment (such as high humidity, strong electromagnetic interference, and dust pollution), resulting in high maintenance costs. Furthermore, their poor compatibility with different drill pipe machines severely limits their application.
[0003] In conclusion, developing a new technology that can adapt to the complex underground environment of coal mines, effectively overcome the limitations of existing drill pipe counting methods, and achieve high-precision and high-reliability drill pipe counting is of vital practical significance and has an urgent market demand for improving coal mine gas extraction efficiency, ensuring safe coal mine production, and promoting the intelligent construction of coal mines. Summary of the Invention
[0004] In view of the problems or defects in the existing technology, the present invention aims to solve the problem that the traditional drill pipe counting method has exposed many drawbacks in practical applications.
[0005] This invention provides a drill pipe counting method based on intelligent analysis of drilling video, characterized by the following steps: Step 1: Data Acquisition: Real-time video acquisition of the drilling process to obtain raw video data; Step 2: Data Preprocessing and Labeling: The original video data is transmitted to a ground server, where it is preprocessed. The preprocessing includes dynamic background suppression based on a spatiotemporal attention mechanism and multi-dimensional feature extraction of the drill pipe. A standardized dataset is constructed and target labels are created. Step 3: Target detection model training: Based on the standardized dataset, target labels, and extracted multi-dimensional features of the drill pipe, train a target detection model to identify workers, drill pipes, drilling rigs, and drilling rig power heads; Step 4: Target Detection and Parameter Recording: Using the trained target detection model, multiple targets in the video, including workers, drill pipes, drilling rigs, and drilling rig power heads, are detected in real time. Multiple targets are marked with rectangular detection boxes, and key parameter information such as the center point coordinates, width, and height of the rectangular detection boxes are recorded simultaneously. Step 5: Target Tracking and Trajectory Recording: A multi-target tracking algorithm is used to continuously track multiple detected targets, including workers, drill pipes, drilling rigs, and drilling rig power heads, and record the motion trajectory of each target in the video sequence; The multi-target tracking algorithm can use the DeepSORT algorithm. During the tracking process, the characteristics of the drill pipe's motion trajectory are used as an additional criterion for tracking and matching. When the difference in the trajectory slope of the drill pipe target in two frames is less than a preset slope threshold and the difference in trajectory smoothness is less than a preset smoothness threshold, the confidence of target matching is improved.
[0006] Step Six: Drilling Quantity Determination: Based on the movement status of the drill rig's power head and whether the operator has continuous drilling movements, the drilling quantity is determined comprehensively. The determination method includes: first, monitoring the coordinate changes of the power head's rectangular frame; if the coordinates change, the drilling process starts; then, determining whether one of the following conditions is met: the drill rod's rectangular frame is below the power head's rectangular frame, or the operator's rectangular frame coincides with the lower part of the power head's rectangular frame and reaches the set time. If both conditions are met, then checking whether the power head completes the cycle movement and returns to the initial position within the set time. If so, the drilling quantity is incremented by 1; if the power head stops moving and maintains the set time, the drilling is determined to be finished and the final quantity is output.
[0007] Furthermore, in step two, dynamic background suppression based on the spatiotemporal attention mechanism is achieved through the following steps: Let the drilling video sequence be... ,in Indicates the first Frame image, For each frame of the video, the total number of frames is [number]. Constructing feature maps , The number of feature channels, , These are the feature map height and width, respectively. Calculate spatial attention weights : Through convolutional layers Dimensionality reduction and activation are performed to obtain the spatial attention map. , represented as ,in This represents the Sigmoid activation function. This represents a 1×1 convolution operation. , These represent average pooling and max pooling operations, respectively. The weight value at each location is positively correlated with the "target probability" of that region—target areas such as drill pipes, workers, and power heads have significant grayscale / texture variations, resulting in high response values after pooling. The weights approach 1; while static interference areas in the background, such as "equipment shadows, dust spots, and irrelevant debris," have low response values. The weights approach 0; Calculate the attention weights over time : For continuous Frame feature map The inter-frame differences are calculated, and the temporal dependencies are learned through a gated recurrent unit (GRU) to obtain a temporal attention map. , represented as ,in Represents the L2 norm. This represents a gated loop unit; the value of k ranges from 5 to 10, used to balance the learning and computational efficiency of time-dependent relationships; downhole dynamic noise (such as inter-frame offset caused by drilling rig vibration, light flickering, and dust flow) is characterized by high frequency and irregularity, with large but unpredictable inter-frame differences; while the movement of the target (drill pipe feed, operator operation) is characterized by low frequency and continuous regularity, with stable differences; the GRU learns this regularity to enable... Regular target motion is assigned high weight, while irregular dynamic noise is assigned low weight. Generate feature maps after dynamic background suppression The spatial attention weights and temporal attention weights are fused together to weight the original feature map, as shown in the formula: ,in This represents element-wise multiplication. This is the attention fusion coefficient, with a value range of [value range missing]. .
[0008] Furthermore, the multi-dimensional feature extraction of the drill pipe includes the extraction of texture features, geometric morphology features, and motion trajectory features: Texture features: The contrast, correlation, energy, and homogeneity of the drill pipe region are calculated using the Gray-Level Co-occurrence Matrix (GLCM). Let the gray-level matrix of the image within the drill pipe detection box be... grayscale level is Gray-level co-occurrence matrix Indicates distance as Angle is Time grayscale and Simultaneous occurrence probability, contrast Correlation ,in , Grayscale , The mean, , Grayscale , Standard deviation; The possible values include, for example , , , The robustness of drill pipe texture features is improved by fusing multi-directional gray-level co-occurrence matrix features.
[0009] Geometric features: Calculate the aspect ratio of the drill pipe inspection frame. ( For the width of the detection frame, (for detecting the height of the detection frame) and the rectangularity of the drill pipe area. ( To detect the area of the frame, (The actual pixel area of the drill pipe target). Motion trajectory characteristics: Coordinates of the center point of the drill pipe detection frame during the tracking process. Fit a linear trajectory and calculate the trajectory slope. and trajectory smoothness ; Furthermore, in step one, the raw video data is transmitted to the ground server via the underground ring network.
[0010] Furthermore, in step three, the target detection model is constructed using the YOLO series of target detection algorithms, and during the model training process, the extracted multi-dimensional features of the drill rod are integrated as an additional input layer into the feature fusion module of the YOLO series of algorithms.
[0011] Furthermore, the specific process of the determination method in step six is as follows: (1) Monitor the changes in the coordinates of the vertices of the rectangle corresponding to the drill rig's power head. If the coordinates change, it is determined that the drill rig's power head has started to move and the drilling process has begun. (2) Determine whether any of the following conditions are met: Condition 1 is that the rectangular frame corresponding to the drill rod appears below the rectangular frame corresponding to the drill power head; Condition 2 is that the rectangular frame corresponding to the worker is located below the rectangular frame corresponding to the drill power head and the two overlap for a set time. The overlap is determined by comparing the intersection-union ratio (IoU) of the two types of rectangular frames with a preset IoU threshold. If the intersection-union ratio exceeds the preset threshold, it is determined to be an overlap. (3) If any of the above conditions are not met, return to step four and execute again; if any of the above conditions are met, further determine whether the drilling rig power head has completed the cycle action within the set time and returned to the initial marker position, the initial marker position being the position before the drilling rig power head starts moving. (4) If the drill rig power head completes the cycle action and returns to the initial marker position within the set time, it is determined that a complete drilling action has been completed, and the drilling count is incremented by 1; if it is not satisfied, return to step 4 and execute again. (5) Continuously monitor the movement status of the drill rig's power head. If the drill rig's power head stops moving and remains for a set time, the drilling is considered to have ended, and the final total number of drilled parts is output.
[0012] Furthermore, the determination method for condition one in step six is as follows: if the y-axis coordinate of the lower right corner vertex of the rectangle corresponding to the drill pipe is less than the y-axis coordinate of the lower right corner vertex of the rectangle corresponding to the drill rig power head, then it is determined that the rectangle corresponding to the drill pipe appears below the rectangle corresponding to the drill rig power head.
[0013] Furthermore, in step six, the determination method for "the rectangle corresponding to the worker is located below the rectangle corresponding to the drill rig power head" in condition two is as follows: if the y-axis coordinate of the lower right corner vertex of the rectangle corresponding to the worker is less than the y-axis coordinate of the lower right corner vertex of the rectangle corresponding to the drill rig power head, then it is determined that the rectangle corresponding to the worker is located below the rectangle corresponding to the drill rig power head.
[0014] Furthermore, in step six, the "drilling rig power head stops moving" is determined by monitoring whether the coordinates of the vertices of the rectangle corresponding to the drilling rig power head remain unchanged. If the coordinates remain unchanged for a set time, it is determined that the movement has stopped.
[0015] As another aspect of the present invention, a drill pipe counting system based on intelligent analysis of drilling video is also disclosed, comprising: Data acquisition unit: used to acquire raw video data in real time by using intrinsically safe mining camera equipment to capture the drilling process of borehole operations. Data preprocessing and labeling unit: used to transmit the raw video data to the ground server, where the ground server preprocesses the raw video data. The preprocessing includes dynamic background suppression based on spatiotemporal attention mechanism and multi-dimensional feature extraction of drill rod, constructing a standardized dataset and creating target labels. Target detection model training unit: used to train a target detection model for identifying workers, drill pipes, drilling rigs and drilling rig power heads based on the standardized dataset, target labels and extracted multi-dimensional features of drill pipes; Target detection and parameter recording unit: Used to detect workers, drill rods, drilling rigs and drilling rig power heads in the video in real time using the trained target detection model, mark the detected targets with rectangular boxes, and simultaneously record key parameter information such as the coordinates of the center point of the detection box, width and height; Target tracking and trajectory recording unit: Used to continuously track detected workers, drill pipes, drilling rigs and drilling rig power heads using multi-target tracking algorithms, and record the motion trajectory of each target in the video sequence; The drilling quantity is determined based on the motion state of the drill head and whether the operator has continuous drilling movements. The determination method includes: first, monitoring the coordinate changes of the drill head rectangle; if the coordinates change, the drilling process is started; then, determining whether one of the following conditions is met: the drill rod rectangle is below the drill head rectangle, or the operator's rectangle coincides with the lower part of the drill head rectangle and reaches the set time. If the condition is met, then checking whether the drill head completes the cycle movement and returns to the initial position within the set time. If so, the drilling quantity is incremented by 1; if the drill head stops moving and remains in the set time, the drilling is determined to be over and the final quantity is output.
[0016] Compared with the prior art, the present invention has the following advantages: (1) The drill pipe counting method based on intelligent analysis of drilling video in this invention adopts clear coordinate judgment rules (positional relationship between drill pipe and power head, worker and power head), which makes the drilling judgment logic standardized and quantifiable, reduces subjective error, and improves the reliability of counting results.
[0017] (2) The drill rod counting method based on intelligent analysis of drilling video of the present invention accurately counts the number of drill rods during drilling by comprehensively judging the state of the drill rig's power head and the actions of the workers drilling. Compared with the traditional manual counting method, this method can effectively avoid the problems of missed detection and misjudgment caused by long-term operation or complex environment, significantly improve video processing efficiency, reduce labor costs, significantly shorten the data processing cycle, and improve the intelligence and reliability of drill rod counting.
[0018] (3) The drill pipe counting method based on intelligent analysis of drilling video of the present invention adopts dynamic background suppression technology based on spatiotemporal attention mechanism (integrating spatial attention weight and temporal attention weight) to effectively filter dynamic background interference such as downhole dust, vibration, and light changes, and improve the purity and recognizability of target features. Attached Figure Description
[0019] Figure 1 This is a flowchart of a preferred embodiment of the present invention; Figure 2 This is a structural diagram of a preferred embodiment of the present invention; Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0021] This invention proposes a drill pipe counting method based on intelligent analysis of drilling video. This method utilizes intrinsically safe mining cameras to capture real-time video of the entire drilling process at the borehole face, and transmits the video data to a ground server via an underground ring network for intelligent analysis and processing. The ground server employs the YOLOv8 target detection algorithm to identify key targets such as workers, drill pipes, drilling rigs, and the rig's power head, combined with the DeepSORT multi-target tracking algorithm to achieve continuous tracking and behavior recognition of the work objects. The system accurately and automatically counts the number of drill pipes during drilling by comprehensively judging the movement of the rig's power head and the worker's actions such as drilling. Compared with traditional manual counting methods, this method effectively avoids missed detections and misjudgments caused by long working hours or complex environments, significantly improves video processing efficiency, reduces labor costs, significantly shortens the data processing cycle, and enhances the intelligence and reliability of drill pipe counting.
[0022] Please refer to Figure 1 The specific implementation steps of this invention are as follows: Step 1, Data Acquisition: The drilling process is captured in real time using intrinsically safe mining cameras deployed at the front end to obtain the raw video data required for analysis.
[0023] Step 2, Data Preprocessing and Label Creation: After the collected video data is transmitted to the ground server via the downhole ring network, the server performs preprocessing and analysis on the video. The preprocessing includes dynamic background suppression based on the spatiotemporal attention mechanism and multi-dimensional feature extraction of the drill pipe, constructing a standardized dataset and creating target labels; constructing a standardized dataset and completing the creation of target labels provide high-quality data support for subsequent model training.
[0024] Step 3, Target Detection Model Training: For three key targets—workers, drill pipes, drilling rigs, and drill pipe power heads—a detection model is constructed and trained to ensure that the model has the ability to accurately identify and classify the above targets.
[0025] Step 4, Target Detection and Parameter Recording: The trained target detection model is used to detect workers, drill rods, drilling rigs and drilling rig power heads in the video in real time. The detected targets are marked with rectangular boxes, and key parameter information such as the center point coordinates, width and height of the detection boxes are recorded simultaneously.
[0026] Step 5, Target Tracking and Trajectory Recording: Based on the detection results, a target tracking algorithm is used to continuously track the worker, drill pipe, drilling rig, and drilling rig power head, and to record the motion trajectory of each target in the video sequence in real time to support subsequent action recognition and behavior analysis.
[0027] Step 6, Determining the Number of Drill Bits: The backend server comprehensively analyzes the movement status of the drill rig's power head and whether the workers have continuous drilling actions to accurately determine the number of drill bits, effectively reducing the probability of missed detections and false judgments. The specific determination logic is as follows: First, it checks if the drill rig's power head is in motion. If it is, the drilling process begins. Then, it checks either condition 1: whether a drill rod detection frame appears below the drill rig's power head detection frame, or condition 2: whether the worker detection frame is below the drill rig's power head detection frame and whether the worker detection frame overlaps with the drill rig's power head detection frame for a certain period of time. If neither condition 1 nor condition 2 is met, it returns to step 4 and restarts the loop. If either condition 1 or condition 2 is met, it checks if the drill rig's power head completes its cycle within a certain time and returns to the marker position. If the condition is met, it is determined that a complete drilling action has been completed, and the drilling count is incremented by 1. If the condition is not met, it returns to step 4 and restarts the loop until the drill rig's power head stops moving and remains stationary for a certain period of time, at which point the drilling process ends, and the total drilling count is output.
[0028] The coordinates of the three types of target detection boxes are defined as follows: the worker detection box coordinates are (x1, y1, x2, y2), the drill pipe detection box coordinates are (x3, y3, x4, y4), and the drilling rig power head detection box coordinates are (x5, y5, x6, y6). Wherein, (x1, y1), (x3, y3), and (x5, y5) correspond to the coordinates of the upper left corner of the worker detection box, drill pipe detection box, and drilling rig power head detection box, respectively; (x2, y2), (x4, y4), and (x6, y6) correspond to the coordinates of the lower right corner of the worker detection box, drill pipe detection box, and drilling rig power head detection box, respectively. The coordinates of the center point of the three types of detection boxes can be calculated based on the length and height parameters of their respective boxes. The specific judgment logic is explained as follows: the determination of "whether the drilling rig power head has started moving" mentioned in step 6 is achieved by real-time monitoring of the coordinate parameters of the drilling rig power head detection box. If the values of y5 (y-axis coordinate of the top left corner) and y6 (y-axis coordinate of the bottom right corner) in the drill rig power head detection frame change, it is defined as the drill rig power head starting to move. Whether a drill rod detection frame appears below the drill rig power head detection frame is determined by real-time detection of the drill rod and the positional relationship between the drill rod detection frame and the drill rig power head detection frame. If a drill rod is detected and the y4 (y-axis coordinate of the bottom right corner) in the drill rod detection frame is less than the y6 (y-axis coordinate of the bottom right corner) in the drill rig power head detection frame, it is defined as a drill rod detection frame appearing below the drill rig power head detection frame. Whether the worker detection frame is below the drill rig power head detection frame is determined by real-time identification of the positional relationship between the worker detection frame and the drill rig power head detection frame. If both the worker and the drill rig power head are detected and the y2 (y-axis coordinate of the bottom right corner) in the worker detection frame is less than the y6 (y-axis coordinate of the bottom right corner) in the drill rig power head detection frame, it is defined as the worker detection frame being below the drill rig power head detection frame. The determination of whether the worker's detection frame and the drilling rig's power head detection frame overlap is achieved using the Intersection over Union (IoU) threshold comparison method: the coordinate overlap degree (i.e., IoU value) of the two types of detection frames is calculated. If the IoU value exceeds a preset IoU threshold, the two types of detection frames are considered to overlap; if it does not exceed the preset IoU threshold, the two types of detection frames are considered not to overlap. The determination of whether the drilling rig's power head completes its cyclical action and returns to the marked position within a certain time period involves first marking the initial position of the drilling rig's power head, and then monitoring whether the trajectory returns to the marked position within a set time range by tracking the movement trajectory of the drilling rig's power head target. If the drilling rig's power head target returns to the marked position within the specified time, it is defined as the drilling rig's power head completing its cyclical action and returning to the marked position; if it does not return to the marked position within the specified time, it is defined as the drilling rig's power head not completing its cyclical action or not returning to the marked position.
[0029] Please refer to Figure 2As another aspect of the present invention, and as a carrier for implementing the above method, a drill pipe counting system based on intelligent analysis of drilling video is also involved, comprising: Data acquisition unit: used to acquire raw video data in real time by using intrinsically safe mining camera equipment to capture the drilling process of borehole operations. Data preprocessing and labeling unit: used to transmit the raw video data to the ground server, where the ground server preprocesses the raw video data. The preprocessing includes dynamic background suppression based on spatiotemporal attention mechanism and multi-dimensional feature extraction of drill rod, constructing a standardized dataset and creating target labels. Target detection model training unit: used to train a target detection model for identifying workers, drill pipes, drilling rigs and drilling rig power heads based on the standardized dataset, target labels and extracted multi-dimensional features of drill pipes; Target detection and parameter recording unit: Used to detect workers, drill rods, drilling rigs and drilling rig power heads in the video in real time using the trained target detection model, mark the detected targets with rectangular boxes, and simultaneously record key parameter information such as the coordinates of the center point of the detection box, width and height; Target tracking and trajectory recording unit: Used to continuously track detected workers, drill pipes, drilling rigs and drilling rig power heads using multi-target tracking algorithms, and record the motion trajectory of each target in the video sequence; The drilling quantity is determined based on the motion state of the drill head and whether the operator has continuous drilling movements. The determination method includes: first, monitoring the coordinate changes of the drill head rectangle; if the coordinates change, the drilling process is started; then, determining whether one of the following conditions is met: the drill rod rectangle is below the drill head rectangle, or the operator's rectangle coincides with the lower part of the drill head rectangle and reaches the set time. If the condition is met, then checking whether the drill head completes the cycle movement and returns to the initial position within the set time. If so, the drilling quantity is incremented by 1; if the drill head stops moving and remains in the set time, the drilling is determined to be over and the final quantity is output.
[0030] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A drill pipe counting method based on intelligent analysis of drilling video, characterized in that, Includes the following steps: Step 1: Data Acquisition: Real-time video acquisition of the drilling process to obtain raw video data; Step 2: Data Preprocessing and Labeling: The raw video data is transmitted to a ground server, where it is preprocessed. The preprocessing includes dynamic background suppression based on a spatiotemporal attention mechanism and multi-dimensional feature extraction of the drill pipe. A standardized dataset is constructed and target labels are created. Step 3: Target detection model training: Based on the standardized dataset, target labels, and extracted multi-dimensional features of the drill pipe, train a target detection model to identify workers, drill pipes, drilling rigs, and drilling rig power heads; Step 4: Target Detection and Parameter Recording: Using the trained target detection model, multiple targets in the video, including workers, drill pipes, drilling rigs, and drilling rig power heads, are detected in real time. Multiple targets are marked with rectangular detection boxes, and key parameter information such as the center point coordinates, width, and height of the rectangular detection boxes are recorded simultaneously. Step 5: Target Tracking and Trajectory Recording: A multi-target tracking algorithm is used to continuously track multiple detected targets, including workers, drill pipes, drilling rigs, and drilling rig power heads, and record the motion trajectory of each target in the video sequence; Step Six: Determining the Number of Drilling Passes: The number of drilling passes is determined by comprehensively considering the motion state of the drill rig's power head, whether the worker has continuous drilling actions, and the coordinate status of the rectangular detection boxes of multiple targets.
2. The drill pipe counting method based on intelligent analysis of drilling video according to claim 1, characterized in that, In step two, dynamic background suppression based on the spatiotemporal attention mechanism is achieved through the following steps: Let the drilling video sequence be... ,in Indicates the first Frame image, For each frame of the video, the total number of frames is [number]. Constructing feature maps , The number of feature channels, , These are the feature map height and width, respectively. Calculate spatial attention weights : Through convolutional layers Dimensionality reduction and activation are performed to obtain the spatial attention map. , represented as ,in This represents the Sigmoid activation function. This represents a 1×1 convolution operation. , These represent average pooling and max pooling operations, respectively. The weight value of each location is positively correlated with the "target probability" of that region—the target regions of drill pipe, worker, and power head have high response values after pooling due to significant grayscale / texture changes. The weights approach 1; while static interference areas in the background, including equipment shadows, dust spots, and irrelevant debris, have low response values. The weights approach 0; Calculate the attention weights over time : For continuous Frame feature map The inter-frame differences are calculated, and the temporal dependencies are learned through a gated recurrent unit (GRU) to obtain a temporal attention map. , represented as ,in Describing the L2 norm, This represents a gated loop unit; downhole dynamic noise is characterized by high frequency and irregularity, with large inter-frame differences but no continuous pattern; while the target's motion exhibits low frequency and continuous regularity, with stable differences; the GRU learns this pattern to enable... Regular target motion is assigned high weight, while irregular dynamic noise is assigned low weight. Generate feature maps after dynamic background suppression The spatial attention weights and temporal attention weights are fused together to weight the original feature map, as shown in the formula: ,in This represents element-wise multiplication. This represents the attention fusion coefficient.
3. The drill pipe counting method based on intelligent analysis of drilling video according to claim 1, characterized in that, The multi-dimensional feature extraction of the drill pipe includes texture feature extraction, geometric shape feature extraction, and motion trajectory feature extraction: Texture features: The contrast, correlation, energy, and homogeneity of the drill pipe region are calculated using the Gray-Level Co-occurrence Matrix (GLCM). Let the gray-level matrix of the image within the drill pipe detection box be... grayscale level is Gray-level co-occurrence matrix Indicates distance as Angle is Time grayscale and Simultaneous occurrence probability, contrast Correlation in , Grayscale , The mean, , Grayscale , Standard deviation; Geometric features: Calculate the aspect ratio of the drill pipe inspection frame. , For the detection frame width, To determine the height of the detection frame; calculate the rectangularity of the drill pipe area. , To detect the area of the frame, This represents the actual pixel area of the drill rod target. Motion trajectory characteristics: Coordinates of the center point of the drill pipe detection frame during the tracking process. Fit a linear trajectory and calculate the trajectory slope. and trajectory smoothness ; Indicates the first i The x-coordinate of the center point of the drill pipe detection frame at frame time; Indicates the first i The vertical coordinate of the center point of the drill pipe detection frame in frame time; subscript This indicates the total number of frames tracked.
4. The drill pipe counting method based on intelligent analysis of drilling video according to claim 1, characterized in that, In step 1, the raw video data is transmitted to the ground server via the underground ring network.
5. The drill pipe counting method based on intelligent analysis of drilling video according to claim 1, characterized in that, In step three, the target detection model is constructed using the YOLO series target detection model, and during the model training process, the extracted multi-dimensional features of the drill rod are used as an additional input layer and integrated into the feature fusion module of the YOLO series algorithm.
6. The drill pipe counting method based on intelligent analysis of drilling video according to claim 1, characterized in that, The specific method for step six is as follows: (1) Monitor the changes in the coordinates of the vertices of the rectangle corresponding to the drill rig's power head. If the coordinates change, it is determined that the drill rig's power head has started to move and the drilling process has begun. (2) Determine whether any of the following conditions are met: Condition 1 is that the rectangle corresponding to the drill rod appears below the rectangle corresponding to the drill power head; Condition 2 is that the rectangle corresponding to the worker is located below the rectangle corresponding to the drill power head and the two overlap and are set for a continuous time. The overlap is determined by comparing the intersection-over-union ratio (IoU) of the two types of rectangles with a preset IoU threshold. If the IoU exceeds the preset threshold, it is determined to be an overlap. (3) If any of the above conditions are not met, return to step four and execute again; if any of the above conditions are met, further determine whether the drilling rig power head has completed the cycle action within the set time and returned to the initial marker position, the initial marker position being the position before the drilling rig power head starts moving. (4) If the drilling rig power head completes the cycle action and returns to the initial marker position within the set time, it is determined that a complete drilling action has been completed, and the drilling count is incremented by 1; if it is not satisfied, return to step four and execute again. (5) Continuously monitor the movement status of the drill rig's power head. If the drill rig's power head stops moving and remains for a set time, the drilling is considered to have ended, and the final total number of drilled parts is output.
7. The drill pipe counting method based on intelligent analysis of drilling video according to claim 6, characterized in that, The determination method for condition one in step six is as follows: if the y-axis coordinate of the lower right corner vertex of the rectangle corresponding to the drill pipe is less than the y-axis coordinate of the lower right corner vertex of the rectangle corresponding to the drill rig power head, then it is determined that the rectangle corresponding to the drill pipe appears below the rectangle corresponding to the drill rig power head.
8. The drill pipe counting method based on intelligent analysis of drilling video according to claim 6, characterized in that, In step six, the specific method for determining whether the rectangle corresponding to the worker is below the rectangle corresponding to the drilling rig power head in condition two is as follows: if the y-axis coordinate of the lower right corner vertex of the worker's rectangle is less than the y-axis coordinate of the lower right corner vertex of the drilling rig power head's rectangle, then the worker's rectangle is determined to be below the rectangle corresponding to the drilling rig power head.
9. The drill pipe counting method based on intelligent analysis of drilling video according to claim 6, characterized in that, The drilling rig power head stops moving by monitoring whether the coordinates of the vertices of the rectangle corresponding to the drilling rig power head remain unchanged. If the coordinates remain unchanged for a set time, it is determined that the movement has stopped.
10. A drill pipe counting system based on intelligent analysis of drilling video, characterized in that, include: Data acquisition unit: used to acquire raw video data in real time during the drilling process. Data preprocessing and labeling unit: used to transmit the raw video data to the ground server, where the ground server preprocesses the raw video data. The preprocessing includes dynamic background suppression based on spatiotemporal attention mechanism and multi-dimensional feature extraction of drill rod, constructing a standardized dataset and creating target labels. Target detection model training unit: used to train a target detection model for identifying workers, drill pipes, drilling rigs and drilling rig power heads based on the standardized dataset, target labels and extracted multi-dimensional features of drill pipes; Target detection and parameter recording unit: Used to detect workers, drill rods, drilling rigs and drilling rig power heads in the video in real time using the trained target detection model, mark the detected targets with rectangular boxes, and simultaneously record key parameter information such as the coordinates of the center point of the detection box, width and height; Target tracking and trajectory recording unit: Used to continuously track detected workers, drill pipes, drilling rigs and drilling rig power heads using multi-target tracking algorithms, and record the motion trajectory of each target in the video sequence; Drilling Quantity Determination Unit: Based on the movement status of the drill rig's power head and whether the operator has continuous drilling movements, the drilling quantity is determined comprehensively. The determination method includes: first, monitoring the coordinate changes of the power head's rectangular frame; if the coordinates change, the drilling process is started; then, determining whether one of the following conditions is met: the drill rod's rectangular frame is below the power head's rectangular frame, or the operator's rectangular frame coincides with the lower part of the power head's rectangular frame and reaches the set time. If both conditions are met, then checking whether the power head completes the cycle movement and returns to the initial position within the set time. If so, the drilling quantity is incremented by 1; if the power head stops moving and remains in motion for the set time, the drilling is determined to be finished and the final quantity is output.