A pedestrian trajectory prediction method and system based on an improved SSAGCN algorithm
By improving the SSAGCN algorithm and combining it with a pedestrian attention allocation module and graph convolution technology, the problems of low accuracy and mutual interference in pedestrian trajectory prediction are solved, and higher accuracy pedestrian trajectory prediction is achieved.
Patent Information
- Application Number
- CN202310614993.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-05-29
AI Technical Summary
Existing technologies have low accuracy in predicting pedestrian trajectories and suffer from mutual interference between pedestrians.
An improved SSAGCN algorithm is adopted. By constructing an SSAGCN network model that integrates a pedestrian attention allocation module, and combining graph convolution and TXP-CNN, feature extraction and prediction are performed. The loss function is used to train the model to improve the accuracy of trajectory prediction.
It improves the accuracy of pedestrian trajectory prediction, better handles the mutual influence between pedestrians, and achieves more accurate trajectory prediction.
Smart Images

Figure CN116824693B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pedestrian trajectory prediction technology, and in particular to a pedestrian trajectory prediction method and system based on an improved SSAGCN algorithm. Background Technology
[0002] With the rapid development of artificial intelligence technology, autonomous driving technology is also advancing rapidly. Pedestrian trajectory prediction can help autonomous vehicles better identify and predict pedestrian movements. For assisted driving, predicting pedestrian trajectories can avoid potential risks associated with prolonged driving, thus preventing potential collisions and accidents. For example, at intersections, autonomous vehicles can use pedestrian trajectory prediction technology to predict pedestrian movements, thereby better planning their own driving path and speed to ensure traffic safety.
[0003] Pedestrian trajectory prediction also has important applications in robotics and intelligent surveillance systems. In robotics, pedestrian trajectory prediction helps robots better understand pedestrian behavior in their surroundings, thus enabling them to complete tasks more effectively. In video surveillance, pedestrian trajectory prediction can help detect abnormal behavior and pedestrian locations. For example, in the monitoring of shopping malls or public places, pedestrian trajectory prediction technology can be used to track customer movements and monitor their shopping behavior and walking routes.
[0004] In trajectory prediction tasks, pedestrians constantly interact with each other, taking into account the movement status of surrounding pedestrians to avoid collisions and other dangerous behaviors. Pedestrians also adjust their trajectories based on physical environment information. In such scenarios, pedestrian movements are diverse. Existing pedestrian trajectory prediction technologies suffer from low accuracy and the problem of mutual influence between pedestrians. Summary of the Invention
[0005] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a pedestrian trajectory prediction method and system based on the improved SSAGCN algorithm, which solves the problems of low accuracy in pedestrian trajectory prediction and mutual influence between pedestrians in the prior art.
[0006] To achieve the above and other related objectives, this invention provides a pedestrian trajectory prediction method based on an improved SSAGCN algorithm, comprising:
[0007] S1. Obtain the pedestrian trajectory prediction dataset, and process the data in the pedestrian trajectory prediction dataset to divide the pedestrian trajectory prediction dataset into a training set, a validation set, and a test set.
[0008] S2. Construct the SSAGCN network model;
[0009] S3. The backbone feature network of the SSAGCN network model is fused with the improved pedestrian attention allocation module to obtain the fused SSAGCN network model. The training set is input into the fused SSAGCN network model for feature extraction. Inter-pedestrian interaction information features and scene-pedestrian interaction information features are obtained through graph convolution. The weight parameters of the interaction information features are input into the fused SSAGCN network model. The fused SSAGCN network model learns the interaction information features. The training set is input into the fused SSAGCN network model for training to obtain the fused feature map.
[0010] S4. Predict the pedestrian trajectory coordinates in the training set using TXP-CNN to obtain the prediction results, and train the fused SSAGCN network model using the loss function.
[0011] S5. Input the validation set into the fused SSAGCN network model to obtain the optimal weights, and then test the test set to obtain the final trajectory prediction result.
[0012] In one embodiment of the present invention, the construction of the SSAGCN network model in step S2 includes:
[0013] Feature extraction networks are used to extract features, and the extracted features are used as feature layers.
[0014] Prediction networks are used to classify and locate features to obtain the final trajectory prediction results.
[0015] In one embodiment of the present invention, the pedestrian attention allocation module in step S3 includes a social attention module and a physical attention module for speed, direction, and distance. The formula for the social attention mechanism in the social attention module is:
[0016]
[0017]
[0018] in, Let be the velocity vector of node i at time t. Let be the velocity vector of node j at time t. and For node displacement information, α and β are the angles between the velocity vectors of node i and node j, and ω is a hyperparameter representing the pedestrian's attention parameters;
[0019] Obtain the attention function:
[0020] Where c is the number of nodes. It is the output value of the node;
[0021] The formula for the physical attention mechanism in the physical attention module is:
[0022] V ph =VGG19(I scence W vgg19 ),
[0023]
[0024] Among them, I scence For scene frame images, W vgg19 For the pre-trained weights of VGG19, V ph As a scene feature, W att For the parameters of the physical attention module, Including pedestrian i at t = 1, 2, ..., T obs All interaction information between time and scene, update the information included in node i at time t, and update it in the following way: Where Φ(·) represents the embedded network layer, and W e These are the weights embedded in the network layer.
[0025] In one embodiment of the present invention, step S4, predicting the pedestrian trajectory coordinates in the training set using TXP-CNN, includes:
[0026]
[0027] Q l+1 =σ((W) l Q l )+Q l l≥0,
[0028] Among them, W 0 The weights of the network layers, Q l Q is information obtained from the previous layer of the network. 0 To receive output information from graph convolution, σ is the activation function PReLU, and W... l Q represents the weights of layer l. l+1 For the predicted pedestrian trajectory, This is the output information obtained after convolution.
[0029] In one embodiment of the present invention, step S4, training the fused SSAGCN network model using a loss function, includes:
[0030]
[0031] Where W represents all the training parameters of the SSAGCN network model, and T obs For the observation time, Tpred To predict the time, For a uniform distribution, Standard deviation, This indicates a correlation.
[0032] This invention also provides a pedestrian trajectory prediction system based on an improved SSAGCN algorithm, comprising:
[0033] The dataset acquisition module is used to acquire the pedestrian trajectory prediction dataset and process the data in the pedestrian trajectory prediction dataset to divide the pedestrian trajectory prediction dataset into a training set, a validation set, and a test set.
[0034] The network model building module is used to build the SSAGCN network model;
[0035] The fusion module is used to fuse the backbone feature network of the SSAGCN network model with the improved pedestrian attention allocation module to obtain a fused SSAGCN network model. The training set is input into the fused SSAGCN network model for feature extraction. Inter-pedestrian interaction information features and scene-pedestrian interaction information features are obtained through graph convolution. The weight parameters of the interaction information features are input into the fused SSAGCN network model. The fused SSAGCN network model learns the interaction information features. The training set is input into the fused SSAGCN network model for training to obtain a fused feature map.
[0036] The prediction module is used to predict the pedestrian trajectory coordinates in the training set using TXP-CNN, obtain the prediction results, and train the fused SSAGCN network model using a loss function.
[0037] The testing module is used to input the validation set into the fused SSAGCN network model to obtain the optimal weights, and to obtain the final trajectory prediction result by testing the test set.
[0038] The present invention also provides an electronic device, including a processor and a memory, wherein the memory stores program instructions, and the processor executes the program instructions to implement the above-described pedestrian trajectory prediction method based on the improved SSAGCN algorithm.
[0039] As described above, the pedestrian trajectory prediction method and system based on the improved SSAGCN algorithm of the present invention have the following beneficial effects:
[0040] The pedestrian trajectory prediction method based on the improved SSAGCN algorithm of this invention applies SSAGCN to pedestrian trajectory prediction. In the original pedestrian interaction feature extraction network, a new attention allocation module is added to obtain more useful features and can better predict pedestrian trajectories.
[0041] The pedestrian trajectory prediction method based on the improved SSAGCN algorithm of this invention solves the problems of low accuracy and varying degrees of impact in pedestrian trajectory prediction. Attached Figure Description
[0042] Figure 1 This is a flowchart illustrating a pedestrian trajectory prediction method based on an improved SSAGCN algorithm, provided as an embodiment of this application.
[0043] Figure 2 The flowchart of a phase mask optimization algorithm for a pedestrian trajectory prediction method based on an improved SSAGCN algorithm is provided as another embodiment of this application.
[0044] Figure 3 This is a schematic diagram of the structure of a pedestrian trajectory prediction system based on the improved SSAGCN algorithm, provided in an embodiment of this application.
[0045] Figure 4 A structural block diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0046] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0047] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the illustrations only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0048] Please see Figure 1 , Figure 2 , Figure 1 This is a flowchart illustrating a pedestrian trajectory prediction method based on an improved SSAGCN algorithm, provided as an embodiment of this application. Figure 2 A flowchart of a phase mask optimization algorithm for a pedestrian trajectory prediction method based on an improved SSAGCN algorithm is provided as another embodiment of this application. This invention provides a pedestrian trajectory prediction method based on an improved SSAGCN algorithm, comprising:
[0049] Step S1: Obtain the pedestrian trajectory prediction dataset, and process the data in the pedestrian trajectory prediction dataset to divide the pedestrian trajectory prediction dataset into a training set, a validation set, and a test set.
[0050] Step S2: Construct the SSAGCN network model.
[0051] Step S3: The backbone feature network of the SSAGCN network model is fused with the improved pedestrian attention allocation module to obtain the fused SSAGCN network model. The training set is input into the fused SSAGCN network model for feature extraction. Inter-pedestrian interaction information features and scene-pedestrian interaction information features are obtained through graph convolution. The weight parameters of the interaction information features are input into the fused SSAGCN network model. The fused SSAGCN network model learns the interaction information features. The training set is input into the fused SSAGCN network model for training to obtain the fused feature map.
[0052] Step S4: Predict the pedestrian trajectory coordinates in the training set using TXP-CNN to obtain the prediction results, and train the fused SSAGCN network model using the loss function.
[0053] Step S5: Input the validation set into the fused SSAGCN network model to obtain the optimal weights, and then test the test set to obtain the final trajectory prediction result.
[0054] Specifically, the construction of the SSAGCN network model in step S2 includes:
[0055] Feature extraction networks are used to extract features, and the extracted features are used as feature layers.
[0056] Prediction networks are used to classify and locate features to obtain the final trajectory prediction results.
[0057] Specifically, the pedestrian attention allocation module in step S3 includes a social attention module and a physical attention module for speed, direction, and distance. The formula for the social attention mechanism in the social attention module is as follows:
[0058]
[0059]
[0060] in, Let be the velocity vector of node i at time t. Let be the velocity vector of node j at time t. and For node displacement information, α and β are the angles between the velocity vectors of node i and node j, and ω is a hyperparameter representing the pedestrian's attention parameters;
[0061] Obtain the attention function:
[0062] Where c is the number of nodes. It is the output value of the node;
[0063] The formula for the physical attention mechanism in the physical attention module is:
[0064] V ph =VGG19(I scence W vgg19 ),
[0065]
[0066] Among them, I scence For scene frame images, W vgg19 For the pre-trained weights of VGG19, V ph As a scene feature, W att For the parameters of the physical attention module, Including pedestrian i at t = 1, 2, ..., T obs All interaction information between time and scene, update the information included in node i at time t, and update it in the following way: Where Φ(·) represents the embedded network layer, and W e These are the weights embedded in the network layer.
[0067] Specifically, step S4, predicting pedestrian trajectory coordinates in the training set using TXP-CNN, includes:
[0068]
[0069] Q l+1 =σ((W) l Q l )+Q l l≥0,
[0070] Among them, Q l Q is information obtained from the previous layer of the network. 0 To receive output information from graph convolution, σ is the activation function PReLU, and W... l Q represents the weights of layer l. l+1 For the predicted pedestrian trajectory, This is the output information obtained after convolution.
[0071] Specifically, step S4, training the fused SSAGCN network model using the loss function, includes:
[0072]
[0073] Where W represents all the training parameters of the SSAGCN network model, and T obs For the observation time, T pred To predict the time, For a uniform distribution, Standard deviation, This indicates a correlation.
[0074] Please see Figure 3 , Figure 3 This is a schematic diagram of a pedestrian trajectory prediction system based on an improved SSAGCN algorithm, provided as an embodiment of this application. Similar in principle to the pedestrian trajectory prediction method based on the improved SSAGCN algorithm of this invention, this invention also provides a pedestrian trajectory prediction system based on the improved SSAGCN algorithm, comprising:
[0075] The dataset acquisition module 10 is used to acquire the pedestrian trajectory prediction dataset and process the data in the pedestrian trajectory prediction dataset to divide the pedestrian trajectory prediction dataset into a training set, a validation set and a test set.
[0076] Network model building module 20 is used to build the SSAGCN network model;
[0077] The fusion module 30 is used to fuse the backbone feature network of the SSAGCN network model with an improved pedestrian attention allocation module to obtain a fused SSAGCN network model. The training set is input into the fused SSAGCN network model for feature extraction. Inter-pedestrian interaction information features and scene-pedestrian interaction information features are obtained through graph convolution. The weight parameters of the interaction information features are input into the fused SSAGCN network model. The fused SSAGCN network model learns the interaction information features. The training set is input into the fused SSAGCN network model for training to obtain a fused feature map.
[0078] Prediction module 40 is used to predict the pedestrian trajectory coordinates in the training set using TXP-CNN, obtain the prediction results, and train the fused SSAGCN network model using a loss function.
[0079] The testing module 50 is used to input the validation set into the fused SSAGCN network model to obtain the optimal weights, and to obtain the final trajectory prediction result by testing the test set.
[0080] Please see Figure 4 , Figure 4 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The present invention also proposes an electronic device, comprising a processor and a memory. The memory stores program instructions, and the processor executes the program instructions to implement the aforementioned holographic retinal projection near-eye display method based on phase mask optimization. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The memory may include Random Access Memory (RAM) and may also include Non-Volatile Memory, such as at least one disk storage device. The memory can also be an internal memory of the Random Access Memory (RAM) type. The processor and memory can be integrated into one or more independent circuits or hardware, such as an Application Specific Integrated Circuit (ASIC). It should be noted that when the computer program in the aforementioned memory can be implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention.
[0081] On the other hand, embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the methods provided in the above embodiments, including, for example:
[0082] Obtain a pedestrian trajectory prediction dataset, and process the data in the pedestrian trajectory prediction dataset to divide the pedestrian trajectory prediction dataset into a training set, a validation set, and a test set;
[0083] Construct the SSAGCN network model;
[0084] The SSAGCN network model is fused with an improved pedestrian attention allocation module to obtain a fused SSAGCN network model. The training set is input into the fused SSAGCN network model for feature extraction. Inter-pedestrian interaction information features and scene-pedestrian interaction information features are obtained through graph convolution. The weight parameters of the interaction information features are input into the fused SSAGCN network model. The fused SSAGCN network model learns the interaction information features. The training set is input into the fused SSAGCN network model for training to obtain a fused feature map.
[0085] The pedestrian trajectory coordinates in the training set are predicted using TXP-CNN to obtain the prediction results, and the fused SSAGCN network model is trained using the loss function.
[0086] The validation set is input into the fused SSAGCN network model to obtain the optimal weights, and the final trajectory prediction result is obtained by testing the test set.
[0087] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. All or some of the modules can be selected according to actual needs to achieve the purpose of this embodiment.
[0088] In summary, the pedestrian trajectory prediction method based on the improved SSAGCN algorithm of this invention applies SSAGCN to pedestrian trajectory prediction. By adding a new attention allocation module to the original pedestrian interaction feature extraction network, more useful features are obtained, which can better predict pedestrian trajectories.
[0089] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A pedestrian trajectory prediction method based on an improved SSAGCN algorithm, characterized in that, The method comprises the following steps: S1, obtaining a pedestrian trajectory prediction data set, processing data in the pedestrian trajectory prediction data set, and dividing the pedestrian trajectory prediction data set into a training set, a validation set, and a test set; S2, constructing an SSAGCN network model; S3, fusing a main feature network of the SSAGCN network model with an improved pedestrian attention allocation module to obtain a fused SSAGCN network model, inputting the training set into the fused SSAGCN network model for feature extraction, obtaining pedestrian interaction information features and scene-pedestrian interaction information features through graph convolution, inputting weight parameters of the interaction information features into the fused SSAGCN network model, and learning the interaction information features by the fused SSAGCN network model, inputting the training set into the fused SSAGCN network model for training, and obtaining a fused feature map; S4, predicting pedestrian trajectory coordinates in the training set by using a TXP-CNN to obtain a prediction result, and training the fused SSAGCN network model by using a loss function; S5, inputting the validation set into the fused SSAGCN network model to obtain optimal weights, and testing the test set to obtain a final trajectory prediction result. The step S2 of constructing the SSAGCN network model comprises: a feature extraction network for feature extraction, and the extracted features serving as feature layers; a prediction network for classifying and positioning features to obtain a final trajectory prediction result.
2. The method of claim 1, wherein the method is based on an improved SSAGCN algorithm. The pedestrian attention allocation module in the step S3 comprises a social attention module and a physical attention module in terms of speed, direction, and distance, a formula of a social attention mechanism in the social attention module is as follows: wherein, is the velocity vector of node i at time t, is the velocity vector of node j at time t, and is the node displacement information, a and β are the angles between the velocity vector of node i and the velocity vector of node j, ω is a hyperparameter, representing the attention parameter of the pedestrian; Obtain attention function: where c is the number of nodes, is the output value of the node; a formula of a physical attention mechanism in the physical attention module is as follows: V ph = VGG19(I scence ,W vgg19 ), where I scence is the scene frame picture, W vgg19 is the pre-training weight of VGG19, V ph is the scene feature, W att is the physical attention module parameter, includes all interaction information of pedestrian i with the scene at t = 1, 2, …, T obs updates the information included by node i at t, and the update method is: where Φ(·) is the embedded network layer, W e is the weight of the embedded network layer.
3. The method of claim 1, wherein the improved SSAGCN algorithm is based on a social force model. The step S4 of predicting pedestrian trajectory coordinates in the training set by using the TXP-CNN comprises: Q l+1 = σ((W l Q l )+ Q l )l≥ 0, where W 0 is the weight of the network layer, Q l is the information obtained from the previous layer network, Q 0 is the output information received from the graph convolution, and σ is the activation function PReLU, W l is the weight of the l-th layer, Q l+1 is the predicted pedestrian trajectory, is the output information obtained after convolution.
4. The method of claim 1, wherein the improved SSAGCN algorithm is based on a social force model. The step S4 of training the fused SSAGCN network model by using the loss function comprises: where W is all the training parameters of the SSAGCN network model, T obs is the observation time, T pred is the prediction time, is the mean distribution, is the standard deviation, is the correlation.
5. A pedestrian trajectory prediction system based on improved SSAGCN algorithm, characterized in that, The method comprises: a data set acquisition module (10) for acquiring a pedestrian trajectory prediction data set, processing data in the pedestrian trajectory prediction data set, and dividing the pedestrian trajectory prediction data set into a training set, a validation set, and a test set; a network model construction module (20) for constructing an SSAGCN network model; a fusion module (30) for fusing a main feature network of the SSAGCN network model with an improved pedestrian attention allocation module to obtain a fused SSAGCN network model, inputting the training set into the fused SSAGCN network model for feature extraction, obtaining pedestrian interaction information features and scene-pedestrian interaction information features through graph convolution, inputting weight parameters of the interaction information features into the fused SSAGCN network model, and learning the interaction information features by the fused SSAGCN network model, inputting the training set into the fused SSAGCN network model for training, and obtaining a fused feature map; The prediction module (40) is configured to predict pedestrian trajectory coordinates in the training set by using a Txp-CNN to obtain a prediction result, and train the fused SSAGCN network model by using a loss function; The test module (50) is configured to input the verification set into the fused SSAGCN network model to obtain an optimal weight, and test the test set to obtain a final trajectory prediction result. The SSAGCN network model comprises: A feature extraction network configured to perform feature extraction, and the extracted features are used as feature layers; A prediction network configured to classify and locate the features to obtain a final trajectory prediction result. 6.An electronic device, comprising a processor and a memory, the memory storing program instructions, wherein the program instructions are configured to cause the processor to perform the method of any one of claims 1-5. The processor runs program instructions to implement the pedestrian trajectory prediction method based on the improved SSAGCN algorithm according to any one of claims 1 to 4.
Citation Information
Patent Citations
Graph neural network pedestrian trajectory prediction method based on attention mechanism
CN113888638A
Pedestrian occlusion detection method based on improved YOLOX algorithm
CN115082855A