A Pedestrian Trajectory Prediction Method Based on Spatiotemporal Information

By constructing a pedestrian trajectory prediction model based on spatiotemporal information, combining graph convolutional neural network and ResNet18, and extracting spatiotemporal feature vectors, the problem of low pedestrian trajectory prediction accuracy in the existing technology is solved, and higher-precision pedestrian behavior prediction is achieved.

CN114638408BActive Publication Date: 2024-10-15NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing pedestrian trajectory prediction technology is difficult to accurately predict the future behavior of pedestrians, especially in complex public spaces. It is affected by multiple factors, resulting in low prediction accuracy.

Method used

Using a pedestrian trajectory prediction method based on spatiotemporal information, by obtaining pedestrian coordinates and performing coordinate conversion, a pedestrian trajectory vertex matrix is ​​constructed at each moment, the interaction between pedestrians is calculated, and input into the spatial feature encoder to extract temporal features and combine with graph convolution neural The network and ResNet18 extract scene features and generate spatiotemporal feature vectors for predicting pedestrians' future trajectories.

Benefits of technology

It improves the accuracy of pedestrian trajectory prediction and can more accurately consider scene information, pedestrian interaction information and historical trajectory information, improving the accuracy of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114638408B_ABST
    Figure CN114638408B_ABST
Patent Text Reader

Abstract

The present invention discloses a pedestrian trajectory prediction method based on spatiotemporal information. The method selects scene information, pedestrian interaction information and pedestrian historical trajectory information, three factors that will have a significant impact on pedestrian trajectories, from multiple characteristics of pedestrians as inputs of a neural network, thereby obtaining a pedestrian trajectory prediction method with higher accuracy. Specifically, the method includes: converting pedestrian historical trajectory information into a vertex matrix form, designing a kernel function to extract pedestrian interaction information from the historical trajectory information and generate an adjacency matrix, and eliminating pedestrian information in the input scene image to obtain pure background information. The results show that the network structure can correctly generate predicted trajectories based on pedestrian interaction characteristics and pedestrian motion states, and has achieved good prediction results on multiple data sets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pedestrian trajectory prediction, and in particular to a pedestrian trajectory prediction method based on spatiotemporal information. Background Art

[0002] Pedestrian behavior data analysis is widely used in many applications, which analyze pedestrian behavior data to understand pedestrians' future behavior and make final decisions, such as autonomous driving, road planning, urban safety, etc. However, in some cases, people need to go further to understand pedestrians' actions in an uninterrupted manner and infer their short-term or medium-term intentions. However, there are many factors that are closely related to the trajectory changes of a single pedestrian, such as the nature of obstacles near the pedestrian and their spatial distribution, the state of the ground, the pedestrian's destination, the pedestrian's age, the pedestrian's state, etc. A whole group of pedestrians in a public space will interact with each other and affect each other's behavior, which makes pedestrian trajectory prediction more difficult. In order to solve the problem of pedestrian trajectory prediction, several deep learning-based methods have been proposed in the relevant literature in the past few years.

[0003] A recursive neural network called Vanilla RNN is an extension of a two-layer fully connected neural network where the hidden layer has a feedback loop. This small change allows for more efficient modeling of sequential data. Vanilla RNN processes not only the input data belonging to the current step, but also the data from past steps stored in the hidden neurons. RNN plays an important role in sequence-related prediction, and the difficulty of coping with long-term information preservation has been successfully addressed using the long short-term memory (LSTM) structure. LSTM has shown good results in the natural language processing (NLP) domain by modeling latent data features and was later used for pedestrian trajectory prediction. For example, Sun et al. used the LSTM model to learn the environment and human activity patterns in the target environment from long-term observations (i.e., days to weeks).

[0004] Generative Adversarial Networks (GANs) rely on a generator (G) discriminator (D) architecture. They compete with each other: the G network tries to fool the discriminator network, while the D network adapts to new fake data. Therefore, in the GAN framework, the generator model and the discriminator model are trained simultaneously. In terms of tracking, GANs reduce the fragmentation that is typically present in many traditional trajectory prediction models and alleviate the necessity of computing expensive appearance features. Candidate observations are generated and updated by the generation component, and in order to process and classify candidate sequences, an LSTM component with a generation discriminator model is used simultaneously. This approach can form a high-precision model for human behavior prediction, especially group behavior. It is much lighter than previously known CNN-based solutions.

[0005] S. Hoermann et al. proposed an approach combining two networks: a CNN for long-term motion and a Bayesian estimate of the current dynamic environment as input. The scene analysis is based on 360° predicted regions in a single neural network, in addition to a network that performs static and dynamic region segmentation. Using rare dynamic units, the authors created a loss function based on counteracting the imbalance of pixels from different classes. They demonstrated that the network is able to predict highly complex scenes, including various types of different road users (i.e. pedestrians), for up to 3 seconds. In addition, the network can recognize different maneuver levels, e.g., left or right turns, as well as interactions between road users. Summary of the invention

[0006] In view of this, the purpose of the present invention is to provide a pedestrian trajectory prediction method based on spatiotemporal information, which constructs a pedestrian trajectory prediction network model with scene information, pedestrian interaction information and pedestrian historical trajectory information as input to achieve the goal of pedestrian trajectory prediction with higher accuracy. The model is trained on the ETH and UCY datasets, and ADE and FDE are selected as evaluation indicators.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] A pedestrian trajectory prediction method based on spatiotemporal information, the pedestrian trajectory prediction method comprising the following steps:

[0009] Step S1, obtaining a data set and processing the data set, which includes: first extracting the coordinates of pedestrians in the data set, and performing coordinate conversion to obtain the coordinates of pedestrians in a pixel coordinate system, and then constructing a vertex matrix of pedestrian trajectories at each moment based on the coordinates of pedestrians in the pixel coordinate system;

[0010] Step S2: converting the pedestrian trajectory vertex matrix obtained in step S1 into graph information, which includes: extracting the pedestrian trajectory matrix at several moments, calculating the interaction between pedestrians, and obtaining an adjacency matrix;

[0011] Step S3, inputting the graph information obtained in step S2 into a spatial feature encoder for processing, wherein the graph information includes pedestrian trajectory interaction information and scene information;

[0012] Step S4: using a temporal feature encoder to extract features of the temporal dimension from the output of the spatial feature encoder in step S3 to obtain a temporal and spatial feature vector;

[0013] Step S5: transform the dimension of the spatiotemporal feature vector obtained in step S4;

[0014] Step S6: predicting the future trajectory of the pedestrian based on the spatiotemporal feature vector after the dimension transformation in step S5.

[0015] Furthermore, in step S1, coordinate transformation is performed based on formula (1), and the expression of formula (1) is:

[0016]

[0017] In formula (1), u and v represent the x and y axes in the pixel coordinate system, x w ,y w represents the x and y axes in the world coordinate system, where the matrix H is expressed as:

[0018]

[0019] In formula (2), [r1 r2 t] is the camera external parameter, [r1 r2] is the rotation parameter, t is the translation parameter, M is the camera internal parameter, and s is the scale factor.

[0020] Furthermore, the step S2 specifically includes:

[0021] Step S201: the pedestrian trajectory vertex matrix is ​​expressed as:

[0022] V'={v ij |i∈{1,2,...,N},j∈{1,2}} (3)

[0023] In formula (3), the matrix V' has N rows, each row represents a pedestrian, and 2 columns, representing the x and y axes respectively;

[0024] Step S202: extract the vertex matrices at multiple times and set them as a group, which is expressed as:

[0025]

[0026] Step S203: Calculate the size of the interaction between pedestrians based on the pedestrian coordinate data obtained in step S202. The kernel function is:

[0027]

[0028] In formula (5), the value range is The larger the value, the greater the probability of pedestrian trajectory interaction; the smaller the value, the smaller the probability of pedestrian trajectory interaction;

[0029] Step S204: The generated adjacency matrix is:

[0030]

[0031] Furthermore, the step S3 specifically includes:

[0032] Step S301: For the vertex matrix of the pedestrian coordinate information obtained in step S2 and the adjacency matrix of the pedestrian interaction information, a frame is intercepted as the network input, and the input is expressed as: V' = {v ij |i∈{1,2,...,N},j∈{1,2} and, A'={a ij |i∈{1,2,...,N},j∈{1,2,...,N}};

[0033] Step S302: Input the network input obtained in step S301 into the graph convolutional neural network for processing, wherein the adjacency matrix is ​​added to the identity matrix and symmetric normalized, expressed as:

[0034] Step S303: According to the obtained calculate It is expressed as:

[0035]

[0036] In formula (7), That is The result after symmetric normalization is: yes The degree matrix of For an M×M dimensional matrix, first calculate the M dimensional vector, expressed as: in, Then according to Compute the diagonal matrix It is expressed as: in,

[0037] Step S304: the Input graph convolutional network, in which each layer will Multiply it with the input matrix and then send it to the fully connected network and nonlinear activation layer. When the input matrix of the nonlinear activation layer is X, the layer is expressed as:

[0038] Step S305: For the entire network, when its input is the vertex matrix V, its final output is:

[0039] v traj =GCN(V)=GCNlayer(GCNlayer...(GCNlayer(V))) (8)

[0040] In formula (8), v traj It is represented as the encoded feature vector of the pedestrian trajectory interaction information obtained in the end;

[0041] Step S306: Repeat steps S301 to S305 in chronological order to obtain v at different times. traj , and then arranged in time sequence to become the final pedestrian trajectory interaction encoding vector:

[0042]

[0043] Step S307: ResNet18 is used to extract scene features in the network input, and then the full connection and nonlinear activation layers are superimposed on the final output layer to generate a scene feature vector:

[0044] V scene =LeakyRelu(FC(ResNet(picture))) (10)

[0045] Step S308: concatenate the pedestrian trajectory interaction coding vector obtained in step S306 and the scene feature vector obtained in step S307 into the final output of the spatial feature encoder, which is expressed as:

[0046] V spatio =concat(V traj ,V scene ) (11)

[0047] Furthermore, the step S4 specifically includes:

[0048] Step S401: Set the spatial feature vector V spatio According to the time sequence, it is divided into T obs Vectors:

[0049]

[0050] Step S404: Set the length of each input time segment to T seg , then the input each time is:

[0051]

[0052] Step S405, the calculation process of each time series feature is expressed as:

[0053]

[0054] In formula (12), is the temporal encoding vector obtained by the i-th calculation, mem i is the memory latent vector calculated for the i-th time;

[0055] Step S406: concatenate the temporal coding vectors of different sequence segments to obtain a spatiotemporal feature vector:

[0056]

[0057] In formula (13),

[0058] Furthermore, in step S5, a dimension expander is used to transform the dimension of the spatiotemporal feature vector. When the input three-dimensional matrix is ​​H i ×W i ×C i When , the output matrix is ​​H o ×W o ×C o , where C o It is only related to the number of convolution kernels, C i is the time dimension, keeping other dimensions unchanged, the calculation formula is:

[0059]

[0060] In formula (14), N o is the output dimension, N i is the input dimension, F is the convolution kernel size, P is the number of padded pixels, and S is the convolution step size.

[0061] Furthermore, in step S5, the dimension expander adopts a stacked structure. When the input of each layer is X, the expression of each layer is:

[0062] layer Exp (X) = PReLu(Conv(X));

[0063] In step S5, the dimension expander is represented as a whole as follows:

[0064] V Exp =ExpNN(V st )=layer Exp (layer Exp ...(layer Exp (V st ))), where V st For the time

[0065] Sequence characteristic encoder output, V Exp is the output of the dimension expander.

[0066] Furthermore, in step S5, F=3, P=1, S=1.

[0067] Furthermore, the data set includes: UCY data set and ETH data set.

[0068] Furthermore, in step S6, the future trajectory of the pedestrian is predicted by inputting the spatiotemporal feature vector into a trajectory generator.

[0069] The beneficial effects of the present invention are:

[0070] In pedestrian trajectory prediction, there are many factors that affect the changes in pedestrian trajectory characteristics, so the accuracy of trajectory prediction is often not guaranteed. Based on this, the present invention selects scene information, pedestrian interaction information and pedestrian historical trajectory information from a variety of special types of pedestrians. These three factors will have a significant impact on pedestrian trajectories as inputs of the neural network to train the model to achieve more accurate pedestrian trajectory prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 A schematic diagram of a flow chart of a pedestrian trajectory prediction method based on spatiotemporal information in Example 1;

[0072] Figure 2 A schematic diagram of a model of a temporal feature encoder provided in Example 1;

[0073] Figure 3 This is a schematic diagram of the dimension expander structure provided in Example 1;

[0074] Figure 4 This is a schematic diagram of the model of the trajectory generator network provided in Example 1. DETAILED DESCRIPTION

[0075] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0076] Example 1

[0077] See also Figure 1-Figure 4 , this embodiment provides a pedestrian trajectory prediction method based on spatiotemporal information, including:

[0078] Step S1, obtain a training data set and process the data set, which specifically includes: first extracting the coordinates of the pedestrians in the data set, and performing coordinate conversion to obtain the coordinates of the pedestrians in the pixel coordinate system, and then constructing the vertex matrix of the pedestrian trajectory at each moment based on the pedestrian coordinates in the pixel coordinate system, wherein the data set uses the human trajectory data set UCY and ETH. The evaluation indicators average displacement error (ADE) and final displacement error (FDE) are selected.

[0079] Specifically, in this embodiment, step S1 specifically includes:

[0080] Read the data from the text file, put the read data into the matrix, and transform the pedestrian coordinates into the pixel coordinate system. The matrix for transforming the world coordinate system into the pixel coordinate system is:

[0081]

[0082] In formula (1), [r1 r2 t] is the camera external parameter, [r1 r2] is the rotation parameter, and t is the translation parameter; M is the camera internal parameter, and its specific value depends on factors such as lens distortion and lens focal length; s is the scale factor, which controls the scale relationship between the pixel coordinate system and the world coordinate system. It can also be written as:

[0083]

[0084] Therefore, the formula for conversion between coordinate systems is:

[0085]

[0086] In formula (2), u and v represent the x and y axes in the pixel coordinate system, and x w ,y w Represents the x and y axes in the world coordinate system.

[0087] Step S2: converting the pedestrian trajectory vertex matrix obtained in step S1 into graph information, which includes:

[0088] Extract the pedestrian trajectory matrix at several moments, calculate the interaction between pedestrians, and obtain the adjacency matrix;

[0089] Specifically, in this embodiment, step S2 specifically includes:

[0090] Step S201: the pedestrian trajectory vertex matrix is ​​expressed as:

[0091] V'={v ij |i∈{1,2,...,N},j∈{1,2}} (3)

[0092] In formula (3), the matrix V' has N rows, each row represents a pedestrian, and 2 columns, representing the x and y axes respectively;

[0093] Step S202: extract the vertex matrices at multiple times and set them as a group, which is expressed as:

[0094]

[0095] More specifically, in this embodiment, 8 vertex matrices may be selected and set as a group.

[0096] Step S203: Calculate the size of the interaction between pedestrians based on the pedestrian coordinate data obtained in step S202. The kernel function is:

[0097]

[0098] In formula (5), the value range is The larger the value, the greater the probability of pedestrian trajectory interaction; the smaller the value, the smaller the probability of pedestrian trajectory interaction;

[0099] Step S204: The generated adjacency matrix is:

[0100]

[0101] Step S3, inputting the graph information obtained in step S2 into a spatial feature encoder for processing, wherein the graph information includes pedestrian trajectory interaction information and scene information;

[0102] Specifically, in this embodiment, step S3 specifically includes:

[0103] Step S301: For the vertex matrix of the pedestrian coordinate information obtained in step S2 and the adjacency matrix of the pedestrian interaction information, a frame is intercepted as the network input, and the input is expressed as: V' = {v ij |i∈{1,2,...,N},j∈{1,2} and, A'={a ij |i∈{1,2,...,N},j∈{1,2,...,N}};

[0104] Step S302: Input the network input obtained in step S301 into the graph convolutional neural network for processing, wherein the adjacency matrix is ​​added to the identity matrix and symmetric normalized, expressed as:

[0105] Step S303: According to the obtained calculate It is expressed as:

[0106]

[0107] In formula (7), That is The result after symmetric normalization is: yes The degree matrix of For an M×M dimensional matrix, first calculate the M dimensional vector, expressed as: in, Then according to Compute the diagonal matrix It is expressed as: in,

[0108] Step S304: the Input graph convolutional network, in which each layer will Multiply it with the input matrix and then send it to the fully connected network and nonlinear activation layer. When the input matrix of the nonlinear activation layer is X, the layer is expressed as:

[0109] Step S305: For the entire network, when its input is the vertex matrix V, its final output is:

[0110] v traj =GCN(V)=GCNlayer(GCNlayer...(GCNlayer(V))) (8)

[0111] In formula (8), v traj It is represented as the encoded feature vector of the pedestrian trajectory interaction information obtained in the end;

[0112] Step S306: Repeat steps S301 to S305 in chronological order to obtain v at different times. traj , and then arranged in time sequence to become the final pedestrian trajectory interaction encoding vector:

[0113]

[0114] Step S307: ResNet18 is used to extract scene features in the network input, and then the full connection and nonlinear activation layers are superimposed on the final output layer to generate a scene feature vector:

[0115] V scene =LeakyRelu(FC(ResNet(picture))) (10)

[0116] Step S308: concatenate the pedestrian trajectory interaction coding vector obtained in step S306 and the scene feature vector obtained in step S307 into the final output of the spatial feature encoder, which is expressed as:

[0117] V spatio =concat(V traj ,V scene ) (11)

[0118] Step S4: Using a temporal feature encoder, extract the temporal dimension of the output of the spatial feature encoder in step S3 to obtain a spatiotemporal feature vector. The temporal feature extraction in this embodiment adopts a Transformer structure, and its specific structure diagram is shown in FIG. Figure 2shown.

[0119] Specifically, in this embodiment, step S4 specifically includes:

[0120] Step S401: Set the spatial feature vector V spatio According to the time sequence, it is divided into T obs Vectors:

[0121]

[0122] Step S404: Set the length of each input time segment to T seg , then the input each time is:

[0123]

[0124] Step S405, the calculation process of each time series feature is expressed as:

[0125]

[0126] In formula (12), is the temporal encoding vector obtained by the i-th calculation, mem i is the memory latent vector calculated for the i-th time;

[0127] Step S406: concatenate the temporal coding vectors of different sequence segments to obtain a spatiotemporal feature vector:

[0128]

[0129] In formula (13),

[0130] Step S5: transform the dimension of the spatiotemporal feature vector obtained in step S4;

[0131] In step S5, a dimension expander is used to transform the dimension of the spatiotemporal feature vector. When the input three-dimensional matrix is ​​H i ×W i ×C i When , the output matrix is ​​H o ×W o ×C o , where C o It is only related to the number of convolution kernels, C i is the time dimension, keeping other dimensions unchanged, the calculation formula is:

[0132]

[0133] In formula (14), N o is the output dimension, N iis the input dimension, F is the convolution kernel size, P is the number of padded pixels, and S is the convolution step size.

[0134] More specifically, in this embodiment, it is set that F=3, P=1, and S=1.

[0135] More specifically, in this embodiment, in step S5, the dimension expander adopts a stacked structure, and its specific structural diagram is as follows: Figure 3 When the input of each layer is X, the expression of each layer is:

[0136] layer Exp (X) = PReLu(Conv(X));

[0137] More specifically, in this embodiment, in step S5, the dimension expander is represented as a whole as follows:

[0138] V Exp =ExpNN(V st )=layer Exp (layer Exp ...(layer Exp (V st ))), where V st is the output of the timing feature encoder, V Exp is the output of the dimension expander.

[0139] In step S6, the spatiotemporal feature vector after dimension transformation in step S5 is used to predict the future trajectory of the pedestrian.

[0140] Specifically, the processed spatiotemporal information is input into the trajectory generator to predict the pedestrian trajectory of the next 12 frames. In this embodiment, the trajectory generator has a specific structure as follows: Figure 4 shown.

[0141] The matters not described in detail in the present invention are all known technologies to those skilled in the art.

[0142] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A pedestrian trajectory prediction method based on spatiotemporal information, characterized in that: The pedestrian trajectory prediction method comprises the following steps: Step S1, obtaining a data set and processing the data set, which includes: first extracting the coordinates of pedestrians in the data set, and performing coordinate conversion to obtain the coordinates of pedestrians in a pixel coordinate system, and then constructing a vertex matrix of pedestrian trajectories at each moment based on the coordinates of pedestrians in the pixel coordinate system; Step S2: converting the pedestrian trajectory vertex matrix obtained in step S1 into graph information, which includes: extracting the pedestrian trajectory matrix at several moments, calculating the interaction between pedestrians, and obtaining an adjacency matrix; Step S3, inputting the graph information obtained in step S2 into a spatial feature encoder for processing, wherein the graph information includes pedestrian trajectory interaction information and scene information; Step S4, using a time series feature encoder to extract features of the time series dimension from the output of the spatial feature encoder in step S3 to obtain a spatiotemporal feature vector; Step S5: transform the dimension of the spatiotemporal feature vector obtained in step S4; Step S6, predicting the future trajectory of the pedestrian based on the spatiotemporal feature vector after the dimension transformation in step S5; In step S1, coordinate transformation is performed based on formula (1), and the expression of formula (1) is: In formula (1), u and v represent the x and y axes in the pixel coordinate system, x w ,y w represents the x and y axes in the world coordinate system, where the matrix H is expressed as: In formula (2), [r1 r2 t] is the camera external parameter, [r1 r2] is the rotation parameter, t is the translation parameter, M is the camera internal parameter, and s is the scale factor; The step S2 specifically includes: Step S201: the pedestrian trajectory vertex matrix is ​​expressed as: V'={v ij |i∈{1,2,...,N},j∈{1,2}} (3) In formula (3), the matrix V' has N rows, each row represents a pedestrian, and 2 columns, representing the x and y axes respectively; Step S202: extract the vertex matrices at multiple times and set them as a group, which is expressed as: Step S203: Calculate the size of the interaction between pedestrians based on the pedestrian coordinate data obtained in step S202. The kernel function is: In formula (5), the value range is The larger the value, the greater the probability of pedestrian trajectory interaction; the smaller the value, the smaller the probability of pedestrian trajectory interaction; Step S204: The generated adjacency matrix is: The step S3 specifically includes: Step S301: For the vertex matrix of the pedestrian coordinate information obtained in step S2 and the adjacency matrix of the pedestrian interaction information, a frame is intercepted as the network input, and the input is expressed as: V' = {v ij |i∈{1,2,...,N},j∈{1,2} and, A'={a ij |i∈{1,2,...,N},j∈{1,2,...,N}}; Step S302: Input the network input obtained in step S301 into the graph convolutional neural network for processing, wherein the adjacency matrix is ​​added to the identity matrix and symmetric normalized, expressed as: Step S303: According to the obtained calculate It is expressed as: In formula (7), That is The result after symmetric normalization is: yes The degree matrix of For an M×M dimensional matrix, first calculate the M dimensional vector, expressed as: in, Then according to Compute the diagonal matrix It is expressed as: in, Step S304: the Input graph convolutional network, in which each layer will Multiply it with the input matrix and then send it to the fully connected network and nonlinear activation layer. When the input matrix of the nonlinear activation layer is X, the layer is expressed as: Step S305: For the entire network, when its input is the vertex matrix V, its final output is: v traj =GCN(V)=GCNlayer(GCNlayer...(GCNlayer(V))) (8) In formula (8), v traj It is represented as the encoded feature vector of the pedestrian trajectory interaction information obtained in the end; Step S306: Repeat steps S301 to S305 in chronological order to obtain v at different times. traj , and then arranged in time sequence to become the final pedestrian trajectory interaction encoding vector: Step S307: ResNet18 is used to extract scene features in the network input, and then the full connection and nonlinear activation layers are superimposed on the final output layer to generate a scene feature vector: V scene =LeakyRelu(FC(ResNet(picture))) (10) Step S308: concatenate the pedestrian trajectory interaction coding vector obtained in step S306 and the scene feature vector obtained in step S307 into the final output of the spatial feature encoder, which is expressed as: In spatio =concat(V traj ,V scene ) (11); The step S4 specifically includes: Step S401: Set the spatial feature vector V spatio According to the time sequence, it is divided into T obs Vectors: Step S404: Set the length of each input time segment to T seg , then the input each time is: Step S405, the calculation process of each time series feature is expressed as: In formula (12), is the temporal encoding vector obtained by the i-th calculation, mem i is the memory latent vector calculated for the i-th time; Step S406: concatenate the temporal coding vectors of different sequence segments to obtain a spatiotemporal feature vector: In formula (13), 2. The pedestrian trajectory prediction method based on spatiotemporal information according to claim 1, characterized in that: In step S5, a dimension expander is used to transform the dimension of the spatiotemporal feature vector. When the input three-dimensional matrix is ​​H i ×W i ×C i When , the output matrix is ​​H o ×W o ×C o , where C o It is only related to the number of convolution kernels, C i is the time dimension, keeping other dimensions unchanged, the calculation formula is: In formula (14), N o is the output dimension, N i is the input dimension, F is the convolution kernel size, P is the number of padded pixels, and S is the convolution step size.

3. The pedestrian trajectory prediction method based on spatiotemporal information according to claim 2, characterized in that: In step S5, the dimension expander adopts a stacked structure. When the input of each layer is X, the expression of each layer is: layer Exp (X)=PReLu(Conv(X)); In step S5, the dimension expander is represented as a whole as follows: V Exp =ExpNN(V st )=layer Exp (layer Exp ...(layer Exp (V st ))), where V st is the output of the timing feature encoder, V Exp is the output of the dimension expander.

4. The pedestrian trajectory prediction method based on spatiotemporal information according to claim 3, characterized in that: In step S5, F=3, P=1, S=1.

5. The pedestrian trajectory prediction method based on spatiotemporal information according to claim 3, characterized in that: The data sets include: UCY data set and ETH data set.

6. The pedestrian trajectory prediction method based on spatiotemporal information according to claim 3, characterized in that: In step S6, the future trajectory of the pedestrian is predicted by inputting the spatiotemporal feature vector into a trajectory generator.