Drill rod counting method and system suitable for low-illumination environment, electronic equipment and medium
By using an improved YOLOv5 target detection model and a mining wireless equipment system, the problems of automation and accuracy in drill pipe counting under low-light conditions in mines have been solved, improving the safety and efficiency of mine operations and realizing automated monitoring and abnormal alarms for the number of drill pipes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHENGZHOU HENGDA INTELLIGENT CONTROL TECHNOLOGY CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-12
AI Technical Summary
At mine drilling sites, manually counting drill rods is labor-intensive, poses significant safety risks, and is difficult to guarantee in terms of accuracy, especially in low-light environments where the detection performance is significantly reduced.
An improved YOLOv5 target detection model is used to recognize and process video images. Combined with LSNet and CARAFE manipulators, the drilling rod operation status is determined and counted by recognizing the position information of the rotating chuck and anchor bolt support. Intrinsically safe wireless cameras and wireless base stations are used for image acquisition and transmission. The workstation performs analysis to achieve automated counting.
It enables automated and precise drill pipe counting in low-light environments, improving the safety and efficiency of mine operations, and provides abnormal alerts through audible and visual alarms.
Smart Images

Figure CN122024136A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mine automation monitoring technology, specifically relating to a drill pipe counting method, system, electronic equipment, and medium suitable for low-light environments. Background Technology
[0002] In the fields of mining and geological exploration, drill pipe operation is a critical construction link, and the monitoring of its operation quality directly affects project safety and construction efficiency.
[0003] Currently, at mine drilling sites, the counting of drill rods mainly relies on manual methods. This traditional method has obvious limitations: on the one hand, operators need to be on duty for long periods of time in harsh mine environments, which is not only labor-intensive and costly, but also poses safety hazards; on the other hand, manual counting is easily affected by environmental interference, visual fatigue, and human negligence, making it difficult to guarantee the accuracy of the count, which brings potential risks to project quality control and safety management. Summary of the Invention
[0004] The purpose of this invention is to provide a drill pipe counting method, system, electronic device, and medium suitable for low-light environments, so as to solve the safety risks that exist when manually counting drill pipes in the prior art.
[0005] To address the aforementioned problems, the drill pipe counting method applicable to low-light environments disclosed in this invention employs the following technical solution: Real-time acquisition of video images of a preset area in the drilling site; the preset area includes a rotating card and an anchor bolt support. Each frame of the video image is processed for recognition to obtain the position information of the corresponding target object; the target object includes a rotating chuck and an anchor bolt support. The operating status of the rotating chuck is determined based on the position information of the rotating card and the position information of the anchor bolt support; The drill pipe operation cycle is determined based on the operating status of the rotating chuck, and the drill pipe count is determined based on the drill pipe operation cycle.
[0006] In some embodiments, an improved YOLOv5 target detection model is used to identify each frame of the video image to obtain the rotating chuck and the anchor bracket.
[0007] In some embodiments, the improved YOLOv5 object detection model includes an LSNet model in the Backbone portion and a CARAFE manipulator in the Neck portion.
[0008] In some embodiments, the adaptive loss function of the improved YOLOv5 object detection model includes low-light adaptive bounding box loss, object confidence loss, and classification loss; Target confidence loss The expression is: In the formula, As a weighting factor for low illumination, This represents the binary cross-entropy loss for the "target". This indicates the loss of focus on the "target".
[0009] In some embodiments, determining the operating state of the rotating chuck based on the position information of the rotating card and the position information of the anchor bolt support includes: The position information of the rotating chuck and the position information of the anchor bolt support are processed to obtain the center distance between the rotating chuck and the anchor bolt support; The operating status of the rotating chuck is determined by comparing the center distance between each rotating chuck and the anchor support with the first threshold and the second threshold, respectively.
[0010] In some embodiments, the operating states of the rotating chuck include approaching action and moving away action; If the center distance between the rotating chuck and the anchor support at the current moment is less than or equal to the first threshold and the center distance between the rotating chuck and the anchor support at the current moment is greater than the center distance between the rotating chuck and the anchor support at the next moment, then it is determined that the current moment is in a close-up action. If the center distance between the rotating chuck and the anchor support at the current moment is greater than or equal to the second threshold and the center distance between the rotating chuck and the anchor support at the current moment is less than the center distance between the rotating chuck and the anchor support at the next moment, it is determined as a moving away action.
[0011] To address the aforementioned problems, the present invention relates to a drill pipe counting system suitable for low-light environments, comprising surface equipment and downhole equipment; the surface equipment includes an intrinsically safe wireless camera for mining and an intrinsically safe wireless base station for mining; the surface equipment also includes a ground switch and a workstation; The intrinsically safe wireless camera for mining is used to collect video images of the drilling area in real time. The intrinsically safe wireless base station for mining is used to upload the video images; The ground switch is used to forward the received video images to the workstation; The workstation is used to process each video image according to the drill rod counting method applicable to low-light environments described above to obtain the drill rod count.
[0012] In some embodiments, the surface equipment further includes an intrinsically safe wireless audible and visual alarm for mining; if the final count of drill pipes is inconsistent with the preset count of drill pipes, the workstation outputs an alarm command, which is then sent sequentially to the intrinsically safe wireless audible and visual alarm for mining via the ground switch and the intrinsically safe wireless base station for audible and visual alert.
[0013] To address the aforementioned problems, the present invention relates to an electronic device comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the aforementioned drill pipe counting method suitable for low-light environments.
[0014] To address the aforementioned problems, the present invention relates to a computer-readable storage medium storing a computer program that, when executed on a processor, implements the drill pipe counting method applicable to low-light environments as described above.
[0015] The beneficial effects of this invention are as follows: This invention relates to a drill pipe technology method applicable to low-light environments. It involves real-time acquisition of video images of a pre-defined area in the drilling site. This pre-defined area includes a rotating chuck and an anchor bolt support. Each frame of the video image is processed to obtain the position information of a corresponding target object. The target object includes a rotating chuck and an anchor bolt support. The operating state of the rotating chuck is determined based on the position information of the rotating chuck and the anchor bolt support. The drill pipe operation cycle is determined based on the operating state of the rotating chuck, and the number of drill pipes is counted based on the drill pipe operation cycle. This invention can accurately count the drill pipe operation cycles based on the position information of the target object, and it enables automated, precise, and intelligent drill pipe counting based on the drill pipe operation cycle, significantly improving the safety and efficiency of mine operations. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below: Figure 1 This is a schematic diagram of the principle structure of the drill pipe counting system in an embodiment of the present invention; Figure 2 This is a flowchart illustrating the drill pipe counting method in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the improved YOLOv5 target detection model used in an embodiment of the present invention. Detailed Implementation
[0017] To make the technical objectives, technical solutions, and beneficial effects of the present invention clearer, the technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention; that is, the described embodiments are merely some embodiments of the present invention, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0018] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0019] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0020] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0021] With the rapid development of industrial automation technology, computer vision-based intelligent inspection methods have provided a new technological path for automated drill pipe counting. However, in the specific application scenario of mines, existing visual inspection technologies face severe challenges: First, the illumination at the underground working face is generally below 50 lux, which means that the light is severely insufficient. Images acquired under such low illumination conditions are characterized by high noise, low contrast, and blurred features. Traditional target detection algorithms often have difficulty effectively extracting features when processing such low-quality images, which seriously affects the accuracy of target detection and leads to a significant decline in detection performance.
[0022] Secondly, drill rods are typical long, narrow, fine-grained targets, exhibiting significant scale variations in video footage. Drill rods appear larger in close-up shots, while in distant shots they may occupy only a tiny fraction of the image. This scale difference makes it difficult for single-scale detection models to adapt, often resulting in "discontinuous detection," meaning that only local segments of the drill rod can be detected, failing to fully identify the entire drill rod target.
[0023] Furthermore, background objects such as supports, pipes, and rock walls share high similarity with the drill rod in terms of visual features such as color and texture, which poses a significant challenge to target differentiation. Existing general-purpose target detection models are prone to false positives and false negatives in such complex environments with abundant visual interference.
[0024] Therefore, this invention aims to propose a technology that can be specifically adapted to the low-light environment of mines, accurately identify drill rod targets, and achieve automatic counting. This is not only related to the improvement of the automation level of mine operations, but also directly affects the level of mine safety production and modern management.
[0025] The following describes the drill pipe counting method, system, electronic equipment, and medium applicable to low-light environments using specific embodiments.
[0026] This invention relates to a specific embodiment of a drill pipe counting system suitable for low-light environments. The system includes surface equipment and downhole equipment. The surface equipment includes an intrinsically safe wireless camera and a mining-grade intrinsically safe wireless base station. The surface equipment also includes a ground switch and a workstation. The intrinsically safe wireless camera is used to acquire video images of the drilling area in real time. The mining-grade intrinsically safe wireless base station is used to upload the video images. The ground switch is used to forward the received video images to the workstation. The workstation processes each video image according to the drill pipe counting method for low-light environments described in the above embodiment to obtain the total number of drill pipes.
[0027] In this embodiment of the invention, the surface equipment also includes a mining intrinsically safe wireless audible and visual alarm; if the counted number of drill pipes is inconsistent with the preset number of drill pipes, an alarm command is generated, and the alarm command is sent to the mining intrinsically safe wireless audible and visual alarm via the mining intrinsically safe wireless base station to provide audible and visual prompts.
[0028] Specifically, such as Figure 1The drill pipe counting system shown uses an intrinsically safe wireless base station as the information exchange hub for underground equipment. It transmits signals via Wi-Fi to both an intrinsically safe wireless camera and an intrinsically safe wireless audible and visual alarm, and transmits the collected image data to a surface switch via the mine ring network. The surface switch receives the image signals and further transmits them to the workstation via a wired network. The workstation has real-time video image processing capabilities and includes a drill pipe counting analysis program for image recognition and drill pipe quantity analysis of the incoming video stream.
[0029] When the workstation detects a discrepancy between the actual number of drill pipes driven and the preset number, it generates an alarm command. This command is transmitted back to the underground wireless base station via the network, triggering the intrinsically safe wireless audible and visual alarm to issue an audible and visual alert to on-site personnel, informing them of the abnormal situation. Both the intrinsically safe wireless camera and the intrinsically safe wireless audible and visual alarm have built-in power supplies or are connected to a portable external power supply to ensure continuous and stable operation in the special environment of a mine.
[0030] A specific embodiment of the drill pipe counting method applicable to low-light environments involved in this invention is as follows: Figure 2 As shown, drill pipe counting methods suitable for low-light environments include: S100 can acquire video images of a preset area in the drilling site in real time.
[0031] In this embodiment of the invention, a mining-grade intrinsically safe wireless camera is installed in the drilling site. This camera is capable of covering and capturing video images of a predetermined area within the drilling site; the predetermined area includes a rotating chuck and an anchor bolt support. In the mine, the mining-grade intrinsically safe wireless camera captures video images of the drilling site in real time. Alternatively, multiple mining-grade intrinsically safe wireless cameras can be installed, as long as they can cover the predetermined area of the drilling site.
[0032] S200 performs recognition processing on each frame of video image to obtain the position information of the corresponding target object; the target object includes a rotating chuck and an anchor bolt support.
[0033] In this embodiment of the invention, a target detection model based on the YOLOv5 model structure is used to identify the rotating chuck and anchor bracket in each frame of video image. Therefore, this invention can use the existing YOLOv5 model structure to achieve target identification, or it can use an improved YOLOv5 model structure to achieve target identification, without specifically limiting the algorithm and structure of the target detection model. YOLO (You Only Look Once) is a very classic target detection algorithm that can complete multi-scale, multi-target detection tasks, and is more efficient than two-stage detection methods.
[0034] In a specific embodiment of the present invention, an improved YOLOv5 target detection model is used, such as... Figure 3 As shown, the YOLOv5 object detection model structure consists of four parts: Input, Backbone, Neck, and Prediction.
[0035] Drill pipes, as typical elongated targets, exhibit significant scale variations and fragility in mining environments. Traditional methods have limitations in both feature extraction and upsampling stages, leading to insufficient detection completeness.
[0036] Traditional backbones include Focus, CBL, CSP, and SPP structures; however, the improved YOLOv5 object detection model of this invention replaces the SPP structure with the LSNet model (shown with a gray background in the figure) in the backbone, and replaces the upsampling method with the CARAFE operator (shown with a gray background in the figure) in the Neck.
[0037] Among them, the large receptive field of the LSNet module can completely capture the global structural features of the drill pipe, while its small core component can accurately lock the discriminative details such as the interface and threads; the heteroscale perception mechanism of the LSNet module combines global structural analysis and local detail capture, providing a dual basis for distinguishing the drill pipe from background interference.
[0038] Among them, the Content-Aware Reassembly Upsampling Operator (CARAEE) covers the local continuous region of the drill pipe through its dynamic sampling mechanism, avoiding feature breaks, and ensures feature continuity through global context constraints. That is, through its content-aware characteristics, it assigns higher sampling weights to drill pipe features and lower weights to background interference, achieving adaptive differentiation between the target and the background.
[0039] Therefore, the LSNet module of this invention employs depthwise separable convolution and grouped convolution, with computational complexity exhibiting an approximately linear relationship with the input size. The content-aware reassembly upsampling operator achieves efficient computation through lightweight convolution and local weighted aggregation; by organically combining heteroscale awareness and dynamic sampling, it provides dual protection for the detection of elongated targets.
[0040] The adaptive loss function of the improved YOLOv5 object detection model includes low-light adaptive bounding box loss, object confidence loss, and classification loss.
[0041] In the formula, To adapt to low illumination boundary light loss, For target confidence loss, For classification loss.
[0042] In this embodiment of the invention, the expression for the low-light adaptive bounding box loss is: In the formula, For illumination perception weighting factors, For the light perception loss term; Gradient enhancement weighting factor; For gradient boosting loss term, To compare the sensitivity weighting factors, To compare the sensitivity loss term. For example, .
[0043] Among them, the light perception weight factor The calculation formula is: In the formula, This represents the average brightness of the image, with its value normalized to the [0,1] interval; and These are the mean and standard deviation of the luminance distribution, respectively; To control the hyperparameter of light sensitivity, a value of 0.5 is recommended.
[0044] Among them, the gradient enhancement loss term The calculation formula is: In the formula, The Sobel gradient features representing the bounding box. To prevent small constants from being divided by zero, This represents the target object predicted based on the i-th sample. This represents the i-th real target object that was manually annotated. This represents the number of samples.
[0045] Among them, the comparison-sensitive loss term The calculation formula is: In the formula, Indicates the target local contrast. Indicates global image contrast. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box.
[0046] In this embodiment of the invention, the improved target confidence loss is described. The expression is: In the formula, Focal weighting factor for low illumination This represents the binary cross-entropy loss for the "target". This indicates the loss of focus on the "target".
[0047] The formula for calculating the low-light Focal weight is as follows: In the formula, Indicates the average brightness of the image. The recommended value for the brightness threshold is 0.3. To adjust the parameter, a value of 10.0 is recommended.
[0048] In this embodiment of the invention, the expression for the classification loss is: In the formula, This represents the binary cross-entropy loss for a classification task. This represents the feature consistency loss. For feature consistency weight coefficients (e.g.) (1).
[0049] Among them, feature consistency loss The calculation is as follows: In the formula, Let represent the feature vector of the i-th target under low light conditions. This represents the corresponding feature vector under normal lighting conditions.
[0050] This invention introduces a novel low-light adaptive loss function during the training of the improved YOLOv5 object detection model. The model adaptively adjusts the contribution of each loss term during training, specifically optimizing for technical challenges such as blurred boundaries and low contrast in low-light environments. In other words, this loss function significantly improves the model's detection performance in low-light environments through a multi-component collaborative mechanism.
[0051] In this embodiment of the invention, an improved YOLOv5 target detection model is used to identify and process each frame of video image to obtain the position information of the rotating chuck and anchor bracket. The output target box is positioned using visual standard, that is, the upper left corner of the target box is the origin (0, 0), the positive X-axis direction is horizontal to the right, and the positive Y-axis direction is vertical downward.
[0052] Let the coordinates of the target frame A corresponding to the anchor bolt support be: top left corner (x1, y1), bottom right corner (x2, y2). Let the coordinates of the target frame B corresponding to the rotating chuck be: top left corner (x3, y3), bottom right corner (x4, y4).
[0053] S300 determines the operating status of the rotating chuck based on the position information of the rotating card and the position information of the anchor bolt support.
[0054] In this embodiment of the invention, the process of determining the operating state of the rotating chuck based on the position information of the rotating card and the position information of the anchor bolt support includes: (1) The center distance between the rotating chuck and the anchor support is obtained by processing the position information of the rotating chuck and the anchor support based on the Euclidean algorithm.
[0055] First, calculate the coordinates of the center point of the target frame A corresponding to the anchor bolt support and the coordinates of the center point of the target frame B corresponding to the rotating chuck.
[0056] Center point of target box A coordinates The calculation formula is: Center point of target box B coordinates The calculation formula is: Then, the center distance between the rotating chuck and the anchor support is calculated using Euclidean distance.
[0057] Relative distance between two target boxes That is, their center point and The straight-line distance between them is calculated using the following formula: (2) The center distance between each rotating chuck and the anchor support is compared with the first threshold and the second threshold to determine the working status of the rotating chuck.
[0058] In this embodiment of the invention, the operating state of the rotating chuck includes approaching action and moving away action. If the center distance between the rotating chuck and the anchor support at the current moment is less than or equal to a first threshold and the center distance between the rotating chuck and the anchor support at the current moment is greater than the center distance between the rotating chuck and the anchor support at the next moment, it is determined that the current moment is in the approaching action; if the center distance between the rotating chuck and the anchor support at the current moment is greater than or equal to a second threshold and the center distance between the rotating chuck and the anchor support at the current moment is less than the center distance between the rotating chuck and the anchor support at the next moment, it is determined that the current moment is in the moving away action.
[0059] S400 determines the drill pipe operation cycle based on the operating status of the rotating chuck, and determines the drill pipe count based on the drill pipe operation cycle.
[0060] At the initial moment The system is in a ready state. At this time, the rotating chuck and the anchor bolt support are in a predefined spatially distant state, and drill pipe operation is underway. The program will record the drill pipe count value. Initialize to zero, that is: This state is recorded as the system baseline state. .
[0061] Job initiation determination (proximity action): at time... The chuck was detected to be moving towards the anchor support. The program determined this "approaching action" as the first... Root drill pipe (initial) The start signal of the work cycle.
[0062] Task completion judgment and counting trigger (away from action): at time After the drill pipe was driven into the ground, the rotary chuck was detected moving away from the anchor support. The program classifies this "movement away" as the first... Root drill pipe (initial) The end signal of the work cycle.
[0063] Therefore, a complete drill pipe driving operation corresponds to a mechanical cycle consisting of the operation initiation judgment corresponding to the "approaching action" and the operation completion judgment corresponding to the "moving away action". That is, when the system state changes from the "approaching action" state... Switch to "Away from Action" state At the end of a complete "near-far" cycle, the drill pipe count value... Perform an increment operation once. ).
[0064] In the initial state of the system, when the rotating chuck is first detected to be approaching, the drill pipe operation is determined to begin; when the drill chuck is first detected to be moving away, the drill pipe operation is determined to end; and at the end of the drill pipe operation cycle, the drill pipe operation cycle K count is 1. After the drill pipe operation cycle ends, if the rotating chuck is first detected to be approaching, the drill pipe operation cycle is determined to begin; when the drill chuck is first detected to be moving away, the drill pipe operation cycle is determined to end; and at the end of each operation, the drill pipe operation cycle K count is incremented by 1.
[0065] In this embodiment of the invention, a complete cycle of "rotating the chuck towards the anchor support and then immediately moving away" corresponds one-to-one with the successful driving of a drill pipe. Therefore, the complete drill pipe operation cycle K experienced and identified by the system is equal to the statistical number of drill pipes N.
[0066] This invention captures and analyzes the periodic relative motion between a rotating chuck and an anchor support by recognizing and processing video images. It quantifies the motion by measuring the change in the relative spatial distance between the detection frames of the rotating chuck and the anchor support. The core of this invention lies in calculating the center distance between the center points of the two target frames. This method has high stability because it is insensitive to changes in the size of the target frames.
[0067] After completing the drilling operations in the mine, the system of this invention compares the final count of drill rods with the preset count. If they do not match, the workstation outputs an alarm command. The alarm command is then sent sequentially to the intrinsically safe wireless audible and visual alarm via the ground switch and the intrinsically safe wireless base station for use in the mine, providing an audible and visual prompt to remind the staff to check whether all drilling operations have been completed.
[0068] The workflow of the system of this invention is as follows: 1. System startup: The downhole camera, base station, alarm, and surface switch and workstation are started in sequence to complete system initialization.
[0069] 2. Video Acquisition and Transmission: The camera acquires drilling site video in real time and transmits it to the ground workstation via the mine ring network through the wireless base station.
[0070] 3. Intelligent analysis and recognition: The workstation uses an optimized detection model to identify the positional relationship between the rotating chuck and the anchor bolt support in real time.
[0071] 4. Action status judgment: By calculating the center distance between the two, the "closer" or "farther" status is determined according to the preset threshold.
[0072] 5. Automatic counting execution: When a complete "approaching → moving away" state transition is detected, it is determined that one drill pipe operation has been completed, and the count value is automatically accumulated.
[0073] 6. Abnormal alarm trigger: When the actual count value does not match the preset quantity, an alarm command is generated and sent to the downhole audible and visual alarm.
[0074] 7. Continuous cyclic monitoring: The system operates around the clock, enabling continuous automated monitoring and early warning of drill pipe operations.
[0075] This application also provides an electronic device, exemplary in that the electronic device includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to cause the electronic device to perform the above-described drill pipe counting method suitable for low-light environments.
[0076] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0077] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electrically Erasable Programmable Read-Only Memory (EEPROM). The memory stores computer programs, and the processor, upon receiving execution instructions, can execute the computer programs accordingly.
[0078] This application also provides a computer-readable storage medium for storing the computer program used in the aforementioned electronic device. For example, the computer-readable storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0079] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0080] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0081] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0082] Finally, it should be noted that the above embodiments are only for illustration and not for limiting the technical solutions of the present invention. Any equivalent substitutions, modifications or partial substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A drill pipe counting method suitable for low-light environments, characterized in that, include: Real-time acquisition of video images of a preset area in the drilling site; the preset area includes a rotating card and an anchor bolt support. Each frame of the video image is processed for recognition to obtain the position information of the corresponding target object; the target object includes a rotating chuck and an anchor bolt support. The operating status of the rotating chuck is determined based on the position information of the rotating card and the position information of the anchor bolt support; The drill pipe operation cycle is determined based on the operating status of the rotating chuck, and the drill pipe count is determined based on the drill pipe operation cycle.
2. The drill pipe counting method applicable to low-light environments according to claim 1, characterized in that, The improved YOLOv5 target detection model is used to identify and process each frame of the video image to obtain the rotating chuck and the anchor bracket.
3. The drill pipe counting method applicable to low-light environments according to claim 2, characterized in that, The improved YOLOv5 object detection model includes an LSNet model in the Backbone part and a CARAFE manipulator in the Neck part.
4. The drill pipe counting method applicable to low-light environments according to claim 3, characterized in that, The adaptive loss function of the improved YOLOv5 object detection model includes low-light adaptive bounding box loss, object confidence loss, and classification loss; Target confidence loss The expression is: In the formula, As a weighting factor for low illumination, This represents the binary cross-entropy loss for the "target". This indicates the loss of focus on the "target".
5. The drill pipe counting method applicable to low-light environments according to claim 4, characterized in that, Determining the operating state of the rotating chuck based on the position information of the rotating card and the position information of the anchor bolt support includes: The position information of the rotating chuck and the position information of the anchor bolt support are processed to obtain the center distance between the rotating chuck and the anchor bolt support; The operating status of the rotating chuck is determined by comparing the center distance between each rotating chuck and the anchor support with the first threshold and the second threshold, respectively.
6. The drill pipe counting method applicable to low-light environments according to claim 5, characterized in that, The operating states of the rotating chuck include approaching action and moving away action; If the center distance between the rotating chuck and the anchor support at the current moment is less than or equal to the first threshold and the center distance between the rotating chuck and the anchor support at the current moment is greater than the center distance between the rotating chuck and the anchor support at the next moment, then it is determined that the current moment is in a close-up action. If the center distance between the rotating chuck and the anchor support at the current moment is greater than or equal to the second threshold and the center distance between the rotating chuck and the anchor support at the current moment is less than the center distance between the rotating chuck and the anchor support at the next moment, it is determined as a moving away action.
7. A drill pipe counting system suitable for low-light environments, characterized in that, It includes surface equipment and underground equipment; the surface equipment includes intrinsically safe wireless cameras and intrinsically safe wireless base stations for mining; the surface equipment includes ground switches and workstations; The intrinsically safe wireless camera for mining is used to collect video images of the drilling area in real time. The intrinsically safe wireless base station for mining is used to upload the video images; The ground switch is used to forward the received video images to the workstation; The workstation is used to process each of the video images to obtain the drill rod count for low-light environments according to any one of claims 1-6.
8. The drill pipe counting system suitable for low-light environments according to claim 7, characterized in that, The above-ground equipment also includes an intrinsically safe wireless audible and visual alarm for mining; if the final count of drill pipes is inconsistent with the preset count of drill pipes, the workstation outputs an alarm command, which is then sent to the intrinsically safe wireless audible and visual alarm via the ground switch and the intrinsically safe wireless base station for audible and visual alert.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the drill pipe counting method suitable for low-light environments as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed on a processor, implements a drill pipe counting method applicable to low-light environments according to any one of claims 1-6.