Joint multi-target detection and tracking method based on space-time diagram network
By constructing a spatiotemporal graph network model and combining graph neural networks and the Sinkhorn method, the problem of not fully considering the appearance and positional relationship of targets in multi-target tracking is solved, achieving efficient and accurate tracking of pedestrian targets and reducing the ID switching frequency.
Patent Information
- Application Number
- CN202410916079.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-01
AI Technical Summary
Existing multi-target tracking algorithms fail to fully consider the appearance and spatial relationships of pedestrian targets, leading to frequent target ID switching.
A joint multi-target detection and tracking method based on spatiotemporal graph networks is adopted. By constructing a training set and a joint multi-target detection and tracking model STGTracker, a dual-stream DLA network and a spatiotemporal graph network module are used, combined with multilayer perceptron (MLP) and FC-NN to model the positional relationships and appearance features between targets. A graph neural network is used to learn the correlation between target features, and the Sinkhorn method is used for normalization and column normalization to generate a target matching matrix.
It improves the accuracy and stability of pedestrian target tracking, reduces the frequent switching of target IDs, enhances the distinguishability of target features and the expression of correlation relationships, and realizes end-to-end pedestrian target detection and tracking.
Smart Images

Figure CN118887253A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a joint multi-target detection and tracking method based on a spatiotemporal graph network. Background Art
[0002] For the task of multi-target pedestrian tracking, existing algorithms based on the joint target detection and tracking paradigm can accurately track pedestrian targets to a certain extent. Existing methods often treat detection, feature extraction, and target association as three independent and unrelated tasks, and build their own models to solve them. However, due to the separation of detection and tracking, when target detection errors occur, such as false detection, missed detection, or inaccurate target position, these erroneous information may be propagated to the association stage. In the association stage, the tracking algorithm usually uses detection results, target features, or motion models to predict the position or state of the target in the next frame. If the target detection is wrong, the tracking algorithm will receive inaccurate input information, which will cause the tracker to select incorrect matches in subsequent frames and the target ID to switch frequently. In order to alleviate the problem of frequent ID switching of pedestrian targets, current multi-target tracking algorithms mainly solve it from the perspective of enhancing the appearance features of pedestrian targets: (1) Take the historical frames and the current frame as input at the same time to train the CNN model. In this method, CNN can learn the associations between the historical frames and the current frame, and use these associations to improve the feature expression ability of the current frame. (2) Some works regard the multi-target tracking task as a spatiotemporal modeling and graph modeling problem. GNN is used to capture the relationship and contextual information between targets. Neither of these two methods of enhancing the appearance features of pedestrian targets deals with the relationship between targets in the same frame, and their feature extraction of pedestrian objects is independent of each other. Therefore, the existing multi-target tracking model fails to fully consider the appearance representation and spatial position relationship of the target. Summary of the invention
[0003] In view of the above problems existing in the prior art, the technical problem to be solved by the present invention is: how to comprehensively consider the appearance representation and spatial position relationship of the target.
[0004] To solve the above problems, the present invention adopts the following technical solution: a joint multi-target detection and tracking method based on a spatiotemporal graph network, comprising the following steps:
[0005] S1: Constructing a training set and a joint multi-target detection and tracking model STGTracker, wherein the training set includes several existing labeled videos, and STGTracker includes a two-stream DLA network and a spatiotemporal graph network module, wherein the spatiotemporal graph network module includes a multi-layer perceptron MLP and a FC-NN;
[0006] S2: Construct an object graph and feed the images of consecutive frames in a video to the two-stream DLA network respectively. The two-stream DLA network detects the target in the two frames and extracts the target features f in the two frames. node1 and f node2 , and extract the location information of the target; the two-stream DLA network extracts the positional relationship between each target in the two frames of images, and uses the positional relationship between each target in the two frames of images as the edge feature f edge1 and f edge2 ;
[0007] The objects in the two frames detected by the dual-stream DLA network are regarded as nodes of the object graph, and the positional relationship between the objects is regarded as the edge of the object graph;
[0008] The object graph corresponding to the current frame image is taken as the target graph G D , the object graph corresponding to the previous frame image of the current frame is used as the trajectory graph G T ;
[0009] S3: Training STGTracker
[0010] G D and G T Input spatiotemporal graph network module [G D and G T Enter Multilayer Perceptron (MLP) and FC-NN].
[0011] S3-1: Target feature f node1 and f node2 Initialization: Use the ID of the detected target as the node information, and the node information includes the target feature, edge feature and location information corresponding to the node.
[0012] Edge feature f edge1 and f edge2 Initialization: The positional relationship between objects in the same frame is described as edge features, and the edge features are initialized as e (i,j) .
[0013] Where i and j are the start and end node indices respectively. Initialize the high-dimensional edge features as:
[0014]
[0015] where [·] is the concat operator, x and y are the center coordinates, and since the initialized edge features are direction-aware, two edges connecting the same node but in opposite directions have different edge features.
[0016] S3-2: Edge feature and target feature update
[0017] Edge feature update: The edge features in the graph neural network are updated by aggregating the associated information of each edge. The associated information of the edge is the feature similarity between edges. The edge feature update module consists of an encoder module ρ e and an update function composition.
[0018] Node feature update: For each node, it is used to collect the edge features of the edges connecting the nodes.
[0019] Finally merge all nodes between two frames Possible representation cascades are fed into an FCNN, which outputs an affinity score matrix A i,j , complete the target matching in the images of consecutive frames.
[0020] S3-3: Let the total loss of STGTracker be L total , according to L total Update the parameters of STGTracker in reverse order, use the Sinkhorn method to perform row and column normalization, and repeat the iteration until A i,j Convergence, the trained STGTracker is obtained.
[0021] S4: Input a video into the trained STGTracker, and STGTracker outputs the detection result image corresponding to each frame image in the video. Each result image is marked with the tracking mark box of each target.
[0022] Furthermore, the method for updating the edge features in S3-2 is:
[0023] ρ e It is designed as a multi-layer perceptron (MLP), which takes edge features as input and transforms them into a latent space.
[0024] E (i,j) =ρ e ([x j -x i ,y i -y i ,x i ,y i ])#(3)
[0025] Among them, G D and G T The edge features on are the geometric features of the target, that is, and set up and is the edge (i D ,j D )∈ED and edge(i T ,j T )∈E T edge features.
[0026] The aggregation weight coefficient in GCN Defined as edge (i D ,j D ) and edge (i T ,j T ) feature similarity between:
[0027]
[0028] where cos(·,·) represents the cosine similarity between input elements.
[0029] G D and G T The edge features on are the geometric features of the target, that is, and set up and is the edge (i D , j D )∈E D and edge(i T , j T )∈E T edge features.
[0030] Use sum as the aggregate function, that is:
[0031]
[0032] Update Function is specified as a multilayer perceptron (MLP) and outputs an updated marginal attribute vector.
[0033] Furthermore, the method for updating the node features in S3-2 is:
[0034] The calculation of node feature updates is performed by an aggregation function ρ v and an update function to complete.
[0035]
[0036] Where R i represents the set of all edge features associated with the i-th node. refers to the FC block, and the aggregation function ρ in the edge convolution layer e Different, the ρ in this layer v is nonparametric and has the formula:
[0037]
[0038] Furthermore, the method of performing row normalization and column normalization using the Sinkhorn method in S3-3 is:
[0039] A i,j The elements in the matrix are transformed using:
[0040]
[0041] in Represents the sum of the elements in the i-th row. The effect of row normalization is to make the sum of the elements in each row equal to 1.
[0042]
[0043] in represents the sum of the elements in the jth column. The effect of column normalization is to make the sum of the elements in each column equal to 1.
[0044] Multiple row and column normalizations gradually make the matrix approach a doubly random matrix that satisfies both row and column constraints, thereby converging to a stable matching solution. This allows the MOT constraints to be automatically satisfied during training and testing without the need for a dedicated loss function.
[0045] Furthermore, L in S3-3 total for:
[0046] The loss for the detection task is calculated as:
[0047] L det =λ cls L cls +λ off L off +λ size L size #(11)
[0048] where λ cls =1,λ size =1,λ off = 0.1. The category loss of the target center point (L cls ) is measured by the cross entropy loss function. By comparing the classification output of the model with the true label, the loss of the target center point category can be calculated. Secondly, for the target center point offset loss L off , the L1Loss function can measure the distance between the predicted target center point and the true target center point. And the target area size loss L size The difference between the width and height of the target box and the width and height of the true target box can also be calculated by the L1Loss function.
[0049] Target association loss: After enhancing the graph G D and G T After the node features on the network are obtained, the node features are fed to the fully connected layer to calculate G D and G T The real-valued scores A of the affinities between and normalize these affinity scores by row and column using the Sinkhorn algorithm to obtain S. In addition to satisfying the MOT constraint, another advantage of the Sinkhorn algorithm is that it is fully differentiable at each iteration. Therefore, S can be directly fed into the following objective function:
[0050]
[0051] Where w is a weight hyperparameter used to balance the loss between positive and negative samples, w = (N-1), O m,n and S represent the true matching relationship matrix and the predicted matching relationship matrix respectively.
[0052] Finally, the total loss of STGTracker can be summarized as:
[0053] L total =μ1L det +μ2L ass #(13)
[0054] The hyperparameters of μ1 and μ2 can be set to μ1=1 and μ2=0.1 to obtain the best results.
[0055] Compared with the prior art, the present invention has at least the following beneficial effects:
[0056] 1. Considering that pedestrian targets are relatively fixed in terms of movement mode and speed, which means that pedestrians move less in a short period of time, the relative relationship between targets in the same frame has a certain invariance, which is very suitable for graph structure data expression. Therefore, this method constructs a pedestrian object graph with the structure of a graph network, and uses a graph neural network to learn the representation relationship and position relationship between each target feature and generate the similarity of targets between frames. First, the detection target graph G is modeled. D and trajectory target graph G T. The targets are regarded as nodes in the object graph, the positional relationships between targets are represented as edges in the object graph, and the interactions between targets are described by defining edge features, so as to express the relationships between targets more comprehensively and accurately. Secondly, since the characteristic information of pedestrians includes not only their own characteristics, but also the correlation between pedestrians. Therefore, in the time domain, the graph topology information between adjacent frames of GCN (Graph Convolutional Networks) is used to realize the edge feature transmission across frames and enhance the correlation between nodes; in the spatial domain, the edge information is aggregated to the nodes, so that the node information has not only its own characteristics, but also the correlation information between adjacent nodes. By iterating this process, the effect of enhancing the appearance features of pedestrian objects is achieved. Then all possible representation cascades between the two frames are merged to generate the association matrix A M,N The association matrix contains the target matching relationship between the two frames. Finally, a Sinkhorn-based normalization is applied to enforce the MOT constraint of the bipartite matching problem. This approach greatly reduces the frequent switching of target IDs while ensuring the speed and accuracy of pedestrian multi-target tracking.
[0057] 2. The present invention proposes an end-to-end joint pedestrian target detection and tracking method STGTracker, which jointly processes object detection and association to alleviate the problem of error propagation.
[0058] 3. Build an object graph based on pedestrian targets. Considering the mutual relationship between targets in the same frame, model the relationship between each target in each frame. Targets are regarded as nodes in the object graph, and the association relationship between targets is represented as edges in the object graph. The interaction between targets is described by defining edge attributes.
[0059] 4. Design a spatiotemporal graph network module. In the time domain, use the graph neural network to exchange graph topology information between adjacent frames. In the spatial domain, aggregate edge information to nodes. Make the node information include not only its own features, but also the association information with adjacent nodes, so that the node features finally obtained are more distinguishable. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 This is the structural diagram of STGTracker.
[0061] Figure 2 This is the structural diagram of the space-time graph network. DETAILED DESCRIPTION
[0062] Joint multi-target detection and tracking method based on spatiotemporal graph network: In a given video, the tracked object may leave the scene or be blocked, or a new object may enter the scene. At each time point t in a given video, the goal of multi-target tracking MOT is to learn the association prediction model between the detection set M and the trajectory set N. Considering the possibility between all trajectories and detections, this problem can be formulated as a constrained optimization problem:
[0063]
[0064] Where O is the true matching label between the detection set and the trajectory set, 1 is a match and 0 is a mismatch. The problem of learning S can be viewed as a bipartite graph matching problem, with a graph G = (V, E) and a node V = M∪V. If there is a match between i∈M and j∈N in O, then the edge E connects the trajectory node j∈N and the detection node i∈M. Then, the goal of MOT is to learn a model to recover the adjacency matrix A of the graph given the image appearance features and geometric features of the nodes.
[0065] represents the element of the A matrix at time t, It represents the true label of the detection and trajectory at time t.
[0066] STGTracker aims to achieve efficient pedestrian target tracking, understand and analyze their motion trajectories, so as to track them in real time in scenarios such as autonomous driving. This method takes into account that pedestrian information includes not only their own characteristics, but also the associations between pedestrians, and this association also constrains pedestrian targets. In addition, in a short period of time, the constraints between targets in adjacent frames are invariant. Therefore, this study uses graph neural networks to strengthen the association information between pedestrians in the current frame with the help of the constraints of the previous frame, and allows the pedestrian targets in the current frame to aggregate the associations around them, thereby improving the distinguishability of pedestrian target features, thereby more accurately locking the same pedestrian target in different frames.
[0067] In STGTracker (such as Figure 1 ), the images of two consecutive frames are first fed to the DLA network for feature extraction. Inspired by DAN, this study intentionally makes the two-stream DLA network have shared weights. The network output object score prediction is expressed as Among them, H h and H w is the height and width of the feature map; the candidate box size is expressed as The center coordinates of the candidate box are offset using Appearance characteristics of the target At frame t, the target is detected by the score B score , B embeddingIt consists of a geometric vector that represents the center position and size of the detection bounding box.
[0068] This study proposes to construct key points based on the appearance features of pedestrian objects. According to the position information of the target at time I, the appearance feature vector B of the pedestrian object is directly extracted on the feature map. embedding , as the key point information of the current frame D t and the key point information of the past frame T t . M and N represent the number of detected objects and tracklet candidates. The detected target in frame t is defined as the target map represents all vertices in frame t, Representing all edges in frame t, the set of trajectory segments in the past frames is defined as the trajectory graph represents all vertices in the past frames of frame t, represents all edges in the past frames of frame t. and are respectively described as the positional relationship between objects in the same frame. The data association in frame t can be formulated as and The graph matching problem between .
[0069] Finish First and Then G D and G T The edge features are aggregated to the nodes, from the trajectory set With detection node The extracted node features are fed into FC-NN to calculate the affinity between each pair to produce representation and The actual value score of affinity between M,N These affinity scores are then normalized row-wise and column-wise using the Sinkhorn algorithm to satisfy the MOT constraints and produce the final association matrix S. During testing, the Hungarian algorithm sets a threshold on S to perform binarization to produce an assignment between tracklets and detections.
[0070] 1. Space-time Graph Network Module
[0071] In a given video, the tracked object may leave the scene or be blocked, or a new object may enter the scene. At each time point t in a given video, the goal of MOT is to learn the association prediction model between the detection set M and the trajectory set N. Considering the possibility between all trajectories and detections, the problem can be formulated as a constrained optimization problem:
[0072]
[0073] Where O is the true matching label between the detection set and the trajectory set, 1 is a match, and 0 is a mismatch. m is the number of elements in the detection set M, and n is the number of elements in the trajectory set N. The problem can be viewed as a bipartite graph matching problem, with a graph G = (V, E) and a node V = M∪N. If there is a match between i∈M and j∈N in O, then the edge E connects the trajectory node j∈N and the detection node i∈M. Then, the goal of MOT is to learn a model to recover the adjacency matrix A of the graph given the image appearance features and geometric features of the nodes.
[0074] 1. Construction of object graph within the same frame
[0075] At present, multi-target tracking algorithms focus on using the appearance features of targets to match targets between different frames. However, pedestrian target features include not only the appearance features of targets, but also the relative spatial position relationship between targets. Pedestrians are a type of target with obvious social attributes, because in real scenes, the movement trajectory of pedestrians is often continuous and will not change suddenly. Therefore, in the data of continuous frames, the association relationship between the target and the surrounding targets is often certain, and this association relationship also constrains the pedestrian target. In a short period of time, the constraints between targets in adjacent frames are invariant. Therefore, the data expression form of the graph structure is more suitable for showing the association between pedestrian targets. The present invention models the relationship between each target in each frame image, takes the target as a node in the object graph, represents the association relationship between targets as an edge in the object graph, and describes the interaction between targets by defining edge attributes, thereby expressing the relationship between targets more comprehensively and accurately. In the present invention, the pedestrian target association is regarded as finding a partial match between two sets of features.
[0076] The present invention proposes to construct key points based on the appearance features of pedestrian objects. According to the position information of the target at time I, the appearance feature vector B of the pedestrian object is directly extracted on the feature map. embedding , as key point information D and T. is defined as the set of detections in the current frame, is defined as the set of trajectory segments obtained in the past frames. M and N represent the number of detected objects and trajectory segment candidates. The detection target in frame t is defined as the complete graph The set of trajectory segments in the past frames is defined as the complete graph Each vertex and vertices Respectively indicate detection and track segments and They are and The edges in t are described as the positional relationship between objects in the same frame. The data association in frame t can be formulated as and For simplicity, t will be ignored in the following sections.
[0077] 2. Aggregation and update of temporal and spatial features
[0078] Due to the complexity of the real-world environment, there are situations such as pedestrian targets being occluded and motion blurred. In the data association stage, existing tracking algorithms usually directly use the ReID features of the target, ignoring that the interdependence between targets is unchanged in a short period of time, which weakens the correlation between different frames. The ID of the same pedestrian target is constantly switched, resulting in unstable tracking effect and a significant decrease in MOT performance.
[0079] like Figure 2 As shown, the present invention first completes G D and G T Then G D and G T The edge features are aggregated to the nodes, from the trajectory set G T With the detection node G D The extracted node features are fed into FC-NN to calculate the affinity between each pair to produce the representation G D and G T The actual value score of affinity between M,N . Then use the Sinkhorn algorithm
[79] These affinity scores are normalized row and column by row to satisfy the MOT constraints and produce the final association matrix S. During testing, the Hungarian algorithm sets a threshold on S to perform binarization to produce an assignment between tracklets and detections.
[0080] In addition, considering that only using CNN and FC-NN cannot include the interaction effects between different objects (e.g., detection and tracklet). To solve this problem, the present invention uses GCNN architecture instead of FC-NN in the detection graph G. D and trajectory graph G T Extract interactive features.
[0081] Node feature initialization: Use the appearance features of the detected objects as node information.
[0082] Edge feature initialization: The positional relationship between objects in the same frame is described as edge features, denoted as e (i,j) , where i and j are the start and end node indices respectively. Initialize the high-dimensional edge features as:
[0083]
[0084] where [·] is the concatenation operator, x and y are the center coordinates, and since the initialized edge features are direction-aware, two edges connecting the same node but in opposite directions have different edge features.
[0085] Edge feature update: This layer updates the edge attributes in the graph neural network by aggregating the associated information of each edge. It consists of an encoder module ρ e and an update function composition.
[0086] In this work, ρ e It is designed as a multi-layer perceptron (MLP), which takes edge attribute vectors as input and transforms them into a latent space.
[0087] E (i,j) =ρ e ([x j -x i ,y j -y i ,x i ,y i ])#(3)
[0088] Detection graph G D and trajectory graph G T The edge features on are the geometric features of the target, that is, and set up and In the lth propagation, the edge (i D ,j D )∈E D and edge(i T ,j T )∈E T The aggregation weight coefficient in GCN Defined as edge (i D ,j D ) and edge (i T ,j T ) feature similarity between:
[0089]
[0090] Among them, cos(·,·) represents the cosine similarity between input elements. Use summation as the aggregation function, that is:
[0091]
[0092] Update Function It is specified as a multi-layer perceptron (MLP) and outputs an updated marginal attribute vector.
[0093] Node feature update: For each node, we aim to collect the features of its adjacent edges. The calculation of node feature update is performed by an aggregation function ρ v and an update function to complete.
[0094]
[0095] Where E i Represents the feature set of all edges associated with the i-th node. refers to the FC block, and the aggregation function ρ in the edge convolution layer e Different, the ρ in this layer v is nonparametric and has the formula:
[0096]
[0097] Finally merge all nodes between two frames Possible representation cascades, fed into another FCNN, which produces an affinity score A i,j , completing the target matching between adjacent frames. Note that the affinity matrix A is constructed in a way that each element represents the distribution score of trajectory segment j to detection i. Conventional methods for satisfying MOT constraints (DAN) generally apply a dedicated loss function during training. In contrast, the present invention uses the Sinkhorn algorithm for row normalization and column normalization, and repeats the iteration until the matrix converges. Each element A i,j Use the following to transform:
[0098]
[0099] in Represents the sum of the elements in the i-th row of the matrix. The effect of row normalization is to make the sum of the elements in each row equal to 1.
[0100]
[0101] in represents the sum of the elements in the jth column of the matrix. The effect of column normalization is to make the sum of the elements in each column equal to 1. Multiple row and column normalizations gradually make the matrix approach a doubly random matrix that satisfies both row and column constraints, thereby converging to a stable matching solution. This allows the MOT constraints to be automatically satisfied during training and testing without the need for a dedicated loss function.
[0102] 3. Loss Function
[0103] The network proposed in the present invention has two tasks: target detection and target association. Among them, the loss function of the target detection task enables it to accurately detect the target and provide relevant position and size information, while also learning the appearance characteristics of the target. In view of the fact that the present invention focuses on pedestrian targets, the number of categories of the target detection network is set to 1. In order to more accurately locate the position and appearance characteristics of pedestrian targets in the image, the present invention uses corresponding branches to predict the target center offset, target size information and feature vector. Considering that the number of pedestrian target center points is far less than that of non-pedestrian target center points, the present invention uses Focalloss
[80] More attention and weight are given to pedestrian targets, thereby improving the network's accuracy in detecting the center points of pedestrian targets. In addition, the target center point category loss and L1 loss are introduced to learn the category and position offset of the target center point. The target center point category loss is used to measure the network's prediction effect on the target category, while the L1 loss is used to calculate the loss of the target center point position offset. Since the features of each target are different, the present invention regards appearance feature learning as a classification task. The loss function of the detection task continues the design concept of FairMOT, and its formula is as follows:
[0104] L det =λ cls L cls +λ off L off +λ size L size #(11)
[0105] Among them, L cls is the category loss of the target center point, L off is the loss of learning the offset of the target center position, L size is the target area size loss, L cls ,λ size ,λ off Respectively represent L cls , L off , L size The weight of the target center point category loss L cls Measured by the cross entropy loss function; in the experiment of the present invention, λ cls =1,λ size =1,λ off =0.1.
[0106] Target association loss: After enhancing the graph G D and G T After the node features on the network are obtained, the node features are fed to the fully connected layer to calculate G D and G T The actual value of affinity between And normalize these affinity scores by row and column using the Sinkhorn algorithm to obtain In addition to satisfying the MOT constraint, another advantage of the Sinkhorn algorithm is that it is fully differentiable at each iteration. m×n It is directly fed into the objective function of the end-to-end learning framework proposed in this paper to minimize the following weighted binary cross entropy loss:
[0107]
[0108] Where w is a weight hyperparameter used to balance the loss between positive and negative samples, w = (N-1). and Represent the true matching relationship matrix and the predicted matching relationship matrix respectively.
[0109] Finally, the total loss can be summarized as:
[0110] L total =μ1L det +μ2L ass #(13)
[0111] According to the experimental results of the present invention, the hyperparameters of μ1 and μ2 can be set to μ1=1 and μ2=0.1 to obtain the best results.
[0112] 2. Experimental Results and Analysis
[0113] 1. Training Dataset and Indicators
[0114] The present invention will use the MOTCha11lenge dataset, including MOT16 and MOT17. The MOT16 dataset includes a training set and a test set, where the training set occupies 14 videos and 58,000 frames of images, and the test set occupies 7 videos and 52,000 frames of images. MOT17 is a dataset with denser targets than MOT16. The training set contains 81,000 frames of images from 7 videos, and the test set also contains 7 videos and a total of 88,000 frames. The present invention will use standard MOTCha11lenge evaluation indicators, and focus on indicators such as MOTA, IDF1, and IDSw (IDSwitch).
[0115] 2. Experimental Setup
[0116] The STGTracker overall network is divided into a detection network and an association network. First, in the detection network, a deep layer aggregation (DLA-34) network is used as the choice of CNN architecture, and four branches are introduced at the end of the network. Each branch consists of a 3×3 convolution layer and a 1×1 convolution layer. In addition, all activation functions used in the network are ReLU. The association network consists of two layers of GCNN and one fully connected layer. Between the two layers of GCNN, no activation function is used to prevent information distortion. And the number of Sinkhorn iterations is set to 8.
[0117] The training process includes two stages: detection network training and association network optimization. In the target detection stage, since the scene of the dataset MOT17 is relatively single, it is difficult to fully cover various real-world environments and pedestrian target changes. Therefore, it is necessary to use large-scale CrowdHuman and other datasets to learn general target feature representations to alleviate the problem of data scarcity. After obtaining the pre-trained model, the model is fine-tuned on the dataset MOT17. The image resolution of the network input is 1088×608, the batchsize is equal to 8, the initial learning rate is set to 0.0001, and after 20 training cycles, the learning rate is reduced by 10 times. By iterating 30 training cycles, an optimal pedestrian detection network in a multi-target tracking scenario can be obtained. In the target association stage, the present invention chooses to freeze the pedestrian detection network parameters first, and then train the association network on the dataset MOT17. In order to reduce computational and memory overhead, the number of pedestrian targets per frame is set to N in the experiment. m =80. If the number of targets in the current frame is less than 80, empty nodes are used to supplement; if the number of pedestrian targets exceeds 80, the top 80 targets with the highest confidence are selected for matching. The operating system environment of the experiment of the present invention is Ubuntu 18.04 LTS, and a Tesla V100 is used as a training resource to calculate and train the model. The detectors of the experiment of the present invention are all Public.
[0118] 3. Comparison and analysis of experimental results
[0119] In order to understand the importance of each component in the proposed method, a series of studies are performed using the full model. These ablation experiments show performance on the MOT17 validation set.
[0120] Ablation study using softmax instead of Sinkhorn algorithm: Table 3.1 shows the experimental results of softmax and sinkhorn on the validation set. It can be seen that the model trained with sinkhorn is better than the model trained with softmax in terms of MOTA, IDF1, IDSw and other indicators. This is because the Sinkhorn regularization itself is differentiable, and its parameters are updated through back propagation during the training process. It is more stable than Softmax and allows the model to learn more interpretable feature representations. When the Sinkhorn algorithm is selected to meet the MOT constraint, the method of the present invention achieves the best results on the validation set.
[0121] Table 3.1 Experimental results using Sinkhorn instead of Softmax algorithm
[0122]
[0123] Ablation study of the number of graph neural network layers: By designing different numbers of graph neural network layers, multiple groups of experiments are conducted to verify the overall impact of the number of graph neural network layers on the algorithm, and the optimal number of graph neural network layers is selected according to the experimental results. Table 3.2 describes the ablation experimental results of different numbers of graph neural network layers on the MOT17 validation set. The experimental results show that when the number of graph neural network layers reaches 3, the tracking performance decreases compared with the case with fewer layers. This phenomenon can be attributed to the fact that too deep graph convolutional networks are prone to over-smoothing problems. As the number of layers increases, node features will become more and more similar and lose distinctiveness. Compared with using only one layer of graph neural network, using two layers of graph neural network layers can produce the best results on various indicators. This is because too few graph neural network layers only aggregate local neighbor information and ignore the global structure, which will lead to insufficient ability of the model to learn node representation and the model cannot fully fit the training data. Therefore, the present invention selects a two-layer graph neural network and achieves good results on various indicators.
[0124] Table 3. Experimental results of the number of layers of 2GCN
[0125]
[0126] Ablation study of the effects of node features (Appear) and edge features (Geom): In order to verify the influence of target appearance features (Appear) and position information (Geom) between targets on the multi-target tracking algorithm. As can be seen from Table 3.3, compared with using only node features (Appear), the method of the present invention has slight improvements in indicators by fusing node features and edge features. These results show that appearance and position features complement each other. Appearance features are sensitive to posture changes, while position features are sensitive to appearance changes. The combination of the two can form a richer and more robust target representation.
[0127] Table 3.3 Experimental results of different features
[0128]
[0129] Ablation study of the impact of the number of Sinkborn iterations: According to Table 3.4, when the number of iterations is equal to 10, neither IDF1 nor IDSw reaches the optimal level, indicating that the model may overfit the current training data, resulting in poor performance on new data. On the other hand, fewer iterations may not be able to find the global optimal solution, but only a suboptimal solution. Finally, the optimal number of iterations is selected, which is 8 in this method, which can strike a balance between avoiding overfitting or finding the global optimal solution.
[0130] Table 3.4 Experimental results of Sinkborn iterations
[0131]
[0132] Compared with other algorithms: In order to authoritatively verify the effectiveness of the method of the present invention, the tracking results of the present invention are uploaded to the MOTChallenge official website for online evaluation, and compared horizontally with existing methods on the MOT17 test set and the MOT16 test set. The key indicator for evaluating the effectiveness of the method of the present invention is IDF1, which measures the ratio between the number of correctly identified target IDs and the number of real target IDs and the number of detected target IDs. In addition, the IDSw indicator measures the frequent track identity exchanges in target tracking. It can be seen from Tables 3.5 and 3.6 that the method of the present invention has achieved the best results in IDF1 and IDSw, indicating that it effectively alleviates the problem of frequent switching of pedestrian IDs in dense scenes. The best result is red and the second best is blue. On the MOT16 dataset, although the IDSw of the method proposed in the present invention is slightly lower than that of GMTracker, the IDF1 of the present invention is higher than it, which shows that the proposed method is superior to GMTracker in target recognition ID accuracy.
[0133] In order to prove the effectiveness of the proposed method, it is compared with the multi-target tracking algorithm based on graph neural network in recent years on the MOTSynth dataset. By analyzing Table 3.7, it is found that although the algorithm of the present invention does not achieve the highest score of the MOTA index, it performs comparable to other methods in terms of MOTA, ML, MT and IDSw. Here, MT measures the degree of match between the trajectory hypothesis and the ground truth trajectory, while ML measures the difference between the trajectory hypothesis and the ground truth trajectory. This shows that the proposed algorithm effectively obtains distinctive target features and helps to reduce the target ID switching frequency.
[0134] Table 3.5 Comparison of MOT16 test set results
[0135]
[0136] Table 3.6 Comparison of MOT17 test set results
[0137]
[0138] Table 3.7 Experimental results of MOTSythn dataset
[0139]
Claims
1. A joint multi-target detection and tracking method based on spatiotemporal graph network, characterized in that: The steps include: S1: Constructing a training set and a joint multi-target detection and tracking model STGTracker, wherein the training set includes several existing labeled videos, and STGTracker includes a two-stream DLA network and a spatiotemporal graph network module, wherein the spatiotemporal graph network module includes a multi-layer perceptron MLP and a FC-NN; S2: Construct an object graph and feed the images of consecutive frames in a video to the two-stream DLA network respectively. The two-stream DLA network detects the target in the two frames and extracts the target features f in the two frames. node1 and f node2 , and extract the location information of the target; the two-stream DLA network extracts the positional relationship between each target in the two frames of images, and uses the positional relationship between each target in the two frames of images as the edge feature f edge1 and f edge2 ; The objects in the two frames detected by the dual-stream DLA network are regarded as nodes of the object graph, and the positional relationship between the objects is regarded as the edge of the object graph; The object graph corresponding to the current frame image is taken as the target graph G D , the object graph corresponding to the previous frame image of the current frame is used as the trajectory graph G T ; S3: Train STGTracker to convert G D and G T Input spatiotemporal graph network module; S3-1: Target feature f node1 and f node2 Initialization: Use the ID of the detected target as the node information, which includes the target features, edge features and location information corresponding to the node; Edge feature f edge1 and f edge2 Initialization: The positional relationship between objects in the same frame is described as edge features, and the edge features are initialized as e (i,j) ; Where i and j are the start and end node indices respectively, and the high-dimensional edge features are initialized as: Where [·] is the concat operator, x and y are the center coordinates; S3-2: Edge feature and target feature update: Edge feature update: The edge features in the graph neural network are updated by aggregating the associated information of each edge. The associated information of the edge is the feature similarity between edges. The edge feature update module consists of an encoder module ρ e and an update function composition; Node feature update: for each node, it is used to collect the edge features of the edges connecting the nodes; Finally merge all nodes between two frames Possible representation cascades are fed into an FCNN, which outputs an affinity score matrix A i,j , complete the target matching in the images of consecutive frames; S3-3: Let the total loss of STGTracker be L total , according to L total Update the parameters of STGTracker in reverse order, use the Sinkhorn method to perform row and column normalization, and repeat the iteration until A i,j Convergence, then the trained STGTracker is obtained; S4: Input a video into the trained STGTracker, and STGTracker outputs the detection result image corresponding to each frame image in the video. Each result image is marked with the tracking mark box of each target.
2. A joint multi-target detection and tracking method based on a spatiotemporal graph network as claimed in claim 1, characterized in that: The method for updating edge features in S3-2 is: ρ e It is designed as a multi-layer perceptron (MLP), which takes edge features as input and transforms them into a latent space. AND (i,j) =ρ e ([x j -x i ,and j -and i ,x i ,and i ])#(3) Among them, G D and G T The edge features on are the geometric features of the target, that is, and set up and is the edge (i D ,j D )∈E D and edge(i T ,j T )∈E T The edge features of The aggregation weight coefficient in GCN Defined as edge (i D ,j D ) and edge (i T ,j T ) feature similarity between: Where cos(·,·) represents the cosine similarity between input elements; Use sum as the aggregate function, that is: Update Function is specified as a multilayer perceptron (MLP) and outputs an updated marginal attribute vector.
3. A joint multi-target detection and tracking method based on a spatiotemporal graph network as claimed in claim 2, characterized in that: The method for updating node features in S3-2 is: The calculation of node feature updates is performed by an aggregation function ρ v and an update function to complete; Where E i represents the set of all edge features associated with the i-th node; refers to the FC block, ρ v The non-parametric formula is:
4. The joint multi-target detection and tracking method based on spatiotemporal graph network according to claim 1, characterized in that: The method for performing row normalization and column normalization using the Sinkhorn method in S3-3 is: A i,j The elements in the matrix are transformed using: in Represents the sum of the elements in the i-th row. The effect of row normalization is to make the sum of the elements in each row equal to 1; in Represents the sum of the elements in the jth column. The effect of column normalization is to make the sum of the elements in each column equal to 1.
5. The joint multi-target detection and tracking method based on spatiotemporal graph network according to claim 1, characterized in that: The L in S3-3 total for: The loss for the detection task is calculated as: L det =λ cls L cls +λ off L off +λ size L size #(11) Where L cls is the category loss of the target center point, L off is the loss of learning the offset of the target center position, L size is the target region size loss, λ cls ,λ size ,λ off Respectively represent L cls , L off , L size The weight of the target center point category loss L cls Measured by the cross entropy loss function; Target association loss: After enhancing the graph G D and G T After the node features on the network are obtained, the node features are fed to the fully connected layer to calculate G D and G T The real-valued scores A of the affinities between them are obtained, and these affinity scores are normalized by rows and columns using the Sinkhorn algorithm to obtain S, which is directly fed into the following objective function: Where w is a weight hyperparameter used to balance the loss between positive and negative samples, w = (N-1), O m,n and S represent the real matching relationship matrix and the predicted matching relationship matrix respectively; Finally, the total loss of STGTracker can be summarized as: L total =μ1L det +μ2L ass #(13) Where μ1 and μ2 are hyperparameters.
Citation Information
Cited By
Data fusion method and device, tracking method and device, electronic equipment and storage medium
CN121661615A
