Vehicle multi-target intelligent dynamic fusion tracking method
Through Kalman suboptimal estimation, dynamic camera compensation and IoU and Re-ID feature fusion methods, the problem of insufficient real-time performance and generalization ability of vehicle multi-target tracking technology in complex traffic scenes is solved, and the accuracy of tracking is significantly improved. performance and robustness, suitable for intelligent transportation and autonomous driving applications.
Patent Information
- Application Number
- CN202410634493.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing vehicle multi-target tracking technology has problems with insufficient real-time performance and generalization capabilities in complex traffic scenes, especially when dealing with dynamic and diverse scenes, causing tracking accuracy and stability to be affected.
It adopts Kalman suboptimal estimation, dynamic camera compensation and IoU and Re-ID feature fusion methods, uses Kalman filter for motion modeling and state estimation, combines sparse optical flow and RANSAC algorithm for camera motion correction, and uses improved IoU and Re-ID feature association improves the robustness and accuracy of tracking.
It significantly improves the accuracy and robustness of vehicle target tracking in complex traffic scenarios, reduces the probability of mismatching, is suitable for the real-time processing needs of intelligent transportation systems and autonomous vehicles, and improves tracking performance in diverse environments.
Smart Images

Figure CN118608563A
Abstract
Description
Technical Field
[0001] The invention relates to the technical fields of computer vision, video analysis and pattern recognition, in particular to a vehicle multi-target intelligent dynamic fusion tracking method. Background Art
[0002] Multi-target tracking technology for vehicle targets plays a vital role in the fields of intelligent transportation systems (ITS), autonomous vehicles, video surveillance, and security monitoring. Traditional tracking methods, such as rule-based tracking algorithms and Kalman filters, mainly rely on the motion information and appearance features of the target, but they have limitations in dealing with complex traffic scenes, such as target occlusion, illumination changes, and camera motion. In addition, as time accumulates, the errors of traditional tracking algorithms are also prone to divergence, affecting the accuracy and stability of tracking.
[0003] The development of deep learning and data association technology has brought new solutions to vehicle multi-target tracking. Deep learning models, such as convolutional neural networks (CNNs), can automatically learn robust target feature representations from large amounts of data, while data association algorithms, such as the Hungarian algorithm and deep matching networks, can effectively solve the matching problem between multiple targets. However, existing deep learning-based tracking methods still face challenges in real-time performance and generalization capabilities, especially in dynamic and complex traffic environments. In order to improve the accuracy and robustness of vehicle multi-target tracking, researchers have proposed a hybrid tracking framework that combines motion models and deep learning features. Among them, the improved BoT-SORT algorithm effectively solves the target tracking problem in dynamic camera scenes by integrating technologies such as camera motion compensation, Kalman filter state estimation, and IoU and ReID feature fusion. Camera motion compensation can correct the target position change caused by camera motion, the Kalman filter is used to predict the target's motion state, and the IoU and ReID feature fusion combines the target's motion information and appearance features to improve the accuracy of target matching.
[0004] Nevertheless, the performance of vehicle multi-target tracking systems is still limited by the accuracy and real-time performance of prior models. For example, ReID feature extraction models are usually trained on specific datasets and may lack sufficient generalization capabilities to handle diverse scenarios in practical applications. In addition, real-time requirements also limit the complexity of the algorithm, especially when deploying high-performance tracking algorithms on resource-constrained devices.
[0005] The comparison with the prior art is as follows;
[0006] Comparative Patent 1: A three-dimensional multi-target tracking method that integrates images and laser point clouds, authorization announcement date, 2020 / 9 / 11; authorization announcement date number: CN110675431B, the invention relates to a three-dimensional multi-target tracking method that integrates images and laser point clouds, integrates the point cloud of the laser radar and the image data of the camera, gives full play to the complementary advantages between point cloud data and image data, extracts the three-dimensional spatial position information of the target, point cloud features, image features, matches the detected target with the tracking trajectory, and combines the Kalman filter to estimate the state of the tracking trajectory, so as to obtain accurate and stable three-dimensional multi-target tracking. The present invention can be used for tracking and predicting moving targets such as pedestrians and vehicles in various types of unmanned vehicles, and can also be used in security monitoring and drone ground target reconnaissance and other fields. The method includes the following steps: S1. Acquire point cloud data from a laser radar, detect the three-dimensional spatial position information of the target and extract point cloud features; S2. Acquire image data from a camera, project the three-dimensional boundary of the target onto an image plane, and extract image features of the projection area; S3. Calculate the similarity matrix of the detected target and the tracking trajectory on the point cloud three-dimensional spatial position information, point cloud features and image features, and merge the three similarity matrices; the step S3 also includes the following steps: S31. Use t to represent the frame number of the video image. When t=0, initialize each detected target to a root (x, y, z, θ, l, w, h, vx, vy, vz), where (x, y, z) is the center point of the target, l is the target S32. When t>0, firstly use the Kalman filter to predict the three-dimensional spatial position information of the trajectory of frame t-1 in frame t; S33. Calculate the similarity matrix of the three-dimensional spatial position information of the point cloud predicted by the tracking trajectory, the point cloud features and the image features, and merge the three similarity matrices; S4. Calculate the bipartite graph matching relationship between the target and the trajectory through the merged similarity matrix through the Hungarian algorithm, and perform state estimation on the tracking trajectory in combination with the Kalman filter to achieve tracking of the three-dimensional target.
[0007] Although it also involves image target tracking, this article does not use lidar point cloud data, nor does it track targets in three-dimensional space. Through the new Kalman suboptimal estimation, camera dynamic compensation and Re-ID feature library at the algorithm level and the use of KD tree data association, multi-target detection of planar vehicles at the pure visual level is achieved.
[0008] Comparative Patent 2: A multi-target tracking algorithm for automated urban public buses based on motion models, authorization announcement date, 2023 / 10 / 3; authorization announcement date number: CN116843720A, the invention relates to a multi-target tracking algorithm for automated urban public buses based on motion models, belonging to the field of intelligent vehicle technology, and mainly includes an initialization module, a prediction module, and a trajectory association module. The initialization module reads the detection file to obtain the detection frame information of each target in the current frame, divides the detection frame into a high-score detection frame and a low-score detection frame according to the threshold, and sends it to the trajectory association module; the prediction module includes setting corresponding adaptive state transfer matrices for the trajectories in the previous frame, and obtaining the predicted boundary frame and covariance matrix of the trajectory in the previous frame in the current frame through Kalman filtering; the trajectory association module calculates the intersection and union ratio of the predicted boundary frame after correction of the current frame with the high-score detection frame and the low-score detection frame. The present invention improves the tracking effect of the multi-target tracking algorithm on automated urban public buses by combining Kalman filtering with an adaptive state transfer matrix and camera motion compensation. Specifically, the method includes the following steps: Step 1: an initialization module, which is used to read the detection file generated by the detector, obtain the detection frame information of each target in the current frame, and divide the detection frame into a high-score detection frame and a low-score detection frame according to a threshold value, and send the detection frame into a trajectory association module; Step 2: a prediction module, which includes setting corresponding adaptive state transfer matrices for the trajectories in the previous frame, obtaining the predicted bounding box and covariance matrix of the trajectory in the previous frame in the current frame through Kalman filtering, using camera motion compensation to perform image registration of two adjacent frames, obtaining the affine transformation matrix of the two adjacent frames through image registration, splitting the affine transformation matrix into two parts, namely, scaling rotation and conversion, combining these two parts with the predicted bounding box and covariance matrix obtained by Kalman filtering, and correcting the predicted bounding box and covariance matrix that are more in line with the actual position of the target; Step 3: a trajectory association module, which calculates the intersection and union ratio of the corrected predicted bounding box of the current frame with the high-score detection frame and the low-score detection frame in turn, and the predicted bounding box and the detection frame with high overlap and greater than the threshold are put into the Hungarian algorithm for data association, and the detection frame successfully associated with the corrected predicted bounding box is considered to be the trajectory in the current frame.
[0009] Although it also involves Kalman filtering and trajectory association, this paper uses a more effective Kalman suboptimal estimation and optimizes the noise measurement matrix and the measurement noise matrix, uses dynamic camera compensation technology, and uses Re-ID features to solve the ID switching problem caused by target occlusion and re-entry. The trajectory association uses IoU and Re-ID fusion to obtain the association result, and uses the KD tree data structure to maintain the Re-ID feature library. Summary of the invention
[0010] In order to solve the above technical problems, the present invention proposes a vehicle multi-target intelligent dynamic fusion tracking method, which aims to provide a robust, accurate and efficient vehicle tracking solution by optimizing data association strategy, introducing real-time performance optimization technology and improving the generalization ability of the model.
[0011] To achieve the above objectives, the technical solutions adopted by the present invention are: using Kalman suboptimal estimation to improve the fit between the width and height of the bounding box and the target; using dynamic camera compensation to correct the error caused by camera motion; and using the feature association method of IoU and Re-ID fusion to reduce the probability of ID switching.
[0012] The vehicle multi-target intelligent dynamic fusion tracking method includes the following steps:
[0013] (1) Use an object detector to perform object detection on each frame of the video sequence, obtain the position and size information of the vehicle target, and obtain a set of detection results;
[0014] (2) The Kalman filter is used to model the motion and state estimation of the vehicle target, and the octet method is used to represent it:
[0015]
[0016] where x c (k), y c (k), w(k), h(k) represent the horizontal and vertical coordinates of the current target center and the width and height of the target frame respectively. The horizontal and vertical coordinates of the center predicted for the next frame and the width and height of the target box, the measurement vector of the kth frame is:
[0017]
[0018] in, Represents the measured values of the two-dimensional coordinates of the target center on the image plane, z w (k), z h (k) represent the measured values of the width and height of the target respectively;
[0019] (3) Use camera motion compensation techniques to estimate the camera motion through image registration and correct the Kalman filter prediction to adapt to dynamic camera scenes;
[0020] (4) Associate the detection result of the current frame with the existing tracking trajectory, and use the improved IoU and Re-ID feature fusion method to enhance the robustness of the association;
[0021] (5) Solve the global assignment problem, associate detected vehicle targets with existing trajectories, and update or maintain tracking trajectories.
[0022] As a further improvement of the present invention, in step (2), a new noise covariance vector Q is reconstructed in the modeling and state estimation of the vehicle target motion using a Kalman filter. k and the measurement noise covariance R k :
[0023]
[0024] Among them, σ p =0.05,σ v =0.00625,σ m =0.05, Q k It is used to quantify the uncertainty in the state prediction step. Each element in the matrix represents the prediction uncertainty of the target width, height, width change rate and height change rate. k It is used to quantify the uncertainty introduced by the measurement process in the state update step. The elements in the matrix represent the uncertainty of the target width and height measurement respectively.
[0025] As a further improvement of the present invention, the camera motion compensation technology in step (3) includes the following steps:
[0026] (3-1) Extract image key points from two consecutive frames of a video sequence;
[0027] (3-2) Use sparse optical flow algorithm to track key points and estimate the motion of feature points between two frames;
[0028] (3-3) Remove outliers caused by dynamic vehicle targets by using methods such as local outlier factors to more accurately estimate the rigid body motion of the background;
[0029] (3-4) Use the RANSAC algorithm to solve the affine transformation matrix from the tracked point pairs
[0030]
[0031] Among them, a 11, , a 22 represents the scaling factor, a 12, , a 21 represents the rotation factor, a 13, , a 23 represents the translation factor;
[0032] (3-5) Constructing the transformation matrix and translation vectors Used to apply an affine transformation to the state vector of the Kalman filter:
[0033]
[0034] in, is the rotation part of the affine matrix; use the transformation matrix to update the predicted state vector of the Kalman filter
[0035]
[0036] And update the prediction covariance matrix P of the Kalman filter k|k-1 :
[0037]
[0038] (3-6) Using the calculated Update the parameters of the Kalman filter:
[0039]
[0040] Among them, K k is the updated Kalman gain, To use the observed value z k The updated state estimate vector, P k|k is the updated estimated error covariance.
[0041] As a further improvement of the present invention, the improved IoU and R are used in step (4). e The -ID feature fusion method to associate the detection results of the current frame with the existing tracking trajectory includes the following steps:
[0042] (4-1) Calculate the IoU distance diou between the predicted tracking bounding box and the target bounding box detected in the current frame i,j :
[0043] diou i,j =1-IoU(i,j)
[0044] Where i is the predicted track index and j is the detected object index in the current frame.
[0045] (4-2) For each detection and each track in the current frame, use the feature extraction network to extract R e -ID features and calculate the cosine distance between them
[0046]
[0047] Among them, θ emb is the appearance distance threshold, θ iou is the IoU distance threshold,
[0048] (4-3) Using the minimum strategy, the IoU distance and the adjusted appearance distance are combined to form the final cost matrix Ci,j :
[0049]
[0050] (4-4) The Hungarian algorithm is used to minimize the sum of the cost matrix C, thereby completing the optimal association between the current frame detection and the existing tracking, and based on the association result, the state of the matching tracking is updated, including the position, size and appearance features. In the present invention, the Re-ID feature extraction network used is an improved lightweight network, which aims to extract high-dimensional features that can characterize the appearance of the target from the image of the target and save them in the feature library, and then compare the similarity of these features within a set life cycle to identify the target, use the KD tree to store the extracted Re-ID features, and maintain the KD tree index through cosine similarity, Euclidean distance and other scales to achieve faster feature matching.
[0051] Beneficial effects: The vehicle multi-target intelligent dynamic fusion tracking method of the present invention significantly improves the accuracy and robustness of vehicle target tracking in complex traffic scenarios by integrating the motion prediction of the Kalman filter, the joint matching of IoU and ReID features, and the camera motion compensation. The method is particularly suitable for the fields of intelligent transportation systems, self-driving cars, video surveillance and security monitoring, and can effectively deal with problems such as target occlusion, lighting changes, camera motion and multi-target interaction. At the same time, the algorithm optimization meets the needs of real-time processing and is suitable for fast-response application scenarios. In addition, the modular design of the method is easy to integrate and expand, improves the tracking performance in a variety of traffic environments, and reduces the probability of mismatching, which is of great significance for improving the safety and efficiency of intelligent transportation systems and self-driving cars. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a flow chart of the method disclosed in the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific implementation examples of the present invention are described below in conjunction with the accompanying drawings.
[0054] The present invention discloses a flow chart as follows Figure 1 A vehicle multi-target intelligent dynamic fusion tracking method shown includes the following steps:
[0055] Step 1: Use the target detector to perform target detection on each frame of the video sequence, obtain the position and size information of the vehicle target, and obtain a set of detection results.
[0056] Step 2: Use the Kalman filter to model the motion and state estimation of the vehicle target, using the octet method to represent:
[0057]
[0058] where x c (k), y c (k), w(k), h(k) represent the horizontal and vertical coordinates of the current target center and the width and height of the target frame respectively. The horizontal and vertical coordinates of the center and the width and height of the target box predicted for the next frame. The measurement vector of the kth frame is:
[0059]
[0060] in, Represents the measured values of the two-dimensional coordinates of the target center on the image plane, z w (k), z h (k) represent the measured values of the width and height of the target respectively;
[0061] The new noise covariance vector Q is reconstructed k and the measurement noise covariance R k :
[0062]
[0063] Among them, σ p =0.05,σ v =0.00625,σ m =0.05, Q k It is used to quantify the uncertainty in the state prediction step. Each element in the matrix represents the prediction uncertainty of the target width, height, width change rate and height change rate. k It is used to quantify the uncertainty introduced by the measurement process in the state update step. The elements in the matrix represent the uncertainty of the target width and height measurement respectively.
[0064] Step 3: Use camera motion compensation techniques to estimate the camera motion through image registration and correct the Kalman filter prediction to adapt to dynamic camera scenes.
[0065] The construction of camera motion compensation technology includes the following steps:
[0066] (3-1) Extract image key points from two consecutive frames of a video sequence;
[0067] (3-2) Use sparse optical flow algorithm to track key points and estimate the motion of feature points between two frames;
[0068] (3-3) Remove outliers caused by dynamic vehicle targets by using methods such as local outlier factors to more accurately estimate the rigid body motion of the background;
[0069] (3-4) Use the RANSAC algorithm to solve the affine transformation matrix from the tracked point pairs
[0070]
[0071] Among them, a 11, , a 22 represents the scaling factor, a 12, , a 21 represents the rotation factor, a 13, , a 23 Represents the translation factor.
[0072] (3-5) Constructing the transformation matrix and translation vectors Used to apply an affine transformation to the state vector of the Kalman filter:
[0073]
[0074] in, is the rotation part of the affine matrix; use the transformation matrix to update the predicted state vector of the Kalman filter
[0075]
[0076] And update the prediction covariance matrix P of the Kalman filter k|k-1 :
[0077]
[0078] (3-6) Using the calculated Update the parameters of the Kalman filter:
[0079]
[0080] Among them, K k is the updated Kalman gain, To use the observed value z k The updated state estimate vector, P k|k is the updated estimated error covariance.
[0081] Step 4: Associate the detection result of the current frame with the existing tracking trajectory, and use the improved IoU and Re-ID feature fusion method to enhance the robustness of the association;
[0082] The improved association of IoU and Re-ID feature fusion includes the following steps:
[0083] (4-1) Calculate the IoU distance diou between the predicted tracking bounding box and the target bounding box detected in the current framei,j :
[0084] diou i,j =1-IoU(i,j)
[0085] Where i is the predicted track index and j is the detected object index in the current frame.
[0086] (4-2) For each detection and each track in the current frame, use the feature extraction network to extract the Re-ID features and calculate the cosine distance between them
[0087]
[0088] Among them, θ emb is the appearance distance threshold, θ iou is the IoU distance threshold,
[0089] The Re-ID feature extraction network is shown in the following table;
[0090]
[0091] (4-3) Using the minimum strategy, the IoU distance and the adjusted appearance distance are combined to form the final cost matrix C i,j :
[0092]
[0093] (4-4) Use the Hungarian algorithm to minimize the sum of the cost matrix C to complete the optimal association between the current frame detection and the existing tracking, and based on the association results, update the status of the matching tracking, including position, size, and appearance features.
[0094] Step 5: Solve the global assignment problem, associate the detected vehicle targets with existing trajectories, and update or maintain the tracking trajectories.
[0095] The above description is only a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any modification or equivalent change made based on the technical essence of the present invention still falls within the scope of protection required by the present invention.
Claims
1. Vehicle multi-target intelligent dynamic fusion tracking method, characterized in that: The steps include: (1) Use an object detector to perform object detection on each frame of the video sequence, obtain the position and size information of the vehicle target, and obtain a set of detection results; (2) The Kalman filter is used to model the motion and state estimation of the vehicle target, and the octet method is used to represent it: where x c (k),y c (k), w(k), h(k) represent the horizontal and vertical coordinates of the current target center and the width and height of the target frame respectively. The horizontal and vertical coordinates of the center predicted for the next frame and the width and height of the target box, the measurement vector of the kth frame is: in, Represent the measured values of the two-dimensional coordinates of the target center on the image plane, Represent the measurement values of the width and height of the target respectively; (3) Use camera motion compensation techniques to estimate the camera motion through image registration and correct the Kalman filter prediction to adapt to dynamic camera scenes; (4) Associate the detection result of the current frame with the existing tracking trajectory, and use the improved IoU and Re-ID feature fusion method to enhance the robustness of the association; (5) Solve the global assignment problem, associate detected vehicle targets with existing trajectories, and update or maintain tracking trajectories.
2. The vehicle multi-target intelligent dynamic fusion tracking method according to claim 1 is characterized by: In step (2), the Kalman filter is used to model the motion of the vehicle target and reconstruct a new noise covariance vector Q in state estimation. k and the measurement noise covariance R k : Among them, σ p =0.05,σ v =0.00625,σ m =0.05, Q k It is used to quantify the uncertainty in the state prediction step. Each element in the matrix represents the prediction uncertainty of the target width, height, width change rate and height change rate. k It is used to quantify the uncertainty introduced by the measurement process in the state update step. The elements in the matrix represent the uncertainty of the target width and height measurement respectively.
3. The vehicle multi-target intelligent dynamic fusion tracking method according to claim 1 is characterized by: The camera motion compensation technique in step (3) includes the following steps: (3-1) Extract image key points from two consecutive frames of a video sequence; (3-2) Use sparse optical flow algorithm to track key points and estimate the motion of feature points between two frames; (3-3) Remove outliers caused by dynamic vehicle targets by using methods such as local outlier factors to more accurately estimate the rigid body motion of the background; (3-4) Use the RANSAC algorithm to solve the affine transformation matrix from the tracked point pairs Among them, a 11, ,a 22 represents the scaling factor, a 12, ,a 21 represents the rotation factor, a 13, ,a 23 represents the translation factor; (3-5) Constructing the transformation matrix and translation vectors Used to apply an affine transformation to the state vector of the Kalman filter: in, is the rotation part of the affine matrix; use the transformation matrix to update the predicted state vector of the Kalman filter And update the prediction covariance matrix P of the Kalman filter k|k-1 : (3-6) Using the calculated Update the parameters of the Kalman filter: Among them, K k is the updated Kalman gain, To use the observed value z k The updated state estimate vector, P k|k is the updated estimated error covariance.
4. The vehicle multi-target intelligent dynamic fusion tracking method according to claim 1 is characterized by: In step (4), the improved IoU and Re-ID feature fusion method is used to associate the detection result of the current frame with the existing tracking trajectory, including the following steps: (4-1) Calculate the IoU distance diou between the predicted tracking bounding box and the target bounding box detected in the current frame i,j : God i,j =1-IoU(i,j) Where i is the predicted track index and j is the detected object index in the current frame. (4-2) For each detection and each track in the current frame, use the feature extraction network to extract the Re-ID features and calculate the cosine distance between them Among them, θ emb is the appearance distance threshold, θ iou is the IoU distance threshold, (4-3) Using the minimum strategy, the IoU distance and the adjusted appearance distance are combined to form the final cost matrix C i,j : (4-4) Use the Hungarian algorithm to minimize the sum of the cost matrix C to complete the optimal association between the current frame detection and the existing tracking, and based on the association results, update the status of the matching tracking, including position, size, and appearance features.
Citation Information
Patent Citations
A 3D multi-target tracking method that fuses images and laser point clouds
CN110675431B
Automatic urban public bus multi-target tracking algorithm based on motion model
CN116843720A
Anchor-free multi-target tracking method for enhancing ID re-identification
CN113971688A
Multi-target tracking method, equipment and medium
CN114638855A
Visual multi-target tracking method of fusion normal form
CN116823878A
Cited By
3D multi-target tracking method for improving Kalman filtering based on number of scene targets
CN118864542A
Global positioning method based on semantic distribution feature retrieval and semantic topological histogram
CN119741376A
Multi-target tracking method and device based on diffusion model
CN119941785A
Railway track foreign matter detection method based on millimeter wave radar sensor and camera sensor
CN120028786A
Night vehicle cross-camera trajectory tracking method and device
CN120471961A
