Real-time counting method for underground coal mine drill rods
By using YOLOv8 model and ByteTrack technology in underground drilling pipe counting in coal mines, the collision line detection area is constructed, and the problems of traditional manual counting inefficiency and inaccurate counting in complex environments are solved, thus achieving efficient and accurate drilling pipe counting.
Patent Information
- Application Number
- CN202510226243.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-13
AI Technical Summary
Traditional artificial drill pipe counting is inefficient and prone to errors. The existing automated counting technology is prone to miscalculation and inaccurate counting problems in complex downhole environments.
The YOLOv8 model is used to detect the real-time video data of the upper and lower drill pipes of the drill rig, and the collision line detection area is constructed based on the preset drill rig-related coordinate information. Correlation tracking is performed through ByteTrack to achieve accurate detection and counting of the drill pipe status.
It significantly improves the accuracy and efficiency of drill pipe counting, reduces interference caused by complex underground environments, provides reliable data support, and improves the safety and efficiency of coal mining operations.
Smart Images

Figure CN120147925A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of coal mine drilling, and particularly relates to a real-time counting method for drill pipes in coal mines underground. Background Art
[0002] In traditional drilling rig operations, the counting of drill pipes usually relies on manual labor. This method is not only inefficient but also prone to errors, seriously affecting the safety and efficiency of operations. With the development of automation technology, especially the progress in the field of computer vision, automatic drill pipe counting technology has emerged, aiming to improve the accuracy and efficiency of counting.
[0003] With the development of automation technology, especially the progress in the field of computer vision, there has been a need for automatic technology counting to improve the accuracy and efficiency of drill pipe counting. Some existing automatic counting methods attempt to achieve automatic counting of drill pipes through computer vision technology. For example: Patent 202110103397.7: This method identifies and locates the drill pipes, and then counts based on the distance peak graph of their movement trajectories. However, in the complex underground environment (such as when multiple drill pipes exist simultaneously, the drill rig breaks or retreats to adjust the angle in hard rock formations), this method is prone to mismeasurement; Patent 202310944258.6: This method identifies and tracks the power head and the front end of the fuselage, but when the drill rig retreats and adjusts, it may misjudge additional peaks, resulting in inaccurate counting; Patent 202410030225.5: This method uses a rotating target detection algorithm to determine the key points of the target drill pipe and the center point of the impact power head, and calculates the distance between the two in real time, and draws a peak change graph for counting. However, when the power head of the drill rig is blocked by passing workers, the size of the detection frame will change or even drift, thus affecting the accuracy of statistics. Summary of the Invention
[0004] The present invention aims to provide a real-time counting method for drill pipes in coal mines underground, effectively overcoming the disadvantages of low efficiency and easy errors in traditional manual counting, and at the same time solving problems such as the peak graph of the movement trajectory of markers in existing automatic counting technologies being prone to mismeasurement due to the influence of complex environments, so as to achieve accurate, efficient real-time counting of drill pipes in coal mines underground, provide reliable data support for coal mine mining operations, improve the overall safety and efficiency of operations, and promote the further development of automation technology in the field of coal mine mining.
[0005] To achieve the above object, the present invention adopts the following technical solution: A real-time counting method for drill pipes in coal mines underground, including the following steps:
[0006] S41 Video input model: Input the real-time video data of the drill rig's up and down drill pipes into the YOLOv8 model with target detection function;
[0007] S42 Construct the crossing detection area: Generate the crossing detection area by using the preset coordinate information related to the drill rig and the crossing detection area construction method;
[0008] S43 Count: Detect and count the drill pipe status by using the automatically generated crossing detection area.
[0009] The beneficial effects of this solution are as follows: By inputting the coordinate information related to the drill rig into the YOLOv8 model, the position of the drill rig in the complex underground environment can be accurately located, providing an accurate basis for the subsequent construction of the crossing detection area. On this basis, the constructed crossing detection area closely combines the actual position of the drill rig and the characteristics of the drill pipe movement trajectory, greatly enhancing the pertinence of the detection of the drill pipe status. Compared with traditional counting methods and existing automated counting technologies, this method effectively reduces the interference caused by the complex underground environment (such as the coexistence of multiple drill pipes, the adjustment of the drill rig angle, the occlusion of the power head, etc.), significantly improving the accuracy and efficiency of drill pipe counting. It can not only provide reliable data support for coal mining operations, ensure the accuracy of the mining progress and resource assessment, but also improve the overall operation safety, reduce operation errors and potential safety hazards caused by counting errors, and strongly promote the further development of automation technology in the coal mining field.
[0010] Further, the preset coordinate information related to the drill rig includes the initial distance and scaling factor between the center coordinate point A of the gripper and the center coordinate point B of the chuck; in S42 for constructing the crossing detection area, the crossing detection area construction method includes the following steps: S401 Construct line segment AB through the input initial distance between the center coordinate point A of the gripper and the center coordinate point B of the chuck and the scaling factor; S402 Obtain the angle between AB and the horizontal line or the plumb line through line segment AB; S403 Construct the crossing detection area according to the determined distance on the AB line and the angle between AB and the horizontal line or the plumb line.
[0011] Further, the way to obtain the angle is to construct a right triangle ABC, where C is the intersection of the horizontal line passing through B and the vertical line passing through A.
[0012] Further, S43 counting is as follows: Use ByteTrack to associate and track the movement trajectory of the drill pipe, and count according to the situation of the collision detection area at the tail of the drill rig.
[0013] Further, the determined distances on the AB line include BD, BE, BF, and BG, and the constructed crossing detection area includes area one and area two for detecting the movement status of the chuck and area three and area four for detecting the movement status of the drill pipe.
[0014] Further, a counting method for detecting and counting the drill rod status using the automatically generated collision detection area is as follows: when the chuck trajectory passes through area one and area two in sequence, the chuck status is recorded as "pushing backward", and when the chuck trajectory passes through area two and area one in sequence, the chuck status is recorded as "pushing forward"; when the drill rod tail trajectory passes through area four and area three in sequence, "drill rod mounted" is set to true, and when the drill rod tail trajectory passes through area three and area four in sequence, "drill rod lowered" is set to true; when the chuck status is detected to be "pushing backward" and "pushing forward" in the most recent time sequence, and the status "drill rod mounted" is true, the drill rod upper count is increased by 1, and the status "drill rod mounted" is updated to false; when the chuck status is detected to be "pushing forward" and "pushing backward" in the most recent time sequence, and the status "drill rod lowered" is true, the drill rod lower count is increased by 1, and the status "drill rod lowered" is updated to false.
[0015] Further, in S41, the training method of the YOLOv8 model with target detection function includes the following steps: S1 data acquisition: obtaining video recordings of the upper and lower drill rods of the drilling surface to obtain video data;
[0016] S2 data processing: processing the video data obtained in S1, labeling the first target displayed on the picture, and obtaining the labeled picture data;
[0017] S3 model training: Use the labeled image data obtained in S2 to train the YOLOv8 model to obtain a YOLOv8 model with target detection function.
[0018] Furthermore, the video recording of the upper and lower drill rods on the drilling surface in S1 is recorded by using a camera provided by the drilling rig.
[0019] Beneficial effects: 1. Reduce costs: Make full use of the existing hardware resources of the drilling rig, without the need to purchase additional complex external camera equipment, greatly reducing the cost of data acquisition. At the same time, the time and labor costs of equipment installation and debugging are reduced, making the entire target detection model training process more economical and efficient; 2. Facilitate maintenance and management: Based on the drilling rig's built-in camera for data collection and model training, the entire system architecture is more concise. At the same time, for the maintenance and management of the equipment, you only need to pay attention to the camera status of the drilling rig itself, avoiding compatibility issues and maintenance difficulties that may arise between multiple devices, and improving the reliability and maintainability of the system; 3. Improve detection accuracy: The video data obtained by the drilling rig's built-in camera is directly derived from the drilling operation site, which can truly reflect the status of the drill rod under different working conditions. This makes the training data highly consistent with the actual application scenario. After such data training, the model can learn the characteristics of the drill rod target more accurately, thereby effectively improving the accuracy of target detection in actual drilling operations and reducing the occurrence of false detection and missed detection.
[0020] Furthermore, the method for obtaining the labeled image data in S2 is as follows: extract the frames of the video data one by one, and use the Labelimg tool to label the first targets shown in the image data.
[0021] Furthermore, the first targets include a drilling rig, drill pipes, a chuck, a gripper, and a person.
[0022] This solution also has the following beneficial effects:
[0023] By using the input coordinate information related to the drilling rig and the trained model with object detection function, the algorithm is lightweight and can run in real time on a common industrial control computer, reducing the hardware deployment cost. By integrating object detection (YOLOv8n) and multi-object tracking (ByteTrack) technologies, problems such as interference of multiple drill pipes underground, target occlusion, equipment vibration, and dynamic perspective shift are effectively solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram for constructing the crossing detection area in the embodiment of the present invention;
[0025] Figure 2 It is a flowchart of the counting process of the present invention;
[0026] Figure 3 It is a schematic diagram of the counting state of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The following is a more detailed description through specific embodiments:
[0028] Embodiment 1
[0029] Embodiment 1 is basically as shown in the attached Figure 1-2 shown, such as Figure 1-2 shown, a real-time counting method for drill pipes in coal mines, including the following steps:
[0030] S41 Video input to the model: Input the real-time video data of the drill pipes going up and down of the drilling rig into the YOLOv8 model with object detection function;
[0031] S42 Construct the crossing detection area: Use the pre-set coordinate information related to the drilling rig and the method for constructing the crossing detection area to generate the crossing detection area. The coordinate information related to the drilling rig includes the initial distance and scaling factor between the center coordinate point A of the gripper and the center coordinate point B of the chuck;
[0032] The method for constructing the wire crossing detection area includes the following steps: S401 Construct line segment AB through the initial distance between the preset center coordinate point A of the gripper and the center coordinate point B of the chuck and the scaling coefficient; S402 Obtain the included angle between AB and the horizontal line or the plumb line through line segment AB; S403 Construct the wire crossing detection area according to the determined distance on the straight line AB and the included angle between AB and the horizontal line or the plumb line. As Figure 1 shown, in this embodiment, the way to obtain the included angle is to construct a right triangle ABC, where C is the intersection point of the horizontal line passing through B and the vertical line passing through A;
[0033] The determined distances on the straight line AB include BD, BE, BF, and BG. The constructed wire crossing detection area includes area one and area two for detecting the movement status of the chuck, and area three and area four for detecting the movement status of the drill pipe.
[0034] The generation process of the wire crossing area is as follows: Refer to Figure 1 , when the drill bit of the drilling rig is at different inclination angles, the wire crossing detection area can be adjusted according to the center coordinate point A of the gripper and the center coordinate point B of the chuck input by the operator to ensure that the detection area always maintains the correct relative position with the drill pipe.
[0035] According to the center coordinates (x g , y g ) and (x c , y c ) of the gripper and the chuck respectively detected by the model during the operation of the drilling rig, calculate the sine values of the two rotation angles α and β of the drilling rig:
[0036] AC = y c - y g
[0037] BC = x c - x g
[0038]
[0039] Among them, the coordinate position of the gripper is fixed during the drilling process, and the coordinate position of the chuck will change as the chuck moves back and forth. Through the input coordinate information related to the drilling rig, set the line segments AD, AE, AF, AG and the border lengths of each wire crossing area, and use trigonometric function calculation to determine the coordinate information of each point in the picture, so as to accurately draw the wire crossing area. As the angle α changes, the position of the wire crossing area will also be adjusted accordingly to adapt to different visual angles and detection requirements. The method for determining the coordinate information of each point in the picture is as follows: Area one, area two, area three, and area four are all rectangles of the same size, and all areas take AB as the axis of symmetry median line. Therefore
[0040] DH-DK-LE-QE-PF-SF-TG-WG
[0041] HI = KJ = LM = ON = PQ = SR = TU = WV
[0042] The calculation formulas for the coordinate points of each region are as follows, where k i is the scaling factor, used to adjust the position and width of the region.
[0043] AD = k 1 ·AB
[0044] AE = k 2 ·AB
[0045] AF = k g ·AB
[0046] AG = k 4 ·AB
[0047] HI = k 5 ·AB
[0048] HD = k 6 ·AB
[0049] D = (x D , y D ) = (x g + AD·sinβ, y g + AD·sinα)
[0050] E = (x E , y E ) = (x g + AE·sinβ, y g + AE·sinα)
[0051] F = (x F , y F ) = (x g + AF·sinβ, y g + AF·sinα)
[0052] G = (x G , y G ) = (x g + AG·sinβ, y g + AG·sinα)
[0053] H = (x H , y H ) = (x D - HD·sinα, y D + HD·sinβ)
[0054] K = (x K, y K ) = (x D +HD·sinα, y D -HD·sinβ)
[0055] J = (x J , y J ) = (x K +HI·sinβ, y K +HI·sinα)
[0056] I = (x I , y I ) = (x H +HI·sinβ, y H +HI·sinα)
[0057] L = (x L , y L ) = (x E -LE·sinα, y E +LE·sinβ)
[0058] M - (x M , y M ) - (x E +LE·sinα, y E -LE·sinβ)
[0059] N = (x N , y N ) = (x Q +LM·sinβ, y Q +LM·sinα)
[0060] O = (x O , y O ) = (x L +LM·sinβ, y L +LM·sinα)
[0061] P = (x p , y p ) = (x F -PF·sinα, y F +PF·sinβ)
[0062] S = (x g , y g ) = (x F +PF·sinα, y p +PF·sinβ)
[0063] R = (x R , y R ) = (x S+PQ·sinβ, y S +PQ·sinα)
[0064] Q = (x Q , y Q ) = (x P +PQ·sinβ, y p +PQ·sinα)
[0065] T = (x T , y T ) = (x c -TG·sinα, y c +TG·sinβ)
[0066] W = (x W , y W ) = (x G +TG·sinα, y c -TG·sinβ)
[0067] V - (x V , y V ) - (x W +TG·sinβ, y W +TG·sinα)
[0068] U = (x U , y U ) = (x T +TG·sinβ, y T +TG·sinα)
[0069] As Figure 1 shown, AB is the distance between the gripper and the chuck, BC is the horizontal line, and α is the drilling inclination angle.
[0070] S43 Counting: Use the generated line-crossing detection area to detect and count the state of the drill pipe, use DeepSORT to associate and track the movement trajectory of the drill pipe, and count according to the situation of the collision detection area at the tail of the drilling rig.
[0071] The counting method is as follows: Refer to Figure 1 , Figure 3 , when the chuck trajectory passes through Area 1 and Area 2 in sequence, record the chuck state as "pushing backward", when the chuck trajectory passes through Area 2 and Area 1 in sequence, record the chuck state as "pushing forward"; when the drill pipe tail trajectory passes through Area 4 and Area 3 in sequence, set "drill pipe has been inserted" to true, and when the drill pipe tail trajectory passes through Area 3 and Area 4 in sequence, set "drill pipe has been removed" to true.
[0072] When it is detected that the chuck states are "pushing backward" and "pushing forward" in sequence according to the most recent time order, and the state "drill pipe has been loaded" is true, the drill pipe loading count is incremented by 1, and the state "drill pipe has been loaded" is updated to false; when it is detected that the chuck states are "pushing forward" and "pushing backward" in sequence according to the most recent time order, and the state "drill pipe has been unloaded" is true, the drill pipe unloading count is incremented by 1, and the state "drill pipe has been unloaded" is updated to false.
[0073] Refer to Figure 2 , and the specific implementation process is as follows:
[0074] (1) Input the drilling video into the model, and at the same time input the rack inclination angle and height of the drilling rig in the drilling video. Use YOL08 and ByteTrack for detection to obtain the detection frame of the first target and the center coordinate points of the second target, and draw the line-crossing detection area according to the coordinate points.
[0075] (2) According to the change of the chuck center coordinate points, detect whether the chuck passes through area one and area two in sequence. If so, the system records the chuck state as "pushing backward";
[0076] (3) According to the change of the chuck center coordinate points, the system detects whether the chuck passes through the second and first line-crossing areas in sequence. If so, the system records the chuck state as "pushing forward";
[0077] (4) According to the change of the drill pipe center coordinate points, the system detects whether there is a drill pipe passing through the fourth and third line-crossing areas in sequence. If so, the system sets "drill pipe has been loaded" to true;
[0078] (5) According to the change of the drill pipe center coordinate points, the system detects whether there is a drill pipe passing through the third and fourth line-crossing areas in sequence. If so, the system sets "drill pipe has been unloaded" to true;
[0079] (6) When the system detects that the chuck states are "pushing backward" and "pushing forward" in sequence according to the most recent time order, and the state "drill pipe has been loaded" is true, the drill pipe loading count is incremented by 1, and the state "drill pipe has been loaded" is updated to false;
[0080] (7) When the system detects that the chuck states are "pushing forward" and "pushing backward" in sequence according to the most recent time order, and the state "drill pipe has been unloaded" is true, the drill pipe unloading count is incremented by 1, and the state "drill pipe has been unloaded" is updated to false;
[0081] (8) Loop through steps (2) to (7) until the video ends.
[0082] Embodiment 2
[0083] Embodiment 2 is substantially the same as Embodiment 1, except that Embodiment 2 further includes a training method for a YOLOv8 model having a target detection function, and the training method for a YOLOv8 model having a target detection function includes the following steps: S1 data acquisition: using a camera provided by the drilling rig to shoot a video of the upper and lower drill rods of the drilling surface to obtain video data; in this embodiment, the camera provided by the drilling rig is a mining intrinsically safe camera;
[0084] S2 data processing: processing the video data obtained in S1, labeling the first target displayed on the picture, and obtaining the labeled picture data, wherein the labeled picture data is obtained by extracting the video data frame by frame, and labeling the first target displayed on the picture data using the Labelimg tool. In this embodiment, the first target includes a drilling rig, a drill rod, a chuck, a clamp, and a person;
[0085] S3 model training: Use the labeled image data obtained in S2 to train the YOLOv8 model to obtain a YOLOv8 model with target detection function.
[0086] The above is only an embodiment of the present invention, and common knowledge such as the known specific technical solutions and / or characteristics in the solution is not described in detail here. It should be pointed out that the technical means for solving the problems in the above-mentioned embodiments of the present invention can be used in combination to solve multiple technical problems at the same time. For those skilled in the art, several modifications and improvements can be made without departing from the technical solution of the present invention, which should also be regarded as the scope of protection of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A real-time counting method for drill rods in coal mines, characterized in that: The steps include: S41 video input model: input the real-time video data of the upper and lower drill rods of the drilling rig into the YOLOv8 model with target detection function; S42 constructs a line collision detection area: generates a line collision detection area using preset drilling rig-related coordinate information and a line collision detection area construction method; S43 Count: Use the automatically generated line collision detection area to detect and count the drill pipe status.
2. A real-time counting method for drill rods in coal mines according to claim 1, characterized in that: S42 pre-set drilling rig related coordinate information includes the initial distance and scaling factor of the center coordinate point A of the clamp and the center coordinate point B of the chuck; S42 constructs the line collision detection area, and the line collision detection area construction method includes the following steps: S401 constructs the line segment AB by inputting the initial distance and scaling factor of the center coordinate point A of the clamp and the center coordinate point B of the chuck; S402 obtains the angle between AB and the horizontal line or the plumb line through the line segment AB; S403 constructs the line collision detection area according to the determined distance on the AB straight line and the angle between AB and the horizontal line or the plumb line.
3. A real-time counting method for drill rods in coal mines according to claim 2, characterized in that: S43 counts as follows: ByteTrack is used to correlate and track the movement trajectory of the drill rod, and counts according to the situation of the collision detection area at the rear of the drilling rig.
4. A real-time counting method for drill rods in coal mines according to claim 3, characterized in that: The distances determined on the AB straight line include BD, BE, BF and BG, and the constructed collision detection areas include area one and area two for detecting the movement of the chuck and area three and area four for detecting the movement of the drill rod.
5. A real-time counting method for drill rods in coal mines according to claim 4, characterized in that: The counting method for detecting and counting the drill rod status using the automatically generated collision detection area is as follows: when the chuck track passes through area 1 and area 2 in sequence, the chuck status is recorded as "pushing backward", and when the chuck track passes through area 2 and area 1 in sequence, the chuck status is recorded as "pushing forward"; when the drill rod tail track passes through area 4 and area 3 in sequence, "drill rod mounted" is set to true, and when the drill rod tail track passes through area 3 and area 4 in sequence, "drill rod lowered" is set to true.
6. A real-time counting method for drill rods in coal mines according to claim 5, characterized in that: When it is detected that the chuck status is "pushing backward" and "pushing forward" in the most recent time order, and the status "drill rod mounted" is true, the drill rod mounted count is increased by 1, and the status "drill rod mounted" is updated to false.
7. A real-time counting method for drill rods in coal mines according to claim 5, characterized in that: When it is detected that the chuck status is "forward push" and "backward push" in the most recent time order, and the status "drill rod lowered" is true, the drill rod lowering count is increased by 1, and the status "drill rod lowered" is updated to false.
8. A real-time counting method for drill rods in coal mines according to claim 1, characterized in that: In S41, the training method of the YOLOv8 model with target detection function includes the following steps: S1 data acquisition: obtaining video recordings of the upper and lower drill rods of the drilling surface to obtain video data; S2 data processing: processing the video data obtained in S1, labeling the first target displayed on the picture, and obtaining the labeled picture data; S3 model training: Use the labeled image data obtained in S2 to train the YOLOv8 model to obtain a YOLOv8 model with target detection function.
9. A real-time counting method for drill rods in coal mines according to claim 8, characterized in that: The video recording of the upper and lower drill rods on the drilling surface in S1 is recorded by using the camera provided by the drilling rig.
10. A real-time counting method for drill rods in coal mines according to claim 8, characterized in that: The method for obtaining labeled image data in S2 is: extracting the video data frame by frame, and using the Labelimg tool to label the first target displayed on the image data, the first target including the drilling rig, drill rod, chuck, clamp and person.
Citation Information
Patent Citations
Coal mine drill rod counting method
CN112580609A
A method for counting downhole drill pipes based on improved YOLOX
CN116664573B
Scene-adaptive coal mine drill rod counting method, device and equipment and medium
CN117830908A