Drill rod counting method and system based on drill withdrawal video intelligent analysis

By using intelligent analysis of drilling videos based on drilling rig withdrawal, and employing YOLOv8 and DeepSORT algorithms to identify drill pipe, drilling rig, and worker targets, combined with an online incremental learning optimization model, the problem of low efficiency and easy damage of traditional drill pipe counting methods in underground coal mines has been solved, achieving high-precision and reliable drill pipe counting.

CN121861641APending Publication Date: 2026-04-14CHINA MEDIA SCI & TECH GRP WUHAN DESIGN RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Traditional drill pipe counting methods are inefficient, susceptible to human error, and the equipment is easily damaged in the underground coal mine environment. They also have poor adaptability, which affects gas extraction efficiency and coal mine safety.

Method used

A method based on intelligent video analysis of drill retraction is adopted. The YOLOv8 model is used to identify drill pipe, drilling rig and worker targets. The DeepSORT algorithm is used for real-time detection and tracking. The cross-union ratio threshold is used to determine the overlap and motion status. The model is optimized by online incremental learning to achieve high-precision drill pipe counting.

Benefits of technology

It significantly improves the intelligence and reliability of drill pipe counting, reduces labor costs, shortens the data processing cycle, enhances adaptability to new scenarios and counting accuracy, and avoids missed detections and misjudgments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121861641A_ABST
    Figure CN121861641A_ABST
Patent Text Reader

Abstract

A drill rod counting method based on drill rod withdrawing video intelligent analysis comprises the steps of data collection and preprocessing, wherein real-time video collection, preprocessing and analysis are conducted on the drill rod withdrawing process of drilling operation, a standardized data set is constructed, and target label manufacturing for a key target is completed; aiming at the key target, constructing a target detection model and training the model; performing real-time detection on a key target in the video by using the trained target detection model, labeling the detection target with a rectangular frame, and synchronously recording key parameter information of each detection frame; target tracking and trajectory recording: continuously tracking and recording the key target based on a detection result; the drill withdrawal number is judged, specifically, starting of a drilling machine power head is detected to start drill withdrawal judgment, and then whether the two conditions that a drill rod detection frame appears or a worker coincides with the power head detection frame are met or not is judged to comprehensively judge the drill withdrawal number; the video processing efficiency is remarkably improved, the labor cost is reduced, the data processing period is remarkably shortened, and the intelligence, adaptability and reliability of drill rod counting are improved.
Need to check novelty before this filing date? Find Prior Art

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 drill withdrawal 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 drill pipe withdrawal video, comprising the following steps: Step 1: Data Acquisition and Preprocessing: Real-time video acquisition is performed on the drilling operation and rod withdrawal process to obtain video data; the ground server then preprocesses and analyzes the video. Step 2: Target Label Creation: Construct a standardized dataset and complete the creation of target labels for key objectives; Step 3: Target detection model training: For key targets including workers, drill pipes, drilling rigs and drilling rig power heads, construct a target detection model (e.g., using the YOLOv8 model) and train the model so that the trained model has the ability to identify and classify the three types of key targets with high accuracy. Step 4: Target Detection and Parameter Recording: Use the target detection model trained in Step 3 to detect key targets in the video in real time, mark the detected targets with rectangular boxes, and record the key parameter information of each detection box simultaneously; Step 5: Target Tracking and Trajectory Recording: Based on the detection results, key targets are continuously tracked and recorded (for example, using the DeepSORT algorithm for multi-target tracking), and the motion trajectory of each key target in the video sequence is recorded in real time to support subsequent action recognition and behavior analysis; Step 6: Determining the number of drill bits withdrawn: First, check if the drill rig power head is started to activate the drill bit withdrawal determination. Then, determine whether the two conditions are met: the drill rod detection frame appears or the worker overlaps with the power head detection frame. This will be used to comprehensively determine the number of drill bits withdrawn.

[0006] Further, the specific method of step 6 is as follows: First, detect whether the drill rig power head has started to move. If it has started to move, the drill retraction process is determined to have started. Then, determine whether condition 1: a drill rod detection frame appears below the drill rig power head detection frame or condition 2: whether the worker detection frame and the drill rig power head detection frame overlap and last for a predetermined time. If neither condition 1 nor condition 2 is met, return to step 4 and start the cycle again. If either condition 1 or condition 2 is met, then determine whether the worker has completed the cycle action and returned to the marker position within the predetermined time. If the condition is met, it is determined that a complete drill retraction action has been completed, and the drill retraction count is incremented by 1. If the condition is not met, return to step 4 and start the cycle again until the drill rig power head stops moving and maintains the predetermined time. The drill retraction is then determined to have ended, and the total number of drill retractions is finally output.

[0007] Further, the coordinates of the rectangular boxes used to mark the detection targets in step 4 are defined as follows: the coordinates of the worker detection box are (x1, y1, x2, y2), the coordinates of the drill pipe detection box are (x3, y3, x4, y4), and the coordinates of the drilling rig power head detection box are (x5, y5, x6, y6); where (x1, y1), (x3, y3), and (x5, y5) correspond to the coordinates of the upper left corner of the worker detection box, the drill pipe detection box, and the 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, the drill pipe detection box, and the 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.

[0008] Furthermore, 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 frame. If the values ​​of y5 (y-axis coordinate of the upper left corner vertex) and y6 (y-axis coordinate of the lower right corner vertex) in the drilling rig power head detection frame change, it is defined as the drilling rig power head starting to move.

[0009] Furthermore, whether a drill rod detection frame appears below the drill rig power head detection frame is determined by comprehensively identifying the positional relationship between the drill rod detection frame and the drill rig power head detection frame in real time. If a drill rod is detected and the coordinates y4 (y-axis coordinate of the lower right corner vertex) of the drill rod detection frame are less than the coordinates y6 (y-axis coordinate of the lower right corner vertex) of the drill rig power head detection frame, then it is defined as a drill rod detection frame appearing below the drill rig power head detection frame.

[0010] Furthermore, the determination of whether the worker detection frame and the drilling rig power head detection frame overlap is made by 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 the preset IoU threshold, it is determined that the two types of detection frames overlap; if it does not exceed the preset IoU threshold, it is determined that the two types of detection frames do not overlap.

[0011] Furthermore, the determination of whether the worker completes the cyclical action and returns to the marked position within the predetermined time involves first marking the worker's initial marked position, and then monitoring whether the worker's trajectory returns to the marked position within a set predetermined time range by tracking the worker's movement trajectory. If the worker's trajectory returns to the marked position within the predetermined time, it is defined as the worker completing the cyclical action and returning to the marked position; if the worker does not return to the marked position within the predetermined time, it is defined as the worker not completing the cyclical action or not returning to the marked position.

[0012] Furthermore, (addressing the issue of target features changing over time in drilling-out scenarios) the parameters of the target detection model are updated in real time through online incremental learning, learning new features while retaining historical knowledge. Specifically, the standardized dataset described in step 2 includes an incremental sample buffer to store low-confidence samples selected later; incremental parameter update logic is embedded during the target detection model training process in step 3; and the confidence level of the target detection is calculated in step 4. ; Then, incremental learning is performed using the following method: (1) Incremental sample screening and weight allocation: Samples with confidence levels below the threshold in the real-time detection results of step 4 are screened and assigned dynamic weights to balance the influence of new and old samples. The calculation formula is as follows: ; in, For the first Weights of frame samples; This is the historical weight decay coefficient; For the first Confidence level of frame target detection; The confidence threshold; This is an indicator function, set to 1 if the condition is met, and 0 otherwise; the selected low-confidence samples are stored in the incremental sample buffer in step 2; (2) Model update triggering condition: Set a cumulative error triggering mechanism to avoid model oscillation caused by frequent updates. The calculation formula is: ⇒ Trigger parameter update; in, The number of frames within the sliding window. The average detection confidence of the i-th frame; This is the error threshold; when this condition is met, it indicates that the model's adaptability has decreased and the parameters need to be updated. (3) Incremental update of model parameters: The momentum gradient descent method is used to update the model parameters, and knowledge distillation constraints are introduced to avoid "catastrophic forgetting". As another aspect of the present invention, a drill pipe counting system based on intelligent analysis of drill retraction video is also provided, comprising: Data acquisition and preprocessing: Used for real-time video acquisition of the drilling operation rod withdrawal process to obtain video data; the ground server performs preprocessing and analysis on the video; Target labeling device: used to construct a standardized dataset and create target labels for key objectives; Target detection model training device: used to build and train target detection models for key targets including workers, drill pipes, drilling rigs and drilling rig power heads; Target detection and parameter recording device: used to detect key targets in the video in real time using a trained target detection model, mark the detected targets with rectangular boxes, and record the key parameter information of each detection box simultaneously; Target tracking and trajectory recording device: used for continuous tracking and recording of key targets based on detection results; Drilling withdrawal quantity determination device: It is used to first detect the start of the drill rig power head to activate the drilling withdrawal determination, and then determine whether the two conditions of the drill rod detection frame appearing or the worker coinciding with the power head detection frame are met to comprehensively determine the drilling withdrawal quantity.

[0013] Compared with the prior art, the present invention has the following advantages: (1) The drill rod counting method based on intelligent video analysis of drill rod retraction in this invention adopts clear coordinate judgment rules (positional relationship between drill rod and power head, and between worker and power head). The system makes a comprehensive judgment based on the state of the drill rig power head in motion and the worker's drilling actions, and accurately completes the automatic counting of drill rods during retraction. 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.

[0014] (3) The drill pipe counting method based on intelligent video analysis of the present invention adopts the technical means of incremental sample screening and weight allocation in online incremental learning to effectively screen out potential new feature samples and balance their influence with historical samples. The system regularly (e.g., weekly) automatically sends the false detection / missed detection samples (after manual annotation and confirmation) of each working face back to the model training end, updates the model parameters through incremental learning, and continuously improves the adaptability to new drilling rigs and new working conditions; and improves the model's adaptability to new scenarios.

[0015] (4) The drill pipe counting method based on intelligent analysis of drill pipe retraction video of the present invention adopts the technical means of model update triggering conditions (cumulative error mechanism) to avoid model oscillation due to frequent updates and ensure the stable operation of the model. Attached Figure Description

[0016] 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

[0017] 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.

[0018] Example 1: This embodiment proposes a drill pipe counting method based on intelligent video analysis of drill pipe retraction. The method utilizes intrinsically safe mining cameras to capture real-time video of the entire drill pipe retraction process at the drilling face, and transmits the video data to a ground server via an underground ring network for intelligent analysis and processing. The ground server employs target detection algorithms (such as YOLOv8) to identify key targets such as workers, drill pipes, drilling rigs, and the rig's power head, combined with multi-target tracking algorithms (such as DeepSORT) to achieve continuous tracking and behavior recognition of the work objects. The system accurately and automatically counts the number of drill pipes during retraction by comprehensively judging the movement of the rig's power head and the worker's actions such as retrieving and transporting drill bits. Compared with traditional manual counting methods, this method effectively avoids missed detections and misjudgments caused by long working hours or complex environments. Furthermore, by introducing algorithm acceleration technology, it significantly improves video processing efficiency, reduces labor costs, significantly shortens the data processing cycle, and enhances the intelligence and reliability of drill pipe counting.

[0019] Please refer to Figure 1 The specific implementation steps of this embodiment are as follows: Step 1 Data Acquisition: Real-time video acquisition of the drilling operation and rod withdrawal process is carried out using intrinsically safe mining cameras deployed at the front end to obtain the raw video data required for algorithm analysis.

[0020] Step 2: Data Preprocessing and Label Creation: After the collected video data is transmitted to the ground server via the underground ring network, the server preprocesses and analyzes the video, constructs a standardized dataset, and completes the creation of target labels, providing high-quality data support for subsequent model training.

[0021] Step 3 Target Detection Model Training: For three key target categories—workers, drill pipes, drilling rigs, and drill pipe power heads—build and train a detection model to ensure that the model has the ability to accurately identify and classify these targets.

[0022] 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 box are recorded simultaneously.

[0023] 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.

[0024] Step 6: Determining the Number of Drill Bits Removed: The backend server uses an algorithm to comprehensively analyze the movement status of the drill rig's power head and whether the worker has continuous actions such as retrieving and transporting drill bits, to accurately determine the number of drill bits removed, effectively reducing the probability of missed detections and false judgments. The specific determination logic is as follows: First, it checks whether the drill rig's power head has started moving. If it has, the drill bit removal process is determined to have started. Then, it checks whether either condition 1 (drill rod detection box) or condition 2 (worker detection box and drill rig power head detection box overlap and remain for a certain period of time) is met. 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 whether the worker completes the cycle action within a certain time and returns to the marker position. If the condition is met, it is determined that a complete drill bit removal action has been completed, and the number of drill bits removed 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 drill bit removal process is determined to be complete, and the total number of drill bits removed is finally output.

[0025] 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). (x1, y1), (x3, y3), and (x5, y5) correspond to the upper left corner coordinates 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 lower right corner coordinates of the worker detection box, drill pipe detection box, and drilling rig power head detection box, respectively. The center point coordinates 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 vertex) and y6 (y-axis coordinate of the bottom right corner vertex) 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 comprehensively identifying the positional relationship between the drill rod detection frame and the drill rig power head detection frame in real time. If a drill rod is detected and the y4 (y-axis coordinate of the bottom right corner vertex) in the drill rod detection frame is less than the y6 (y-axis coordinate of the bottom right corner vertex) 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. The determination of whether the worker detection frame and the drill rig power head detection frame overlap is achieved using the Intersection over Union (IoU) threshold comparison method: the 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 determined to overlap; if it does not exceed the preset IoU threshold, the two types of detection frames are determined not to overlap. The determination of whether "the worker completes the cyclical action and returns to the marked position within a certain time" first involves marking the worker's initial position, then tracking the worker's movement trajectory and monitoring whether the trajectory returns to the marked position within a set time range. If the worker's trajectory returns to the marked position within the specified time, it is defined as the worker completing the cyclical action and returning to the marked position; if the worker does not return to the marked position within the specified time, it is defined as the worker not completing the cyclical action or not returning to the marked position.

[0026] Example 2: In some preferred embodiments, to enhance the adaptability of the above method to new drilling rigs and working conditions, and to improve the model's adaptability to new scenarios, the method further includes (addressing the issue of target features changing over time in drilling withdrawal scenarios) updating the parameters of the target detection model in real time through online incremental learning, learning new features while retaining historical knowledge. Specifically, the standardized dataset described in step 2 includes an incremental sample buffer to store subsequently selected low-confidence samples; incremental parameter update logic is embedded during the target detection model training process in step 3; and the confidence level of target detection is calculated in step 4. ; Then, incremental learning is performed using the following method: (1) Incremental sample screening and weight allocation: Samples with confidence levels below the threshold in the real-time detection results of step 4 are screened and assigned dynamic weights to balance the influence of new and old samples. The calculation formula is as follows: ; in, For the first Weights of frame samples; This is the historical weight decay coefficient; For the first Confidence level of frame target detection; The confidence threshold; This is an indicator function, set to 1 if the condition is met, and 0 otherwise; the selected low-confidence samples are stored in the incremental sample buffer in step 2; (2) Model update triggering condition: Set a cumulative error triggering mechanism to avoid model oscillation caused by frequent updates. The calculation formula is: ⇒ Trigger parameter update; in, The number of frames within the sliding window. The average detection confidence of the i-th frame; This is the error threshold; when this condition is met, it indicates that the model's adaptability has decreased and the parameters need to be updated. (3) Incremental update of model parameters: The momentum gradient descent method is used to update the model parameters, while knowledge distillation constraints are introduced to avoid "catastrophic forgetting". Knowledge distillation constraints preserve the output feature distribution of the model before the update (as a reference model) to ensure that the output of the new model is consistent with the output of the reference model when updating the target detection model parameters. Specifically, the new model learns the historical knowledge contained in the reference model. By constraining the difference in the prediction results of the two for the same input, the new model avoids losing the key target recognition capabilities it has mastered (such as the stable recognition of workers, drill pipes, and drill rig power heads) in the process of learning new features. Thus, while adapting to the changes in the new scene, the model maintains the recognition accuracy of the historical scene and prevents the phenomenon of "catastrophic forgetting".

[0027] Please refer to Figure 2 As another aspect of the present invention, and as a carrier for implementing the above method, a drill pipe counting system based on intelligent video analysis of drill pipe retraction is also provided, comprising: Data acquisition and preprocessing: Used for real-time video acquisition of the drilling operation rod withdrawal process to obtain video data; the ground server performs preprocessing and analysis on the video; Target labeling device: used to construct a standardized dataset and create target labels for key objectives; Target detection model training device: used to build and train target detection models for key targets including workers, drill pipes, drilling rigs and drilling rig power heads; Target detection and parameter recording device: used to detect key targets in the video in real time using a trained target detection model, mark the detected targets with rectangular boxes, and record the key parameter information of each detection box simultaneously; Target tracking and trajectory recording device: used for continuous tracking and recording of key targets based on detection results; Drilling withdrawal quantity determination device: It is used to first detect the start of the drill rig power head to activate the drilling withdrawal determination, and then determine whether the two conditions of the drill rod detection frame appearing or the worker coinciding with the power head detection frame are met to comprehensively determine the drilling withdrawal quantity.

[0028] 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 drill retraction video, characterized in that, Includes the following steps: Step 1: Data Acquisition and Preprocessing: Real-time video acquisition of the drilling operation and rod withdrawal process to obtain video data; The video is preprocessed and analyzed by the ground server; Step 2: Target Label Creation: Construct a standardized dataset and complete the creation of target labels for key objectives; Step 3: Target detection model training: Build and train a target detection model for key targets including workers, drill pipes, drilling rigs, and drilling rig power heads. Step 4: Target Detection and Parameter Recording: Use the target detection model trained in Step 3 to detect key targets in the video in real time, mark the detected targets with rectangular boxes, and record the key parameter information of each detection box simultaneously; Step 5: Target Tracking and Trajectory Recording: Based on the detection results, continuously track and record key targets; Step 6: Determining the number of drill bits withdrawn: First, check if the drill rig power head is started to activate the drill bit withdrawal determination. Then, determine whether the two conditions are met: the drill rod detection frame appears or the worker overlaps with the power head detection frame. This will be used to comprehensively determine the number of drill bits withdrawn.

2. The drill pipe counting method based on intelligent analysis of drill retraction video according to claim 1, characterized in that, The specific method for step 6 is as follows: First, detect whether the drill rig power head has started moving. If it has started moving, the drill retraction process is determined to have begun. Then, determine whether condition 1 (drill rod detection frame) or condition 2 (worker detection frame and drill rig power head detection frame overlap and remain in place for a predetermined time) is met. If neither condition 1 nor condition 2 is met, return to step 4 and start the cycle again. If either condition 1 or condition 2 is met, determine whether the worker has completed the cycle action and returned to the marker position within the predetermined time. If the condition is met, it is determined that a complete drill retraction action has been completed, and the drill retraction count is incremented by 1. If the condition is not met, return to step 4 and start the cycle again until the drill rig power head stops moving and remains in place for the predetermined time. The drill retraction is then determined to have ended, and the total number of drill retractions is finally output.

3. The drill pipe counting method based on intelligent analysis of drill retraction video according to claim 2, characterized in that, In step 4, the coordinates of the rectangular boxes used to mark the detection targets 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); where (x1, y1), (x3, y3), and (x5, y5) correspond to the coordinates of the upper left corner of the worker detection box, the drill pipe detection box, and the 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, the drill pipe detection box, and the 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.

4. The drill pipe counting method based on intelligent analysis of drill retraction video according to claim 3, characterized in that, 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 frame. If the values ​​of the y-axis coordinates of the upper left corner of y5 and the lower right corner of y6 in the drilling rig power head detection frame change, it is defined as the drilling rig power head starting to move.

5. The drill pipe counting method based on intelligent analysis of drill retraction video according to claim 3, characterized in that, Whether a drill rod detection frame appears below the drill rig power head detection frame is determined by comprehensively identifying the positional relationship between the drill rod detection frame and the drill rig power head detection frame in real time. If a drill rod is detected and the coordinates of the drill rod detection frame (y4, the y-axis coordinate of the lower right corner vertex) are less than the coordinates of the drill rig power head detection frame (y6, the y-axis coordinate of the lower right corner vertex), then it is defined as a drill rod detection frame appearing below the drill rig power head detection frame.

6. The drill pipe counting method based on intelligent analysis of drill retraction video according to claim 3, characterized in that, The determination of whether the worker detection frame and the drilling rig power head detection frame overlap is made by 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 the preset IoU threshold, it is determined that the two types of detection frames overlap; if it does not exceed the preset IoU threshold, it is determined that the two types of detection frames do not overlap.

7. The drill pipe counting method based on intelligent analysis of drill retraction video according to claim 3, characterized in that, The determination of whether the worker completes the cycle action and returns to the marked position within the predetermined time is made by first marking the worker's initial marked position, and then by tracking the movement trajectory of the worker target and monitoring whether the trajectory returns to the marked position within the set predetermined time range. If the worker's target tracking trajectory returns to the marker position within the specified time, it is defined as the worker completing the cycle action and returning to the marker position; if the worker does not return to the marker position within the specified time, it is defined as the worker not completing the cycle action or not returning to the marker position.

8. The drill pipe counting method based on intelligent analysis of drill retraction video according to claim 1, characterized in that, This also includes updating the parameters of the object detection model in real time through online incremental learning, learning new features while retaining historical knowledge. Specifically, the standardized dataset described in step 2 includes an incremental sample buffer to store low-confidence samples selected later. Incremental parameter update logic is embedded during the object detection model training process in step 3. The confidence level of the object detection is calculated in step 4. ; Then, incremental learning is performed using the following method: (1) Incremental sample screening and weight allocation: Samples with confidence levels below the threshold in the real-time detection results of step 4 are screened and assigned dynamic weights to balance the influence of new and old samples. The calculation formula is as follows: ; in, For the first Weights of frame samples; This is the historical weight decay coefficient; For the first Confidence level of frame target detection; The confidence threshold; This is an indicator function, set to 1 if the condition is met, and 0 otherwise; the selected low-confidence samples are stored in the incremental sample buffer in step 2; (2) Model update triggering condition: Set a cumulative error triggering mechanism to avoid model oscillation caused by frequent updates. The calculation formula is as follows: ⇒ Trigger parameter update in, The number of frames within the sliding window. The average detection confidence of the i-th frame; This is the error threshold; when this condition is met, it indicates that the model's adaptability has decreased and the parameters need to be updated. (3) Incremental update of model parameters: The momentum gradient descent method is used to update the model parameters, and knowledge distillation constraints are introduced to avoid "catastrophic forgetting".

9. A drill pipe counting system based on intelligent analysis of drill string withdrawal video, characterized in that, include: Data acquisition and preprocessing: Used for real-time video acquisition of the drilling operation rod withdrawal process to obtain video data; The video is preprocessed and analyzed by the ground server; Target labeling device: used to construct a standardized dataset and create target labels for key objectives; Target detection model training device: used to build and train target detection models for key targets including workers, drill pipes, drilling rigs and drilling rig power heads; Target detection and parameter recording device: used to detect key targets in the video in real time using a trained target detection model, mark the detected targets with rectangular boxes, and record the key parameter information of each detection box simultaneously; Target tracking and trajectory recording device: used for continuous tracking and recording of key targets based on detection results; Drilling withdrawal quantity determination device: It is used to first detect the start of the drill rig power head to activate the drilling withdrawal determination, and then determine whether the two conditions of the drill rod detection frame appearing or the worker coinciding with the power head detection frame are met to comprehensively determine the drilling withdrawal quantity.