A real-time multi-target tracking method
By combining deep learning features with historical trajectories, the existing multi-target tracking algorithm solves the problems of large computational load and high hardware resource requirements, achieving low resource usage, fast matching and efficient tracking, and is suitable for complex environmental conditions.
Patent Information
- Application Number
- CN202010594911.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-06-28
AI Technical Summary
Existing multi-target tracking algorithms are computationally intensive, require high hardware resources, are slow, and have poor data correlation effects, making it difficult to meet the needs of real-time and high-quality multi-target tracking.
Use deep learning features and historical trajectories as object matching criteria, combine IOU distance and feature distance, use the Hungarian algorithm for matching, and design a simple and efficient feature storage method to integrate measurement information through the 'reward' and 'punishment' mechanisms to reduce hardware resources Occupancy and matching time.
It achieves low hardware resource usage, fast matching and efficient tracking, improves the robustness and accuracy of multi-target tracking, and is suitable for complex environmental conditions.
Smart Images

Figure CN113850839B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multi-target tracking, and in particular to a real-time multi-target tracking method using deep learning and data association. Background Art
[0002] Multiple Object Tracking (MOT), also known as Multiple Target Tracking (MTT), is a technology that finds moving objects in a given image sequence, matches the moving objects in different frames one by one, and then gives the motion trajectories of different objects. Multiple object tracking technology plays a vital role in many fields, such as security, autonomous driving, etc.
[0003] Classical multi-target tracking is usually solved using multiple hypothesis tracking (MHT) or joint probabilistic data association filter (JPDAF). Multiple hypothesis tracking (MHT) is one of the earliest successful visual tracking algorithms. The earliest multiple hypothesis tracking algorithm was proposed by Reid in 1979. The algorithm establishes a potential tracking hypothesis tree for each candidate target and makes delayed association decisions through subsequent measurement data, providing a systematic solution to the data association problem. Using the transfer characteristics of Bayesian posterior probability, the multiple hypothesis tracking algorithm calculates the probability of each tracking, and then selects the most likely combination, repeatedly "prunes" the unlikely hypotheses with small probabilities, merges the same hypotheses, and realizes data association and tracking of multiple targets. Because the entire tracking hypothesis is considered when calculating the probability, the multiple tracking hypothesis is theoretically good at utilizing high-order information, such as long-term motion and appearance information. Kim et al. introduced an appearance model for each hypothesis, which can be trained online through the normalized minimum mean square error optimization algorithm.
[0004] The joint probability data interconnection filter was proposed by Shalom et al. in 1988 and is widely regarded as an effective data interconnection technology. The joint probability data interconnection filter comprehensively considers all echoes that fall into the tracking gate and believes that common echoes may belong to different targets. It is more suitable for multi-target tracking in cluttered environments. In order to represent the complex relationship between valid echoes and each target tracking gate, Shalom introduced the concept of confirmation matrix. By splitting the confirmation matrix, all interconnection matrices representing interconnected events can be obtained. The earliest joint probability data interconnection filter has the serious disadvantage of complex combination. The joint probability data interconnection algorithm needs to consider the possible association between the target and all other targets and calculate the joint probability score. In order to alleviate the computational burden, many improved algorithms based on joint probability data interconnection have been proposed. Oh et al. proposed a joint probability data interconnection estimation based on Markov chain Monte Carlo data interconnection. Although this sampling scheme provides a practical method for estimating high-dimensional problems, it may slow convergence due to poor mixing, and random elements also make it difficult to reproduce experiments.
[0005] The idea of the joint probability data interconnection algorithm is simple and intuitive. Many detection-based tracking algorithms now have references to varying degrees, such as eliminating false alarms through data interconnection. SORT is a simpler method. It uses Faster R-CNN for detection and Kalman filtering for motion trajectory prediction. When associating data, the IOU distance is introduced, and the Hungarian algorithm is used for frame-by-frame association. Deep SORT introduces appearance information on the basis of SORT. The deep learning model is trained offline on the pedestrian re-identification dataset for target feature extraction during tracking. When associating data, the cascaded Hungarian algorithm uses fused distances, including the Mahalanobis distance between the predicted position and the observed position of the Kalman filter, and the cosine distance between the apparent features of the targets.
[0006] Algorithms based on multi-hypothesis tracking are usually slow due to the speed of pruning algorithms and the growth of search space. They are also limited by pruning techniques, which leads to reduced accuracy. In addition, track information maintenance and other factors lead to large storage resource consumption and low practicality. Multi-target tracking algorithms based on joint probability data interconnection will experience an explosion in computational complexity as the number of targets increases. Although the effective measurement range can be reduced by setting a threshold value, thereby reducing the number of possible interconnections, the computational complexity is still very large, resulting in the algorithm being very inefficient in almost all practical applications. Currently, it is only used in multi-target tracking with a short time. The SORT method only uses the IOU distance. The higher the frame rate, the better the theoretical effect. In addition, the Kalman filter has high CPU requirements, which further limits the application of SORT. Although Deep SORT uses deep learning technology to extract target features, the distinctiveness of the features needs to be improved, the feature storage method is relatively simple, the Kalman filter still requires high CPU resources, and the target detector is slow, resulting in poor practicality. In addition, target changes in the real world will be more complex, such as frame rate, posture, size, illumination, apparent similarity, resolution, etc., which put higher requirements on multi-target tracking algorithms.
[0007] The existing algorithms are relatively complex, require large amounts of computation, require high hardware resources, and are slow. In addition, the data association effect is poor, resulting in low tracking accuracy. Therefore, the existing multi-target tracking algorithms are difficult to meet the requirements of practicality. We believe that it is necessary to design a new multi-target tracking algorithm to achieve real-time, high-quality multi-target tracking. Summary of the invention
[0008] The technical problem to be solved by the present invention is: in response to the above-mentioned problems, a real-time multi-target tracking method is provided. The method directly uses historical trajectories and deep learning features as the matching criteria for two objects, which makes the method widely applicable, and adopts a simple and efficient feature storage method to reduce hardware resource usage and matching time, while calculating IOU distance and feature distance to improve matching speed and matching efficiency.
[0009] The technical solution adopted by the present invention is as follows: a real-time multi-target tracking method, comprising:
[0010] Step 1: Detect objects in the initial frame of the video, record the location information of each object and extract the features of each detected object, and use each object in the initial frame as a potential state tracker;
[0011] Step 2: Detect the subsequent frames in the video, record the position information of each object in the subsequent frames and store the features of each object;
[0012] Step 3: Extract subsequent frames in sequence for data association, calculate the feature distance and IOU distance of each combination of the object in the current subsequent frame and the existing tracker, then fuse the two measurement methods of feature distance and IOU distance, modify the feature distance, and generate a feature distance matrix;
[0013] Step 4: Use the modified feature distance matrix as the final metric cost matrix and use the Hungarian algorithm for matching. If the object in the current subsequent frame matches the existing tracker successfully, update the position information of the tracker and store the object features. If the match is not successful, initialize the object in the current subsequent frame as a new potential state tracker.
[0014] Step 5: Check the number of successful matches. If the number of successful matches is greater than or equal to the set threshold, mark the tracker in the latent state as an explicit state and continue to maintain the state.
[0015] If the number of successful matches is less than the set threshold, the potential state of the tracker will continue to be maintained;
[0016] Step 6: Return the position information of the tracker with explicit status and the corresponding object features;
[0017] Step 7: Display the tracking results in the video.
[0018] Furthermore, the specific process of step 2 includes:
[0019] Step 21: Obtain subsequent frames by extracting frames;
[0020] Step 22: Detect the subsequent frames, record the position information of each object in the subsequent frames, and store the features of each object.
[0021] Furthermore, the specific process of step 3 includes:
[0022] Step 31: Calculate the feature distance and IOU distance of each combination of the object in the current subsequent frame and the existing tracker;
[0023] Step 32: Fusion of two metrics. When the IOU distance is greater than a certain set threshold and the position overlap between the object in the current subsequent frame and the existing tracker is higher than a certain set threshold, a "reward mechanism" is performed, and the feature distance decreases as the overlap increases. When the IOU distance is less than a certain set threshold and the position overlap between the object in the current subsequent frame and the potential state tracker is lower than a certain set threshold or even has no overlap, a "penalty" mechanism is performed, and the feature distance increases as the overlap decreases.
[0024] Step 33: Generate a feature distance matrix based on the modified feature distance.
[0025] When associating data, the above two measurement information are used, one is the motion trajectory information represented by the IOU distance, and the other is the deep learning feature information represented by the feature distance extracted by the model. Effective and reasonable fusion of the two information is one of the keys to achieve good tracking. When fusing the IOU distance and the feature distance, this scheme designs a "reward" and "penalty" mechanism, further refines the fusion method, improves the fusion effect, and thus improves the robustness of multi-target tracking. When the IOU is high, that is, the distance between the two is close, the feature distance is scaled, and when the IOU is low, that is, the distance between the two is far, the feature distance is enlarged. The modified feature distance matrix is used as the final cost matrix. The historical trajectory is used to calculate the IOU distance, which greatly reduces the hardware resource usage while ensuring the effect. Previous methods usually use Kalman filters or deep learning methods for trajectory prediction, which have high CPU usage or high video memory usage, slow speed, and poor prediction effect on irregular motion trajectories.
[0026] Furthermore, in step 31, if the current subsequent frame is any frame from the third frame to the last frame, the characteristic distance between the object detected in the frame and the tracker is the minimum value of multiple distances between the object and the tracker.
[0027] Furthermore, in step 4, when storing object features, if the number of object features already stored is small, then add them for storage; if the number is large, measure the similarity between the object features to be stored and the stored object features, and if the similarity is higher than a set threshold, then weight the average of these object features into one feature, delete the stored features with high similarity, and add the weighted average features.
[0028] A simple and efficient feature storage method reduces hardware resource usage and matching time. Most previous methods use direct feature storage. In order to ensure tracking quality, the tracker will accumulate multiple feature information during the tracking process. These feature information are usually redundant or too old and have large differences from the current object features. Based on this, and in order to reduce storage resources, the present invention designs a new feature storage method. When there are many features, the similarity between the new feature and the stored feature is first measured, and the new feature is weighted averaged with the highly similar feature, and the new feature after weighted average is added to the end, and the feature with the highest similarity is deleted. If the similarity is low, the feature with the longest storage time is deleted and the new feature is added.
[0029] Furthermore, if a tracker fails to match successfully for multiple times in a row, the tracker is deleted. In step 4, if a tracker fails to match successfully for multiple times in a row, the tracker is deleted.
[0030] The specific manifestations are:
[0031] If a potential state tracker fails to match successfully for multiple consecutive times, the potential tracker will be deleted.
[0032] If an explicit state tracker does not update information for multiple consecutive times, the explicit state tracker will be deleted.
[0033] Compared with the prior art, the beneficial effects of adopting the above technical solution are: this method has the advantages of low hardware resource usage, high speed, good tracking effect, etc. At the same time, it also has good robustness under the influence of environmental conditions such as occupancy, size, posture and lighting. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of the multi-target tracking process.
[0035] Figure 2 It is a schematic diagram of existing features and features to be added.
[0036] Figure 3 This is a schematic diagram after the new features are added.
[0037] Figure 4 is a schematic diagram of the fully stored tracker and new features.
[0038] Figure 5 It is a feature diagram after new features with lower similarity are updated and added.
[0039] Figure 6 It is a feature diagram after new features with higher similarity are updated and added. DETAILED DESCRIPTION
[0040] The present invention is further described below in conjunction with the accompanying drawings.
[0041] This embodiment provides a real-time multi-target tracking method. The specific steps of the method are as follows: Figure 1 shown.
[0042] Step 1: Input the video, use the object detection model to detect the objects in the initial frame, record the location information of each object at this time and store the features of each detected object extracted by the deep learning model. Each object in the initial frame is a potential state tracker.
[0043] Step 2: Obtain the second frame, the third frame, the Mth frame, the Nth frame, and other subsequent frames in sequence by extracting frames. Perform target detection on each subsequent frame, record the location information of the object in each frame, and store the features of the corresponding object.
[0044] Step 3: Perform data association. First, calculate the feature distance and IOU distance of each combination of the object in the current frame and the existing tracker. Then, fuse the two metrics. That is, when the IOU distance is greater than a certain threshold and the overlap between the two objects is high, a "reward mechanism" is implemented. As the overlap increases, the feature distance is reduced. When the IOU distance is less than a certain threshold and the overlap between the two objects is low or even non-existent, a "penalty" mechanism is implemented. As the overlap decreases, the feature distance is increased to generate the corresponding feature distance matrix.
[0045] If the current frame is any frame from the third frame to the Nth frame, the tracker may have stored at least two features when calculating the feature distance, so the feature distance between each detected object and the tracker takes the minimum value of multiple distances between the detected object and the tracker.
[0046] Step 4: The modified feature distance matrix is used as the final metric cost matrix and matched using the Hungarian algorithm. If the object in the current frame successfully matches the existing tracker, the position information of the tracker is updated and the object features are stored; if no match is successful, the object in the current frame is initialized as a new tracker.
[0047] When storing object features, if the number of stored features is small and lower than the set threshold, they are added for storage. If the number is large and higher than the set threshold, the similarity between the features to be stored and the stored features is first measured. If the similarity is high, it means that two or more features are very similar. The highly similar features are weighted averaged into one feature, and the stored features with high similarity are deleted, and the weighted averaged features are added.
[0048] In this embodiment, the threshold of the number of stored features is set to 10. When the number of features in the tracker does not reach 10, new features are added at the end in sequence. Figure 2 , Figure 3 As shown. When there are 10 features and a new feature is to be added, a simple and quick comparison of each feature is first required. If the new feature is very close to the existing feature, that is, the two features are very similar, the new feature and the feature with the highest similarity are weighted averaged and added to the end. If the new feature is very far from the existing feature, that is, the new feature is not similar to the existing feature, the new feature is added to the end and the first feature is deleted, as shown in Figure 4 , Figure 5 , Figure 6 shown.
[0049] Step 5: Check the number of successful matches. In this embodiment, the threshold of the number of successful matches is set to 4 times.
[0050] If the number of successful matches is equal to 4, the tracker of the latent state is marked as an explicit state.
[0051] If the number of successful matches is greater than 4, the explicit state of the tracker is maintained.
[0052] If the number of successful matches is less than 4, the potential state of the tracker is maintained.
[0053] If a potential tracker is not matched for multiple times in a row (unsuccessfully matched), the potential tracker is deleted.
[0054] If the tracker in the explicit state fails to update the location information for multiple times in a row (no matching success), the tracker in the explicit state is deleted.
[0055] Step 6: Return the position information of the tracker with explicit status and the corresponding object features;
[0056] Step 7: Display the tracking results in the video.
[0057] As described in the above implementation method, this solution adopts a multi-target tracking method based on deep learning, which can successfully track multiple targets in the video for a long time and flexibly, and its effect is also better than the existing detection scheme in terms of tracking accuracy, processing speed, space occupancy, anti-interference and other aspects. It can be seen that this solution has achieved the expected purpose.
[0058] The present invention is not limited to the above-mentioned specific embodiments. The present invention extends to any new features or any new combination disclosed in this specification, as well as any new method or process steps or any new combination disclosed. If non-substantial changes or improvements made by those skilled in the art without departing from the spirit of the present invention should fall within the scope of protection of the claims of the present invention.
Claims
1. A real-time multi-target tracking method, characterized in that: include: Step 1: Detect objects in the initial frame of the video, record the location information of each object and extract the features of each detected object, and use each object in the initial frame as a potential state tracker; Step 2: Detect the subsequent frames in the video, record the position information of each object in the subsequent frames and store the features of each object; Step 3: Extract subsequent frames in sequence for data association, calculate the feature distance and IOU distance of each combination of the object in the current subsequent frame and the existing tracker, then fuse the two measurement methods of feature distance and IOU distance, modify the feature distance, and generate a feature distance matrix; Step 4: Use the modified feature distance matrix as the final metric cost matrix and use the Hungarian algorithm for matching. If the object in the current subsequent frame matches the existing tracker successfully, update the position information of the tracker and store the object features. If the match is not successful, initialize the object in the current subsequent frame as a new potential state tracker. Step 5: Check the number of successful matches. If the number of successful matches is greater than or equal to the set threshold, mark the tracker in the latent state as an explicit state and continue to maintain the state. If the number of successful matches is less than the set threshold, the potential state of the tracker will continue to be maintained; Step 6: Return the position information of the tracker with explicit status and the corresponding object features; Step 7: Display the tracking results in the video; The specific process of step 3 includes: Step 31: Calculate the feature distance and IOU distance of each combination of the object in the current subsequent frame and the existing tracker; Step 32: Fusion of two metrics. When the IOU distance is greater than a certain set threshold and the position overlap between the object in the current subsequent frame and the existing tracker is higher than a certain set threshold, a "reward mechanism" is performed, and the feature distance decreases as the overlap increases. When the IOU distance is less than a certain set threshold and the position overlap between the object in the current subsequent frame and the potential state tracker is lower than a certain set threshold or even has no overlap, a "penalty" mechanism is performed, and the feature distance increases as the overlap decreases. Step 33: Generate a feature distance matrix based on the modified feature distance.
2. A real-time multi-target tracking method according to claim 1, characterized in that: The specific process of step 2 includes: Step 21: Obtain subsequent frames by extracting frames; Step 22: Detect the subsequent frames, record the position information of each object in the subsequent frames, and store the features of each object.
3. A real-time multi-target tracking method according to claim 1, characterized in that: In step 31, if the current subsequent frame is any frame from the third frame to the last frame, the characteristic distance between the object detected in the frame and the tracker is the minimum value of multiple distances between the object and the tracker.
4. A real-time multi-target tracking method according to claim 1, characterized in that: In step 4, when storing object features, if the number of object features already stored is lower than a set threshold, then they are added for storage; if they are higher than the set threshold, the similarity between the object features to be stored and the stored object features is measured, and if the similarity is higher than a set threshold, then these object features are weighted averaged into one feature, the stored features with high similarity are deleted, and the features after weighted average are added.
5. A real-time multi-target tracking method according to claim 1, characterized in that: In step 4, if a tracker fails to match successfully for multiple consecutive times, the tracker is deleted.
Citation Information
Patent Citations
Multi-target tracking method combined with video scene feature perception
CN110660083A
Face multi-target tracking method
CN110717403A
