A system for predicting agent motion trajectory
By using multiple trajectory decoding units with different learning rates and the back-propagation algorithm in the trajectory decoding module and dynamically adjusting the learning rate, the problem of reduced prediction accuracy of existing models over time and with environmental changes is solved, and efficient and fast trajectory prediction is achieved.
Patent Information
- Application Number
- CN202210569469.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-24
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-05-24
AI Technical Summary
As time goes by and the environment changes, the existing trajectory prediction model suffers from reduced prediction accuracy and excessive consumption of computing resources, making it unable to quickly adapt to adjustments to new data.
In the future trajectory decoding module, multiple trajectory decoding units trained with different learning rates are set up, and the parameters are updated through weighted summation and back propagation algorithm, and the learning rate is dynamically adjusted to adapt to data changes.
It improves the accuracy and efficiency of trajectory prediction, reduces the waste of computing resources, can quickly respond to data changes, and reduces concept drift.
Smart Images

Figure CN114936638B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of trajectory prediction, in particular to the field of future trajectory decoding, and more particularly to a system for agent motion trajectory prediction. Background Art
[0002] Accurately predicting an agent's trajectory is crucial for decision-making and planning in autonomous driving, intelligent robotics, and other applications. Trajectory prediction aims to predict possible future trajectories based on observed environmental information and the agent's trajectory, i.e., a sequence of coordinates sampled at fixed intervals in the past.
[0003] Traditional difficulties in trajectory prediction lie in: 1) the abstract interactions between agents and their complex impact on trajectories. An agent's trajectory decisions depend to some extent on the surrounding agents. For example, detouring, accelerating, and walking in groups are all related to surrounding agents. Different interactions have different impacts on the agent's trajectory. Coordinate sequences alone cannot fully perceive these interactions, making it difficult for algorithmic modeling and prediction. 2) Real-world constraints. Model predictions often conform only to theoretical results but fail to meet objective real-world constraints, such as wall-passing and excessive speed. This means that the algorithm is prone to making invalid predictions that are inconsistent with reality. 3) Multimodality. For the same trajectory, agents with different subjective intentions may produce different trajectories. For example, a pedestrian walking to an intersection may have the same trajectory, but may subsequently take two completely opposite, yet plausible, trajectories, either to the left or the right. This requires the model to provide a reasonable distribution for the predicted trajectories. Furthermore, in addition to uncertainty in agent intentions, there is also uncertainty in the agent's trajectory patterns. Trajectory pattern diversity manifests itself in two ways: 1) Changes in the agent's trajectory pattern over time or in response to events. For example, pedestrians in a shopping mall suddenly start running after hearing a fire alarm. 2) New agent trajectory patterns emerge in dynamic, open environments. For example, a young person appears running in a park where elderly people typically stroll early in the morning. The uncertainty of these trajectory patterns makes trajectory data susceptible to concept drift, where the characteristics of trajectory data change in unpredictable ways over time.
[0004] In recent years, the application of deep learning methods to trajectory prediction has led to solutions to the three traditional difficulties. TPNet (Trajectory Proposal Network) proposed a novel two-stage trajectory prediction method, enabling future trajectory modeling under different intentions. SGCN (Sparse Graph Convolution Network) proposed a sparse graph convolutional network for pedestrian trajectory prediction, using a sparse directed spatial graph to explicitly model sparse directed interactions, thereby modeling motion trends.
[0005] However, most of these existing methods use a fixed learning rate to train the entire model offline. This leads to problems when using models trained with a fixed learning rate to predict trajectory data, which is prone to concept drift. First, the characteristics of the trajectory data fed into the model change in unpredictable ways over time, resulting in a decrease in model prediction accuracy. Second, to maintain model prediction accuracy, the entire model must be retrained offline based on new trajectory data, making it impossible to quickly adjust to new data and consuming extremely high computing resources.
[0006] Therefore, there is a need to improve the existing technology. Summary of the Invention
[0007] Therefore, the object of the present invention is to overcome the above-mentioned defects of the prior art and provide a system for agent motion trajectory prediction.
[0008] The purpose of the present invention is achieved through the following technical solutions:
[0009] According to a first aspect of the present invention, a system for predicting agent motion trajectories is provided, comprising: a historical trajectory data processing module for extracting features from historical agent motion trajectory data to obtain historical agent motion trajectory features; a historical trajectory information encoding module for encoding the historical agent motion trajectory features based on a neural network to obtain historical agent motion trajectory data stream features; and a future trajectory decoding module, comprising a plurality of trajectory decoding units trained at different learning rates, configured to predict future agent motion trajectories based on the historical agent motion data stream features using corresponding trajectory decoding units to obtain corresponding first prediction results, and to obtain a second prediction result based on the first prediction results of the plurality of trajectory decoding units.
[0010] In some embodiments of the present invention, the future trajectory decoding module obtains the second prediction result based on the first prediction results of the plurality of trajectory decoding units, including: performing a weighted summation on the first prediction results of the plurality of trajectory decoding units to obtain the second prediction result, wherein the first prediction result of each trajectory decoding unit is respectively provided with a corresponding first weight.
[0011] In some embodiments of the present invention, the multiple trajectory decoding units trained with different learning rates are obtained by performing multiple rounds of iterations in the following training method: obtaining a training set, wherein the sample input data in the samples of the training set include historical agent motion trajectory data stream features, and the sample labels are real agent motion trajectories; using the training set to train multiple trajectory decoding units to predict future agent motion trajectories based on corresponding learning rates and historical agent motion trajectory data stream features, respectively, to obtain respective first prediction results; calculating first loss values corresponding to the multiple trajectory decoding units based on the respective first prediction results and the real agent motion trajectories; and updating the parameters of the corresponding trajectory decoding units through a backpropagation algorithm based on the first loss values corresponding to the multiple trajectory decoding units.
[0012] In some embodiments of the present invention, the system further includes: updating a first weight corresponding to a first prediction result of a trajectory decoding unit of a corresponding learning rate according to a corresponding first loss value, wherein the larger the corresponding first loss value, the smaller the corresponding first weight.
[0013] In some embodiments of the present invention, updating the parameters of the corresponding trajectory decoding units using a back-propagation algorithm based on the first loss values corresponding to the multiple trajectory decoding units includes: comparing the first loss values corresponding to the multiple trajectory decoding units, selecting the trajectory decoding unit corresponding to the smallest first loss value as the optimal trajectory decoding unit; resetting the parameters of all remaining trajectory decoding units to the parameters of the optimal trajectory decoding unit; and updating the parameters of the corresponding optimal trajectory decoding unit using the back-propagation algorithm.
[0014] In some embodiments of the present invention, the system further comprises: updating the learning rates of the remaining trajectory decoding units based on the learning rate of the optimal trajectory decoding unit, wherein the updating method comprises updating the learning rates of the remaining trajectory decoding units in a direction close to the learning rate of the optimal trajectory decoding unit.
[0015] In some embodiments of the present invention, the trajectory decoding unit includes: multiple trajectory representation layers and a trajectory output layer corresponding to each trajectory representation layer. The first prediction result is obtained by: performing trajectory representation based on historical proxy motion trajectory data stream features by each trajectory representation layer, and obtaining a future proxy motion trajectory based on the trajectory representation result by the corresponding trajectory output layer; and performing a weighted summation of the future proxy motion trajectories of the multiple trajectory output layers to obtain the first prediction result, wherein the output result of each trajectory output layer is respectively assigned a corresponding second weight.
[0016] In some embodiments of the present invention, the backpropagation algorithm is a hedged backpropagation algorithm. Updating the parameters of the corresponding optimal trajectory decoding unit using the hedged backpropagation algorithm includes: obtaining a second loss value of the corresponding trajectory output layer based on the future proxy motion trajectory and the real proxy motion trajectory output by each trajectory output layer; and updating the parameters of the corresponding trajectory output layer and the trajectory representation layer according to the corresponding second loss value.
[0017] In some embodiments of the present invention, the method for calculating the first loss value further includes: performing weighted summation on the second loss function of each trajectory output layer based on a second weight corresponding to an output result of each trajectory output layer to obtain the first loss value.
[0018] In some embodiments of the present invention, the system further includes: updating a second weight corresponding to an output result of a trajectory output layer corresponding to the optimal trajectory decoding unit according to the corresponding second loss value, wherein the larger the corresponding second loss value, the smaller the corresponding second weight.
[0019] In some embodiments of the present invention, the system further includes: an agent scene information encoding module for acquiring agent scene information based on a neural network and encoding the agent scene information to obtain agent scene features; a corresponding trajectory decoding unit for predicting future agent motion trajectories based on historical agent motion data stream features and corresponding agent scene features to obtain a corresponding first prediction result.
[0020] According to a second aspect of the present invention, a method for predicting agent motion trajectories is provided, comprising: extracting features from historical agent motion trajectory data to obtain historical agent motion trajectory features; encoding the historical agent motion trajectory features based on a neural network to obtain a historical agent motion trajectory feature data stream; predicting future agent motion trajectories based on the historical agent motion feature data stream using multiple trajectory decoding units trained at different learning rates, obtaining first prediction results for each of the multiple trajectory decoding units, and obtaining a second prediction result based on the multiple first prediction results.
[0021] According to a third aspect of the present invention, an electronic device is provided, comprising: one or more processors; and a memory, wherein the memory is used to store executable instructions; the one or more processors are configured to implement the steps of the method described in the second aspect of the present invention by executing the executable instructions.
[0022] Compared with the prior art, the advantages of the present invention are:
[0023] 1. The present invention incorporates multiple different trajectory decoding units trained at different learning rates into the future trajectory decoding module, and the final second prediction result is obtained by fusing the first prediction results of multiple trajectory decoding units. This overcomes the problem of existing models trained at a fixed learning rate, where the characteristics of the input data change in unpredictable ways over time, leading to reduced prediction accuracy. Furthermore, the present invention's future trajectory decoding module is adaptable to most current trajectory prediction models. These models can quickly adjust only the future trajectory decoding module based on newly available data, overcoming the problems of existing models that require not only adjustments to each model component but also offline retraining based on new data, resulting in low efficiency and significant consumption of computing resources.
[0024] 2. When training the future trajectory decoding module, the present invention dynamically and adaptively adjusts the learning rate of the trajectory decoding unit based on the training set. This allows for better adjustment and control of the overall learning speed of the future trajectory decoding module. This allows for better adaptation to the unpredictable changes in new trajectory data when faced with concept drift. When new trajectory data changes significantly, online training is performed and the parameters of the future trajectory decoding module are rapidly updated to improve convergence speed. When new trajectory data changes less significantly, the parameters of the future trajectory decoding module are smoothly updated to enhance overall prediction performance. Furthermore, a hedged backpropagation algorithm is used to update the trajectory representation layer, trajectory output layer, and the second weights corresponding to the output results of the trajectory output layer at different levels within the trajectory decoding unit. This enables the trajectory decoding unit to respond to data changes in real time, further reducing concept drift and improving prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The embodiments of the present invention are further described below with reference to the accompanying drawings, in which:
[0026] Figure 1 2. A schematic diagram of a system for predicting agent motion trajectory according to an embodiment of the present invention;
[0027] Figure 2 2. A schematic diagram of the structural principle of a future trajectory decoding module according to an embodiment of the present invention;
[0028] Figure 3 is a schematic diagram of a system for predicting agent motion trajectory according to another embodiment of the present invention;
[0029] Figure 4 FIG. 1 is a schematic diagram illustrating the principle of performing hedged back-propagation updating in a trajectory decoding unit of a future trajectory decoding module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below through specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0031] As mentioned in the background section, most existing methods use a fixed learning rate to train the entire model offline. This fixed learning rate model is used to predict trajectory data, which is prone to concept drift. This presents several problems: First, the characteristics of the trajectory data fed into the model change in unpredictable ways over time, leading to a decrease in model prediction accuracy. Second, to maintain model prediction accuracy, the entire model must be retrained offline based on new trajectory data, making it impossible to quickly adjust to new data and consuming significant computing resources.
[0032] In response to the problems existing in existing methods, the inventors investigated existing trajectory prediction models and found that the models generally include a historical trajectory data processing part for extracting features from historical trajectories, a historical trajectory information encoding part for encoding the extracted features, and a trajectory decoding part for predicting trajectories based on the encoded features. Each model has made many improvements in feature extraction and encoding through various algorithms and networks. In contrast, although there are variations in the trajectory decoding part, they are basically concentrated in two cases: a simple convolutional neural network (CNN) stack or a long short-term memory artificial neural network (LSTM) output. For most trajectory prediction models, the trajectory decoding part of each model has a high degree of similarity. Therefore, the trajectory decoding part is improved, and the improved trajectory decoding part can be adapted to most current trajectory prediction models. The corresponding model can directly perform online training on the improved trajectory decoding part based on newly emerging data and adjust the trajectory decoding part parameters by adjusting the learning rate of the trajectory decoding part at different learning rates to ensure the prediction accuracy of the corresponding model.
[0033] Based on the above research, the present invention provides a system for predicting agent motion trajectories, comprising: a historical trajectory data processing module for extracting features from historical agent motion trajectory data to obtain historical agent motion trajectory features; a historical trajectory information encoding module for encoding the historical agent motion trajectory features based on a neural network to obtain historical agent motion trajectory data stream features; and a future trajectory decoding module, comprising multiple trajectory decoding units trained at different learning rates. The module is configured to predict the future agent motion trajectory based on the historical agent motion data stream features via corresponding trajectory decoding units to obtain a corresponding first prediction result, and to obtain a second prediction result based on the first prediction results of the multiple trajectory decoding units. The present invention incorporates multiple trajectory decoding units trained at different learning rates into the future trajectory decoding module, and the final second prediction result is obtained by fusing the first prediction results of multiple trajectory decoding units. This overcomes the problem of existing models trained at a fixed learning rate, where the characteristics of the input data change in unpredictable ways over time, leading to reduced prediction accuracy. Furthermore, the future trajectory decoding module of the present invention is adaptable to most current trajectory prediction models and can be rapidly adjusted based on newly available data, simply by adjusting the future trajectory decoding module based on the corresponding model. This overcomes the problems of existing models, which not only require adjustments to every part of the model but also require offline retraining based on new data, resulting in low efficiency and significant consumption of computing resources.
[0034] According to one embodiment of the present invention, obtaining a second prediction result based on the first prediction results of multiple trajectory decoding units includes: performing a weighted summation of the first prediction results of the multiple trajectory decoding units to obtain the second prediction result, wherein the first prediction result of each trajectory decoding unit is respectively assigned a corresponding first weight. In the present invention, the corresponding first weight is adjusted during training based on the prediction accuracy of each trajectory decoding unit, with a higher prediction accuracy corresponding to a larger proportion of the first weight. In this way, not only the first prediction results of each trajectory decoding unit are integrated, but also the prediction accuracy of each trajectory decoding unit is considered, and a weighted sum is performed based on the first weight set corresponding to the first prediction result of each trajectory decoding unit, thereby further improving the prediction accuracy.
[0035] In order to better understand the present invention, each module of the system is described in detail below in conjunction with specific embodiments. Figure 1The agent motion trajectory prediction system includes: a historical trajectory data processing module a, a historical trajectory information encoding module b, and a future trajectory decoding module c. The future trajectory decoding module c includes multiple trajectory decoding units, such as trajectory decoding unit 1, trajectory decoding unit 2, and trajectory decoding unit n. The term "agent" is used to represent categories such as pedestrians, vehicles, or animals. The agent motion trajectory can be a pedestrian motion trajectory, a vehicle motion trajectory, or an animal motion trajectory. The agent motion trajectory prediction system of the present invention is applicable to predicting the motion trajectories of pedestrians, vehicles, animals, and other categories, but the present invention is not limited to this.
[0036] According to one embodiment of the present invention, each module independently selects an appropriate algorithm or neural network for implementation based on the agent's motion trajectory category. For example, the historical trajectory data processing module a selects a corresponding trajectory algorithm based on the agent's motion trajectory category requirements to extract features from the historical agent's motion trajectory data, generating historical agent motion trajectory features. The historical agent motion trajectory features include spatiotemporal interaction features between agents, thereby better modeling inter-agent interaction information. The historical trajectory information encoding module b can encode the historical agent motion trajectory data and historical agent motion trajectory features using convolutional neural networks, recurrent neural networks, or graph neural networks. The trajectory decoding unit in the future trajectory decoding module c is selected based on the specific agent motion trajectory prediction method. When this system is applied to pedestrian motion trajectory prediction, taking a social spatiotemporal graph convolutional neural network model (Social-STGCNN) for human trajectory prediction as an example, the historical trajectory data processing module a and the historical trajectory information encoding module b use the spatiotemporal graph convolutional neural network (STGCN) in the Social-STGCNN model to extract features from historical pedestrian motion trajectory data, and the trajectory decoding unit in the future trajectory decoding module c uses the temporal expander convolutional network (TXP-CNN) in the Social-STGCNN model to predict future pedestrian motion trajectories.
[0037] According to one embodiment of the present invention, the trajectory decoding unit in the future trajectory decoding module c includes: multiple trajectory representation layers and a trajectory output layer corresponding to each trajectory representation layer, see Figure 2The multiple trajectory representation layers are trajectory representation layer 1, trajectory representation layer 2, trajectory representation layer 3, etc. Each trajectory representation layer corresponds to trajectory output layer 1, trajectory output layer 2, trajectory output layer 3, etc. The output result of each trajectory output layer is corresponding to a second weight. That is, the output result of trajectory output layer 1 corresponds to the second weight α1, the output result of trajectory output layer 2 corresponds to the second weight α2, the output result of trajectory output layer 3 corresponds to the second weight α3, and so on. Each circled multiplication sign multiplies the output result of the corresponding trajectory output layer by the corresponding second weight, and each circled plus sign adds the results of the multiplication of the output result of each trajectory output layer by the corresponding second weight in sequence to obtain the first prediction result. Taking a social spatiotemporal graph convolutional neural network model (Social-STGCNN) for human trajectory prediction as an example, the trajectory decoding unit uses the time expander convolutional network (TXP-CNN) stack in the Social-STGCNN model to predict future pedestrian motion trajectories. Specifically, the time expander convolutional network (TXP-CNN) is used as a trajectory representation layer, and multiple time expander convolutional networks (TXP-CNN) are stacked to form multiple trajectory representation layers to predict future pedestrian motion trajectories and obtain a first prediction result.
[0038] According to another embodiment of the present invention, see Figure 3 The proxy motion trajectory prediction system includes a historical trajectory data processing module a, a historical trajectory information encoding module b, a proxy scene information encoding module d, and a future trajectory decoding module c. The historical trajectory data processing module a, the historical trajectory information encoding module b, and the future trajectory decoding module c are the same as those in the above-mentioned embodiment. The proxy scene information encoding module d encodes the proxy scene information using methods such as convolutional neural networks to obtain scene semantic information, thereby improving the interpretability of the final prediction results of the future trajectory decoding module c.
[0039] According to one embodiment of the present invention, the historical trajectory data processing module a and the historical trajectory information encoding module b in the system of the present invention are already trained modules in the existing corresponding proxy motion trajectory prediction model. Therefore, it is only necessary to use the existing trajectory data to generate a training set to train the future trajectory decoding module c in the system. Furthermore, as the characteristics of the trajectory data input to the model change in unpredictable ways over time, the new trajectory data can be used to generate a corresponding training set to train the future trajectory decoding module c in the system again. This allows for rapid adjustments to the future trajectory decoding module c, thereby ensuring the accuracy of the proxy motion trajectory prediction system.
[0040] Before training the future trajectory decoding module c in the corresponding agent motion trajectory prediction system, a training set needs to be constructed. According to one embodiment of the present invention, a method for constructing the training set includes:
[0041] The historical agent trajectory data processing module a extracts features from the historical agent trajectory data. The historical trajectory information encoding module b encodes the extracted features to obtain the historical agent trajectory data stream features. The historical agent trajectory data stream features serve as the sample input data, and the actual agent trajectory in real-world situations serves as the corresponding sample label to form a sample. This creates a training set consisting of several samples.
[0042] Since the use of a fixed learning rate for offline training of the entire trajectory prediction model will have many disadvantages, when the prediction accuracy decreases, you can choose to adjust the learning rate of the trajectory prediction model and perform offline training based on the new trajectory data to improve the prediction accuracy. However, the adjustment of the learning rate also requires a lot of prior knowledge, and it cannot play a practical role in the real environment and cannot be quickly adjusted according to the newly emerging data. Therefore, according to one embodiment of the present invention, the present invention provides a method for adjusting the learning rate of the corresponding trajectory decoding unit during the training process, and obtains multiple trajectory decoding units trained with different learning rates. Among them, the learning rates of the multiple trajectory decoding units are different at the beginning, some are large and some are small, and the corresponding learning rates are adaptively adjusted according to the actual training situation. The specific training steps include steps S1, S2, S3 and S4:
[0043] Step S1: obtaining a training set, wherein the sample input data in the samples of the training set include historical agent motion trajectory data stream features, and the sample label is the real agent motion trajectory.
[0044] Step S2: using the training set to train multiple trajectory decoding units to predict future agent motion trajectories based on corresponding learning rates and historical agent motion trajectory data stream features, and obtain respective first prediction results.
[0045] According to one embodiment of the present invention, each trajectory decoding unit includes: multiple trajectory representation layers and a trajectory output layer corresponding to each trajectory representation layer. The first prediction result is obtained by:
[0046] Each trajectory representation layer represents the trajectory based on the historical agent motion trajectory data stream features, and the corresponding trajectory output layer obtains the future agent motion trajectory based on the result of the trajectory representation;
[0047] A weighted sum is performed on the future agent motion trajectories of the multiple trajectory output layers to obtain a first prediction result, wherein the output result of each trajectory output layer is respectively set with a corresponding second weight.
[0048] Step S3: Calculate first loss values corresponding to the plurality of trajectory decoding units according to the respective first prediction results and the true proxy motion trajectory.
[0049] According to one embodiment of the present invention, a first loss value of a corresponding trajectory decoding unit is calculated based on a difference between the first prediction result and the true proxy motion trajectory.
[0050] According to another embodiment of the present invention, the method for calculating the first loss value further includes: performing weighted summation on the second loss function of each trajectory output layer based on a second weight corresponding to an output result of each trajectory output layer to obtain the first loss value.
[0051] According to one embodiment of the present invention, first loss values of multiple trajectory decoding units are weightedly summed according to first weights corresponding to first prediction results of the multiple trajectory decoding units to obtain a total loss value.
[0052] According to one embodiment of the present invention, the first weight corresponding to the first prediction result of the trajectory decoding unit of the corresponding learning rate is updated according to the corresponding first loss value, wherein the larger the corresponding first loss value, the smaller the corresponding first weight, and the sum of the first weights of all trajectory decoding units is 1. Specifically, the first weight of the corresponding trajectory decoding unit can be updated by the following calculation method:
[0053]
[0054] Among them, β′ i is the first weight corresponding to the updated i-th trajectory decoding unit, max means comparing the two parameters in the brackets and selecting a relatively large parameter as the first weight corresponding to the new first prediction result, ε a Represents the control constant of the first weight, so that the first weight will not be too low, avoiding the first prediction result predicted by the corresponding trajectory decoding unit from not playing a weighted role, β i represents the first weight corresponding to the current first prediction result of the i-th trajectory decoding unit, Represents the range parameter and the range is between (0, 1) to ensure that when the loss of the i-th trajectory decoding unit i The larger it is, the lower the prediction accuracy is, making the first weight smaller and the loss i represents the first loss value of the i-th trajectory decoding unit.
[0055] According to an embodiment of the present invention, after the first weights corresponding to the first prediction results of all trajectory decoding units are updated, the first weights are normalized.
[0056] Step S4: Based on the first loss values corresponding to the multiple trajectory decoding units, the parameters of the corresponding trajectory decoding units are updated using a backpropagation algorithm. Training and updating are stopped until the total loss falls within a set threshold or a preset number of iterations is reached.
[0057] According to one embodiment of the present invention, step S4 specifically includes:
[0058] Step S41 : comparing first loss values corresponding to a plurality of trajectory decoding units, and selecting the trajectory decoding unit corresponding to the smallest first loss value as the optimal trajectory decoding unit.
[0059] Step S42: Reset all parameters of the remaining trajectory decoding units to the parameters of the optimal trajectory decoding unit.
[0060] Step S43: updating the parameters of the corresponding optimal trajectory decoding unit through the back propagation algorithm.
[0061] According to one embodiment of the present invention, the back propagation algorithm in step S43 is a hedge back propagation algorithm, and updating the parameters of the optimal trajectory decoding unit by the hedge back propagation algorithm includes:
[0062] Step S431: According to the future agent motion trajectory and the real agent motion trajectory output by each trajectory output layer, a second loss value of the corresponding trajectory output layer is obtained.
[0063] According to one embodiment of the present invention, see Figure 4 , y is the real agent motion trajectory, calculate the difference between the future agent motion trajectory output by trajectory output layer 1, trajectory output layer 2, trajectory output layer 3 and the real agent motion trajectory y, and obtain the second loss value corresponding to trajectory output layer 1, trajectory output layer 2, trajectory output layer 3, etc., and hedge the calculated second loss value by backpropagating it to the corresponding trajectory output layer and trajectory representation layer to update the parameters of the corresponding trajectory output layer and trajectory representation layer.
[0064] According to one embodiment of the present invention, the second weight corresponding to the output result of the trajectory output layer corresponding to the optimal trajectory decoding unit is updated according to the corresponding second loss value, wherein the larger the corresponding second loss value, the smaller the corresponding second weight. The sum of the second weights corresponding to the output results of all trajectory output layers of the optimal trajectory decoding unit is 1. Specifically, the second weight corresponding to the output result of the trajectory output layer of the corresponding trajectory decoding unit can be updated by the following calculation method:
[0065]
[0066] in, The output result of the trajectory output layer l of the best trajectory decoding unit (here, it means that the i-th trajectory decoding unit is the best trajectory decoding unit) corresponds to the updated second weight. max means comparing the two parameters in the brackets and selecting a relatively large parameter as the second weight corresponding to the new output result. ε h Represents the control constant of the second weight, so that the second weight will not be too low, avoiding the output result of the corresponding trajectory output layer from not playing a weighted role, Represents the second weight corresponding to the current output result of the trajectory output layer l, Represents the range parameter and the range is between (0, 1) to ensure that when the trajectory output layer l The larger it is, the lower the prediction accuracy is, and the smaller the second weight is. Represents the second loss value corresponding to the trajectory output layer l.
[0067] According to one embodiment of the present invention, after the second weights corresponding to the output results of all trajectory output layers of the optimal trajectory decoding unit are updated, the second weights are normalized.
[0068] Step S432: Update the parameters of the corresponding trajectory output layer and the trajectory representation layer according to the corresponding second loss value. By using the above hedged backpropagation algorithm to update the parameters of the optimal trajectory decoding unit and the second weight corresponding to the output results of each trajectory output layer, since the shallow network (such as trajectory representation layer 1 and trajectory output layer 1, trajectory representation layer 2 and trajectory output layer 2) corresponds to the relatively superficial features extracted, the deep network (such as trajectory representation layer 3 and trajectory output layer 3, and the deeper trajectory representation layer 4 and trajectory output layer 4, trajectory representation layer 1 and trajectory output layer 1, etc.) Figure 3 、 Figure 4 The trajectory representation layer 4 and trajectory output layer 4, as well as the trajectory representation layer 1 and trajectory output layer 1, are not shown. The extracted features are often more abstract. When faced with data that has experienced concept drift, shallow networks often provide better representation results and higher learning efficiency. After concept drift occurs, the second weight corresponding to the shallow network's output results will rapidly increase in weight, preventing the shallow network's prediction accuracy from rapidly decreasing. However, after a longer training period, the deep network will have learned sufficient abstract feature representations, and the second weight corresponding to the deep network's output results will further increase in weight, further improving the prediction accuracy of the optimal trajectory decoding unit.
[0069] According to one embodiment of the present invention, the method further includes: updating the learning rates of the remaining trajectory decoding units based on the learning rate of the optimal trajectory decoding unit, wherein the updating method includes updating the learning rates of the remaining trajectory decoding units in a direction close to the learning rate of the optimal trajectory decoding unit. When the learning rate of the corresponding trajectory decoding unit is greater than the learning rate of the optimal trajectory decoding unit, the update is performed by the following calculation method:
[0070] lr′ i =lr i -δlr,
[0071] Among them, lr′ i represents the learning rate after the update of the i-th trajectory decoding unit, lr irepresents the current learning rate of the i-th trajectory decoding unit, δ represents the control constant of the learning rate, and lr represents a fixed learning rate. The fixed value can be set according to user needs, such as a fixed learning rate of 1 or 2.
[0072] When the learning rate of the corresponding trajectory decoding unit is less than the learning rate of the optimal trajectory decoding unit, it is updated by the following calculation method:
[0073] lr′ i =lr i +δlr.
[0074] In the above training method, the learning rate of the trajectory decoding unit is dynamically and adaptively adjusted based on the agent's motion trajectory data. Multiple different trajectory decoding units are obtained through online training with different learning rates. This allows for better adjustment and control of the overall learning speed of the future trajectory decoding module c. This allows for better adaptation to the unpredictable nature of new trajectory data in the face of concept drift. When new trajectory data changes significantly, the parameters of the future trajectory decoding module c are trained online and updated rapidly to improve convergence speed. When new trajectory data changes less significantly, the parameters of the future trajectory decoding module c are updated smoothly to enhance overall prediction performance. Furthermore, a hedged backpropagation algorithm is used to update the trajectory representation layer, trajectory output layer, and the second weights corresponding to the output results of the trajectory output layer at different levels within the trajectory decoding unit. This allows the trajectory decoding unit to respond to data changes in real time, thereby addressing the concept drift phenomenon caused by the uncertainty of the agent's motion trajectory features.
[0075] Furthermore, according to one embodiment of the present invention, when the above training method is combined with a specific data set and applied to pedestrian motion trajectory prediction, a social spatiotemporal graph convolutional neural network model (Social-STGCNN) for human trajectory prediction is taken as an example. The historical trajectory data processing module a and the historical trajectory information encoding module b both use the spatiotemporal graph convolutional neural network (STGCN) to extract and encode historical pedestrian motion trajectory data. The trajectory decoding unit in the future trajectory decoding module c uses a time expander convolutional network (TXP-CNN) stack to predict future pedestrian motion trajectories. Specifically, the time expander convolutional network (TXP-CNN) is used as a trajectory representation layer, and the last layer of the TXP-CNN forming the trajectory representation layer is input as the result to the corresponding trajectory output layer. Multiple time expander convolutional networks (TXP-CNN) are stacked to form multiple trajectory representation layers to predict future pedestrian motion trajectories and obtain a first prediction result. The Social-STGCNN model, trained offline on the ETH-UCY pedestrian trajectory prediction dataset with a batch size of 64, was trained online on the SNU pedestrian trajectory prediction dataset with a batch size of 1. Since the ETH-UCY pedestrian trajectory prediction dataset is a benchmark dataset divided by scene, while the SNU pedestrian trajectory prediction dataset distinguishes pedestrian trajectory patterns such as walking, queuing, winding, and hesitating, the SNU and ETH-UCY pedestrian trajectory prediction datasets differ significantly. Due to the different trajectory data patterns, the Social-STGCNN model suffers from accuracy issues and learning difficulties.
[0076] When a new dataset emerges, according to one embodiment of the present invention, the historical trajectory data processing module a and historical trajectory information encoding module b, which utilize a spatiotemporal graph convolutional network (STGCN), remain unchanged. The future trajectory decoding module c utilizes multiple trajectory decoding units of a time-expanded convolutional network (TXP-CNN) to initialize first weights corresponding to the first prediction results of the multiple trajectory decoding units and second weights corresponding to the output results of the trajectory output layer of each trajectory decoding unit. Different learning rates are set for the multiple trajectory decoding units to implement an adaptive learning rate algorithm. Subsequently, for each trajectory data in the SNU dataset, after feature extraction and encoding by the historical trajectory data processing module a and the historical trajectory information encoding module b using the spatiotemporal graph convolutional network (STGCN), the data is input into trajectory decoding units with different learning rates. The aforementioned training method is used to train and update the parameters in each trajectory decoding unit, update the learning rates of each trajectory decoding unit, and update the first weights of the first prediction results of the multiple trajectory decoding units and the second weights corresponding to the output results of the trajectory output layer of the optimal trajectory decoding unit. This allows for rapid adjustment of the future trajectory decoding module c, improving prediction accuracy.
[0077] The future trajectory decoding module C, composed of multiple different trajectory decoding units obtained through online training at different learning rates, can better adapt and predict more accurate future proxy motion trajectories when new proxy motion trajectory data changes in unpredictable ways. According to one embodiment of the present invention, a method for proxy motion trajectory prediction is provided based on multiple different trajectory decoding units obtained through online training at different learning rates, including:
[0078] Feature extraction is performed on the historical agent motion trajectory data to obtain the historical agent motion trajectory features.
[0079] The historical agent motion trajectory features are encoded based on a neural network to obtain a historical agent motion trajectory feature data stream.
[0080] Multiple trajectory decoding units trained with different learning rates are used to predict future agent motion trajectories based on historical agent motion feature data streams, thereby obtaining first prediction results of each of the multiple trajectory decoding units, and obtaining a second prediction result based on the multiple first prediction results.
[0081] According to one embodiment of the present invention, the method for predicting agent motion trajectories further includes: obtaining agent scene information based on a neural network and encoding the agent scene information through an agent scene information encoding module d to obtain agent scene features; and predicting future agent motion trajectories based on historical agent motion data stream features and corresponding agent scene features by a corresponding trajectory decoding unit to obtain a corresponding first prediction result.
[0082] According to one embodiment of the present invention, the training method of the above embodiment is demonstrated in detail in pseudocode. For example, when training the future trajectory decoding module, the learning rate of each trajectory decoding unit in the future trajectory decoding module c, as well as the first weights and parameters corresponding to the first prediction results of the trajectory decoding units are adaptively adjusted. The specific pseudocode process is shown as follows:
[0083]
[0084] Line 1 in the above pseudo code: represents the control constant ε that defines the first weight corresponding to the first prediction result of the trajectory decoding unit a , the control constant is also the lower limit of the first weight; the second line: represents the definition of the range parameter ζ a , the range parameter is also a scaling factor and ranges between (0, 1); the third line: indicates that one trajectory decoding unit is copied into multiple trajectory decoding units, the fourth line: indicates that the first weight β corresponding to the first prediction result of each trajectory decoding unit is initialized according to the mean number of trajectory decoding units, such as the first weight corresponding to the first prediction result of the i-th trajectory decoding unit is β i , i is 1, 2, 3..., the 5th and 6th lines: indicate that the historical agent motion trajectory data stream features obtained after feature extraction and encoding are input into each trajectory decoding unit; the 7th to 9th lines: indicate the first prediction result obtained by each trajectory decoding unit based on the input prediction. Indicates; Line 10: Indicates the weighted sum of the first prediction results of each trajectory decoding unit, Indicates; Lines 11-14 indicate obtaining the true agent motion trajectory, represented by y, and calculating the loss value loss of each trajectory decoding unit in turn i , i=1,2,3…; Lines 15-17 indicate that according to the loss values of all trajectory decoding units, the trajectory decoding unit with the smallest loss value is found and used as the optimal trajectory decoding unit, and the learning rate control constant δ corresponding to the optimal trajectory decoding unit is obtained. ibest , so that δ=δ tbest ; Lines 18-23: Indicates that based on the learning rate of the best trajectory decoding unit, the learning rate lr of the remaining trajectory decoding units is updated i ; Line 24: indicates that the parameters of the remaining trajectory decoding units are all reset to the parameters of the optimal trajectory decoding unit; Line 25: indicates that the first weight of the first prediction result of each trajectory decoding unit is updated to obtain β′ i ; Lines 26 and 27: represent the first loss value loss of the decoding unit according to the optimal trajectory ibest Back propagation updates the parameters of the unit, where the back propagation algorithm can be a conventional back propagation algorithm or a hedged back propagation algorithm; Lines 28 and 29: represent the normalization of the first weight to obtain β″ i .
[0085] According to one embodiment of the present invention, lines 26 and 27 represent the first loss value loss. ibest (The following is directly based on loss i Back propagation updates the parameters of the optimal trajectory decoding unit. When the back propagation algorithm is the hedge back propagation algorithm, the pseudo code process is expressed as follows:
[0086]
[0087]
[0088] Lines 1-5 in the pseudo code above indicate that after the features obtained through feature extraction and encoding are input to each trajectory representation layer and the corresponding trajectory output layer of the optimal trajectory decoding unit, each trajectory output layer outputs a prediction result of the future agent motion trajectory, where: The trajectory represents the output of layer l, is the transformation matrix corresponding to the trajectory representation layer l, The trajectory output layer l is based on and Output; Lines 6-8: represent the weighted summation of the prediction results output by each trajectory output layer based on the second weight corresponding to the output result of each trajectory output layer to obtain the first prediction result Line 9: represents the function for calculating the first loss value of the optimal trajectory decoding unit; Lines 10-14: represents the function for calculating the second loss value between the predicted result output by each trajectory output layer and the true trajectory, where the second loss value of the trajectory output layer l is Indicates; Lines 15-17: Indicates the first loss value loss i The second loss function of each trajectory output layer is obtained by weighted summation based on the second weight corresponding to the output result of each trajectory output layer; Line 18: represents the hedge back propagation algorithm; Line 19: represents the parameters of each trajectory representation layer input to the optimal trajectory decoding unit, such as the parameters of the trajectory representation layer l are Line 20: Indicates the initialization of the second weight corresponding to the output result of each track output layer, such as the second weight corresponding to the output result of track output layer 1. Line 21: represents the control constant ε that defines the second weight h , which is the lower limit of the second weight; Line 22: represents the definition of the range parameter ζ h , the range parameter is also a scaling factor and ranges between (0, 1); Line 23: The learning rate lr of the decoding unit according to the trajectory i and the second weight Calculate the transformation matrix of each layer About the partial derivative of the second loss value to achieve Parameter update; Line 24: represents the calculation of the partial derivative of the sum of the second loss values of all layers after layer l to achieve Parameter update; Line 25: indicates updating the second weight corresponding to the output result of each trajectory output layer, and obtaining Lines 26 and 27: Normalize the second weight corresponding to the output of each trajectory output layer to obtain α′ i .
[0089] It should be noted that although the above describes the various steps in a specific order, it does not mean that the steps must be performed in the above specific order. In fact, some of these steps can be executed concurrently or even in a different order as long as the required functions can be achieved.
[0090] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0091] Computer-readable storage media can be a tangible device that holds and stores the instructions used by an instruction execution device. Computer-readable storage media can, for example, include, but are not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, a punch card or a raised structure in a groove on which instructions are stored, for example, and any suitable combination thereof.
[0092] While various embodiments of the present invention have been described above, the above descriptions are intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A system for predicting agent motion trajectory, characterized in that: include: A historical trajectory data processing module is used to extract features from historical agent motion trajectory data to obtain historical agent motion trajectory features; A historical trajectory information encoding module is used to encode the historical agent motion trajectory features based on a neural network to obtain the historical agent motion trajectory data stream features; A future trajectory decoding module, comprising multiple trajectory decoding units trained at different learning rates, is configured to predict future agent motion trajectories based on historical agent motion data stream features using corresponding trajectory decoding units to obtain corresponding first prediction results, and to obtain a second prediction result based on the first prediction results of the multiple trajectory decoding units; The multiple trajectory decoding units trained at different learning rates are obtained by performing multiple rounds of iterations using the following training method: A training set is obtained, wherein sample input data in the samples of the training set include historical agent motion trajectory data stream features, and the sample labels are real agent motion trajectories; Using the training set, multiple trajectory decoding units are trained to predict future agent motion trajectories based on corresponding learning rates and historical agent motion trajectory data stream features, and obtain respective first prediction results; Calculating first loss values corresponding to the plurality of trajectory decoding units according to the respective first prediction results and the true agent motion trajectory; Based on the first loss values corresponding to the plurality of trajectory decoding units, parameters of the corresponding trajectory decoding units are updated through a back propagation algorithm.
2. The system according to claim 1, wherein: The future trajectory decoding module obtains a second prediction result based on the first prediction results of the plurality of trajectory decoding units, including: A weighted sum is performed on the first prediction results of the plurality of trajectory decoding units to obtain a second prediction result, wherein the first prediction result of each trajectory decoding unit is respectively provided with a corresponding first weight value.
3. The system according to claim 1, wherein: Also includes: According to the corresponding first loss value, the first weight corresponding to the first prediction result of the trajectory decoding unit of the corresponding learning rate is updated, wherein the larger the corresponding first loss value, the smaller the corresponding first weight.
4. The system according to claim 1, wherein: The updating of parameters of the corresponding trajectory decoding units by a back propagation algorithm based on the first loss values corresponding to the plurality of trajectory decoding units includes: Comparing the first loss values corresponding to the plurality of trajectory decoding units, and selecting the trajectory decoding unit corresponding to the smallest first loss value as the optimal trajectory decoding unit; Reset the parameters of the remaining trajectory decoding units to the parameters of the optimal trajectory decoding unit; The parameters of the corresponding optimal trajectory decoding unit are updated through the back-propagation algorithm.
5. The system according to claim 4, characterized in that Also includes: Based on the learning rate of the optimal trajectory decoding unit, the learning rates of the remaining trajectory decoding units are updated, wherein the updating method includes updating the learning rates of the remaining trajectory decoding units in a direction close to the learning rate of the optimal trajectory decoding unit.
6. The system according to claim 1, wherein: The trajectory decoding unit includes: multiple trajectory representation layers and a trajectory output layer corresponding to each trajectory representation layer. The first prediction result is obtained by: Each trajectory representation layer represents the trajectory based on the historical agent motion trajectory data stream features, and the corresponding trajectory output layer outputs the future agent motion trajectory based on the result of the trajectory representation; A weighted sum is performed on the future agent motion trajectories of the multiple trajectory output layers to obtain a first prediction result, wherein the output result of each trajectory output layer is respectively set with a corresponding second weight.
7. The system according to claim 6, characterized in that The back propagation algorithm is a hedged back propagation algorithm, which updates the parameters of the corresponding optimal trajectory decoding unit by the hedged back propagation algorithm, including: According to the future agent motion trajectory and the actual agent motion trajectory output by each trajectory output layer, the second loss value of the corresponding trajectory output layer is obtained; The parameters of the corresponding trajectory output layer and the parameters of the trajectory representation layer are updated according to the corresponding second loss value.
8. The system according to claim 7, characterized in that The calculation method of the first loss value further includes: performing weighted summation on the second loss function of each trajectory output layer based on a second weight corresponding to an output result of each trajectory output layer to obtain the first loss value.
9. The system according to claim 7, wherein: Also includes: According to the corresponding second loss value, the second weight corresponding to the output result of the trajectory output layer corresponding to the optimal trajectory decoding unit is updated, wherein the larger the corresponding second loss value is, the smaller the corresponding second weight is.
10. The system according to any one of claims 1 to 9, characterized in that: The system further includes: an agent scene information encoding module for acquiring agent scene information based on a neural network and encoding the agent scene information to obtain agent scene features; The corresponding trajectory decoding unit predicts the future agent motion trajectory based on the historical agent motion data stream features and the corresponding agent scene features to obtain a corresponding first prediction result.
11. A method for predicting agent motion trajectory, characterized in that: include: Perform feature extraction on historical agent motion trajectory data to obtain historical agent motion trajectory features; Encode the historical agent motion trajectory features based on a neural network to obtain a historical agent motion trajectory feature data stream; Multiple trajectory decoding units trained with different learning rates are used to predict future agent motion trajectories based on historical agent motion feature data streams, to obtain first prediction results of each of the multiple trajectory decoding units, and to obtain a second prediction result based on the multiple first prediction results.
12. A computer-readable storage medium, characterized in that A computer program is stored thereon, which can be executed by a processor to implement the steps of the method described in claim 11.
13. An electronic device, characterized in that: include: one or more processors; as well as a memory, wherein the memory is used to store executable instructions; The one or more processors are configured to implement the steps of the method of claim 11 by executing the executable instructions.
Citation Information
Patent Citations
Pedestrian trajectory prediction method, apparatus and device, and storage medium
CN114155270A