Pedestrian trajectory prediction method, system and device based on continuous learning and medium
Through the pseudo sample playback mechanism based on the social generation model, pseudo samples with interactive attributes are generated and the model weights are updated, which solves the catastrophic forgetting problem in cross-scene pedestrian trajectory prediction, realizes efficient cross-scene learning and prediction, and improves the robustness and adaptability of the model.
Patent Information
- Application Number
- CN202511113147.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-08-11
AI Technical Summary
Existing technologies suffer from the catastrophic forgetting problem in pedestrian trajectory prediction across multiple scenarios. It is difficult to learn new knowledge in new scenarios while maintaining the prediction ability for old scenarios. In addition, the computing resource consumption is high and the model management and storage burden is heavy.
A pseudo sample replay mechanism based on the social generation model is adopted to generate pseudo samples with interactive properties. Combined with a dynamic weighted loss function, the weights of the main model and the social generation model are updated to reduce computing resource consumption and maintain old scene knowledge.
It effectively alleviates the problem of catastrophic forgetting, improves the robustness and accuracy of cross-scene prediction, reduces computing resource consumption, enhances the authenticity and adaptability of pedestrian trajectory prediction, and improves the navigation reliability of humanoid robots in dynamic environments.
Smart Images

Figure CN120633467A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of embodied intelligence technology in the field of artificial intelligence, and in particular to a pedestrian trajectory prediction method, system, device and medium based on continuous learning. Background Art
[0002] Existing technologies have been able to solve the transfer learning problem of pedestrian trajectory prediction across a single scene in the surrounding pedestrian trajectory domain adaptation method. However, when faced with multiple scenes, extracting domain-invariant features between them becomes very difficult. In addition, methods based on domain adaptation often only focus on the performance of the model in new scenes, while ignoring the performance of the model in old scenes. In actual use, humanoid robots need to operate safely and reliably in multiple scenes where the environmental structure and pedestrian movement patterns are constantly changing. Therefore, a reliable pedestrian trajectory prediction system needs to be able to continuously adapt to new scenes and learn new knowledge, while maintaining the ability to predict old scenes that have already been learned, that is, it needs to have the ability of continuous learning.
[0003] Currently, several solutions exist for cross-scenario pedestrian trajectory prediction, but they still have shortcomings. The first is the scene aggregation approach, which combines datasets from all scenarios to train a unified trajectory prediction model. This approach has the advantage of eliminating the need to redesign the model architecture. However, its computational cost, including training time and storage space, is very high. Since datasets for different scenarios are typically not available all at once, each new scene requires re-merging all the data and fully training the model, which is inefficient in practical applications where new scenarios are dynamically added. The second approach is the dedicated approach, which trains a dedicated trajectory prediction model for each different scenario. This approach offers the advantage of providing optimized prediction performance for each specific scenario. However, the number of models increases linearly with the number of scenarios, increasing the burden of model management and storage. Furthermore, in practical applications, how to quickly and accurately select and switch to the appropriate dedicated model based on the current scenario remains a poorly addressed issue. Finally, the continuous learning approach continuously iteratively updates the same trajectory prediction model based on continuously arriving data streams from new scenarios. Its advantages include a single model, relatively manageable computational resource usage, the elimination of the need to store all original data from previous scenarios, and the ability to achieve real-time model updates. However, this approach faces the problem of catastrophic forgetting, whereby when the model is trained on new scene data, its prediction performance on previously learned scenes will drop sharply or even be completely lost. This makes it impossible for the model to truly achieve its goal of stably retaining old knowledge while learning new knowledge.
[0004] Chinese patent application CN117634587A discloses a continuous learning trajectory prediction system based on uncertainty perception. The continuous learning trajectory prediction system based on uncertainty perception and conditional generative memory modules avoids the problem of large working memory requirements of the rehearsal method and the problem of pseudo-rehearsal generating data that is unrealistic and non-discriminative. However, the application does not involve the social interaction behavior unique to pedestrian trajectories, which makes it difficult to restore the social scene characteristics of old tasks and lacks a certain degree of adaptability to actual scenes. Therefore, when applying 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 the new scene without forgetting the knowledge of the old scene, and adapt to the social interaction attributes of the pedestrian trajectory, is a technical problem that needs to be solved. Summary of the Invention
[0005] The purpose of the present invention is to overcome the defects of the above-mentioned existing technologies and provide a pedestrian trajectory prediction method, system, device and medium based on continuous learning. Taking into account the unique social interaction properties of pedestrian trajectories, a social generation model is used to generate pseudo samples that are close to reality and have interactive properties, and the catastrophic forgetting problem in the pedestrian trajectory prediction model in continuous scenarios is alleviated by replaying pseudo samples based on the social generation model.
[0006] The purpose of the present invention can be achieved by the following technical solutions: According to one aspect of the present invention, a pedestrian trajectory prediction method based on continuous learning is provided, which specifically comprises the following steps: S1. Using sensors mounted on a humanoid robot, collect motion data and task scenario information of target pedestrians in the environment in real time. The motion data includes position coordinates and instantaneous velocity values in a global coordinate system. The task scenario information includes the number of pedestrians in the scene and their initial positions. S2. Preprocess the motion data and extract several trajectory segments of fixed time length. Select the first few seconds of the trajectory segments as the historical trajectory sequence, and the rest as the future real trajectory labels; S3. Input the historical trajectory sequence into the main model of the pedestrian trajectory prediction model for calculation to obtain the actual predicted future trajectory sequence of the current task, and train the model to converge using the mean square error between the predicted future trajectory and the actual future trajectory as a loss function. The main model includes a first trajectory encoder and a first trajectory decoder. S4. Based on the 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 has been trained. The pseudo historical trajectories are input into the master model copy corresponding to the old task to generate pseudo future trajectories. The pseudo historical trajectories and pseudo future trajectories are combined into pseudo samples. The real predicted future trajectory sequence and the 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 master model and the social generation model are iteratively updated. S5. Based on the historical trajectory data collected in real time, the trained main model outputs the future predicted trajectory coordinate sequence.
[0007] Furthermore, the social generation model includes a variational autoencoder that maps inputs to hidden variables, a second trajectory decoder that reconstructs trajectories, and a social interaction encoder that obtains interaction features of the target pedestrian.
[0008] Furthermore, the output time window of the second decoder of the social generation model is smaller than that of the first trajectory decoder.
[0009] Furthermore, the model structure of the main model is a long short-term memory network that does not model the interactive relationship and an STGAT model that considers the interactive relationship; the loss function of the main model includes the loss on the current task sample and the loss on the playback sample. The loss function adopts the mean square error, and the loss weight is obtained according to the number of tasks currently experienced.
[0010] Furthermore, the specific steps of 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 with real samples, and after the training is completed, 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 playback samples, i.e., pseudo samples; the pseudo samples are used together with the current task samples to train the main model and social generation model, and so on for training in subsequent tasks, and finally the learning of the entire task sequence is completed.
[0011] Furthermore, the loss function of the social generation model is Including reconstruction losses and variational loss , the expression is: , in, For the input data sequence The expected value of the log-likelihood of For hidden variables Z The prior distribution of is the identity matrix, is a hidden variable Z The posterior distribution of is the second encoder weight, is the second decoder weight, hidden variable Z The encoder processes the input data sequence Encoded, is the KL divergence.
[0012] According to another aspect of the present invention, a system for pedestrian trajectory prediction method based on continuous learning is provided, the system comprising a sensor module, a data processing module, a prediction execution module and a control interface module; 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, including a main model and a social generation model, wherein the main model includes 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 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.
[0013] Furthermore, the system also includes an evaluation module in the continuous learning scenario, and the evaluation indicators include accuracy and the average forgetting rate , the expression is: , , in, For i After training on the task j The test results on the task, where T is the current task number, include the average displacement error and the endpoint displacement error.
[0014] According to a second aspect of the present invention, an electronic device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the method when executing the program.
[0015] According to a third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.
[0016] Compared with the prior art, the present invention has the following beneficial effects: (1) Effectively alleviate the catastrophic forgetting problem and improve cross-scenario prediction robustness: Generate pseudo samples with interactive properties through a social generation model, combined with a dynamic weighted loss function, so that the model can stably maintain old scene knowledge when continuously learning new scenes. Compared with existing technologies, this method avoids storing original trajectory data. At the same time, the generated pseudo samples contain pedestrian social interaction characteristics, such as avoidance rules, group movement patterns, etc., which improves the prediction consistency of the model in dynamic multi-scenario.
[0017] (2) Reduce computing resource consumption and improve system practicality: A pseudo-sample generation strategy with a shortened time window is adopted. The output time window of the second decoder of the social generation model is smaller than that of the main model decoder, which reduces the uncertainty of high-dimensional trajectory generation. Combined with the dual-model coupling playback mechanism, only lightweight model copies need to be stored instead of the original data, significantly reducing memory usage and computing overhead.
[0018] (3) Enhance the authenticity and adaptability of pedestrian trajectory prediction: The social generation model explicitly embeds scene information and integrates a social interaction encoder. The generated samples cover scene features such as the number of pedestrians and initial positions, which are more in line with the actual pedestrian behavior patterns. Through the 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 THE DRAWINGS
[0019] Figure 1 Flowchart of the pedestrian trajectory prediction method based on continuous learning; Figure 2 Data flow diagram for continuous pedestrian trajectory prediction; Figure 3 Schematic diagram of system training and playback; Figure 4 Schematic diagram of the specific process of training the main model and the social generation model; Figure 5 Schematic diagram of the use of scene information in social generation models; Figure 6 Structural diagram of the main model and the social generation model. DETAILED DESCRIPTION
[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0021] This embodiment mainly solves the problem of pedestrian trajectory prediction across multiple scenarios, thereby realizing continuous learning of the model in new environments. Since the movement patterns of pedestrians in different environments are different, pedestrian trajectory prediction in this situation is challenging. When facing data from a new environment, existing pedestrian trajectory prediction models often need to be retrained on all data sets to avoid catastrophic forgetting of knowledge learned from previous environments. Faced with situations across multiple scenarios, it will become very difficult to extract domain-invariant features between them. However, a reliable pedestrian trajectory prediction system must be able to continuously acquire knowledge in new environments without forgetting the experience learned in old scenarios. In response to the catastrophic forgetting problem of trajectory prediction models across multiple scenarios, a memory-replay continuous pedestrian trajectory prediction algorithm based on a generative model is proposed. It consists of two parts: a main model and a social generation model. The main model is mainly used for the current trajectory prediction task, and the social generation model is mainly used to generate trajectory samples of old tasks with social interaction properties. This method does not require retraining the model and storing samples of old tasks.
[0022] like Figure 1 As shown in Figure 1, a pedestrian trajectory prediction method based on continuous learning is shown. The specific steps include: S1. Using sensors mounted on a humanoid robot, the motion data and mission scenario information of target pedestrians in the environment are collected in real time. The motion data includes the position coordinates and instantaneous velocity values in the global coordinate system. The mission scenario information includes the number of pedestrians in the scene and their initial positions. S2. Preprocess the motion data and extract several trajectory segments of fixed time length. Select the first few seconds of the trajectory segments as the historical trajectory sequence, and the rest as the future real trajectory labels; S3. Input the historical trajectory sequence into the main model of the pedestrian trajectory prediction model for calculation to obtain the real predicted future trajectory sequence of the current task. The model is trained and converged based on the mean square error between the predicted future trajectory and the real future trajectory as the loss function. The main model includes a first trajectory encoder and a first trajectory decoder. S4. Based on the 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 has been trained. The pseudo historical trajectories are input into the master model copy corresponding to the old task to generate pseudo future trajectories. The pseudo historical trajectories and pseudo future trajectories are combined into pseudo samples. The real predicted future trajectory sequence and the 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 master model and the social generation model are iteratively updated. S5. Based on the historical trajectory data collected in real time, the trained main model outputs the future predicted trajectory coordinate sequence.
[0023] like Figure 2 As shown in the taskT j and T j+1 The data flow diagram of continuous pedestrian trajectory prediction is shown below. The pedestrian trajectory prediction model includes a main model and a social generation model. The main model is used for the current trajectory prediction task, 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 the old task trajectory samples with social interaction attributes, that is, the task dataset obtained from the previous task .
[0024] The social generative model includes a variational autoencoder that maps inputs to hidden variables, a second trajectory decoder that reconstructs the trajectory, and a social interaction encoder that derives interaction features of the target pedestrian. The output time window of the second decoder of the social generative model is smaller than that of the first trajectory decoder. The variational autoencoder maps the inputs to random hidden variables, and the second decoder then maps the hidden variables to the reconstructed inputs.
[0025] Because pedestrian trajectory data contains complex spatiotemporal interactions within a crowd, the generated replay samples need to be enhanced with social attributes to make them more realistic. First, research on human navigation shows that pedestrians follow basic social etiquette and rules while walking. When walking in crowded areas, pedestrians regularly adjust their paths and speeds to maintain a comfortable distance from strangers. Therefore, generating independent pedestrian trajectory samples cannot represent the hidden behavioral information of pedestrians in the previous scene. By considering the interactions between people in the crowd and generating pseudo samples in the form of trajectory scenes, we can obtain scene-level replay samples. The social generative model includes a trajectory encoder that encodes the trajectories in the scene, a social interaction encoder that encodes the social interactions of the crowd, and a variational autoencoder that encodes the hidden features. Furthermore, similar to related methods in classification tasks, the social generative model is only used to reconstruct the input, while the main model generates labels. The social generative model is responsible for generating only the historical trajectories of the pseudo samples, while its future trajectories are obtained by using the main model trained in the previous task. Furthermore, the uncertainty of the social generative model increases with the time step. Therefore, the model uncertainty is reduced by shortening the time window of the generated trajectory. Finally, social generative models usually generate pseudo samples from input noise, whose 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, this embodiment uses additional scene information to enrich the input noise. The scene information comes from the current dataset. For the task scene T , and define its scene information as , which includes the number of pedestrians in the scene and their initial positions. j Mission scenarios , define its scene information as , when the model is j When training on a task, combined with the relevant scene information of the current training set Generate pseudo samples. The model uses the scene information of the current dataset to simulate crowd behavior in previous scenes. This method decouples the generative model's dependence on the scene information of old task samples.
[0026] The main model consists of 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 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 is: , in, is the number of tasks currently experienced, is the loss on the current task sample, is the loss on the replay sample.
[0027] like Figure 3 and Figure 4 As shown in Figure 2, the specific steps of 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 with real samples, and after the training is completed, the current main model and the social generation model copy are frozen and stored. When a new task appears, the main model and the social generation model copy are first called to generate the old task playback sample, that is, the pseudo sample, and the pseudo sample is used together with the current task sample to train the main model and the social generation model, and so on for subsequent tasks to complete the learning of the entire task sequence. The playback sample is first obtained by sampling the social generation model. That is, the pseudo historical trajectory, and then use the main model to get the corresponding pseudo future trajectory , combining the two to get the final playback sample That is, pseudo samples. Task The playback samples during this period are generated by the generation model and the main model to complete the task In the specific implementation process, it is achieved by temporarily storing two model copies after completing the training of each task. Figure 5The figure shows a schematic diagram of the use of scene information in the social generation model. The social generation model encodes the motion data and initial position of the target pedestrian in the current scene into a Gaussian distribution on the hidden variables through a variational autoencoder, a social interaction encoder, and a trajectory encoder. The trajectory encoder is based on a long short-term memory network model to process the time dependency of each trajectory. The social interaction encoder uses the maximum pooling layer to obtain the interaction features of the target pedestrian based on the input of the trajectory encoder and the scene information. The variational autoencoder then converts the collected features into a latent space distribution, thereby sampling to obtain sampling scene points representing the old task scene. The current playback scene is obtained through the second trajectory decoder, namely the social replay model decoder. Each playback sample in the current playback scene includes a pseudo-historical trajectory and a corresponding pseudo-future trajectory.
[0028] Loss Function for Social Generative Models Including reconstruction losses and variational loss , the expression is: , in, For the input data sequence The expected value of the log-likelihood of For hidden variables Z The prior distribution of is the identity matrix, is a hidden variable Z The posterior distribution of is the second encoder weight, is the second decoder weight, hidden variable Z The encoder processes the input data sequence Encoded, is the KL divergence.
[0029] This embodiment addresses the catastrophic forgetting problem in continuous pedestrian trajectory prediction, eliminating the need for model retraining and storing samples from previous tasks. By factoring in the unique social interaction properties of pedestrian trajectories, a social replay model is used to generate realistic pseudo-samples with interactive properties. Experimental results demonstrate that the proposed method outperforms other continuous learning methods that rely on explicit experience replay. The robustness and effectiveness of this method are further demonstrated by varying the training task order and the main model structure.
[0030] This embodiment also provides a system for pedestrian trajectory prediction based on continuous learning, including a sensor module, a data processing module, a prediction execution module and a control interface module.
[0031] The sensor module is used to collect the target pedestrian's motion data and mission scenario information 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 the trajectory prediction model, which includes the main model and the social generation model. Figure 6 As shown in the figure, it is a structural diagram of the main model and the social generation model, where the main model includes a first trajectory encoder and a first trajectory decoder, which are used to obtain the true predicted future trajectory sequence of 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.
[0032] For continuous pedestrian trajectory prediction in multiple scenarios, in addition to the normal trajectory prediction evaluation indicators, it is also necessary to consider the indicators for evaluating the continuous learning ability of the trajectory prediction model, including accuracy and memory ability. Specifically, the average displacement error (ADE) and the terminal displacement error (FDE) are used as evaluation indicators for pedestrian trajectory prediction. The system also includes an evaluation module for continuous learning scenarios, and the evaluation indicators include accuracy and the average forgetting rate , the expression is: , , in, For i After training on the task j The test results on the task, T is the current task number, and the test results include the average displacement error and the endpoint displacement error.
[0033] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0034] The electronic device of the present invention includes a graphics processing unit (GPU), which can perform various appropriate actions and processes based on computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). The RAM can also store various programs and data required for device operation. The GPU, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0035] Multiple components in the device are connected to the I / O interface, including: input units, such as a keyboard and mouse; output units, such as various types of displays and speakers; storage units, such as magnetic disks and optical disks; and communication units, such as network cards, modems, and wireless communication transceivers. The communication unit allows the device to exchange information / data with other devices via 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 present invention. For example, in some embodiments, the present invention may be implemented as a computer software program tangibly embodied 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 onto 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 present invention described above may be performed. Alternatively, in other embodiments, the GPU may be configured to perform the present invention through any other suitable means (e.g., via firmware).
[0036] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0037] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0038] In the context of the present invention, machine-readable medium can be a tangible medium that can contain or store a program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0039] 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 such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A pedestrian trajectory prediction method based on continuous learning, characterized in that: The specific steps include: S1. Using sensors mounted on a humanoid robot, collect motion data and task scenario information of target pedestrians in the environment in real time. The motion data includes position coordinates and instantaneous velocity values in a global coordinate system. The task scenario information includes the number of pedestrians in the scene and their initial positions. S2. Preprocess the motion data and extract several trajectory segments of fixed time length. Select the first few seconds of the trajectory segments as the historical trajectory sequence, and the rest as the future real trajectory labels; S3. Input the historical trajectory sequence into the main model of the pedestrian trajectory prediction model for calculation to obtain the actual predicted future trajectory sequence of the current task, and train the model to converge using the mean square error between the predicted future trajectory and the actual future trajectory as a loss function. The main model includes a first trajectory encoder and a first trajectory decoder. S4. Based on the 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 has been trained. The pseudo historical trajectories are input into the master model copy corresponding to the old task to generate pseudo future trajectories. The pseudo historical trajectories and pseudo future trajectories are combined into pseudo samples. The real predicted future trajectory sequence and the 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 master model and the social generation model are iteratively updated. S5. Based on the historical trajectory data collected in real time, the trained main model outputs the future predicted trajectory coordinate sequence.
2. The pedestrian trajectory prediction method based on continuous learning according to claim 1, characterized in that: The social generation model includes a variational autoencoder that maps inputs to hidden variables, a second trajectory decoder that reconstructs trajectories, and a social interaction encoder that obtains interaction features of the target pedestrian.
3. The pedestrian trajectory prediction method based on continuous learning according to claim 2, characterized in that: The output time window of the second decoder of the social generative model is smaller than that of the first trajectory decoder.
4. The pedestrian trajectory prediction method based on continuous learning according to claim 1, characterized in that: 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.
5. The pedestrian trajectory prediction method based on continuous learning according to claim 1, characterized in that: The specific steps of 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 with real samples, and after the training is completed, 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 playback 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 training is performed in subsequent tasks in this way, and finally the learning of the entire task sequence is completed.
6. The pedestrian trajectory prediction method based on continuous learning according to claim 1, characterized in that: The loss function of the social generative model Including reconstruction losses and variational loss , the expression is: , in, For the input data sequence The expected value of the log-likelihood of For hidden variables Z The prior distribution of is the identity matrix, is a hidden variable Z The posterior distribution of is the second encoder weight, is the second decoder weight, hidden variable Z The encoder processes the input data sequence Encoded, is the KL divergence.
7. A pedestrian trajectory prediction system based on continuous learning, used in the pedestrian trajectory prediction method based on continuous learning according to any one of claims 1 to 6, 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 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, including a main model and a social generation model, wherein the main model includes 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 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.
8. The pedestrian trajectory prediction system based on continuous learning according to claim 7, characterized in that: The system also includes an evaluation module for continuous learning scenarios, and the evaluation indicators include accuracy and the average forgetting rate , the expression is: , , in, For i After training on the task j The test results on the task, where T is the current task number, include the average displacement error and the endpoint displacement error.
9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
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
Multi-modal vehicle trajectory prediction method for urban multi-type traffic participants based on graph traversal strategy
CN119007431A
Instantaneous trajectory prediction method based on bidirectional collaborative diffusion model and application
CN119961597A
Cited By
Pre-training and online updating method for multi-view dynamic trajectory representation learning
CN121050751A
People flow density distribution prediction method, device, equipment and medium
CN121119293A