A method, system, medium, and apparatus for detecting wear of a crossbar of a drill bit of a drilling rig
Patent Information
- Application Number
- CN202611157278.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-20
AI Technical Summary
其中,人工目视检查与卡尺测量是应用最广泛的方式,其操作简单、成本较低,但检测精度严重依赖操作人员的经验与责任心,存在漏检、误检率高的问题,且无法精准量化磨损长度
[0015]相对于现有技术,本发明的有益效果如下:本发明提供了一种钻机钻头的横杆磨损检测方法,该方法通过获取的竖杆的像素直径和实际直径,确定尺度因子,能够实现横杆从图片长度到实际长度的准确还原,进而有效提高钻机横杆磨损测量精度,降低人工成本,避免耽误工程进度等问题,能够解决现有钻机钻头的横杆磨损检测系统判断磨损程度准确性低,检测过程需停机作业,中断工程进度,效率低下的问题。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of drilling rig wear detection, and particularly to a method, system, medium, and equipment for detecting crossbar wear of drilling rig bits. Background Technology
[0002] In engineering fields such as mining, oil and gas exploration, and pile foundation construction, drilling rigs are core operating equipment, and their operational stability and safety directly determine project progress, construction costs, and personnel safety. The drilling rig crossbar, as a key load-bearing and force-transmitting component, plays a crucial role in supporting the drilling tools, transmitting operational loads, and maintaining the overall structural balance of the equipment. Its working condition directly affects the overall operating efficiency and service life of the drilling rig.
[0003] In actual operation, the drill rig crossbar is constantly exposed to a complex and harsh working environment, subjected to alternating stress, impact, torque, and friction. It is also susceptible to erosion from drilling fluid, rock debris, dust, and other media, making it highly prone to surface wear and dimensional reduction. As wear accumulates, the crossbar's cross-sectional dimensions gradually decrease, significantly reducing its mechanical strength and load-bearing capacity. This not only leads to reduced drilling accuracy and increased energy consumption but can also cause serious safety accidents such as crossbar breakage, drill string jamming, or even complete rig overturning, resulting in enormous economic losses and the risk of personal injury.
[0004] Currently, the industry primarily employs a combination of traditional offline and manual inspection methods to detect the wear length of drilling rig crossbars. Common inspection techniques include visual inspection, caliper measurement, ultrasonic testing, magnetic particle testing, and 3D laser scanning. Among these, visual inspection and caliper measurement are the most widely used methods due to their simplicity and low cost. However, their accuracy heavily relies on the operator's experience and responsibility, resulting in high rates of missed or false detections, and they cannot accurately quantify the wear length. Summary of the Invention
[0005] This invention provides a method, system, medium, and equipment for detecting crossbar wear of drill bits, to solve the aforementioned problems in the prior art, namely, how to improve the accuracy of drill bit crossbar wear detection in the prior art. This invention provides a method for detecting crossbar wear of drill bits, the method comprising: Based on the vertical and horizontal bar images of the drill bit acquired frame by frame, the target bounding boxes corresponding to the vertical and horizontal bar images are determined; wherein, the target bounding box includes a category ID, confidence level, and bounding box; Extract the gradient magnitude in the horizontal direction of the top region of the target bounding box in the image of the vertical pole. Summate the gradient magnitude in the vertical direction to determine the peak values of the left and right edges. Determine the pixel diameter of the vertical pole by obtaining the horizontal pixel distance between the peak values of the left and right edges. Use the ratio of the actual diameter of the vertical pole to the pixel diameter of the vertical pole as a scale factor. Based on the motion trajectory of the centroid of the crossbar in consecutive frames, the same crossbar is matched in consecutive frames. The historical maximum pixel width of the crossbar in the target bounding box of the crossbar image is extracted. The product of the historical maximum pixel width and the scale factor is taken as the longest physical length of the crossbar. The product of the pixel width of the target bounding box of the current crossbar image and the scale factor is taken as the current physical length of the crossbar. The difference between the longest physical length and the current physical length is taken as the wear detection result of the current crossbar.
[0006] Optionally, obtaining the target bounding box specifically includes: The vertical and horizontal bar images of the drill bit are acquired frame by frame to construct an image dataset; The YOLOv8 model was used to perform object detection on the image dataset to determine the initial object bounding boxes; The initial target bounding box is determined, and the target bounding box is then filtered using a preset confidence threshold.
[0007] Optionally, the category ID specifically includes: vertical bar length and horizontal bar length; the confidence threshold is 0.35.
[0008] Optionally, the ratio of the actual diameter of the vertical rod to the pixel diameter of the vertical rod is used as a scaling factor, specifically including: ; Where scale is the scale factor, and D is the actual diameter of the vertical rod. It is the pixel diameter of the vertical rod.
[0009] Optionally, an edge analysis function can be used to extract the gradient magnitude in the horizontal direction of the top region of the bounding box of the vertical rod.
[0010] Optionally, the current physical length of the crossbar includes the current physical length of the upper crossbar and the current physical length of the lower crossbar.
[0011] Optionally, the image dataset can be preprocessed and standardized.
[0012] This invention provides a crossbar wear detection system for drill bits, comprising: The target bounding box determination module is used to determine the target bounding boxes corresponding to the vertical and horizontal bar images based on multiple sets of vertical and horizontal bar images acquired frame by frame from the drill bit of the drilling rig; wherein, the target bounding box includes a category ID, confidence level, and bounding box; The scale factor determination module is used to extract the gradient magnitude of the top region of the target bounding box of the vertical pole image in the horizontal direction. By summing the gradient magnitude in the vertical direction, the peak values of the left and right edges are determined. By obtaining the horizontal pixel distance between the peak values of the left and right edges, the pixel diameter of the vertical pole is determined. The ratio of the actual diameter of the vertical pole to the pixel diameter of the vertical pole is used as the scale factor. The wear detection module is used to match the same crossbar in consecutive frames based on the motion trajectory of the acquired crossbar centroid in consecutive frames, extract the historical maximum pixel width of the crossbar in the target bounding box of the crossbar image, and take the product of the historical maximum pixel width and the scale factor as the longest physical length of the crossbar. The pixel width of the target bounding box of the acquired current crossbar image and the scale factor are taken as the current physical length of the crossbar, and the difference between the longest physical length and the current physical length is taken as the wear detection result of the current crossbar.
[0013] The present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for detecting crossbar wear of a drill bit.
[0014] The present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-mentioned method for detecting crossbar wear of drill bit.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention provides a method for detecting crossbar wear of drill bits. This method determines the scale factor by obtaining the pixel diameter and actual diameter of the vertical bar, which can accurately restore the crossbar from the image length to the actual length, thereby effectively improving the measurement accuracy of drill bit crossbar wear, reducing labor costs, and avoiding delays in project progress. It can solve the problems of low accuracy in judging the degree of wear of existing drill bit crossbar wear detection systems, the need to stop the machine during the detection process, interrupting the project progress, and low efficiency. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0017] Figure 1 A flowchart illustrating a method for detecting crossbar wear of a drill bit according to an embodiment of the present invention; Figure 2A technical roadmap for a method for detecting crossbar wear of a drill bit provided in an embodiment of the present invention; Figure 3 A schematic diagram of a computer device for a method of detecting crossbar wear of a drill bit provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0019] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0020] Figure 1 This is a flowchart of a method for detecting crossbar wear of a drill bit according to an embodiment of the present invention, as shown below. Figure 1 As shown in the figure, this embodiment illustrates a method for detecting crossbar wear of a drilling rig bit, comprising: S1: Based on the vertical and horizontal bar images of the drill bit acquired frame by frame, determine the target bounding boxes corresponding to the vertical and horizontal bar images; wherein, the target bounding box includes a category ID, confidence level, and bounding box.
[0021] For example, video footage can be obtained by capturing real-time images of the drill bit using a camera, and then processed using OpenCV. The function acquires images frame by frame from the video footage captured by the camera. It repeatedly calls the cap.read() function through a loop function, which continuously returns a boolean value ret and a NumPy array frame. The frame array variable corresponds to the image of each frame. By processing the frame in each loop, the function acquires the image of each frame, thereby obtaining the required image dataset.
[0022] For example, the present invention can use the YOLOv8 model to perform target detection and calibration on the acquired image dataset. The model output includes class ID, confidence score and bounding box. The length of the vertical bar is used as a reference for subsequent pixel-to-physical unit conversion, and the length of the horizontal bar is the target to be tested.
[0023] For example, the prediction box is the smallest bounding rectangle of the object's location analyzed by the YOLO model after image recognition. The coordinates of the corresponding pixels at the four corners of the rectangle are represented in the form (x1, y1, x2, y2).
[0024] For example, the detection process can set a confidence threshold (0.35) to filter out low-confidence predicted boxes, thus balancing recall and false positive rate. All valid detection results are output as bounding boxes, including coordinates, category, and confidence information;
[0025] Among them, recall rate is the ratio of the number of true targets correctly detected by the model to the total number of truly existing targets. The customer-provided sample involves detecting the lengths of two horizontal bars rigidly connected to the vertical rod of the drilling rig and spaced a certain distance apart. Therefore, successfully detecting these two horizontal bars, rather than one or more, is one of the requirements. False detection rate is the ratio of the number of false detections to the total number of detections. In engineering projects involving the detection of moving or operational drilling rigs, the rig may be obstructed to varying degrees. In such cases, the algorithm may mistakenly identify targets that are not consecutively present as two separate targets. Valid detection results are determined by setting detection parameters and considering targets with a confidence level greater than the detection parameters as valid targets, thereby reducing errors.
[0026] The confidence score is determined by the product of the probability of the target's existence and the probability of the largest class. It is the matching value obtained by YOLOv8 based on the template samples of the two models in the training model to match the objects in the image. It is automatically generated by YOLO. Based on the pixel properties of the image, the upper left corner of the image is set as the origin of the coordinate system. One pixel represents one unit of the coordinate system. The horizontal axis is X, with the positive direction to the right, and the vertical axis is Y, with the positive direction to the down.
[0027] S2: Extract the gradient magnitude of the top region of the target bounding box in the vertical pole image in the horizontal direction. By summing the gradient magnitude in the vertical direction, determine the peak values of the left and right edges. By obtaining the horizontal pixel distance between the peak values of the left and right edges, determine the pixel diameter of the vertical pole. Use the ratio of the actual diameter of the vertical pole to the pixel diameter of the vertical pole as the scale factor.
[0028] For example, this invention uses vertical bars for high-precision calibration, requiring a confidence level higher than 0.9. It extracts the X-direction gradient in the top region of the bounding box using an edge analysis function, integrates along the column, smooths the gradient, and locates the left and right edge peaks, thus obtaining a more robust pixel diameter for the vertical bar than the original bounding box. For horizontal bars with a confidence level higher than 0.35, trajectory tracking is performed. Combined with the known vertical bar perimeter of 29cm, the vertical bar diameter D = cm, calculated by measuring the pixel diameter of the vertical rod in the image. The global pixel-to-centimeter scale factor, i.e., the scale factor, can be calculated. : ; Where, the unit of scale is ; Specifically, the edge analysis function trims a horizontal strip (approximately 1 / 4 of the frame height, but limited to 15-30 pixels) from the top region of the vertical bar's bounding box to avoid potential shadows or reflections at the bottom. This strip is then converted to grayscale, and the Sobel gradient is calculated horizontally, highlighting the left and right edge points (searching for gradient abrupt change points). The pixel diameter of the vertical bar is determined by the horizontal pixel distance between these two edge points. The gradient magnitudes are summed in the vertical direction to obtain a one-dimensional signal, the peak of which corresponds to the left and right boundary positions. After smoothing the signal, the maximum left and right values are searched near the center region to obtain a more accurate edge spacing.
[0029] For example, by extracting the X-direction gradient in the top region of its bounding box, integrating along the column, smoothing, and locating the left and right edge peaks, a more robust pixel diameter for the vertical bar than the original bounding box is obtained. Combined with the known vertical bar perimeter of 29cm, the diameter D = cm can be used to calculate the global pixel-centimeter scale factor, i.e., the scale factor. .
[0030] S3: Based on the motion trajectory of the centroid of the crossbar in consecutive frames, match the same crossbar in consecutive frames, extract the historical maximum pixel width of the crossbar in the target bounding box of the crossbar image, and take the product of the historical maximum pixel width and the scale factor as the longest physical length of the crossbar. Take the product of the pixel width of the target bounding box of the current crossbar image and the scale factor as the current physical length of the crossbar, and take the difference between the longest physical length and the current physical length as the wear detection result of the current crossbar.
[0031] For example, this invention can match the same horizontal bar across consecutive frames, accumulate its occurrence position, and use this position to calculate the average Y-coordinate to distinguish the vertical relationship. It also records the historical maximum width, multiplying the maximum width by `scale` to obtain the physical length. Finally, all valid horizontal bar trajectories are sorted in ascending order of average Y-coordinate, with the smaller Y-value determined as the upper horizontal bar and the larger as the lower horizontal bar, and their measured lengths are output. The process of obtaining the average Y-coordinate can include: calculating the temporal average Y-coordinate by accumulating the center Y-coordinate (sum_y) of each tracked horizontal bar across all frames and dividing by the total number of detections (count), thus eliminating jitter. Distinguishing the vertical relationship utilizes the image coordinate system characteristic that "the smaller the Y-value, the higher the position," spatially sorting the horizontal bars to accurately locate and separate the "upper bar" and "lower bar." Since the upper and lower bars experience different wear conditions during actual use, distinguishing between them is equivalent to separately detecting the wear of the upper and lower bars. When the wear of one exceeds a safe range, separate maintenance can be performed.
[0032] For example, this invention establishes and maintains independent trajectories for each detected horizontal bar. Each trajectory records the last appearing frame number, current center position, historical maximum physical length, and the cumulative value and frequency of observed y-coordinates. A detection-driven tracking strategy is employed to clear expired trajectories, associate and match existing trajectories with the horizontal bars in the current frame, and update trajectory information. Newly detected horizontal bars that are not matched are initialized as new targets. The specific processing can include: First, after each frame of video image input, the YOLO model performs an independent and complete target detection, obtaining the bounding boxes and confidence scores of all vertical and horizontal bars in the current frame. Next, during the tracking phase, the algorithm does not perform a "prediction-correction" loop, but directly calculates the Euclidean distance between the center point of the existing trajectory in the previous frame and the center point of the newly detected horizontal bar in the current frame. Finally, based on a distance threshold (MATCH_DIST_THRESH=60), the currently detected horizontal bar is assigned to the nearest old trajectory (ID). If the match is successful, the center coordinates and statistics of that ID are updated; if the match fails (too far), it is considered a new target and a new ID (next_id) is assigned. In short, it is "detect first, then match". The tracker only acts as an ID allocator and data logger, and the maintenance and updating of IDs are entirely driven by the output of the detector.
[0033] For example, the present invention can convert the pixel width of the horizontal bar detection box into physical length based on a scale factor, and use the historical maximum physical length in the trajectory as the complete true size of the horizontal bar; after the video ends or the user terminates, valid trajectories with a physical length greater than zero are retained, and the vertical position of the horizontal bar is determined by calculating the average y-coordinate of each trajectory. The upper horizontal bar (first item in the sorting) and the lower horizontal bar (second item in the sorting) are distinguished by sorting in ascending order of average y-coordinate, and the maximum physical length of each is output. If only one valid horizontal bar is detected, or the calibration fails, the system will give a corresponding prompt to avoid outputting misleading results.
[0034] The above are one or more embodiments of the drilling rig bit crossbar wear detection method provided in this specification. Based on the same idea, this specification also provides a corresponding drilling rig bit crossbar wear detection system, including: The target bounding box determination module is used to determine the target bounding boxes corresponding to the vertical and horizontal bar images based on multiple sets of vertical and horizontal bar images acquired frame by frame from the drill bit of the drilling rig; wherein, the target bounding box includes a category ID, confidence level, and bounding box; The scale factor determination module is used to extract the gradient magnitude of the top region of the target bounding box of the vertical pole image in the horizontal direction. By summing the gradient magnitude in the vertical direction, the peak values of the left and right edges are determined. By obtaining the horizontal pixel distance between the peak values of the left and right edges, the pixel diameter of the vertical pole is determined. The ratio of the actual diameter of the vertical pole to the pixel diameter of the vertical pole is used as the scale factor. The wear detection module is used to match the same crossbar in consecutive frames based on the motion trajectory of the acquired crossbar centroid in consecutive frames, extract the historical maximum pixel width of the crossbar in the target bounding box of the crossbar image, and take the product of the historical maximum pixel width and the scale factor as the longest physical length of the crossbar. The pixel width of the target bounding box of the acquired current crossbar image and the scale factor are taken as the current physical length of the crossbar, and the difference between the longest physical length and the current physical length is taken as the wear detection result of the current crossbar.
[0035] Specific limitations regarding the crossbar wear detection system for drilling rig bits can be found in the limitations of the crossbar wear detection method for drilling rig bits described above, and will not be repeated here. Each module in the aforementioned crossbar wear detection system for drilling rig bits can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0036] The present invention also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described method for detecting crossbar wear of drill bits.
[0037] The present invention also provides Figure 3 The schematic diagram of the computer device shown is as follows: Figure 3 As shown, at the hardware level, the computer device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to implement the crossbar wear detection method for drilling rig bits provided in the above embodiment.
[0038] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0039] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this invention.
Claims
1. A method for detecting crossbar wear of a drill bit, characterized in that, include: Based on the vertical and horizontal bar images of the drill bit acquired frame by frame, the target bounding boxes corresponding to the vertical and horizontal bar images are determined; wherein, the target bounding box includes a category ID, confidence level, and bounding box; Extract the gradient magnitude in the horizontal direction of the top region of the target bounding box in the image of the vertical pole. Summate the gradient magnitude in the vertical direction to determine the peak values of the left and right edges. Determine the pixel diameter of the vertical pole by obtaining the horizontal pixel distance between the peak values of the left and right edges. Use the ratio of the actual diameter of the vertical pole to the pixel diameter of the vertical pole as a scale factor. Based on the motion trajectory of the centroid of the crossbar in consecutive frames, the same crossbar is matched in consecutive frames. The historical maximum pixel width of the crossbar in the target bounding box of the crossbar image is extracted. The product of the historical maximum pixel width and the scale factor is taken as the longest physical length of the crossbar. The product of the pixel width of the target bounding box of the current crossbar image and the scale factor is taken as the current physical length of the crossbar. The difference between the longest physical length and the current physical length is taken as the wear detection result of the current crossbar.
2. The method for detecting crossbar wear of a drill bit as described in claim 1, characterized in that, The acquisition of the target bounding box specifically includes: The vertical and horizontal bar images of the drill bit are acquired frame by frame to construct an image dataset; The YOLOv8 model was used to detect objects in the image dataset and determine the initial object bounding boxes. The initial target bounding box is determined, and the target bounding box is then filtered using a preset confidence threshold.
3. The method for detecting crossbar wear of a drill bit as described in claim 1, characterized in that, The category ID specifically includes: vertical bar length and horizontal bar length; the confidence threshold is 0.
35.
4. The method for detecting crossbar wear of a drill bit as described in claim 1, characterized in that, The ratio of the actual diameter of the vertical rod to the pixel diameter of the vertical rod is used as a scaling factor, specifically including: ; Where scale is the scale factor, and D is the actual diameter of the vertical rod. It is the pixel diameter of the vertical rod.
5. The method for detecting crossbar wear of a drill bit as described in claim 1, characterized in that, The gradient magnitude in the horizontal direction of the top region of the bounding box of the vertical rod is extracted using an edge analysis function.
6. The method for detecting crossbar wear of a drill bit as described in claim 1, characterized in that, The current physical length of the crossbar includes the current physical length of the upper crossbar and the current physical length of the lower crossbar.
7. The method for detecting crossbar wear of a drill bit as described in claim 1, characterized in that, The image dataset is preprocessed and standardized.
8. A crossbar wear detection system for drilling rig bits, characterized in that, include: The target bounding box determination module is used to determine the target bounding boxes corresponding to the vertical and horizontal bar images based on multiple sets of vertical and horizontal bar images acquired frame by frame from the drill bit of the drilling rig; wherein, the target bounding box includes a category ID, confidence level, and bounding box; The scale factor determination module is used to extract the gradient magnitude of the top region of the target bounding box of the vertical pole image in the horizontal direction. By summing the gradient magnitude in the vertical direction, the peak values of the left and right edges are determined. By obtaining the horizontal pixel distance between the peak values of the left and right edges, the pixel diameter of the vertical pole is determined. The ratio of the actual diameter of the vertical pole to the pixel diameter of the vertical pole is used as the scale factor. The wear detection module is used to match the same crossbar in consecutive frames based on the motion trajectory of the acquired crossbar centroid in consecutive frames, extract the historical maximum pixel width of the crossbar in the target bounding box of the crossbar image, and take the product of the historical maximum pixel width and the scale factor as the longest physical length of the crossbar. The pixel width of the target bounding box of the acquired current crossbar image and the scale factor are taken as the current physical length of the crossbar, and the difference between the longest physical length and the current physical length is taken as the wear detection result of the current crossbar.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the crossbar wear detection method for the drill bit of any one of claims 1-7.
10. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the crossbar wear detection method for the drill bit of any one of claims 1-7.