Mine drill rod counting method, system and equipment based on improved YOLOV5 and DeepSort
By improving the integration of YOLOV5 and DeepSort algorithms, the problems of low monitoring efficiency and insufficient accuracy of underground drill pipes in mines are solved, real-time accurate counting of drill pipes in complex environments is achieved, and the safety and efficiency of gas extraction are improved.
Patent Information
- Application Number
- CN202211021431.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-08-24
AI Technical Summary
In the prior art, the mine drilling rod monitoring method is inefficient, prone to errors and has safety risks, making it difficult to achieve accurate counting, affecting the gas extraction effect.
The improved YOLOV5 model is used to integrate DeepSort multi-objective tracking algorithm to realize real-time accurate counting of the drill pipe through video data processing, including dataset annotation, model improvement, training and tracking counting.
Improve drill pipe detection accuracy and counting accuracy, real-time accurate counting in complex environments, avoid manual counting errors, and ensure safety.
Smart Images

Figure CN115909121B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision recognition technology, and more particularly to a method, system, and equipment for counting drill rods in mines based on improved YOLOV5 and DeepSort. Background Art
[0002] Coal has always been an indispensable resource in industrial production and people's daily lives. Despite annual changes in the energy structure, its status as a primary energy source remains unchanged. To meet the demands of my country's industrial production and the improvement of people's living standards, increasing mining output is crucial. Since gas explosions have always been a major obstacle to mining, intelligent and safe mining has become a future development direction for mining companies.
[0003] Gas is usually stored in layers and released as the layers are mined. In the narrow working environment underground, if the gas concentration reaches a certain proportion, an explosion accident will occur. Therefore, underground gas extraction has become an important guarantee for mine safety. With the increase in the depth of underground mining, new challenges have been posed to gas extraction work. At this stage, drilling extraction, as the main method of gas extraction, can effectively reduce the probability of gas disasters in mines and ensure high and stable production of mining enterprises.
[0004] Currently, the primary factor affecting gas extraction effectiveness is borehole depth. Since each drill rod is the same length, the borehole depth is the product of the number of drill rods and their length. Traditional methods for monitoring moving drill rods in mines primarily include manual monitoring and switch monitoring.
[0005] Due to the harsh working environment underground in mines, large amounts of coal dust and water mist can cause the switch devices on the drill rod machine to malfunction. The manual monitoring and counting method is not only inefficient and prone to errors, but also cannot fully guarantee the authenticity of the drilling depth, posing a great safety risk.
[0006] Therefore, it is an urgent problem for those skilled in the art to study a method and system that can automatically monitor and count drill rods in mines. Summary of the Invention
[0007] In view of this, the present invention provides a method and system for counting drill rods in mines based on improved YOLOV5 and DeepSort, which at least partially solves the above-mentioned technical problems. The present invention integrates the improved YOLOV5 model with the DeepSort multi-target tracking algorithm, thereby improving the detection accuracy and counting accuracy of drill rods without affecting the detection speed, and realizing the function of real-time and accurate counting of drill rods in the complex environment of underground coal mines.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] On one hand, the present invention discloses a method for counting drill rods in a mine based on improved YOLOV5 and DeepSort, comprising the following steps:
[0010] S1. Obtain a drill rod operation video in a mine as a data set, mark the drill rod targets in the data set, and obtain a drill rod target image containing a drill rod target marking frame;
[0011] S2. Improve the YOLOV5 model to obtain an improved YOLOV5 model. The improvement steps include:
[0012] According to the K-means algorithm, calculate the new anchors value;
[0013] Add an attention mechanism to the backbone network of the YOLOV5 model;
[0014] Use BiFPN network for multi-scale feature fusion;
[0015] S3. Training the improved YOLOV5 model according to the drill pipe target image until it is evaluated as qualified, thereby obtaining the trained improved YOLOV5 model;
[0016] S4. Input the drilling rig operation video into the trained improved YOLOV5 model to obtain drill rod position information and detection frame information;
[0017] S5. According to the drill rod position information and the detection frame information, the drill rods are tracked, counted, and displayed using a DeepSort algorithm.
[0018] Furthermore, in S1, the drill rod operation video in the mine is converted into image data according to a given frame interval, and the drill rod target image is obtained after annotation.
[0019] Furthermore, in S2, the new anchors values are obtained according to the K-means algorithm, including the following:
[0020] S21, randomly selecting k cluster centers according to the coordinate information distribution of the drill rod target mark frame;
[0021] S22, calculating the distance between each drill rod target marking frame and each cluster center, and assigning each drill rod target marking frame to the cluster center with the closest distance;
[0022] S23, after all the drill rod target marking frames are allocated, recalculate the cluster centers to obtain k cluster centers;
[0023] S24, determine whether the cluster center 1 and the cluster center have changed. If so, repeat steps S22-24. If not, stop K-means clustering and output the clustering result.
[0024] Furthermore, the attention mechanism is used to encode the generated feature map to obtain a pair of direction-aware and position-sensitive features.
[0025] Furthermore, the training parameters of the improved YOLOV5 model include: attenuation coefficient, iteration batch, total number of iterations and learning rate; the learning rate is preheated using Warmup training, and after preheating, the learning rate is updated using the cosine annealing learning algorithm.
[0026] Furthermore, the improved YOLOV5 model after training is evaluated by recall rate, precision rate and average precision, and the evaluation formulas are respectively:
[0027] Recall:
[0028] Accuracy:
[0029] Mean Average Precision:
[0030] Where TP is the number of detection frames that correctly detect drill rods, FP is the number of detection frames that are falsely detected as drill rods, FN is the number of detection frames that miss the detection of drill rods, NC is the total number of categories, AP is the area under the PR curve, and mAP is the mean AP of all categories.
[0031] Furthermore, in S5, the process of tracking and counting the drill rods includes:
[0032] S51, creating an initial trajectory based on the first frame drill rod detection frame and setting an initial ID;
[0033] S52, using Kalman filtering to predict the position of the drill rod detection frame of the next frame to obtain a drill rod prediction frame;
[0034] S53, performing cascade matching and IOU matching on the drill rod detection frame of the next frame and the drill rod prediction frame to obtain a matching result;
[0035] S54: Update the ID according to the matching result.
[0036] Furthermore, before tracking and counting the drill rods, a confidence threshold is set to filter detection frames with a value less than the confidence threshold.
[0037] On the other hand, the present invention also discloses a mine drill rod counting system based on improved YOLOV5 and DeepSort, which is characterized by comprising:
[0038] Video acquisition module, used to acquire drill rod operation video in mines;
[0039] An improved YOLOV5 model training module is used to train the improved YOLOV5 model until it is evaluated as qualified;
[0040] An improved YOLOV5 model detection module is used to detect the drill rod operation video using the improved YOLOV5 model to obtain the position information and detection frame information of the drill rod;
[0041] The DeepSORT drill rod tracking and counting module is used to track and count the drill rods according to the position information and detection frame information of the drill rods to obtain the current number of drill rods;
[0042] The drill rod counting display module is used to display the detection status of the drill rod by the improved YOLOV5 model and the number of the current drill rods in the drill rod operation video.
[0043] On the other hand, the present invention also discloses a mine drill rod counting device based on improved YOLOV5 and DeepSort, which is characterized by comprising:
[0044] A memory for storing a computer program, wherein the program is the above-mentioned method for counting drill rods in a mine based on improved YOLOV5 and DeepSort;
[0045] a processor, configured to execute the computer program in the memory;
[0046] A bus is used to connect the processor and the memory.
[0047] Through the above technical solutions, it can be seen that the beneficial effects achieved by the present invention include at least:
[0048] The present invention integrates the improved YOLOV5 model with the DeepSort multi-target tracking algorithm, which improves the detection accuracy and counting accuracy of drill rods without affecting the detection speed. It realizes real-time and accurate counting of drill rods directly through video in the complex environment of coal mines, avoiding the counting errors that may occur during long-term manual counting. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0050] Figure 1 The accompanying drawing is a flow chart of the drill rod counting method provided by the present invention;
[0051] Figure 2 The accompanying figure shows the anchors value of the updated YOLOV5 model provided by the present invention;
[0052] Figure 3 The accompanying figure is a structural diagram of the attention mechanism provided by the present invention;
[0053] Figure 4 The accompanying drawing is a diagram of the BiFPN network structure provided by the present invention;
[0054] Figure 5 The accompanying drawing is a flow chart of the DeepSORT algorithm provided by the present invention;
[0055] Figure 6 The accompanying drawing is a display effect diagram of the drill rod counting method provided by the present invention;
[0056] Figure 7 The accompanying drawing is a schematic structural diagram of a drill rod counting system provided by the present invention;
[0057] Figure 8 The accompanying drawing is a schematic structural diagram of the drill rod counting device provided by the present invention. DETAILED DESCRIPTION
[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0059] The embodiments of the present invention disclose a method, system, and device for counting drill rods in mines based on improved YOLOV5 and DeepSort. To make the above-mentioned objects, features, and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] Currently, target detection algorithms are categorized into one-stage and two-stage algorithms. Two-stage detection algorithms offer high accuracy but slow speed, while one-stage detection algorithms offer slightly lower accuracy but faster speed. YOLOv5 is the culmination of current one-stage detection algorithms, achieving high detection accuracy while balancing speed. The DeepSORT algorithm's primary function is multi-target tracking, and the accuracy of the detection algorithm significantly impacts the accuracy of the DeepSORT algorithm. Therefore, combining YOLOv5 with DeepSORT can accurately achieve real-time drill rod counting. The combination of these two algorithms creates a 1+1 greater than 2 effect, and they are irreplaceable.
[0061] Specifically, the drill rod counting method for mines based on improved YOLOV5 and DeepSort disclosed in the present invention includes the following steps: Figure 1 :
[0062] S1. Obtain a drill rod operation video in a mine as a data set, mark the drill rod targets in the data set, and obtain a marked drill rod target image;
[0063] S2. Improve the YOLOV5 model to obtain an improved YOLOV5 model. The improvement steps include:
[0064] According to the K-means algorithm, calculate the new anchors value;
[0065] Add an attention mechanism to the backbone network of the YOLOV5 model;
[0066] Use BiFPN network for multi-scale feature fusion;
[0067] S3. Training the improved YOLOV5 model according to the labeled drill pipe target image until it is evaluated as qualified, thereby obtaining the trained improved YOLOV5 model;
[0068] S4. Input the drilling rig operation video into the trained improved YOLOV5 model to obtain drill rod position information and detection frame information;
[0069] S5. According to the drill rod position information and the detection frame information, the drill rods are tracked, counted, and displayed using a DeepSort algorithm.
[0070] The following is a detailed explanation of each step:
[0071] (1) Acquisition of data,
[0072] The drill rod operation video in the mine required for step S1 is captured by a camera in the mine. The frame interval of the video is set to 15 frames, that is, a picture data frame is intercepted every 15 frames, thereby converting the video into picture data;
[0073] In one embodiment, image data in which the drill rod target is blocked or blurred is screened out, and the data set includes a total of 700 drill rod target images;
[0074] Then, the drill rod targets in the data set are labeled to obtain a labeled drill rod target image.
[0075] In one embodiment, labeling is performed using labelimg software, and the labeling steps include:
[0076] 1. Import the dataset into labelimg software;
[0077] 2. Use labelimg software to set the target category to be labeled;
[0078] 3. Use labelimg software to mark the target position with a rectangular frame to obtain the marked drill rod target image. The marked drill rod target image is a TXT format file with the same name as the original image.
[0079] (2) Improvement of YOLOV5 model
[0080] The YOLOV5 model consists of an input end, a backbone network, a neck network, and an output end in sequence. The data is first standardized and preprocessed at the input end, and then passed into the backbone network to obtain feature maps of different scales. The neck network fuses the feature maps of different scales, and the output end outputs feature maps of different sizes to detect objects of different sizes.
[0081] In order to further improve the accuracy of drill rod detection, the present invention makes the following improvements to the YOLOV5 model:
[0082] 1. According to the K-means algorithm, new anchors values are obtained, including the following:
[0083] According to the distribution of the coordinate information of the annotation boxes marked in the data set, multiple cluster centers (Wi, Hi) are selected, where Wi and Hi are the width and height of the anchors;
[0084] Calculating the distance between the labeled box in each data set and each cluster center, and assigning the labeled box in each data set to the cluster center with the closest distance;
[0085] Calculate the average width and height of the anchors to which each cluster center belongs to obtain a new anchor value.
[0086] In one embodiment, the first two steps are repeated 1000 times, and the values of the clustered labeled boxes are output as new anchors values. The updated anchors values are as follows: Figure 2 shown.
[0087] 2. Add an attention mechanism to the backbone network of the YOLOV5 model. The attention mechanism aims to obtain attention weights through the horizontal and vertical coordinates of the detection frame of the drill pipe target to improve the detection accuracy and enhance the YOLOV5 model's ability to locate the drill pipe target;
[0088] Specifically, such as Figure 3 ,The attention mechanism decomposes channel attention into two parallel one-dimensional ,feature encoding processes, which aggregate features in two directions, ,wherein one direction obtains long-range dependencies and the other direction obtains ,accurate position information. The generated feature map is encoded to form a pair of ,direction-aware and position-sensitive features.
[0089] In one embodiment, the input feature map X has a dimension of C x H x W. First, a pooling kernel of size (H, 1) and (1, W) is used to encode each channel along the horizontal and vertical coordinates respectively, that is, the output of the c-th channel with a height of h and a width of w. The output formula is as follows:
[0090]
[0091] in: is the output of the cth channel in the horizontal direction, is the output of the cth channel in the vertical direction,
[0092] The above formula aggregates features along two directions and returns a pair of direction-aware attention features Z h and Z w , and then use a shared 1×1 convolution to transform F1, the formula is as follows: f=δ(F1([Z h ,Z w ]))
[0093] Where f is the intermediate feature map of spatial information in the horizontal and vertical directions, r is the downsampling ratio 16, [Z h ,Z w ] is the connection operation along the spatial dimension, and δ is the nonlinear activation function.
[0094] Then split f into two separate tensors f along the spatial dimension h ∈R C / r×H and f w ∈R C / r×W , and then use two 1×1 convolution F h and F w Transformed to the same number of channels as the output X, the result is as follows:
[0095] gh =σ(F h (f h ))
[0096] g w =σ(F w (f w ))
[0097] Finally, g h and g w Expanding on this, as the attention weight, the output of the attention mechanism can be expressed as the following formula:
[0098] 3. Use BiFPN network for multi-scale feature fusion; Figure 4 As shown,
[0099] Depend on Figure 4 It can be seen that the BiFPN network deletes nodes with only one input on the basis of the PAN network, thereby simplifying the bidirectional network; secondly, if the input node and the output node are in the same layer, Bi-FPN will add an additional directly connected channel between the two nodes. The purpose of this is to integrate more features; finally, the bottom-up and top-down paths are integrated into one module to facilitate multiple superpositions and achieve higher-level feature fusion.
[0100] (3) Based on the labeled drill pipe target image, the improved YOLOV5 model is trained and evaluated.
[0101] First, the training parameters of the improved YOLOV5 model are set, including: decay coefficient, iteration batch, total number of iterations and learning rate; among them, the learning rate is preheated using Warmup training, and after preheating, the learning rate is updated using the cosine annealing learning algorithm.
[0102] In one embodiment, the attenuation coefficient is set to 0.0005, the iteration batch is 32, and the total number of iterations is 300.
[0103] The dataset annotated in step (1) is divided into training set, validation set, and test set in a ratio of 8:1:1, and the improved YOLOV5 model is trained.
[0104] The trained improved YOLOV5 model is evaluated using the recall rate (ReCAll), precision rate (Precision), and average precision (mAP@0.5). The corresponding formulas for the corresponding indicators are:
[0105] Recall:
[0106] Accuracy:
[0107] Mean Average Precision:
[0108] Where TP is the number of detection frames that correctly detect drill rods, FP is the number of detection frames that are falsely detected as drill rods, FN is the number of detection frames that miss the detection of drill rods, NC is the total number of categories, AP is the area under the PR curve, and mAP is the mean AP of all categories.
[0109] (4) Using the trained improved YOLOV5 model and inputting the drill rig rod withdrawal video into the trained improved YOLOV5 model, the drill rod in operation is detected to obtain the position information and target frame information of the drill rod;
[0110] (5) using the DeepSort algorithm to track, count, and display the drill rod position information and detection frame information obtained;
[0111] Before using the DeepSort algorithm for tracking, counting, and displaying, a confidence threshold is set to filter detection boxes that are smaller than the confidence threshold.
[0112] Secondly, the process of tracking and counting drill rods, e.g. Figure 5 ,include:
[0113] S51. Create an initial trajectory based on the first frame of the drill rod detection frame and set the initial ID. The trajectory has three states: confirmed, unconfirmed, and deleted. An unconfirmed trajectory can be changed to a confirmed state after three consecutive successful matches. The initial trajectory state is unconfirmed.
[0114] S52, using Kalman filtering to predict the position of the drill rod detection frame of the next frame to obtain a drill rod prediction frame;
[0115] S53, performing cascade matching and IOU matching on the drill rod detection frame of the next frame and the drill rod prediction frame to obtain a matching result;
[0116] Specifically, the DeepSORT algorithm combines the Mahalanobis distance and the minimum cosine distance into a cascade matching to associate the drill rod motion trajectories.
[0117] The Mahalanobis distance calculation formula is as follows:
[0118]
[0119] Where: y i is the position of the i-th detection box predicted by DeepSORT, d j It is the j-th detection box position detected by YOLOV5. is the covariance matrix. Set the threshold t = 9.4877. If the Mahalanobis distance between the predicted box and the detected box is less than the threshold, the match is considered successful.
[0120] However, ID jumps may still occur at this time. Therefore, it is necessary to use convolutional neural networks to further extract the appearance features of the target and introduce the cosine distance metric. The formula is as follows:
[0121]
[0122] Where: d (i,j) is the cosine measurement result, r j For each detection box, the appearance feature vector is (i,j) If the value is less than the specified threshold, the match is considered successful.
[0123] The DeepSORT algorithm combines the above two distance measurement methods as cascade matching, introduces the weight λ and combines them to obtain the following formula:
[0124]
[0125] S54, updating the ID according to the matching result;
[0126] Correspondingly, if the trajectory association is successful, the ID remains unchanged and is passed to the Kalman filter for prediction of the next frame.
[0127] If the association fails, the unmatched trajectory and the unmatched detection box are matched by IOU. If the match is successful, the ID is increased by 1, and the Kalman filter is entered to predict the next frame. If the trajectory matching fails, if the trajectory is in a confirmed state before the matching, the trajectory is directly deleted if there is no successful matching after the life cycle; if the match is successful within the life cycle, the ID is increased by 1, and the Kalman filter is entered to predict the next frame; if the trajectory state is undetermined before the IOU match, the trajectory is directly deleted; if the detection box matching fails, a new trajectory is created, assigned a new ID value, and the Kalman filter is entered to predict the next frame.
[0128] Furthermore, the current number of drill rods is displayed to facilitate staff to check the number of drill rods.
[0129] In one embodiment, the detection status of the drill rod by the improved YOLOV5 model and the number of the current drill rods are displayed together in the drill rod operation video, and the display effect is as follows: Figure 6 shown.
[0130] In order to evaluate the performance superiority of the improved algorithm, different algorithm combinations were used to conduct the same test. The measured data results are shown in the following table:
[0131] Model Recall precision Drill rod counting accuracy YOLOV4+DEEPSORT 86% 88.5% 70.5% YOLOV5+DEEPSORT 96.7% 95.8% 80.1% Method of the present invention 98.2% 98.1% 97.2%
[0132] As can be seen from the table, the improved algorithm model in this paper has greatly improved the recall rate, precision and counting accuracy, which can meet the actual production needs.
[0133] On the other hand, the present invention also discloses a mine drill rod counting system based on improved YOLOV5 and DeepSort, the structural diagram of which is shown in FIG. Figure 7 Shown, including:
[0134] The video acquisition module is used to obtain videos of drill rod operations in mines; this video is used to train the improved YOLOV5 model and to detect drill rods.
[0135] An improved YOLOV5 model training module is used to train the improved YOLOV5 model until it is evaluated as qualified; so as to obtain a drill rod detection weight file with the best accuracy;
[0136] An improved YOLOV5 model detection module is used to detect the drill rod operation video using the improved YOLOV5 model to obtain the position information and detection frame information of the drill rod;
[0137] The DeepSORT drill rod tracking and counting module is used to track and count the drill rods according to the position information and detection frame information of the drill rods to obtain the current number of drill rods;
[0138] The drill rod counting display module is used to display the detection status of the drill rod by the improved YOLOV5 model and the number of the current drill rods in the drill rod operation video.
[0139] On the other hand, a mine drill rod counting device based on improved YOLOV5 and DeepSort, the structural diagram is as follows Figure 8 Shown, including:
[0140] A memory for storing a computer program, wherein the program is the above-mentioned method for counting drill rods in a mine based on improved YOLOV5 and DeepSort;
[0141] a processor, configured to execute the computer program in the memory;
[0142] A bus is used to connect the processor and the memory.
[0143] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0144] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A mine drill rod counting method based on improved YOLOV5 and DeepSort, characterized in that: S1. Obtain a drill rod operation video in a mine as a data set, mark the drill rod targets in the data set, and obtain a drill rod target image containing a drill rod target marking frame; S2. Improve the YOLOV5 model to obtain an improved YOLOV5 model. The improvement steps include: According to the K-means algorithm, calculate the new anchors value; Add an attention mechanism to the backbone network of the YOLOV5 model; Use BiFPN network for multi-scale feature fusion; S3. Training the improved YOLOV5 model according to the drill pipe target image until it is evaluated as qualified, thereby obtaining the trained improved YOLOV5 model; S4. Input the drilling rig operation video into the trained improved YOLOV5 model to obtain drill rod position information and detection frame information; S5. According to the drill rod position information and the detection frame information, the drill rods are tracked, counted, and displayed using a DeepSort algorithm.
2. The method for counting drill rods in a mine based on improved YOLOV5 and DeepSort according to claim 1, characterized in that: In S1, the drill rod operation video in the mine is converted into image data according to a given frame interval, and the drill rod target image is obtained after annotation.
3. The method for counting drill rods in a mine based on improved YOLOV5 and DeepSort according to claim 1, characterized in that: In S2, the new anchors values are obtained according to the K-means algorithm, including the following: S21, randomly selecting k cluster centers according to the coordinate information distribution of the drill rod target mark frame; S22, calculating the distance between each drill rod target marking frame and each cluster center, and assigning each drill rod target marking frame to the cluster center with the closest distance; S23, after all the drill rod target marking frames are allocated, recalculate the cluster centers to obtain k cluster centers; S24, determine whether the cluster center 1 and the cluster center have changed. If so, repeat steps S22-24. If not, stop K-means clustering and output the clustering result.
4. The method for counting drill rods in a mine based on improved YOLOV5 and DeepSort according to claim 1, characterized in that: The attention mechanism is used to encode the generated feature map to obtain a pair of direction-aware and position-sensitive features.
5. The method for counting drill rods in a mine based on improved YOLOV5 and DeepSort according to claim 1, characterized in that: The training parameters of the improved YOLOV5 model include: attenuation coefficient, iteration batch, total number of iterations and learning rate; the learning rate is preheated using Warmup training, and after preheating, the learning rate is updated using the cosine annealing learning algorithm.
6. The method for counting drill rods in a mine based on improved YOLOV5 and DeepSort according to claim 1, characterized in that: The improved YOLOV5 model after training is evaluated by recall rate, precision rate and average precision, and the evaluation formulas are as follows: Recall: Accuracy: Mean Average Precision: Where TP is the number of detection frames that correctly detect drill rods, FP is the number of detection frames that are falsely detected as drill rods, FN is the number of detection frames that miss the detection of drill rods, NC is the total number of categories, AP is the area under the PR curve, and mAP is the mean AP of all categories.
7. The method for counting drill rods in mines based on improved YOLOV5 and DeepSort according to claim 1, characterized in that: In S5, the process of tracking and counting the drill rods includes: S51, creating an initial trajectory based on the first frame drill rod detection frame and setting an initial ID; S52, using Kalman filtering to predict the position of the drill rod detection frame of the next frame to obtain a drill rod prediction frame; S53, performing cascade matching and IOU matching on the drill rod detection frame of the next frame and the drill rod prediction frame to obtain a matching result; S54: Update the ID according to the matching result.
8. The method for counting drill rods in mines based on improved YOLOV5 and DeepSort according to claim 1, characterized in that: Before tracking and counting the drill rods, a confidence threshold is set to filter out detection frames with a value less than the confidence threshold.
9. A counting system for executing the mine drill rod counting method based on improved YOLOV5 and DeepSort according to any one of claims 1 to 8, characterized in that: include: Video acquisition module, used to acquire drill rod operation video in mines; An improved YOLOV5 model training module is used to train the improved YOLOV5 model until it is evaluated as qualified; An improved YOLOV5 model detection module is used to detect the drill rod operation video using the improved YOLOV5 model to obtain the position information and detection frame information of the drill rod; The DeepSORT drill rod tracking and counting module is used to track and count the drill rods according to the position information and detection frame information of the drill rods to obtain the current number of drill rods; The drill rod counting display module is used to display the detection status of the drill rod by the improved YOLOV5 model and the number of the current drill rods in the drill rod operation video.
10. A mine drill rod counting device based on improved YOLOV5 and DeepSort, characterized in that: include: A memory for storing a computer program, wherein the computer program is a method for counting drill rods in a mine based on improved YOLOV5 and DeepSort according to any one of claims 1 to 8; a processor, configured to execute the computer program in the memory; A bus is used to connect the processor and the memory.
Citation Information
Patent Citations
Automatic counting method for underground drill rods based on machine vision
CN114511812A
System and method for the detection and counting of repetitions of repetitive activity via a trained network
US20170017857A1