A method for multi-target pedestrian tracking in dense scenes combined with head tracking
By combining the head tracking method in dense scenes, using head and whole body detectors to generate bounding boxes, and performing trajectory matching through particle filters and the Hungarian algorithm, the occlusion problem in dense scenes is solved and the accuracy and accuracy of multi-target tracking are improved. reliability.
Patent Information
- Application Number
- CN202210513751.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-01-04
- Filing Date
- 2022-05-12
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-05-12
AI Technical Summary
In dense scenes, multi-target tracking algorithms are difficult to effectively handle severe and frequent occlusion problems, resulting in unstable and lost target tracking. The existing system cannot effectively judge when to terminate and restart the target trajectory, and lacks a guidance method to reacquire the target.
Using a method combined with head tracking, a head detector and a full-body detector are used to generate head and full-body bounding boxes in dense scenes. The particle filter and Hungarian algorithm are used for trajectory matching and confirmation to reduce the negative impact of occlusion.
It improves the accuracy of multi-target tracking in dense scenes, reduces the problems of false negatives and false positives, enhances the performance of the tracker in dense scenes, can effectively handle severe occlusions, and improves the reliability of target tracking.
Smart Images

Figure CN114926859B_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the field of multi-target tracking of artificial intelligence, and in particular to a method for multi-target tracking of pedestrians in dense scenes based on deep learning and combined with head tracking. [Background technology]
[0002] The Multiple Object Tracking (MOT) algorithm is a general algorithm that can be applied in various fields of vision, and is commonly used in security, autonomous driving, and medical fields. Tracking By Detection (TDB) is a paradigm in the MOT field. TDB has the characteristics of high accuracy, high speed, and real-time performance, and is the mainstream method in the current field of pedestrian multi-target tracking. DeepSort is a multi-target tracking algorithm that follows the TDB paradigm: before running DeepSort, the detector must first be used to detect the target of interest in each frame of the video, and then the Kalman filter, Hungarian algorithm, feature extractor and other components are used to comprehensively consider the motion trajectory, appearance similarity, motion similarity and other information of the target bounding box, and calculate the motion trajectory of the target according to the process of prediction, matching, and updating. DeepSort runs fast, can meet real-time requirements, and has high accuracy. Therefore, it is one of the most widely used MOT algorithms in the industry. Particle filter is another multi-target tracking method. It establishes a set of random samples propagating in the state space, uses the mean of the samples to find the target in the future, and then obtains the minimum variance estimate of the system state. These samples are figuratively called "particles". Particle filter can be divided into four parts: ① target initialization ② target search ③ weighted decision ④ target resampling. Particle filter obtains the motion trajectory of the target in each frame in the order of ①->②->③->④->②->③->④……at runtime.
[0003] In the process of implementing multi-target tracking algorithms, target occlusion has always been a headache for researchers. Occlusion is manifested as the loss of target information, and the key to the tracking algorithm is to search for enough target information and determine the location of the target, so occlusion poses a great challenge to the reliability of target tracking, which may lead to unstable tracking or even loss of the target. Compared with general multi-target tracking scenarios, the large number of targets in dense scenes leads to more serious mutual occlusion between targets, so the frequency and degree of target occlusion in dense scenes are also more serious. How to effectively deal with occlusion, especially severe and frequent occlusion in dense scenes, has always been a difficulty in multi-target tracking. At present, most MOT systems cannot handle more serious occlusion problems, nor can they provide standards to determine when to terminate and when to restart the target's trajectory, and there is no corresponding guidance method to reacquire the target when the target is lost. [Summary of the invention]
[0004] The purpose of the present invention is to solve the problem of severe and frequent occlusion of targets in dense scenes, and reduce the negative impact of target occlusion on multi-target tracking in dense scenes. Taking into account that the head of a pedestrian is the least likely to be occluded on the pedestrian's body and is a body part that can be effectively tracked, the present invention proposes an effective multi-target tracking method combined with head tracking, which is very effective in performing multi-target tracking tasks in dense scenes.
[0005] Technical solution of the present invention
[0006] A method for tracking multiple pedestrians in a dense scene combined with head tracking. The method processes a video shot in a densely populated area with multiple pedestrians walking in the video. The method operates on each frame of the video according to the following steps:
[0007] Step 1: Generation of head trajectory and full body bounding box;
[0008] Taking the original video frame as the input of the tracker, a head tracker is used to generate the head trajectory with the head bounding box when the pedestrian moves, and a full body detector is used to generate the full body bounding box.
[0009] Step 1.1: The head tracking process conforms to the TrackingByDetection paradigm, that is, the head detector is first used to detect the pedestrian's head bounding box in the image, and then the head tracking task is completed based on the detection results. The process of the head detector is as follows:
[0010] 1) Use Resnet50 with feature pyramid model and context prediction module (ContextSensitivePredictionModule) to extract features from the image;
[0011] 2) TransposeConvolution is then used to increase the spatial resolution of the feature map;
[0012] 3) Inspired by the design structure of FasterRCNN, the head feature information extracted from the image in step 1) is input into the region extraction network, followed by the category prediction module and the bounding box prediction module, and finally the pedestrian head bounding box is output;
[0013] Step 1.2: Next, track the pedestrian's head based on the detection results of the head detector. The head tracker is improved from the particle filter (ParticleFilter). The head tracking process is as follows:
[0014] 1) Initialize the trajectory at the beginning of the video and use the regression head in the head detector to adjust the position of each particle in the current frame based on the position of the bounding box in the previous frame;
[0015] 2) Next, resampling is used to replace particles with low importance to reduce the impact of degradation;
[0016] 3) Finally, the Constant Velocity Assumption model is used to restore some trajectories that have been set to an inactive state.
[0017] Step 1.3: The process of generating a full-body bounding box using a full-body detector is as follows:
[0018] 1) Based on Faster-RCNN, two 1024-dimensional fully connected layers are added, and the instance data of two sets of bounding boxes are obtained by the EMD (Earth Mover's Distance Loss) loss function.
[0019] 2) A refinement module is used to fine-tune the output results to enhance the generalization ability of the full-body detector in dense scenes.
[0020] Step 2: Determine whether the head bounding box and the whole body bounding box belong to the same target, i.e., a pedestrian;
[0021] 1) A new bounding box similarity measurement method, Intersection Over Containment (IOC), is used to calculate the degree of association between the head bounding box and the whole body bounding box in the current frame. IOC reflects the degree of correspondence between the head bounding box and the body bounding box by calculating the degree to which the head bounding box is contained in the body bounding box. The specific calculation method is: the area of the intersection of the head bounding box and the whole body bounding box is divided by the area of the entire body bounding box. According to the properties of IOC, its value range is [0,1].
[0022] 2) The calculation result of IOC is input into the Hungarian algorithm. The Hungarian algorithm can associate the head bounding box and the whole body bounding box belonging to the same target to obtain the matching result of the head bounding box and the whole body bounding box.
[0023] Step 3: Final confirmation of the whole body movement trajectory;
[0024] According to the matching result of step 2, the head bounding box in the head trajectory obtained in step 1 is replaced with the whole body bounding box, and the final output of the present invention is the whole body motion trajectory of the pedestrian including the whole body bounding box of the pedestrian.
[0025] Advantages and positive effects of the present invention
[0026] The head is the highest part of the pedestrian's body and is the least likely to be blocked. This is reflected in the following: In dense scenes, the head detector can detect a large number of targets that the body detector cannot detect: given the same image as the input, the head detector detects 64 pedestrian head bounding boxes, while the full body detector can only detect 46 of the 71 targets. The specific effect is as follows: Figure 1 Another point is that compared to the entire body of a pedestrian, the head is smaller in size, which means that even if the head is blocked in some special cases, due to its small size, the head information will soon reappear in the picture, and the tracker can often restore the trajectory of the short-term blocked target to a certain extent. Therefore, using head tracking instead of body tracking in dense scenes can reduce the negative impact caused by severe occlusion to a considerable extent.
[0027] In order to solve the problem of poor performance of multi-target trackers in dense places, and taking into account that the head of a pedestrian is more suitable as a tracking object for the MOT task in a dense scene, the present invention proposes a novel method for multi-target tracking of pedestrians in a dense scene combined with head tracking. Based on the obtained head motion trajectory, the present invention matches the head bounding box with the whole body bounding box, and finally replaces the head bounding box in the head trajectory with the whole body bounding box according to the matching result. On the basis of ensuring the tracking accuracy, the present invention effectively reduces the problems of missed reports and false alarms caused by occlusion, and improves the actual performance of the multi-target tracker in dense scenes. The present invention can perform multi-target tracking tasks in places and venues with dense traffic, such as airports, stations, stadiums, shopping centers, intersections, etc., and has certain practical value.
Brief Description of the Drawings
[0028] Figure 1 This is a comparison of the performance of the head detector and the body detector in dense scenes. The head detector detects 64 pedestrian head bounding boxes, while the full body detector can only detect 46 of the 71 targets;
[0029] Figure 2 It is a structural diagram of the overall network of the present invention, and the operations shown in the figure are performed on each frame of the tracking video.
[0030] Figure 3 It is a structural diagram of the head detector in the present invention;
[0031] Figure 4 is a structural diagram of a whole-body detector, wherein (a) is a structural diagram of the whole-body detector, and (b) is a structural diagram of a refined model part of the whole-body detector;
[0032] Figure 5 It is the classic structure of a bipartite graph: X and Y are two point sets, each point set has several endpoints, and the line between the endpoints represents the weight between the two endpoints;
[0033] Figure 6 It includes the definitions of IOC and IOU (Intersection Over Union), and compares the two.
[0034] Figure 7 It is a comparison chart of the present invention and various multi-target tracking algorithms, wherein “↑” indicates that the higher the index is, the better, and “↓” indicates that the lower the index is, the better. [Specific implementation method]
[0035] Example
[0036] A method for tracking pedestrians in dense scenes combined with head tracking. The input of the invention is a video recording of pedestrians walking recorded by a fixed camera. The invention consists of three parts. The overall structure is shown in the figure. Figure 2 As shown, the following "Step 1", "Step 2", and "Step 3" describe in detail the steps for each frame of the video:
[0037] Step 1: Generation of head trajectory and full body bounding box;
[0038] A head tracker and a full body detector are used to generate the head trajectory (including the head bounding box) and the full body bounding box of the pedestrian when they are moving. The design of the head tracker follows the TDB paradigm and consists of a head detector and a head tracker. The full body detector is improved on the basis of FasterRCNN. Next, the head tracker and the full body detector in the present invention are introduced separately.
[0039] 1.1. The overall structure of the head detector is as follows Figure 3 As shown. The head detector of the present invention is an end-to-end two-level detector, which consists of three functional modules. First, Resnet50 is used as the backbone network, and FPN is used to extract a multi-scale model. Considering that the head is often easily disturbed by irrelevant information in dense scenes, a context prediction module (ContextSensitivePredictionModule) is added on the original basis. Secondly, in order to improve the spatial resolution of the feature map, we performed a transpose convolution operation on the features of all pyramid levels. Finally, we used the region proposal network (RegionProposalNetwork) to generate target proposals, and used regression and classification heads to provide position offsets and confidence scores, respectively.
[0040] 1.2. Input the output result of head detection in 1.1 into the head tracker. The head tracker is improved from the particle filter. The specific execution process is as follows:
[0041] The trajectory is initialized at the beginning of the video, and a new trajectory is initialized at the bounding box that cannot match the existing trajectory. The expression of the initialized trajectory particle is:
[0042]
[0043] Where (x c ,y c ,w,h) respectively represent the center coordinates of the particle in the x-axis direction, the center coordinates in the y-axis direction, the width, and the height; and the item with “·” represents the next prediction of the particle.
[0044] For subsequent video frames, a region of interest pooling operation is performed on the feature map of that frame, a bounding box regression is performed on the head bounding box to obtain the position where it appeared in the previous frame, and the respective foreground boxes are scored according to the weight of their regression heads. The predicted position of the track is determined by the weighted average of the particles:
[0045]
[0046] in represents the prediction of the kth trajectory in the tth frame; M is the number of particles; represents the i-th particle associated with the k-th trajectory in the t-th frame; further, express The weight of .
[0047] Particle filtering itself has the problem of degradation, so we use resampling to replace particles with low importance. When the number of particles with important influence on the position of the regression head reaches the threshold , the particle is resampled.
[0048]
[0049] in, M. The meaning of the expression has been given above and will not be repeated here.
[0050] When the score of the estimated state s of a track is lower than the threshold μ, the track is set to an inactive state. The next position of these tracks is estimated according to the constant velocity assumption model (ConstantVelocityAssumption). If the position of the new track has a high similarity with the detection result, the tracking of these tracks is resumed. The similarity C is calculated as:
[0051]
[0052] Where α and β are hyperparameters representing weights, IOU(·) represents the calculation of the IOU value between two bounding boxes, and d 1 (·) represents the Bhattacharyya distance between corresponding color histograms in the HueSaturationValue space. denote the i-th inactive trajectory and the j-th newly initialized trajectory in the t-th frame, respectively. Once a trajectory is re-identified, we reinitialize the particles around its new position.
[0053] 1.3. The overall structure of the whole body detector is as follows Figure 4In the present invention, the whole body detector needs to be competent for the task of performing target detection in dense scenes. However, the actual situation is that the targets with serious overlap in dense scenes are difficult to process separately. Therefore, several bounding boxes with high IOU are fused together. The fused sample G(b i ) is described as:
[0054]
[0055] where b i Indicates the proposal box; g i represents the ground-truth bounding box; represents the set of all true bounding boxes; θ represents the threshold for IOU calculation.
[0056] In the present invention, the representation of the i-th proposal frame is (c i ,l i ), where c i represents the target category of the proposal box, l i Indicates the relative coordinates of the proposal box. For each frame of the picture, there are often multiple proposal boxes, so the instance prediction of each frame of the picture consists of a proposal box set P(b i )express:
[0057]
[0058] Where K is a preset constant, indicating that there are at most K targets in one frame of image.
[0059] Loss Function The significance is to reduce the prediction set P(b i ) and the true bounding box set G(b i ), the loss function used in the present invention is expressed as follows:
[0060]
[0061] Where π represents an exact sequence with a total of K items, and the value of the kth item in the sequence is the value k; and This has been given above and will not be repeated here; Indicates the πth k A ground-truth bounding box; and They represent the classification loss function and regression loss function respectively.
[0062] Each fused sample contains several bounding boxes, which makes the predicted result contain more bounding boxes, which increases the risk of false positives. Therefore, a supplementary refinement module is added, which is determined by the quality of the output result. The structure of the refinement module is as follows: Figure 4 As shown in (b), it takes the prediction as input and combines it with the proposal box to correct the wrong prediction due to fusion.
[0063] Step 2: Determine whether the head bounding box and the whole body bounding box belong to the same target, i.e., a pedestrian;
[0064] The head bounding box and the whole body bounding box obtained in step 1 can be regarded as a bipartite graph. A bipartite graph is a special type of graph that can be divided into two parts. The points in each part are not connected to each other. Figure 5 It is a typical bipartite graph. The head bounding box and the whole body bounding box constitute two point sets of the bipartite graph respectively, and the weight between the two points is obtained by the IOC calculation result between the head bounding box and the whole body bounding box representing the two points.
[0065] IOC reflects the situation that the pedestrian's head bounding box is included in the whole body bounding box. It is calculated as follows: the area of the intersection of the head bounding box and the whole body bounding box divided by the area of the entire body bounding box. According to the properties of IOC, its value range is [0,1]. The calculation method of IOC and IOU is slightly different. The difference is that IOC divides the area of the larger bounding box (the whole body bounding box), while IOU divides the area of the intersection of the two bounding boxes. Figure 6 The characteristics of both are demonstrated from a visual perspective.
[0066] The bipartite graph constructed above is input into the Hungarian algorithm. As a distribution algorithm, the Hungarian algorithm completes the matching of the target (pedestrian) head bounding box and the whole body bounding box.
[0067] Step 3: Final confirmation of the whole body movement trajectory;
[0068] According to the matching of the head bounding box and the whole body bounding box in step 2, the head bounding box in the head motion trajectory in step 1 is replaced with the body bounding box obtained in step 1. The body bounding box that has no matching head bounding box and the head bounding box that has no matching body bounding box will be directly discarded.
[0069] We have conducted corresponding experiments to verify the practical effects of the present invention, and the specific contents of the experiments are as follows.
[0070] MOT Challenge (https: / / motchallenge.net / ) is a very influential competition in the field of multi-target tracking. Since MOT Challenge released its first multi-target tracking dataset in 2015, many papers on participating projects have been included in the top computer vision conferences every year. Currently, most papers on pedestrian multi-target tracking also use several of these projects to complete their experiments. MOT Challenge mainly focuses on multi-target pedestrian tracking. The video resolution is mostly 1920*1080 and lasts for about one minute. Most of the targets in the video are often occluded. Its latest released projects, such as MOT20 and HT21, belong to multi-target tracking in dense scenes. The number of targets is huge, and the frequency and degree of occlusion are more frequent.
[0071] The experimental part of the present invention uses the MOT20 dataset in the MOT Challenge as a training set and a test set. MOT20 is a dataset about multi-target pedestrian tracking in dense scenes, which is divided into a training set and a test set: the training set has 4 video sequences, a total of 8931 frames of pictures lasting 357 seconds, a total number of targets of 1336920, and an average of 149.7 targets per frame; the test set has 4 video sequences, a total of 4479 frames of pictures lasting 178 seconds, a total number of targets of 765465, and an average of 170.9 targets per frame. The video was shot in places with dense pedestrians, such as squares, stations, and streets. Some were shot during the day and at night. The rich scene elements can more fully demonstrate the performance of the tracker.
[0072] MOTA (Multiple Object Tracking Accuracy, sometimes also called Clear) is the most common evaluation indicator in the MOT field. This indicator combines factors such as missed detection, false detection, and target ID exchange during the tracking process to comprehensively reflect the tracking quality of the tracker. The higher the value, the better the tracking effect. The calculation method of MOTA is as follows:
[0073]
[0074] Among them, FP (False Positive, negative samples predicted as positive by the model) indicates missed detection in the output results; FN (False Negative, positive samples predicted as negative by the model) indicates misdetection in the output results; IDs (ID Switch) indicates the phenomenon of track ID swapping in the output results, which reflects the stability of the tracking results of the tracker; gt (Ground Truth, true result) is the true target manually annotated; ∑ t(·) represents the total number of times the corresponding phenomenon appears in a video sequence with a total number of frames t.
[0075] IDF1 (Identification F-Score) refers to the F-score of pedestrian ID recognition in each pedestrian frame, which reflects the ratio of correctly identified detections to the average number of true and calculated detections. MOTA focuses on whether the tracked trajectory exists, ignoring the ID characteristics of multiple targets. The existence of IDF1 makes up for the shortcomings of MOTA in this regard. The calculation method of IDF1 is as follows:
[0076]
[0077] Among them, IDTP represents the number of positive samples in the output results where the target ID is predicted as positive by the model, IDFP represents the number of negative samples in the output results where the target ID is predicted as positive by the model, and IDFN represents the number of positive samples in the output results where the target ID is predicted as negative by the model.
[0078] The combined use of MOTA and IDF1 can make up for each other's shortcomings and fully demonstrate the quality of the output results of the multi-target tracker.
[0079] We compare the actual performance of the present invention with several other multi-target trackers on the MOT20 dataset. The experimental results are as follows: Figure 7 As shown. Figure 7 It can be seen that the present invention has achieved good results in both MOTA and IDF1, the two most important indicators. The present invention has a significant improvement over the existing methods when processing multi-target pedestrian tracking tasks in densely populated scenes. When performing multi-target tracking tasks in densely populated places such as stations, intersections, stadiums, hospitals, etc., the application of this technology can provide great help.
Claims
1. A method for tracking multiple pedestrians in a dense scene combined with head tracking. The method processes a video shot in a densely populated area with multiple pedestrians walking in the video. The method operates on each frame of the video according to the following steps: Step 1: Generation of head trajectory and full body bounding box; Taking the original video frame as the input of the tracker, a head tracker and a full body detector are used to generate a head motion trajectory with a head bounding box and a full body bounding box respectively when the pedestrian moves; Step 2: Determine whether the head bounding box and the whole body bounding box belong to the same target, i.e., a pedestrian; A novel bounding box similarity measurement method including IOC is used to calculate the correlation between the head bounding box and the whole body bounding box in the current frame. The calculation result of IOC is input into the Hungarian algorithm. After further calculation, the Hungarian algorithm obtains the matching result of the head bounding box and the whole body bounding box. The method of using IOC to calculate the degree of association between the head bounding box and the whole body bounding box in the current frame is that IOC reflects the degree of correspondence between the head bounding box and the body bounding box by calculating the degree to which the head bounding box is contained in the body bounding box. The specific calculation method is: the area of the intersection of the head bounding box and the whole body bounding box is divided by the area of the entire whole body bounding box. According to the properties of IOC, its value range is [0,1]; the calculation result of IOC is input into the Hungarian algorithm, so that the head bounding box and the whole body bounding box belonging to the same target can be associated; Step 3: Final confirmation of the whole body movement trajectory; According to the matching result of step 2, the head bounding box in the head trajectory obtained in step 1 is replaced with the whole body bounding box. The result is the whole body motion trajectory of the pedestrian including the whole body bounding box of the pedestrian, which is used as the final output.
2. The method for tracking multiple pedestrians in dense scenes combined with head tracking according to claim 1, characterized in that: The method described in step 1 to generate head tracks with head bounding boxes and full body bounding boxes using the head tracker and full body detector respectively is as follows: Step 1.1: The head tracking process conforms to the detection-first-then-tracking paradigm, that is, the head detector is first used to detect the pedestrian's head bounding box in the image, and then the head tracking task is completed based on the detection results; The process of the head detector is as follows: 1) Use Resnet50 with feature pyramid model and context prediction module to extract features from images; 2) Transposed convolution is then used to increase the spatial resolution of the feature map; 3) Inspired by the design structure of FasterRCNN, the head feature information extracted from the image in step 1) is input into the region extraction network, followed by the category prediction module and the bounding box prediction module, and finally the pedestrian head bounding box is output; Step 1.2: Next, track the pedestrian's head based on the detection results of the head detector. The head tracker is improved from the particle filter. The head tracking process is as follows: 1) Initialize the trajectory at the beginning of the video and use the regression head in the head detector to adjust the position of each particle in the current frame based on the position of the bounding box in the previous frame; 2) Next, resampling is used to replace particles with low importance to reduce the impact of degradation; 3) Finally, the constant velocity hypothesis model is used to recover some trajectories that have been set to an inactive state; Step 1.3: The process of generating a full-body bounding box using a full-body detector is as follows: 1) Based on Faster-RCNN, two 1024-dimensional fully connected layers are added, and the instance data of two sets of bounding boxes are obtained by the EMD loss function; 2) A refinement module is used to fine-tune the output results to enhance the generalization ability of the full-body detector in dense scenes.
