Cross-domain retrieval and tracking method based on pedestrian features

By extracting pedestrian appearance features and motion information, combined with camera topology and cosine metric strategies, the problem of identity switching and trajectory frame drift in cross-camera multi-target tracking is solved, achieving high-precision cross-domain tracking and retrieval, and reducing false matching Probability.

CN114581954BActive Publication Date: 2024-09-27SHENYANG AEROSPACE UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210251826.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-15
Publication Date
2024-09-27
Estimated Expiration
2042-03-15

AI Technical Summary

Technical Problem

The existing technology has identity switching and trajectory frame drift problems in cross-camera multi-target tracking, and the motion model alone cannot cope with occlusion, downsampling leads to a decrease in tracking accuracy, and fails to effectively consider spatiotemporal information and trajectory correlation from multiple camera angles.

Method used

By extracting pedestrian appearance features to form a pre-sampled feature library, combined with motion information and facial information, the camera topology map is used to reduce the query range, and cosine metric and cascade matching strategies are used to correlate detection and feature trajectories to achieve cross-domain retrieval and tracking.

Benefits of technology

It improves the precision and accuracy of cross-domain tracking, reduces the probability of false matching, makes up for the reduced accuracy of appearance features due to occlusion, and integrates spatiotemporal information to enhance the reliability of trajectory association.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114581954B
    Figure CN114581954B
Patent Text Reader

Abstract

The present invention provides a method for cross-domain retrieval and tracking of targets based on pedestrian features, including collecting full-body images of target pedestrians to be retrieved and tracked to extract features, making a pre-sampled feature library, and assigning an ID tag to each identity; creating a trajectory for each identity, and saving the features of the matched target pedestrian in a short-frame trajectory window; counting the flow frequency of the target pedestrian between cameras, calculating the transfer probability of the target pedestrian, and drawing a camera topology map; obtaining a detection frame for the target pedestrian in each frame image, extracting features from the detected target pedestrian, and jointly measuring with the features in the pre-sampled feature library and the short-frame trajectory window to obtain a matching list of the target pedestrian and the trajectory in the current frame; associating the detection frame of the current frame with the trajectory, displaying the corresponding ID tag in the pre-sampled feature library, updating the trajectory information, and adding the current feature to the short-frame trajectory window, and combining the pre-sampled feature library to participate in subsequent measurement. Improve tracking accuracy and reduce the probability of false matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision and video understanding, and in particular to a method for cross-domain retrieval and tracking of targets based on pedestrian features. Background Art

[0002] Multi-target tracking plays an important role in computer vision, so its academic and commercial potential has attracted more and more attention. It has many practical applications, such as visual monitoring, human-computer interaction, virtual reality, from video surveillance to self-driving cars, from action recognition to crowd behavior analysis. Many of these practical applications will benefit from high-quality tracking algorithms, so it is necessary to develop models for multi-target tracking to solve its application problems in practice, analyze pedestrian trajectories in real scenes, and retrieve and track them in different camera fields of view.

[0003] Multi-camera multi-target tracking systems or methods have become an emerging application direction in the field of digital image processing and computer vision analysis. Multi-camera trajectories can be used in applications including visual surveillance, suspicious activity and anomaly detection, athlete tracking and crowd behavior analysis. It is a key technology for the popularization of intelligent informatization in the future. It has a certain cutting-edge nature and guiding role, and has huge market application value and social significance.

[0004] At present, there are relatively few studies on cross-camera multi-target tracking at home and abroad. Most studies focus on single-camera multi-target tracking, and there are almost no cases of cross-view multi-target tracking. The patent "A multi-target tracking method based on background modeling and IoU matching" (CN202011354657.X, 2020) obtains real-time video streams through camera preset setting and camera calibration, uses convolutional neural network models to detect targets in the area of ​​interest, and performs data association through IoU matching. In combination with the background modeling method, a frame skipping mechanism is introduced to perform real-time target tracking. This method is prone to identity switching and trajectory frame drift when a crowd gathers; the patent "A multi-target tracking method based on an adaptive extended Kalman probability hypothesis density filter" (CN202011097165.7, 2020) ), discloses a multi-target tracking method based on an adaptive extended Kalman probability hypothesis density filter, which uses a two-point difference algorithm to initialize the intensity of new targets, and uses a target maximum velocity constraint algorithm to eliminate erroneous new target intensities, solving the problem that the EK-PHD filter cannot track targets when the intensity of new targets is unknown. The above scheme uses a motion model estimation scheme such as a Kalman filter to perform IoU matching and association on the detection to complete tracking. Using a motion model alone cannot cope with occlusion, and downsampling will lead to a decrease in tracking accuracy; Patent "A multi-target tracking method and system based on identity re-identification" (CN2019104980 68.X, 2019), by extracting the re-identification features of the tracked target in the current detection video sequence, traversing all child nodes in each short track of the track tree, counting the appearance score, identity re-identification score and motion score of each short track, and fusing the appearance score, identity re-identification score and running score of each short track, the total score of multiple clues of each short track is obtained, and the score is used for correlation matching to complete the tracking. The deep feature contains a large amount of feature information and can be effectively used to identify the identity of pedestrians, but this method does not consider the spatiotemporal information, nor does it consider the track association problem from the perspective of multiple cameras; the patent "A method based on long-term and short-term prediction models "Multi-target occlusion tracking method" (CN202010693529.1, 2020), by calculating the similarity of appearance features between the current video frame and the historical video frames within a preset time, taking the product of appearance feature similarity and motion feature similarity as the similarity between the target and the trajectory, determining the best matching relationship between each target and the trajectory, and obtaining the tracking results of multiple targets. Tracking is performed by fusing two trajectories of different time lengths, which makes up for the problem of occlusion loss of short trajectories and meets the problem of cross-domain query. However, the patent does not consider the relationship between cameras and only relies on features as the basis for cross-domain retrieval and tracking, which can easily cause identity switching.

[0005] Therefore, it is necessary to develop a method for cross-domain retrieval and tracking targets based on pedestrian features. By extracting the appearance features of pedestrians, a feature set to be retrieved and tracked is formed, and motion information and facial information are introduced to compensate for the reduced accuracy of appearance features due to occlusion. At the same time, spatiotemporal information is integrated to reduce the query range according to the camera topology and reduce the probability of false matching. The association between detection and feature trajectory is completed through the cosine metric and cascade matching strategy to achieve cross-view tracking. Summary of the invention

[0006] The present invention aims to solve one of the technical problems existing in the prior art or related technology.

[0007] To this end, the present invention proposes a method for cross-domain retrieval and tracking targets based on pedestrian features.

[0008] In view of this, the present invention proposes a method for cross-domain retrieval and tracking of targets based on pedestrian features, which includes:

[0009] Pre-sampling features: collecting full-body images of multiple target pedestrians to be retrieved and tracked, inputting them into the training model and extracting appearance features, making a pre-sampling feature library, and assigning an ID label to each target pedestrian;

[0010] Initialize the trajectory, create a trajectory for each target pedestrian in the pre-sampled feature library, and the trajectory also has a short-frame trajectory window, and the short-frame trajectory window is used to store the matched features of the target pedestrian;

[0011] Camera topology calculation: according to the actual camera position information, the flow frequency of any pedestrian between cameras is counted to obtain a frequency-time histogram, the transfer probability of any pedestrian between cameras is calculated through the frequency-time histogram, and a directed camera topology graph with weight as probability is drawn;

[0012] Feature extraction and measurement: when reading the video, the pedestrians in each frame image are detected to obtain the detection frame, and the features of the detected pedestrians are extracted, and the features are measured together with the features in the pre-sampled feature library and the short frame trajectory window to obtain a similarity matrix, and the matching list of the pedestrians in the current frame and the trajectory is obtained by the Hungarian algorithm;

[0013] Associate the trajectory, associate the detection box of the current frame with the trajectory through the matching list, display the corresponding ID tag in the pre-sampling feature library, update the trajectory information, add the current feature to the short frame trajectory window, and participate in subsequent measurements in combination with the pre-sampling feature library.

[0014] Furthermore, the pre-sampling features include:

[0015] Target feature extraction: preparing 1 to n full-body images of the target pedestrian to be retrieved and tracked in advance and inputting them into the pedestrian re-identification network to extract the appearance features;

[0016] The pre-sampling feature library assigns an ID tag to each target pedestrian and stores the corresponding pre-sampling features to form the pre-sampling feature library.

[0017] Furthermore, the camera topology calculation includes:

[0018] Topology determination: judging whether a topology structure needs to be designed based on the current number of cameras. If the number of cameras is less than 3, the topology structure is not required. Otherwise, the camera topology is designed.

[0019] Camera field point setting: setting a field point for each camera to indicate the location area where any pedestrian enters or exits the camera's field of view, and recording the coordinates of any pedestrian;

[0020] Frequency-time histogram statistics: according to the positions of all the cameras in the real scene, the frequency of the flow of any pedestrian from one camera to another is counted, and the frequency-time histogram is smoothed using a parzen window;

[0021] Obtain the topological relationship, eliminate the impossible connections between cameras, and obtain the final directed camera topology graph.

[0022] Furthermore, the feature extraction and measurement include:

[0023] Detecting the feature extraction of the pedestrians, the camera detects the pedestrians, removes redundant detections and distant targets, and extracts a set of detection features of all the pedestrians in the current frame;

[0024] Query feature set selection, confirm the associated camera of the current camera according to the directed camera topology graph, and obtain the feature set of its trajectory in the "untracked" state in the pre-sampling feature library;

[0025] Cascade matching, the "confirmed state" trajectory and the "tentative state" trajectory of the current camera are preferentially subjected to cosine measurement with the detection feature set, and the remaining unmatched detections are subjected to cosine measurement with the trajectory of the associated camera to obtain multiple similarity matrices;

[0026] Data association, comparing the similarity matrix with a set threshold, setting it to 0 if it exceeds the threshold, and performing data association through the Hungarian algorithm to obtain the matching list.

[0027] Furthermore, YOLOv5 is used as a detector to detect the pedestrian in each frame of the image, and NMS is used to filter the redundant detections and distant targets.

[0028] Furthermore, the associated trajectory includes:

[0029] A short trajectory window, for the successfully associated trajectory, updates the state of the trajectory and adds its features to the short frame trajectory window;

[0030] Status update: for the track that fails to be continuously tracked in the "confirmed state", its status is changed to "untracked" and the current camera number is recorded.

[0031] The technical solution provided by the present invention may include the following beneficial effects:

[0032] By extracting the appearance features of pedestrians, a feature set to be retrieved and tracked is formed, and motion information and facial information are introduced to compensate for the reduced accuracy of appearance features due to occlusion. At the same time, spatiotemporal information is integrated to reduce the query range according to the camera topology and reduce the probability of false matching. The association between detection and feature trajectory is completed through cosine metric and cascade matching strategy to achieve cross-domain retrieval and tracking.

[0033] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 A flowchart showing the steps of a method for cross-domain retrieval and tracking of a target based on pedestrian features according to the present invention is shown;

[0037] Figure 2 A flowchart of the steps of a method for cross-domain retrieval and tracking of a target according to a specific embodiment of the present invention is shown. DETAILED DESCRIPTION

[0038] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0039] Figure 1 A flowchart of the steps of a method for cross-domain retrieval and tracking of targets based on pedestrian features according to the present invention is shown.

[0040] like Figure 1 As shown, the present application proposes a method for cross-domain retrieval and tracking of targets based on pedestrian features, and the method for cross-domain retrieval and tracking of targets includes:

[0041] Pre-sampling features: Collect full-body images of multiple target pedestrians to be retrieved and tracked, input them into the training model and extract appearance features, create a pre-sampling feature library, and assign an ID label to each target pedestrian;

[0042] Initialize the trajectory, create a trajectory for each target pedestrian in the pre-sampled feature library, and the trajectory also has a short-frame trajectory window, and the short-frame trajectory window is used to store the matched features of the target pedestrian;

[0043] Camera topology calculation: According to the actual camera position information, the flow frequency of any pedestrian between cameras is counted to obtain the frequency-time histogram. The transfer probability of any pedestrian between cameras is calculated through the frequency-time histogram, and a directed camera topology graph is drawn.

[0044] Feature extraction and measurement: When reading the video, the pedestrians in each frame are detected to obtain the detection frame, and the features of the detected pedestrians are extracted and measured together with the features in the pre-sampled feature library and the short frame trajectory window to obtain the similarity matrix. The matching list of pedestrians and trajectories in the current frame is obtained through the Hungarian algorithm.

[0045] Associate the trajectory, associate the detection box of the current frame with the trajectory through the matching list, display the corresponding ID label in the pre-sampled feature library, update the trajectory information, and add the current feature to the short frame trajectory window, and participate in subsequent measurements in combination with the pre-sampled feature library.

[0046] Among them, full-body images of multiple target pedestrians to be retrieved and tracked are collected manually, that is, the target pedestrians are manually deducted from the pictures to form fixed-size target pedestrian images, which are sent to the training model to obtain the appearance features of the target pedestrians; when calculating the camera topology, the transfer probability between cameras based on the number of passing pedestrians is used to obtain a directed camera topology graph; among them, the initialization trajectory is to create an initialization trajectory (a data structure) for each target pedestrian by inputting an id label, and is responsible for saving some parameters to record the status of the target pedestrian, and at the same time saving the features of the target pedestrian after recent matching in the short frame trajectory window.

[0047] It should be noted that a trajectory is created for each target pedestrian in the pre-sampled feature library. The trajectory belongs to a custom data structure, in which the data includes id tags, pre-sampled features (the features of each identity are placed in this data structure), center coordinate list, pedestrian trajectory frame coordinate list, trajectory status (tracking or not tracking), camera number of the trajectory, previous camera number (default -1), time since last update (zeroed when matched, and continuously increasing when not matched), maximum loss time (threshold, if not updated for a certain period of time, it is considered to have left the camera group's field of view), and other parameters. At the same time, there is also a short-frame trajectory window for the trajectory, which is used to save the features of the most recently matched target pedestrian (similar to a queue, only features of a certain capacity are saved, and features that exceed the capacity, that is, the features with the longest distance to the match time, will be discarded). This solves the problem of low matching between pre-sampling and feature expressions in the actual environment, and continuously records the motion information of the target pedestrian through the trajectory; the histogram frequency refers to camera 1 to camera The horizontal axis is time, that is, the number of pedestrians from camera 1 to camera i is counted as time goes by, and the probability is bin_i / total number of people observed, where bin_i means: camera 1->camera 2 is a group, camera 1->camera 3 is a group, and so on, divided by the total number of people moving from camera 1 to all other cameras (total number of people observed). This probability is counted in advance in order to predict in practical applications which camera the target pedestrian may appear in again after leaving the field of view. Among them, the detection frame is to deduct the pedestrian from the panoramic frame, and the feature is the expression of the pedestrian, that is, a digital sequence is used to represent the appearance of the pedestrian, similar to face recognition. The less background, the better. The pre-sampled features are extracted from the cropped image as much as possible to ensure the good expression of the features. The image blocks obtained by detection may have clutter and are not suitable for the acquisition of pre-sampled features. The transfer probability of the target pedestrian between cameras is calculated by the frequency-time histogram. The first is to exclude irrelevant camera associations, and the second is to ensure the consistency of the matching results. For example, a new target pedestrian entering camera 2 (may come from 1 or from 3 or 4), his detection features and untracked state trajectories are matched, and a matching list is obtained. The camera number on the matched trajectory is 4. If the probability of camera 4 to camera 2 is ranked higher than the probability of camera i to camera 2, it is considered consistent, but the probability of camera 4 to camera 2 is extremely low, then it is considered that there may be a mismatch in this match, and it is removed from the matching list. The principle followed by this system is to give priority to ensuring the correctness of the id tag, so it is better to abandon some wrong matching results.

[0048] Among them, the features mentioned in this application are basically appearance features. Because the features are extracted through a deep learning network model, the results still focus on the appearance color; the measurement is to the cosine measurement. If the cosine measurement is normalized, it is a matrix multiplication, such as: (12{number of people detected in one frame}×512{vector dimension}) and the pre-sampled feature library (128{number of samples}×512)^T multiplication to obtain the cost matrix (12,128), which refers to the similarity list of each person and all the people in the pre-sampled feature library. The public algorithm-Hungarian algorithm is used for judgment, so that each pedestrian is matched to prevent matching conflicts. Of course, there is a threshold value to exclude non-existent matches. It should be noted that T is the transpose, that is, (12×512) dot product (128×512)^T = (12×512) dot product (512×128) = (12×128), which is the cost matrix. However, because the cosine metric obtains the similarity, the cost matrix is ​​the similarity matrix. Its meaning is the similarity between the features of the 12 detected pedestrians and the features of the 128 pre-sampled people. For example, the first row is the similarity score between the first detected pedestrian and each person in the pre-sampled library. The closer to 1, the higher the similarity.

[0049] By extracting the appearance features of pedestrians, a feature set to be retrieved and tracked is formed, and motion information and facial information are introduced to compensate for the reduced accuracy of appearance features due to occlusion. At the same time, spatiotemporal information is integrated to reduce the query range according to the camera topology and reduce the probability of false matching. The association between detection and feature trajectory is completed through cosine metric and cascade matching strategy to achieve cross-domain retrieval and tracking.

[0050] Among them, in the custom data structure, there are two parameters, namely the current camera and the previous camera (default -1). When the state changes from confirmed to untracked, the previous camera number is set to the current camera number, and the current camera number is set to -1. At this time, the camera associated with the camera will select these tracks at the last match of the cascade, while other unassociated cameras will not take these tracks into consideration when querying the untracked state tracks, which narrows the matching range, that is, reduces the probability of false matching; cross-domain retrieval refers to finding the target pedestrian in different cameras, that is, finding the pedestrian with an identity label in the pre-sampling, and tracking is to continuously retrieve and record the information of the target pedestrian, keep the id label unchanged, that is, to ensure that the person with id = 4 will not be mistakenly matched to the person with id = 10.

[0051] Furthermore, the pre-sampling features include:

[0052] Target feature extraction: prepare 1 to n full-body images of the target to be retrieved and tracked in advance and input them into the pedestrian re-identification network to extract appearance features and form a pre-sampled feature library;

[0053] The pre-sampled feature library assigns an ID label to each target pedestrian and stores the corresponding pre-sampled features.

[0054] Among them, by extracting the appearance features of pedestrians, a feature set to be retrieved and tracked is formed, and motion information is introduced to compensate for the reduced accuracy of appearance features caused by occlusion.

[0055] It should be noted that the reduced accuracy of appearance features due to occlusion can also be compensated by introducing facial information. When introducing facial information, a 1 / 6 area is selected for the full-body image. If it is a clear frontal portrait, it is sent to FaceNet to extract facial features and added to the pre-sampled feature library as supplementary information. Among them, facial information supplement is only used as a supplement. In practice, if the camera is far away, accurate facial information cannot be obtained.

[0056] Furthermore, the camera topology calculation includes:

[0057] Topology determination: According to the current number of cameras, determine whether a topology structure needs to be designed. If the number of cameras is less than 3, no topology structure is required. Otherwise, a camera topology is designed.

[0058] Camera field point setting: set a field point for each camera to indicate the location area where any pedestrian enters or exits the camera's field of view, and record the coordinates of any pedestrian;

[0059] Frequency-time histogram statistics: according to the positions of all cameras in the real scene, the frequency of pedestrian flow from one camera to another is counted, and the frequency-time histogram is drawn by smoothing using the Parzen window;

[0060] Obtain the topological relationship, eliminate the impossible connections between cameras, and obtain the final directed camera topology graph.

[0061] It should be noted that the camera sites are set to facilitate the statistics of the frequency-time histogram, and manual statistics are required; the frequency-time histogram is used to calculate the transfer probability of the target pedestrian between cameras, such as: as time goes by, the probability of camera 1 to camera 2 is 0.58, the probability of camera 1 to camera 3 is 0.31, the probability of camera 1 to camera 3 is 0.08, ..., then the probability from camera 1 to camera 2 is the highest; there is no connection between cameras, such as there is no path from camera 1 to camera 5, or the probability of camera 1 to camera 5 is close to 0, which proves that camera 1 and camera 5 have no direct connection, that is, there is no connection between the two camera nodes in the directed camera topology graph.

[0062] By fusing spatiotemporal information and reducing the query range according to the camera topology, impossible camera connections are eliminated while ensuring the accuracy of matching untracked state trajectories.

[0063] Furthermore, feature extraction and measurement include:

[0064] Pedestrian feature extraction: The camera detects target pedestrians, removes redundant detections and distant targets, and extracts the detection feature set of all target pedestrians in the current frame;

[0065] Query feature set selection, confirm the associated cameras of the current camera according to the directed camera topology graph, and obtain the feature set of its trajectory in the "untracked" state in the pre-sampled feature library;

[0066] Cascade matching: the "confirmed state" trajectory and "tentative state" trajectory of the current camera are first measured with the detection feature set by cosine, and the remaining unmatched detections are measured with the trajectory of the associated camera by cosine, to obtain multiple similarity matrices;

[0067] Data association, comparing the similarity matrix with a set threshold, setting it to 0 if it exceeds the threshold, and performing data association through the Hungarian algorithm to obtain the matching list.

[0068] It should be noted that the feature set refers to the set of features of all target pedestrians detected in a frame, which is sent to the network and then measured with the pre-sampled feature library. The ones to be retrieved and tracked refer to the pre-sampled target pedestrians, and the feature set for feature extraction from them is the pre-sampled feature library.

[0069] Among them, the "untracked" state, "confirmed state" and "tentative state" are all trajectory states. Not all target pedestrians are being tracked. The trajectory state of untracked pedestrians is the "untracked" state. Specifically, the states include untracked (initial state), tentative (confirmed state will be changed only after continuous matching), and confirmed state (converted to untracked state when no match is made for a certain period of time). For example, there are 128 pre-sampled features of target pedestrians in the pre-sampled feature library. The method of the present invention tracks these 128 people. When there are 4 camera monitoring networks, a target appears in Camera 2, then its state must be confirmed, that is, "confirmed state", and it cannot appear in cameras 1, 3 and 4. Then the state of the target pedestrian that does not appear in the field of view of the four cameras is "untracked". For a target that newly enters the field of view of a camera, it must be matched with the trajectory of the "untracked" state and then converted to "tentative state". This "untracked" state is to filter out the trajectories with the state of untracked from the trajectory set corresponding to the 128 pre-sampled feature libraries. The feature set of these trajectories (pre-sampled n×512) is matched as the last step of the cascade.

[0070] It should be noted that we need to distinguish between matching and association. Matching is the process of cosine measurement of detection boxes and trajectories, while association means that the matching list has been obtained through the Hungarian algorithm. Now the corresponding detections need to be associated with the trajectories, which is manifested by updating the coordinates and box information and adding the detection features to the short-frame trajectory window of the trajectory. For example, camera 1 detects 8 people and the detection feature set (8×512). At this time, they have not been associated with the 128 trajectories corresponding to the pre-sampled feature library. First, filter the trajectories (the current state of camera 1 is the trajectory of lack of people), because these trajectories have just been successfully associated in the previous frames, so they should be matched first. Assuming that there are 5 trajectories with composite standards, then let the 8 detection sets and 5 trajectories be matched. , if all can be matched, then the remaining 3 detection sets will be matched with the trajectory of camera 1 and the state is tentative. If there is only 1 and it is matched successfully, there are only 2 detection sets left. It may be roaming from other cameras, or it may not be the target we want to detect and track. So these 2 detection sets will be matched with the trajectory that is associated with the directed camera topology and is not tracked. If successful, its state is changed to tentative and it continues to participate in subsequent associations. If it fails, it is determined that it is not the target we want to retrieve and track, and the detection set is abandoned. Finally, the association is unified and the trajectory information is updated. This is a priority strategy, which gives priority to matching the trajectory that has just been associated, followed by matching the trajectory in the tentative state, and finally matching the trajectory in the untracked state.

[0071] Among them, the threshold is set after pre-sampling features and initializing trajectories, and before the entire method is calculated, which is the system parameter. Data association is to obtain the matching list based on the Hungarian algorithm, associate the current frame detection with the trajectory set, and update the corresponding parameters in the trajectory. It is necessary to distinguish between the pre-sampling feature library and the trajectory. The pre-sampling feature library is just a collection of different features. The trajectory is a data structure set according to the id tag, including the total rudder parameters and information. There is a parameter called sample, which corresponds to the pre-sampling feature of the id tag.

[0072] Extracting features with strong expressive power through deep learning networks is beneficial to improving retrieval accuracy. After feature normalization, the amount of calculation is reduced through the cosine measurement method. The similarity matrix can be obtained only through matrix multiplication, replacing the method of calculating similarity through loop traversal, thereby improving the speed of the entire cross-domain retrieval and tracking target.

[0073] Furthermore, YOLOv5 is used as the detector to detect pedestrians in each frame, and NMS is used to filter redundant detections.

[0074] NMS filters redundant detection frames to ensure that the number of detection frames is as consistent as possible with the actual number of people. The use of the advanced detector YOLOv5 can improve the tracking effect, because the trajectory needs to be associated with the detection. If the detection accuracy is poor and the detection frame positioning error is large, it will directly affect the matching and association results.

[0075] Furthermore, the associated trajectory includes:

[0076] In the short track window, for successfully associated tracks, the track status is updated and its features are added to the short frame track window; for track status update, for tracks that fail to be continuously tracked in the "confirmed state", its status is changed to "untracked" and the current camera number is recorded.

[0077] The confirmed state has the highest matching priority, because the recently associated tracks are likely to continue to be tracked, ensuring that these tracks will not be lost, while the untracked state indicates that they appear for the first time or have been lost. These tracks have a low priority and should not preempt the detection results of the current frame. If they are matched uniformly, the probability of incorrect association will increase. Controlling whether a track participates in matching through state transition has higher stability and tracking accuracy than relying entirely on appearance feature retrieval.

[0078] Example

[0079] Figure 2 A flowchart of the steps of a method for cross-domain retrieval and tracking of a target according to a specific embodiment of the present invention is shown.

[0080] like Figure 2 As shown, this embodiment provides a method for cross-domain retrieval and tracking of targets, and the method specifically includes the following steps:

[0081] Step 1: Collect full-body images of multiple target pedestrians to be retrieved and tracked, extract appearance features, and create a pre-sampled feature library;

[0082] Step 2: assign an ID label to each target pedestrian based on the pre-sampled feature library;

[0083] Step 3: Create a trajectory for each target pedestrian, store parameters such as ID label, pre-sampled features, center coordinate list, pedestrian trajectory box coordinate list and trajectory status, and initialize the parameters;

[0084] Among them, the initialization parameters refer to parameters that need preset values, such as: coordinate list = [] (empty), current camera number = -1 (when not tracking), tracking state = "not tracking" (initialization), etc.

[0085] Step 4: According to the actual scene, count the number of pedestrian flows between cameras to obtain a frequency-time histogram, calculate the probability of any pedestrian transfer between cameras through the histogram, and draw a directed camera topology graph with the weight as probability;

[0086] Step 5: Use YOLOv5 as the detector to perform pedestrian detection on each camera;

[0087] Step 6: Detect each frame of the video. If there is no pedestrian in the current frame, that is, the detection result is empty, update the trajectory of the current "confirmed state" and "tentative state", including trajectory history, trajectory age and other information;

[0088] It should be noted that in actual applications, a video detection is inserted here because the general trajectory status update is placed in the association step, provided that there is detection and trajectory association. If there is no detection, the association is skipped directly and the parameter "time from the last unmatched time" of the confirmed state trajectory is updated. For the tentative state, it takes n consecutive associations to convert to the confirmed state. Once there is no association, it is considered to be an incorrect association or has left the camera's field of view, and it is converted to an untracked state, so a branch is processed here.

[0089] Step 7: If there are detection results, use NMS to filter redundant detection frames, and use the threshold to filter out detections with too small an area. Pedestrians that are too far away from the camera often interfere with the tracking results.

[0090] Step 8: extract pedestrian features and encapsulate them into the detection set to prepare for subsequent measurement;

[0091] It should be noted that this is a single-frame detection feature set.

[0092] Step 9: According to the camera topology, confirm the camera associated with the current camera, and obtain the trajectory set corresponding to the "untracked" state for subsequent matching;

[0093] It should be noted that by excluding the tracks of unconnected cameras, that is, camera 1 cannot directly reach camera 4, then for camera 4, the untracked tracks with the "last camera number" of 1 can be filtered out, that is, the tracks that cannot be successfully matched are removed, which in turn improves the tracking accuracy.

[0094] Step 10: whether to reference the motion model to estimate pedestrian trajectories as a supplement to appearance feature tracking;

[0095] It should be noted that this step corresponds to the Kalman filter in step 14, which is a public algorithm used to predict the pedestrian's movement speed and possible position in the next frame. Whether to use it here is determined according to needs.

[0096] Step 11, prioritize matching the detection set with the “confirmed state” trajectory of this camera, i.e., cosine metric and Hungarian algorithm, as the first-level cascade matching;

[0097] Step 12: Use Kalman filter as the motion estimation model to infer the next frame position information based on the last matched position information, and generate a distance matrix by IOU with the detection set as the input of the metric;

[0098] It should be noted that the distance matrix is ​​similar to the similarity matrix. When it is sent to the Hungarian algorithm, a matching list will be obtained. In step 10, you choose whether to add motion information (a method to improve tracking accuracy). It does not use the cosine metric, but uses a method called IOU to obtain a distance matrix (analogous to the similarity matrix), which will also be sent to the Hungarian algorithm to obtain a matching list. When you choose to use step 10, run step 12. If you choose not to use step 10, do not run step 12.

[0099] Step 13, the remaining unmatched detections are matched with the "tentative state" trajectory of this camera as the second-level cascade matching;

[0100] Step 14: The remaining unmatched detections are matched with the “untracked” feature set as the last layer of cascade matching. Check whether the obtained matching list is consistent with the pedestrian camera transition probability. If there is a big discrepancy, remove it from the matching list.

[0101] Step 15, unify the result lists of multiple matches, check whether the associated results are correct, and remove duplicate items;

[0102] Step 16, update the status of the track. For the successfully matched "tentative state" track, if it meets the requirements, it will be converted to the "confirmed state" track. For the successfully matched "untracked" state track, its status will be converted to the "tentative state" track. For the track that does not meet the requirements, such as the track that has not been associated for a long time, the track with the "tentative state" interrupted, it will be converted to the "untracked" state track.

[0103] Step 17, update the parameters of the trajectory in the non-"untracked" state, including the center coordinate list, the pedestrian trajectory frame coordinate list, the camera number of the trajectory, the number of the previous camera, the last update time, the maximum loss time and the threshold;

[0104] The threshold is responsible for changing the status of a track that has not been associated for a long time (i.e., the parameter in the track: the number of frames since the last unmatched match is greater than the threshold) from "confirmed" to "untracked", and determines that it has left the field of view.

[0105] Step 18, the association result displays the id label of the corresponding track, which is displayed as tracking.

[0106] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0107] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for cross-domain retrieval and tracking of targets based on pedestrian features, characterized in that: The method for cross-domain retrieval and tracking of targets includes: Pre-sampling features: collecting full-body images of multiple target pedestrians to be retrieved and tracked, inputting them into the training model and extracting appearance features, making a pre-sampling feature library, and assigning an ID label to each target pedestrian; Initialize the trajectory, create a trajectory for each of the target pedestrians in the pre-sampled feature library, and the trajectory also has a short-frame trajectory window, and the short-frame trajectory window is used to store the matched features of the target pedestrian; Camera topology calculation: according to the actual camera position information, the flow frequency of any pedestrian between cameras is counted to obtain a frequency-time histogram, the transfer probability of any pedestrian between cameras is calculated through the frequency-time histogram, and a directed camera topology graph with weight as probability is drawn; Feature extraction and measurement: when reading the video, the pedestrians in each frame image are detected to obtain the detection frame, and the features of the detected pedestrians are extracted, and the features are measured together with the features in the pre-sampled feature library and the short frame trajectory window to obtain a similarity matrix, and the matching list of the pedestrians and the trajectories in the current frame is obtained by the Hungarian algorithm; Associate the trajectory, associate the detection box of the current frame with the trajectory through the matching list, display the corresponding ID tag in the pre-sampling feature library, update the trajectory information, add the current feature to the short frame trajectory window, and participate in subsequent measurements in combination with the pre-sampling feature library.

2. The method for cross-domain retrieval and tracking of targets based on pedestrian features according to claim 1 is characterized in that: The pre-sampling features include: Target feature extraction: preparing 1 to n full-body images of the target pedestrian to be retrieved and tracked in advance and inputting them into the pedestrian re-identification network to extract the appearance features; The pre-sampling feature library assigns an ID tag to each target pedestrian and stores the corresponding pre-sampling features to form the pre-sampling feature library.

3. The method for cross-domain retrieval and tracking of targets based on pedestrian features according to claim 1, characterized in that: The camera topology calculation includes: Topology determination: judging whether a topology structure needs to be designed based on the current number of cameras. If the number of cameras is less than 3, the topology structure is not required. Otherwise, the camera topology is designed. Camera field point setting: setting a field point for each camera to indicate the location area where any pedestrian enters or exits the camera's field of view, and recording the coordinates of any pedestrian; Frequency-time histogram statistics: according to the positions of all the cameras in the real scene, the frequency of the flow of any pedestrian from one camera to another is counted, and the frequency-time histogram is smoothed using a parzen window; Obtain the topological relationship, eliminate the impossible connections between cameras, and obtain the final directed camera topology graph.

4. The method for cross-domain retrieval and tracking of targets based on pedestrian features according to claim 1, characterized in that: The feature extraction and measurement include: Detecting the feature extraction of the pedestrians, the camera detects the pedestrians, removes redundant detections and distant targets, and extracts a set of detection features of all the pedestrians in the current frame; Query feature set selection, confirm the associated camera of the current camera according to the directed camera topology graph, and obtain the feature set of its trajectory in the "untracked" state in the pre-sampling feature library; Cascade matching, the "confirmed state" trajectory and the "tentative state" trajectory of the current camera are preferentially subjected to cosine measurement with the detection feature set, and the remaining unmatched detections are subjected to cosine measurement with the trajectory of the associated camera to obtain a plurality of similarity matrices; Data association, comparing the similarity matrix with a set threshold, setting it to 0 if it exceeds the threshold, and performing data association through the Hungarian algorithm to obtain the matching list.

5. The method for cross-domain retrieval and tracking of targets based on pedestrian features according to claim 4 is characterized in that: YOLOv5 is used as the detector to detect the pedestrians in each frame, and NMS is used to filter the redundant detections and distant targets.

6. The method for cross-domain retrieval and tracking of targets based on pedestrian features according to claim 4, characterized in that: The associated trajectory includes: A short trajectory window, for the successfully associated trajectory, updates the state of the trajectory and adds its features to the short frame trajectory window; Status update: for the track that fails to be continuously tracked in the "confirmed state", its status is changed to "untracked" and the current camera number is recorded.

Citation Information

Patent Citations

  • Pedestrian recognition tracking method and device, computer device and storage medium

    CN109977823A

  • Online multi-target tracking method and system based on twin network and long-term and short-term clues

    CN111639551A