A pedestrian trajectory prediction method, system, device and medium based on continuous learning
By employing a pseudo-sample replay mechanism based on a social generative model and a dynamic weighted loss function, the catastrophic forgetting problem in pedestrian trajectory prediction across multiple scenarios is solved. This approach achieves the goal of maintaining old knowledge in new scenarios while reducing computational resource consumption, thereby improving the accuracy and adaptability of pedestrian trajectory prediction.
Patent Information
- Application Number
- CN202511113147.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-08-11
AI Technical Summary
Existing technologies suffer from catastrophic forgetting problems in pedestrian trajectory prediction across multiple scenarios. They struggle to learn new knowledge in new scenarios while maintaining predictive ability for old scenarios, and they also consume high computational resources and impose heavy burdens on model management and storage.
A pseudo-sample replay mechanism based on a social generative model is adopted. By generating pseudo-samples with interactive attributes and combining them with a dynamic weighted loss function, the weights of the main model and the social generative model are updated, reducing the storage requirements of the original data. Trajectory prediction is performed using a long short-term memory network and a STGAT model.
It effectively alleviates the problem of catastrophic forgetting, improves the robustness and accuracy of cross-scene prediction, reduces the consumption of computing resources, enhances the realism and adaptability of pedestrian trajectory prediction, and improves the navigation reliability of humanoid robots in dynamic environments.
Smart Images

Figure CN120633467B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of embodied intelligence in the field of artificial intelligence, in particular to a pedestrian trajectory prediction method, system, device and medium based on continuous learning. BACKGROUND
[0002] The prior art has been able to solve the transfer learning problem of pedestrian trajectory prediction across a single scene in the surrounding pedestrian trajectory domain adaptive method, but if facing multiple scenes, it will be very difficult to extract the domain invariant features between them. And the method based on domain adaptation often only focuses on the performance of the model in the new scene, while ignoring the performance of the model in the old scene. In actual use, humanoid robots need to run safely and reliably in multiple scenes with changing environmental structures and pedestrian movement patterns. Therefore, a reliable pedestrian trajectory prediction system needs to be able to continuously adapt to new scenes, learn new knowledge, while maintaining the prediction ability for the old scenes that have been learned, that is, it has the ability of continuous learning.
[0003] Currently, there are some solutions for cross-scene pedestrian trajectory prediction, but there are still deficiencies. The first is the scene aggregation method, which combines the data of all scenes and trains a unified trajectory prediction model. The advantage is that the model structure does not need to be redesigned. However, the computational cost, including training time and storage space, is very high. Since the data sets of different scenes cannot be obtained all at once, each time new scene data is added, the model needs to be completely trained after all the data is merged, which is inefficient in practical applications of dynamically adding new scenes. The second is the special method, which trains a dedicated trajectory prediction model for each different scene. The advantage is that it can provide the best prediction performance for each specific scene. However, the number of models will increase linearly with the number of scenes, resulting in heavier model management and storage burden. At the same time, in actual operation, the problem of how to quickly and accurately select and switch to the corresponding special model according to the current scene has not been well solved. The last is the continuous learning method, which continuously iteratively updates the same trajectory prediction model on the continuously arriving new scene data stream. The advantage is that the model is single, the computational resource occupation is relatively controllable, there is no need to store all the original data of the old scenes, and the model can be updated in real time. However, this method faces the problem of catastrophic forgetting, when the model is trained on new scene data, its prediction performance on previously learned old scenes will decrease sharply or even completely lost. This makes the model unable to truly achieve the goal of stably retaining old knowledge in the process of learning new knowledge.
[0004] Chinese patent application CN117634587A discloses a continuous learning trajectory prediction system based on uncertainty perception, a continuous learning trajectory prediction system based on uncertainty perception and conditional generation memory module, which avoids the problems of large working memory requirement of rehearsal method and unreal and non-discriminative data generated by pseudo rehearsal. However, the application does not involve the social interaction behavior specific to pedestrian trajectory, which makes it difficult to restore the social scene characteristics of old tasks and lacks a certain adaptability to actual scenes. Therefore, in the application of pedestrian trajectory prediction technology to dynamic multi-scene humanoid robots, how to effectively alleviate or overcome the catastrophic forgetting problem in the continuous learning process, so that a single model can continuously learn the pedestrian trajectory pattern of a new scene without forgetting the knowledge of old scenes, and adapt to the social interaction attributes of pedestrian trajectory, is a technical problem to be solved. SUMMARY
[0005] The purpose of the present application is to provide a pedestrian trajectory prediction method, system, device and medium based on continuous learning, which considers the social interaction attributes specific to pedestrian trajectory, generates pseudo samples close to reality and with interaction attributes using a social generation model, and alleviates the catastrophic forgetting problem in the pedestrian trajectory prediction model in continuous scenes through pseudo sample playback based on the social generation model.
[0006] The purpose of the present application can be achieved by the following technical solutions:
[0007] According to one aspect of the present application, a pedestrian trajectory prediction method based on continuous learning is provided, and the specific steps include:
[0008] S1, real-time collection of motion data and task scene information of target pedestrians in the environment by sensors mounted on a humanoid robot, wherein the motion data includes position coordinates and instantaneous speed values in a global coordinate system, and the task scene information includes the number and initial positions of pedestrians in the scene;
[0009] S2, pre-processing of the motion data, and truncation of trajectory segments of a certain fixed time length, selection of the first several seconds in the trajectory segment as a historical trajectory sequence, and the rest as a future real trajectory label;
[0010] S3, inputting the historical trajectory sequence into a main model in the pedestrian trajectory prediction model for calculation to obtain a real predicted future trajectory sequence of the current task, and training and converging the model according to the mean square error between the predicted future trajectory and the real future trajectory as a loss function, wherein the main model includes a first trajectory encoder and a first trajectory decoder;
[0011] S4. Based on task scenario information, the social generation model in the pedestrian trajectory prediction model is used to generate pseudo-historical trajectories of the old task that have been trained, and input into the main model copy corresponding to the old task to generate pseudo-future trajectories. The pseudo-historical trajectory and pseudo-future trajectory are combined into pseudo samples, and the real predicted future trajectory sequence and historical trajectory sequence are combined into real samples. The real samples and pseudo samples are merged into a mixed dataset, and the weights of the main model and social generation model are iteratively updated.
[0012] S5. Based on the historical trajectory data collected in real time, the master model that has been trained outputs the sequence of predicted trajectory coordinates for the future.
[0013] Furthermore, the social generative model includes a variational autoencoder that maps the input to hidden variables, a second trajectory decoder that reconstructs the trajectory, and a social interaction encoder that obtains the interaction features of the target pedestrian.
[0014] Furthermore, the output time window of the second decoder of the social generation model is smaller than that of the first trajectory decoder.
[0015] Furthermore, the main model's structure consists of a long short-term memory network that does not model interaction relationships and an STGAT model that considers interaction relationships; the main model's loss function includes the loss on the current task sample and the loss on the replay sample, the loss function uses mean squared error, and the loss weight is obtained based on the number of tasks experienced.
[0016] Furthermore, the specific steps for iteratively updating the weights of the main model and the social generation model in S4 include: in the first task, the main model and the social generation model are trained using real samples, and after training, the current main model and social generation model copies are frozen and stored. When a new task appears, the main model and social generation model copies are first called to generate old task replay samples, i.e., pseudo samples. The pseudo samples are used together with the current task samples for training the main model and the social generation model, and so on for subsequent tasks, until the learning of the entire task sequence is completed.
[0017] Furthermore, the loss function of the social generative model Including reconstruction losses and variational loss The expression is:
[0018] ,
[0019] in, For the input data sequence The expected value of the log-likelihood. To hide variables Z The prior distribution, It is the identity matrix. is a hidden variable Z posterior distribution of is a second encoder weight is a second decoder weight, hidden variable Z is obtained by encoding an input data sequence by an encoder, is a KL divergence.
[0020] According to another aspect of the present application, there is provided a system of pedestrian trajectory prediction method based on continuous learning, the system comprising a sensor module, a data processing module, a prediction execution module and a control interface module;
[0021] The sensor module is used to collect the motion data and task scene information of the target pedestrian in the environment in real time; the data processing module is used to construct the historical trajectory sequence and the future real trajectory label; the model in the prediction execution module is a trajectory prediction model, comprising a main model and a social generation model, wherein the main model comprises a first trajectory encoder and a first trajectory decoder, which are used to obtain the real predicted future trajectory sequence of the current task; the social generation model comprises a second trajectory encoder for encoding the trajectories in the scene, a variational autoencoder for mapping the input to a hidden variable, a second trajectory decoder for reconstructing the trajectories, and a social interaction encoder for obtaining the interaction features of the target pedestrian; the control interface module is connected with the motion planning unit of the humanoid robot and transmits the prediction results.
[0022] Further, the system further comprises an evaluation module under the continuous learning scene, and the evaluation indexes comprise the accuracy and the average forgetting rate , and the expression is:
[0023] ,
[0024] ,
[0025] wherein, is the test result on the i task after the training on the j task is completed, T is the current task number, and the test result comprises the average displacement error and the end point displacement error.
[0026] According to the second aspect of the present application, there is provided an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method when executing the program.
[0027] According to the third aspect of the present application, there is provided a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the method.
[0028] Compared with the prior art, the present application has the following beneficial effects:
[0029] (1) Effectively alleviate the catastrophic forgetting problem and improve the robustness of cross-scene prediction: generate pseudo samples with interaction attributes through a social generation model, and combine a dynamic weighted loss function to make the model stably maintain old scene knowledge when learning new scenes continuously. Compared with the prior art, this method avoids storing original trajectory data, and the generated pseudo samples contain pedestrian social interaction features such as avoidance rules and group motion patterns, thereby improving the prediction consistency of the model in dynamic multi-scenarios.
[0030] (2) Reduce the consumption of computing resources and improve the practicability of the system: adopt a pseudo sample generation strategy of shortening the time window, the second decoder of the social generation model outputs a time window smaller than the decoder of the main model, thereby reducing the uncertainty of high-dimensional trajectory generation, and combine a double-model coupling playback mechanism to only store a lightweight model copy instead of original data, thereby significantly reducing the memory occupation and computing overhead.
[0031] (3) Enhance the authenticity and adaptability of pedestrian trajectory prediction: the social generation model explicitly embeds scene information and integrates a social interaction encoder to generate samples covering scene features such as the number of pedestrians and initial positions, which are more consistent with actual pedestrian behavior patterns, and through a task-driven continuous learning framework, the model continuously adapts to the social interaction rules of new scenes, thereby improving the navigation reliability of humanoid robots in dynamic environments. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 Flowchart of the pedestrian trajectory prediction method based on continuous learning;
[0033] Figure 2 Data flowchart of continuous pedestrian trajectory prediction;
[0034] Figure 3 Schematic diagram of system training and playback;
[0035] Figure 4 Schematic diagram of the specific process of training the main model and the social generation model;
[0036] Figure 5 Schematic diagram of the use of scene information in the social generation model;
[0037] Figure 6 Structure diagram of the main model and the social generation model. DETAILED DESCRIPTION
[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0039] This embodiment primarily addresses the problem of pedestrian trajectory prediction across multiple scenarios, enabling continuous learning of the model in new environments. Since pedestrian movement patterns differ across environments, pedestrian trajectory prediction presents a significant challenge. Existing pedestrian trajectory prediction models often require retraining on all datasets when faced with data from new environments to avoid catastrophic forgetting of knowledge learned from previous environments. Extracting domain-invariant features across multiple scenarios becomes extremely difficult; however, a reliable pedestrian trajectory prediction system must continuously acquire knowledge from new environments without forgetting experience learned from older scenarios. To address the catastrophic forgetting problem in trajectory prediction models across multiple scenarios, a memory-playback-based continuous pedestrian trajectory prediction algorithm based on a generative model is proposed. It consists of two parts: a main model and a social generative model. The main model is primarily used for the current trajectory prediction task, while the social generative model generates trajectory samples from previous tasks with social interaction attributes. This method eliminates the need for model retraining and storing samples from previous tasks.
[0040] like Figure 1 The diagram shows a pedestrian trajectory prediction method based on continuous learning, the specific steps of which include:
[0041] S1. Through sensors mounted on the humanoid robot, the motion data of the target pedestrians in the environment and the task scene information are collected in real time. The motion data includes the position coordinates and instantaneous velocity values in the global coordinate system, and the task scene information includes the number of pedestrians in the scene and their initial positions.
[0042] S2. Preprocess the motion data, extract several trajectory segments of fixed time length, select the first few seconds of the trajectory segments as the historical trajectory sequence, and use the rest as the future real trajectory label.
[0043] S3. Input the historical trajectory sequence into the main model of the pedestrian trajectory prediction model for calculation to obtain the true predicted future trajectory sequence of the current task. Use the mean square error between the predicted future trajectory and the true future trajectory as the loss function to train and converge the model. The main model includes a first trajectory encoder and a first trajectory decoder.
[0044] S4, based on the task scene information, using the social generation model in the pedestrian trajectory prediction model to generate the pseudo historical trajectory of the old task which has completed training, and inputting to the main model copy corresponding to the old task to generate the pseudo future trajectory, the pseudo historical trajectory and the pseudo future trajectory are combined into a pseudo sample, the real predicted future trajectory sequence and the historical trajectory sequence are combined into a real sample, the real sample and the pseudo sample are merged into a mixed dataset, and the weights of the main model and the social generation model are iteratively updated;
[0045] S5, according to the historical trajectory data collected in real time, outputting the future predicted trajectory coordinate sequence through the trained main model.
[0046] As Figure 2 shown, for the data flow chart of the continuous pedestrian trajectory prediction task T j and T j+1 The pedestrian trajectory prediction model includes a main model and a social generation model. The main model is used for current trajectory prediction tasks, and the generation model is used to generate old task trajectory samples with social interaction attributes. In the figure, M is the main model, G is the social generation model, is the historical trajectory sequence, is the future real trajectory label. As can be seen from the figure, the pedestrian trajectory prediction model receives old task trajectory samples with social interaction attributes, that is, the task dataset obtained by the last task .
[0047] The social generation model includes a variational autoencoder that maps the input to a hidden variable, a second trajectory decoder that reconstructs the trajectory, and a social interaction encoder that obtains the interaction features of the target pedestrian. The output time window of the second decoder of the social generation model is smaller than that of the first trajectory decoder. The input is mapped into a random hidden variable through the variational autoencoder, and then the hidden variable is mapped into the reconstructed input by the second decoder.
[0048] Since the complex spatio-temporal interaction within the crowd is contained in the pedestrian trajectory data, it is necessary to increase the social attribute of the generated playback sample to make it more realistic. Firstly, research on human navigation shows that pedestrians follow basic social etiquette and rules during walking. When walking in a crowded place, pedestrians will regularly adjust their path and speed to maintain a comfortable distance from strangers around them. Therefore, generating independent pedestrian trajectory samples cannot represent the hidden behavior information of pedestrians in the previous scene. By considering the interaction between people in crowd behavior and generating pseudo samples in the form of trajectory scenes, scene-level playback samples are obtained. The social generation model includes a trajectory encoder that encodes the trajectories in the scene, a social interaction encoder that encodes the social interaction behavior of the crowd, and a variational autoencoder that encodes the hidden features. In addition, similar to related methods in classification tasks, the social generation model is only used to reconstruct the input, and the main model generates the label. The social generation model is only responsible for generating the historical trajectory of the pseudo sample, and the future trajectory is obtained through the main model trained in the previous task. In addition, the uncertainty of the social generation model increases with the increase of the time step, so the model uncertainty is reduced by shortening the trajectory time window of the generation model. Finally, the social generation model usually generates pseudo samples from input noise, and the prior probability is generally modeled as a standard Gaussian distribution. When it comes to crowd scenes, a single input noise cannot fully represent all the information of crowd behavior. Therefore, the embodiment utilizes additional scene information to enrich the input noise, and the scene information comes from the current dataset. For the task scene T , its scene information is defined as , which includes the number of pedestrians in the scene and the initial position. For the j th task scene , its scene information is defined as . When the model is trained on the j th task, the pseudo sample is generated in combination with the related scene information of the current training set. The model simulates the crowd behavior in the previous scene by using the scene information of the current dataset, thereby decoupling the dependence of the generation model on the scene information of the old task samples.
[0049] The model structure of the main model is a long short-term memory network that does not model the interaction relationship and an STGAT model that considers the interaction relationship. The loss function of the main model includes the loss on the current task sample and the loss on the playback sample, and the loss weight is obtained according to the number of tasks currently experienced. The expression of the loss function of the main model is as follows:
[0050] ,
[0051] wherein, is the number of tasks currently experienced, For the loss on the current task sample, This represents the loss on the replay sample.
[0052] like Figure 3 and Figure 4 As shown, the specific steps for iteratively updating the weights of the main model and the social generative model in S4 include: In the first task, the main model and the social generative model are trained using real samples. After training, copies of the current main model and the social generative model are frozen and stored. When a new task appears, the main model and the copies of the social generative model are first used to generate replay samples of the old task, i.e., pseudo-samples. These pseudo-samples are then used together with the current task samples for training the main model and the social generative model. This process is repeated for subsequent tasks until the entire task sequence is learned. The replay samples are first obtained through sampling by the social generative model. That is, pseudo-historical trajectories, and then using the master model to obtain the corresponding pseudo-future trajectories. Combining the two yields the final playback sample. In other words, pseudo-samples. (Task) The replay samples during the process are generated by the generative model and the main model in completing the task. It is generated directly after training. In practice, it is achieved by temporarily storing two copies of the model after training for each task. For example... Figure 5 The diagram illustrates the use of scene information in the social generative model. The social generative model encodes the motion data and initial positions of the target pedestrian in the current scene into a Gaussian distribution over hidden variables using a variational autoencoder, a social interaction encoder, and a trajectory encoder. The trajectory encoder, based on a long short-term memory network model, handles the temporal dependencies of each trajectory. The social interaction encoder, based on the input from the trajectory encoder and scene information, uses a max-pooling layer to obtain the interaction features of the target pedestrian. Then, the variational autoencoder transforms the aggregated features into a hidden space distribution, thereby sampling to obtain sampled scene points representing the old task scene. The current replay scene is obtained through a second trajectory decoder, namely the social replay model decoder. Each replay sample in the current replay scene includes pseudo-historical trajectories and corresponding pseudo-future trajectories.
[0053] Loss function of social generative models Including reconstruction losses and variational loss The expression is:
[0054] ,
[0055] in, For the input data sequence The expected value of the log-likelihood. To hide variables Z The prior distribution, It is the identity matrix. Hidden variables Z The posterior distribution, For the second encoder weights, For the weights of the second decoder, hidden variables Z The input data sequence is processed by an encoder. Encoded to obtain, Let KL divergence be denoted as KL divergence.
[0056] This embodiment addresses the catastrophic forgetting problem in continuous pedestrian trajectory prediction, eliminating the need for model retraining and storing old task samples. By considering the unique social interaction attributes of pedestrian trajectories, it utilizes a social replay model to generate pseudo-samples that closely resemble reality and possess interactive properties. Related experimental results demonstrate that the proposed method outperforms other continuous learning methods that rely on explicit experience replay. Further robustness and effectiveness are illustrated by modifying the training task order and the main model structure.
[0057] This embodiment also provides a system for predicting pedestrian trajectories based on continuous learning, including a sensor module, a data processing module, a prediction execution module, and a control interface module.
[0058] The sensor module is used to collect real-time motion data of target pedestrians and task scene information in the environment; the data processing module is used to construct historical trajectory sequences and future real-world trajectory labels. The model in the prediction execution module is a trajectory prediction model, including a main model and a social generation model. Figure 6 The diagram shows the structure of the main model and the social generation model. The main model includes a first trajectory encoder and a first trajectory decoder, which are used to obtain the true predicted future trajectory sequence for the current task. The social generation model includes a second trajectory encoder that encodes the trajectory in the scene, a variational autoencoder that maps the input to hidden variables, a second trajectory decoder that reconstructs the trajectory, and a social interaction encoder that obtains the interaction features of the target pedestrian. The control interface module is connected to the motion planning unit of the humanoid robot to transmit the prediction results.
[0059] For continuous pedestrian trajectory prediction in multiple scenarios, in addition to the normal trajectory prediction evaluation metrics, it is also necessary to consider additional metrics to evaluate the continuous learning ability of the trajectory prediction model, including accuracy and memory capacity. Specifically, the average displacement error (ADE) and final displacement error (FDE) are used as evaluation metrics for pedestrian trajectory prediction. The system also includes an evaluation module for continuous learning scenarios, with accuracy as an evaluation metric. and average forgetting rate The expression is:
[0060] ,
[0061] ,
[0062] in, In order to be in i After completing the training for the mission j The test results for the task, where T is the current task number, include the average displacement error and the endpoint displacement error.
[0063] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0064] The electronic device of this invention includes a graphics processing unit (GPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). Various programs and data required for device operation can also be stored in the RAM. The GPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0065] Multiple components in the device are connected to an I / O interface, including: input units such as a keyboard, mouse, etc.; output units such as various types of displays, speakers, etc.; storage units such as disks, optical disks, etc.; and communication units such as network interface cards, modems, wireless transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks. The processing unit performs the various methods and processes described above, such as the methods of the present invention. For example, in some embodiments, the methods of the present invention may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or the communication unit. When the computer program is loaded into RAM and executed by the GPU, one or more steps of the methods of the present invention described above may be performed. Alternatively, in other embodiments, the GPU may be configured to execute the methods of the present invention by any other suitable means (e.g., by means of firmware).
[0066] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0067] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0068] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0069] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for pedestrian trajectory prediction based on continuous learning, characterized in that, The specific steps include: S1, real-time collection of motion data and task scene information of target pedestrians in the environment through sensors mounted on a humanoid robot, the motion data including position coordinates and instantaneous speed values in a global coordinate system, and the task scene information including the number and initial positions of pedestrians in the scene; S2, pre-processing of the motion data, interception of trajectory segments of a fixed time length, selection of the first several seconds in the trajectory segment as a historical trajectory sequence, and the remaining as a future real trajectory label; S3, input of the historical trajectory sequence into a main model in a pedestrian trajectory prediction model for calculation to obtain a real predicted future trajectory sequence of the current task, and training and convergence of the model according to the mean square error between the predicted future trajectory and the real future trajectory as a loss function, the main model including a first trajectory encoder and a first trajectory decoder; S4, generation of pseudo historical trajectories of old tasks that have completed training based on the task scene information using a social generation model in the pedestrian trajectory prediction model, and input of the pseudo historical trajectories into a copy of the main model corresponding to the old task to generate pseudo future trajectories, the pseudo historical trajectories and the pseudo future trajectories being combined into pseudo samples, the real predicted future trajectory sequence and the historical trajectory sequence being combined into real samples, merging of the real samples and the pseudo samples into a mixed dataset, and iterative updating of the weights of the main model and the social generation model; S5, output of a future predicted trajectory coordinate sequence through the trained main model according to the real-time collected historical trajectory data; The social generation model includes a variational autoencoder that maps input to hidden variables, a second trajectory decoder that reconstructs trajectories, and a social interaction encoder that obtains interaction features of target pedestrians; the output time window of the second decoder of the social generation model is smaller than that of the first trajectory decoder; loss function of the social generative model including a reconstruction loss and a variational loss , expressed as: , wherein is the expected value of the log-likelihood of the input data sequence , is the prior distribution of the hidden variable Z , is the identity matrix, is the posterior distribution of the hidden variable Z , is the second encoder weight, is the second decoder weight, and the hidden variable Z is obtained by encoding the input data sequence with the encoder, is the KL divergence. 2.The pedestrian trajectory prediction method based on continuous learning according to claim 1, wherein, The model structure of the main model is a long short-term memory network that does not model interaction relationships and an STGAT model that considers interaction relationships; the loss function of the main model includes a loss on current task samples and a loss on playback samples, and the loss weight is obtained according to the number of tasks currently experienced. 3.The pedestrian trajectory prediction method based on continuous learning according to claim 1, wherein, The specific steps of the iterative updating of the weights of the main model and the social generation model in S4 include, in the first task, training of the main model and the social generation model through real samples, and freezing and storing of the current main model and the social generation model copy after training is completed, when a new task occurs, the main model and the social generation model copy are called to generate old task playback samples, i.e., pseudo samples, the pseudo samples are used together with current task samples for training of the main model and the social generation model, and the training is performed in subsequent tasks in this way, and finally the learning of the entire task sequence is completed.
4. A pedestrian trajectory prediction system based on continual learning, used for the pedestrian trajectory prediction method based on continual learning according to any one of claims 1-3, characterized in that, The system includes a sensor module, a data processing module, a prediction execution module, and a control interface module; The sensor module is used for collecting motion data and task scene information of target pedestrians in the environment in real time; the data processing module is used for constructing a historical trajectory sequence and a future real trajectory label; a model in the prediction execution module is a trajectory prediction model, including a main model and a social generation model, wherein the main model includes a first trajectory encoder and a first trajectory decoder, and is used for obtaining a real predicted future trajectory sequence of a current task; the social generation model includes a second trajectory encoder for encoding trajectories in a scene, a variational autoencoder for mapping an input to a hidden variable, a second trajectory decoder for reconstructing trajectories, and a social interaction encoder for obtaining interaction features of target pedestrians; The control interface module is connected with a motion planning unit of the humanoid robot, and transmits the prediction result.
5. The system according to claim 4, wherein, The system further comprises an evaluation module under a continuous learning scenario, and the evaluation indexes include accuracy and average forgetting rate , and the expression is: , , wherein, is the training result on the task, i after the training on the task is completed, j the test result on the task, T is the current task number, and the test result includes the average displacement error and the end-point displacement error. 6.An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, characterized in that, The processor executes the program to implement the method in any one of claims 1-3.
7. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method in any one of claims 1-3.
Citation Information
Patent Citations
Continuous learning track prediction system based on uncertainty perception
CN117634587A
Cross-scene adaptive pedestrian trajectory prediction method and device
CN117011939A
Target entity trajectory prediction method based on air-ground fusion
CN117789082A