Pedestrian trajectory prediction method fusing social interactive perception
By combining Transformer encoder, pedestrian social relations module and GCN, the time and space characteristics in the pedestrian trajectory are extracted and the pedestrian social graph is constructed, which solves the problem that existing methods are difficult to capture pedestrian interaction behavior and hidden state associations, and achieves more accurate Pedestrian trajectory prediction.
Patent Information
- Application Number
- CN202411500210.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-07
AI Technical Summary
Existing pedestrian trajectory prediction methods are difficult to fully capture the interaction behavior and hidden state associations between pedestrians, resulting in information redundancy and unsatisfactory prediction results.
Using a pedestrian trajectory prediction method that integrates social interaction perception, the temporal and spatial interaction characteristics are extracted through the combination of embedding layer, Transformer encoder, pedestrian social relationship module and Transformer decoder, and the pedestrian social interaction characteristics are constructed and the pedestrian social graph is used to perform the Feature extraction, and finally generate a comprehensive comprehensive feature representation for trajectory prediction.
This method can more accurately predict pedestrian trajectories, especially in complex crowd-intensive environments, effectively capture in-depth contextual understanding and trajectory correlations of pedestrian dynamics, taking into account individual movement patterns and collective social impacts.
Smart Images

Figure CN119398101A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of intelligent transportation technology, and in particular to a pedestrian trajectory prediction method integrating social interaction perception. Background Art
[0002] In the field of intelligent transportation and surveillance systems, pedestrian trajectory prediction is widely regarded as an effective method to reduce collision risks. Pedestrian trajectory prediction has made significant progress, especially with the introduction of deep learning methods, which enables the model to perform well in short-term trajectory prediction. However, pedestrian movements are often highly random and affected by multiple factors such as the surrounding environment, social interactions, and group dynamics. Therefore, how to organically capture and model complex pedestrian interactions to predict reasonable future trajectories is a major challenge and research hotspot in the current field of pedestrian trajectory prediction.
[0003] Although some progress has been made in the research of pedestrian trajectory prediction based on social attribute interaction, the following problems still exist: (1) Most of the current mainstream methods are based on time series analysis, focusing on the impact of neighboring pedestrians and the environment in a close range on the target pedestrian. However, these methods only consider the interaction between pedestrians and the environment, ignoring the association of pedestrian trajectories in hidden states, and cannot fully capture the interaction between pedestrians. (2) Most of the current research on pedestrian trajectory prediction based on social attribute interaction is carried out using graph convolutional neural networks (GCN). Experiments show that this method can embed pedestrian interaction relationships into the graph adjacency matrix for effective modeling. However, these methods do not fully process the interaction data between pedestrians when extracting spatial interaction features, resulting in information redundancy and unsatisfactory prediction results. Summary of the invention
[0004] The present invention mainly provides a pedestrian trajectory prediction method integrating social interaction perception to solve the technical problems raised in the above background technology.
[0005] The technical solution adopted by the present invention to solve the above technical problems is:
[0006] A pedestrian trajectory prediction method integrating social interaction perception mainly includes four components: embedding layer, Transformer encoder, pedestrian social relationship module and Transformer decoder, including the following steps:
[0007] S1: First, the original pedestrian trajectory data is encoded into a high-dimensional feature space through a dedicated embedding layer, and the original trajectory sequence is converted into the embedding of the key information of each pedestrian's movement, providing a basis for further feature extraction;
[0008] S2: Then, based on the Transformer encoder, the temporal features are extracted from the embedded features to model the temporal relationship in the trajectory data;
[0009] S3: Then, a pedestrian social graph is constructed based on the dynamic calculation from their time-varying spatial configuration and the interaction relationships between pedestrians in the scene. The nodes in the social graph represent pedestrians and the edges represent their interaction intensity. GCN is then used to extract social and spatial features from the social graph, which enables the model to learn how pedestrians influence each other's movements in a shared space.
[0010] S4: Finally, the Transformer decoder integrates the temporally and spatially processed features that combine historical motion information and current social interactions to generate a comprehensive integrated feature representation.
[0011] Furthermore, in the present invention, in step S1, the embedding layer first converts the vector of the merged input observation sequence and the prediction sequence into an embedded space, which is specifically described as follows: The embedding layer receives the input of the merged pedestrian observation trajectory sequence And the predicted trajectory sequence The shape of the observed trajectory sequence is defined as follows:
[0012]
[0013] B represents the batch size, is the length of the observed trajectory sequence, in_size represents the feature dimension in each time step, and K represents the number of different prediction modes in the predicted trajectory sequence. is the length of the predicted trajectory sequence, so the shape of the predicted trajectory sequence can be expressed as:
[0014]
[0015] The observation trajectory sequence Expanding in the second dimension (the pattern dimension), replicating K times, the shape becomes The predicted trajectory sequence Expand on the first dimension (batch dimension), replicate B times, and the shape becomes These two parts are spliced in the time step dimension (the third dimension) to obtain a complete pedestrian trajectory sequence Its shape is In order to meet the input requirements of the embedding layer, the concatenated Reshape into:
[0016]
[0017] In this way, the time series data of each sample consists of two parts: the observation part and the prediction part. Each time step contains in_size features, such as two-dimensional coordinates (x, y). Finally, the merged reshaped sequence After being converted into an embedding space by this embedding layer, the embedded feature E is obtained:
[0018] E=W e flatten(X)+b c
[0019] Where flatten(X) means flattening each sequence into a one-dimensional vector, W e and b c are the weights and biases of the linear layer.
[0020] Furthermore, in the present invention, in step S2, the Transformer encoder encodes the merged pedestrian state to generate an embedded feature, which is specifically described as follows: after receiving the above embedded feature E as input to the encoder, the self-attention calculation is started, and the specific formula is:
[0021]
[0022] The query Q, key K, and value V are obtained by different linear transformations of the input E.
[0023] d k , which is the key in dimension; the output of the self-attention calculation can be reintegrated into the input stream through residual connection and layer normalization:
[0024] X out =LayerNorm(E+Attention(Q,K,V))
[0025] The output is then passed to a feed-forward network, which is calculated as follows:
[0026] F(X out )=W 2 ReLU(W 1 x+b 1 )+b 2
[0027] W 1 With W 2 is the weight of the linear transformation, b 1 With b 2 is the bias, and the output is then passed to the feedforward network, which is calculated as follows:
[0028] X final =LayerNorm(X out +F(X out ))
[0029] Finally, the encoder outputs the encoded information which will contain the embedded features of pedestrians.
[0030] Furthermore, in the present invention, in step S3, the specific steps of constructing the pedestrian social graph are:
[0031] Given N pedestrians and observation time step T, the position of each pedestrian i at time t is represented by P i (t), where i = 1, ..., N and t = 1, ..., T. In this process, each node represents a pedestrian, and each edge represents the relative distance between pedestrians. Then, at each time step t, the node feature matrix V(t) and the adjacency matrix A(t) are defined to jointly form the representation of the relative position generation graph between pedestrians, which can be:
[0032] V(t)=[P 1 (t),P 2 (t),…P N (t)] T
[0033]
[0034] Among them A ij (t) represents the adjacency relationship between pedestrian i and pedestrian j at time step t, σ is the scale parameter of the Gaussian kernel, and ||P i -P j || 2 is the distance between pedestrian i and pedestrian j at the observation time step,
[0035] In order to improve the stability of the graph convolution operation, the adjacency matrix needs to be normalized. First, the degree matrix D is calculated, and its diagonal elements are:
[0036] D ii =∑ j A ij
[0037] Then, the normalized adjacency moment It can be calculated by the following formula:
[0038]
[0039] Then GCN extracts high-level spatial interaction features from the node feature matrix V through multi-layer convolution operations. The calculation formula for the l-th layer of graph convolution is:
[0040]
[0041] Among them, H (l) is the feature matrix of layer l, is the weight matrix of the lth layer, is the bias vector of the lth layer, σ(·) is the ReLU nonlinear activation function, is the node feature matrix of the l+1th layer;
[0042] Finally, in order to extract effective pedestrian spatial interaction features, we input the pedestrian trajectory data into GCN, given the node feature X = V and the normalized adjacency matrix After multiple layers of graph convolution, the feature representation of GCN output is:
[0043]
[0044] Furthermore, in the present invention, in step S4, the final Transformer decoder combines the embedded pedestrian features and social graph features to predict future pedestrian trajectories, wherein the specific steps are as follows: First, the Transformer decoder embeds the pedestrian features X obtained above into final High-level spatial interaction features H extracted with GCN GCN For integration, assuming H GCN Each node feature is represented as h GCN,j , then the integrated feature is expressed as:
[0045]
[0046] Among them, N(i) represents the neighbor set of pedestrian i, a ij It is the weight coefficient calculated by the self-attention mechanism:
[0047]
[0048] score(h i ,h GCN,j ) is the similarity measure between pedestrian i and neighbor j, which can be expressed by dot product:
[0049]
[0050] Here W q and W k They are the linear transformation matrices of query and key respectively;
[0051] Then the integrated feature z i Decoding is performed through the feature processing decoder to generate a high-level interactive feature representation. Here, the Transformer decoder usually uses a multi-layer decoder, and the output of each layer is:
[0052] f il+1 =DecoderLayer(f i (l) ,Z,Α)
[0053] Among them, f i (0) =z i , f i (l) represents the feature representation of the lth layer, Z is the integrated feature matrix of all pedestrians, and Α is the adjacency matrix; the internal operation of each layer of the decoder can be further decomposed into a multi-head self-attention mechanism, a feedforward neural network, as well as residual connections and layer normalization:
[0054] f i MHSA =MultiHeadAttention(f i (l) ,Z,Α)
[0055] f i FFN =FFN(f i MHSA )
[0056] Finally, the high-level features output by the decoder are represented as:
[0057] f i =f i (l)
[0058] Finally, the high-level feature representation f output by the feature processing decoder is i The input is sent to the regression head to generate the predicted pedestrian trajectory. The regression head is usually composed of a fully connected layer, and its output is the trajectory prediction of pedestrian i in the future time step:
[0059]
[0060] in, and are the weight matrix and bias vector of the regression head, respectively. represents the predicted pedestrian i in the future T pred A two-dimensional sequence of coordinates at time steps.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] First, the present invention can more accurately predict pedestrian trajectories, especially in complex crowded environments, by synergistically combining temporal and spatial processing;
[0063] Second, the present invention can effectively integrate the features of Transformer and GCN architectures, enabling it to capture a deep contextual understanding of pedestrian dynamics and the association of pedestrian trajectories within hidden states, while taking into account individual motion patterns and collective social influences.
[0064] The present invention will be explained in detail below with reference to the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 This is a flowchart of a pedestrian trajectory prediction method based on Transformer fusion social interaction perception of the present invention. DETAILED DESCRIPTION
[0066] To facilitate understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings, but the present invention can be implemented in different forms and is not limited to the embodiments described in the text. On the contrary, these embodiments are provided to make the content disclosed in the present invention more thorough and comprehensive.
[0067] It should be noted that when an element is referred to as being "fixed on" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used in this article are for illustrative purposes only.
[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present invention belongs. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0069] For examples, please refer to the attached Figure 1 , a pedestrian trajectory prediction method integrating social interaction perception, mainly includes four components: embedding layer, Transformer encoder, pedestrian social relationship module and Transformer decoder, and specifically includes the following steps:
[0070] S1: First, the original pedestrian trajectory data is encoded into a high-dimensional feature space through a dedicated embedding layer, and the original trajectory sequence is converted into the embedding of the key information of each pedestrian's movement, providing a basis for further feature extraction;
[0071] S2: Then, based on the Transformer encoder, the temporal features are extracted from the embedded features to model the temporal relationship in the trajectory data;
[0072] S3: Then, a pedestrian social graph is constructed based on the dynamic calculation from their time-varying spatial configuration and the interaction relationships between pedestrians in the scene. The nodes in the social graph represent pedestrians and the edges represent their interaction intensity. GCN is then used to extract social and spatial features from the social graph, which enables the model to learn how pedestrians influence each other's movements in a shared space.
[0073] S4: Finally, the Transformer decoder integrates the temporally and spatially processed features that combine historical motion information and current social interactions to generate a comprehensive integrated feature representation.
[0074] It should be noted that, in this embodiment, in step S2, the self-attention mechanism is specifically used to enable the model to dynamically focus on different parts of the trajectory sequence, thereby capturing complex motion patterns at different time steps and rich features of historical motion information, so as to be better used for future pedestrian trajectory prediction.
[0075] Furthermore, in step S1, the embedding layer first converts the vectors of the merged input observation sequence and the prediction sequence into an embedded space, which is specifically described as follows: The embedding layer receives the input of the merged pedestrian observation trajectory sequence And the predicted trajectory sequence The shape of the observed trajectory sequence is defined as follows:
[0076]
[0077] B represents the batch size, is the length of the observed trajectory sequence, in_size represents the feature dimension in each time step, and K represents the number of different prediction modes in the predicted trajectory sequence. is the length of the predicted trajectory sequence, so the shape of the predicted trajectory sequence can be expressed as:
[0078]
[0079] The observation trajectory sequence Expanding in the second dimension (the pattern dimension), replicating K times, the shape becomes The predicted trajectory sequence Expand on the first dimension (batch dimension), replicate B times, and the shape becomes These two parts are spliced in the time step dimension (the third dimension) to obtain a complete pedestrian trajectory sequence Its shape is In order to meet the input requirements of the embedding layer, the concatenated Reshape into:
[0080]
[0081] In this way, the time series data of each sample consists of two parts: the observation part and the prediction part. Each time step contains in_size features, such as two-dimensional coordinates (x, y). Finally, the merged reshaped sequence After being converted into an embedding space by this embedding layer, the embedded feature E is obtained:
[0082] E=W e flatten(X)+b c
[0083] Where flatten(X) means flattening each sequence into a one-dimensional vector, W e and b c are the weights and biases of the linear layer.
[0084] It should be noted that, in this embodiment, this combined processing method allows the model to consider the possibility of past pedestrian behaviors and future pedestrian behaviors in the same embedding space at the same time, and can more comprehensively understand and infer the overall motion trajectory of pedestrians, thereby making the prediction more coherent and accurate.
[0085] Furthermore, in step S2, the Transformer encoder encodes the merged pedestrian state to generate an embedded feature, which is specifically described as follows: after receiving the above embedded feature E as input to the encoder, the self-attention calculation is started, and the specific formula is:
[0086]
[0087] The query Q, key K, and value V are obtained by different linear transformations of the input E. k is a key in dimension; the output of the self-attention calculation can be reintegrated into the input stream through residual connections and layer normalization:
[0088] X out =LayerNorm(E+Attention(Q,K,V))
[0089] The output is then passed to a feed-forward network, which is calculated as follows:
[0090] F(X out )=W 2 ReLU(W 1 x+b 1 )+b 2
[0091] W 1 With W 2 is the weight of the linear transformation, b 1 With b 2 is the bias, and the output is then passed to the feedforward network, which is calculated as follows:
[0092] X final =LayerNorm(X out +F(X out ))
[0093] Finally, the encoder outputs the encoded information which will contain the embedded features of pedestrians.
[0094] Furthermore, in step S3, the specific steps of constructing the pedestrian social graph are:
[0095] Given N pedestrians and observation time step T, the position of each pedestrian i at time t is represented by P i (t), where i = 1, ..., N and t = 1, ..., T. In this process, each node represents a pedestrian, and each edge represents the relative distance between pedestrians. Then, at each time step t, the node feature matrix V(t) and the adjacency matrix A(t) are defined to jointly form the representation of the relative position generation graph between pedestrians, which can be:
[0096] V(t)=[P 1 (t),P 2 (t),…P N (t)] T
[0097]
[0098] Among them A ij (t) represents the adjacency relationship between pedestrian i and pedestrian j at time step t, σ is the scale parameter of the Gaussian kernel, and ||P i -P j || 2 is the distance between pedestrian i and pedestrian j at the observation time step,
[0099] In order to improve the stability of the graph convolution operation, the adjacency matrix needs to be normalized. First, the degree matrix D is calculated, and its diagonal elements are:
[0100] D ii =∑ j A ij
[0101] Then, the normalized adjacency moment It can be calculated by the following formula:
[0102]
[0103] Then GCN extracts high-level spatial interaction features from the node feature matrix V through multi-layer convolution operations. The calculation formula for the l-th layer of graph convolution is:
[0104]
[0105] Among them, H (l) is the feature matrix of layer l, is the weight matrix of the lth layer, is the bias vector of the lth layer, σ(·) is the ReLU nonlinear activation function, is the node feature matrix of the l+1th layer;
[0106] Finally, in order to extract effective pedestrian spatial interaction features, we input the pedestrian trajectory data into GCN, given the node feature X = V and the normalized adjacency matrix After multiple layers of graph convolution, the feature representation of GCN output is:
[0107]
[0108] It should be noted that, in this embodiment, the pedestrian social relationship module is responsible for the spatial relationship between pedestrians, models pedestrian interactions as graphs, and uses GCN to extract features, which is specifically described as follows: In order to effectively capture the social relationship between pedestrians, we first convert the pedestrian trajectory data into a graph structure;
[0109] It should also be noted that the final characteristic matrix H GCN It not only contains the high-level spatial interaction features of each pedestrian in the scene, but also captures a wider range of spatial contextual relationships through multi-layer superposition.
[0110] Furthermore, in the present invention, in step S4, the final Transformer decoder combines the embedded pedestrian features and social graph features to predict future pedestrian trajectories, wherein the specific steps are as follows: First, the Transformer decoder embeds the pedestrian features X obtained above into final High-level spatial interaction features H extracted with GCN GCN For integration, assuming H GCN Each node feature is represented as h GCN,j , then the integrated feature is expressed as:
[0111]
[0112] Among them, N(i) represents the neighbor set of pedestrian i, a ij It is the weight coefficient calculated by the self-attention mechanism:
[0113]
[0114] score(h i ,h GCN,j ) is the similarity measure between pedestrian i and neighbor j, which can be expressed by dot product:
[0115]
[0116] Here W q and W k They are the linear transformation matrices of query and key respectively;
[0117] Then the integrated feature z i Decoding is performed through the feature processing decoder to generate a high-level interactive feature representation. Here, the Transformer decoder usually uses a multi-layer decoder, and the output of each layer is:
[0118] f i l+1 =DecoderLayer(f i (l) ,Z,Α)
[0119] Among them, f i (0) =z i , f i (l) represents the feature representation of the lth layer, Z is the integrated feature matrix of all pedestrians, and Α is the adjacency matrix; the internal operation of each layer of the decoder can be further decomposed into a multi-head self-attention mechanism, a feedforward neural network, as well as residual connections and layer normalization:
[0120] f i MHSA =MultiHeadAttention(f i (l) ,Z,Α)
[0121] f i FFN =FFN(f i MHSA )
[0122] Finally, the high-level features output by the decoder are represented as:
[0123] f i =f i (l)
[0124] Finally, the high-level feature representation f output by the feature processing decoder isi The input is sent to the regression head to generate the predicted pedestrian trajectory. The regression head is usually composed of a fully connected layer, and its output is the trajectory prediction of pedestrian i in the future time step:
[0125]
[0126] in, and are the weight matrix and bias vector of the regression head, respectively. represents the predicted pedestrian i in the future T pred A two-dimensional sequence of coordinates at time steps.
[0127] The above is an exemplary description of the present invention in conjunction with the accompanying drawings. It is obvious that the specific implementation of the present invention is not limited to the above-mentioned method. As long as such non-substantial improvements are made by adopting the method concept and technical solution of the present invention, or the concept and technical solution of the present invention are directly applied to other occasions without improvement, they are all within the protection scope of the present invention.
Claims
1. A pedestrian trajectory prediction method integrating social interaction perception mainly includes four components: embedding layer, Transformer encoder, pedestrian social relationship module and Transformer decoder, characterized in that: The following steps are involved: S1: First, the original pedestrian trajectory data is encoded into a high-dimensional feature space through a dedicated embedding layer, and the original trajectory sequence is converted into the embedding of the key information of each pedestrian's movement, providing a basis for further feature extraction; S2: Then, based on the Transformer encoder, the temporal features are extracted from the embedded features to model the temporal relationship in the trajectory data; S3: Then, a pedestrian social graph is constructed based on the dynamic calculation from their time-varying spatial configuration and the interaction relationships between pedestrians in the scene. The nodes in the social graph represent pedestrians and the edges represent their interaction intensity. GCN is then used to extract social and spatial features from the social graph, which enables the model to learn how pedestrians influence each other's movements in a shared space. S4: Finally, the Transformer decoder integrates the temporally and spatially processed features that combine historical motion information and current social interactions to generate a comprehensive integrated feature representation.
2. The method for predicting pedestrian trajectories integrating social interaction perception according to claim 1, characterized in that: In step S1, the embedding layer first converts the vectors of the merged input observation sequence and prediction sequence into the embedded space, which is specifically described as follows: The embedding layer receives the input of the merged pedestrian observation trajectory sequence And the predicted trajectory sequence The shape of the observed trajectory sequence is defined as follows: B represents the batch size, is the length of the observed trajectory sequence, in_size represents the feature dimension in each time step, and K represents the number of different prediction modes in the predicted trajectory sequence. is the length of the predicted trajectory sequence, so the shape of the predicted trajectory sequence can be expressed as: The observation trajectory sequence Expanding in the second dimension (the pattern dimension), replicating K times, the shape becomes The predicted trajectory sequence Expand on the first dimension (batch dimension), replicate B times, and the shape becomes These two parts are spliced in the time step dimension (the third dimension) to obtain a complete pedestrian trajectory sequence Its shape is In order to meet the input requirements of the embedding layer, the concatenated Reshape into: In this way, the time series data of each sample consists of two parts: the observation part and the prediction part. Each time step contains in_size features, such as two-dimensional coordinates (x, y). Finally, the merged reshaped sequence After being converted into an embedding space by this embedding layer, the embedded feature E is obtained: E=W e ·flatten(X)+b c Where flatten(X) means flattening each sequence into a one-dimensional vector, W e and b c are the weights and biases of the linear layer.
3. The pedestrian trajectory prediction method integrating social interaction perception according to claim 1 is characterized in that: In step S2, the Transformer encoder encodes the merged pedestrian state to generate an embedded feature, which is specifically described as follows: after receiving the above embedded feature E as input to the encoder, the self-attention calculation is started, and the specific formula is: The query Q, key K, and value V are obtained by different linear transformations of the input E. k , which is the key in dimension; the output of the self-attention calculation can be reintegrated into the input stream through residual connection and layer normalization: X out =LayerNorm(E+Attention(Q,K,V)) The output is then passed to a feed-forward network, which is calculated as follows: F(X out )=W2ReLU(W1x+b1)+b2 W1 and W2 are the weights of the linear transformation, b1 and b2 are the biases, and then the output is passed to the feedforward network, which is calculated as follows: X final =LayerNorm(X out +F(X out )) Finally, the encoder outputs the encoded information which will contain the embedded features of pedestrians.
4. The method for predicting pedestrian trajectories integrating social interaction perception according to claim 1, characterized in that: In step S3, the specific steps of constructing the pedestrian social graph are: Given N pedestrians and observation time step T, the position of each pedestrian i at time t is represented by P i (t), where i = 1, ..., N and t = 1, ..., T. In this process, each node represents a pedestrian, and each edge represents the relative distance between pedestrians. Then, at each time step t, the node feature matrix V(t) and the adjacency matrix A(t) are defined to jointly form the representation of the relative position generation graph between pedestrians, which can be: V(t)=[P1(t),P2(t),…P N (t)] T Among them A ij (t) represents the adjacency relationship between pedestrian i and pedestrian j at time step t, σ is the scale parameter of the Gaussian kernel, and ||P i -P j ||2 is the distance between pedestrian i and pedestrian j at the observation time step, In order to improve the stability of the graph convolution operation, the adjacency matrix needs to be normalized. First, the degree matrix D is calculated, and its diagonal elements are: D ii =S j A ij Then, the normalized adjacency moment It can be calculated by the following formula: Then GCN extracts high-level spatial interaction features from the node feature matrix V through multi-layer convolution operations. The calculation formula for the l-th layer of graph convolution is: Among them, H (l) is the feature matrix of layer l, is the weight matrix of the lth layer, is the bias vector of the lth layer, σ(·) is the ReLU nonlinear activation function, is the node feature matrix of the l+1th layer; Finally, in order to extract effective pedestrian spatial interaction features, we input the pedestrian trajectory data into GCN, given the node feature X = V and the normalized adjacency matrix After multiple layers of graph convolution, the feature representation of GCN output is:
5. The pedestrian trajectory prediction method integrating social interaction perception according to claim 1 is characterized in that: In step S4, the Transformer decoder finally combines the embedded pedestrian features and social graph features to predict the future pedestrian trajectory. The specific steps are as follows: First, the Transformer decoder embeds the pedestrian features X obtained above final High-level spatial interaction features H extracted with GCN GCN For integration, assuming H GCN Each node feature is represented as h GCN,j , then the integrated feature is expressed as: Among them, N(i) represents the neighbor set of pedestrian i, a ij It is the weight coefficient calculated by the self-attention mechanism: score(h i ,h GCN,j ) is the similarity measure between pedestrian i and neighbor j, which can be expressed by dot product: Here W q and W k They are the linear transformation matrices of query and key respectively; Then the integrated feature z i Decoding is performed through the feature processing decoder to generate a high-level interactive feature representation. Here, the Transformer decoder usually uses a multi-layer decoder, and the output of each layer is: f i l+1 =DecoderLayer(f i (l) ,Z,A) Among them, f i (0) =z i , f i (l) represents the feature representation of the lth layer, Z is the integrated feature matrix of all pedestrians, and Α is the adjacency matrix; the internal operation of each layer of the decoder can be further decomposed into a multi-head self-attention mechanism, a feedforward neural network, as well as residual connections and layer normalization: f i MHSA =MultiHeadAttention(f i (l) ,Z,A) f i FFN =FFN(f i MHSA ) Finally, the high-level features output by the decoder are represented as: f i =f i (l) Finally, the high-level feature representation f output by the feature processing decoder is i The input is sent to the regression head to generate the predicted pedestrian trajectory. The regression head is usually composed of a fully connected layer, and its output is the trajectory prediction of pedestrian i in the future time step: in, and are the weight matrix and bias vector of the regression head, respectively. represents the predicted pedestrian i in the future T pred A two-dimensional sequence of coordinates at time steps.
Citation Information
Cited By
Time-space interaction vehicle trajectory prediction method based on speed perception
CN120611190A