Trajectory prediction method, device, electronic device and storage medium

By generating and adjusting feature vector queues, combining latent features and memory features, and combining scene image features, the problem of insufficient trajectory prediction accuracy in the existing technology is solved, achieving high-accuracy trajectory prediction in complex scenes and supporting autonomous driving. and accurate decision-making by intelligent monitoring systems.

CN112000756BActive Publication Date: 2024-09-17SHANGHAI SENSETIME INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010852421.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-21
Publication Date
2024-09-17
Estimated Expiration
2040-08-21

AI Technical Summary

Technical Problem

It is difficult for existing technologies to achieve highly accurate future trajectory prediction of target objects in complex scenes in trajectory prediction, especially in the fields of autonomous driving and intelligent monitoring. Existing methods are difficult to effectively utilize historical location information and scene image features, resulting in prediction results. Not precise enough.

Method used

By determining the historical location information of the target object, generating a queue of feature vectors matching these location information, combining latent feature vectors and memory feature vectors to generate latent feature vectors to improve the accuracy of predicted trajectories, and adjust latent feature vectors in multi-target object scenarios. Feature vectors to consider motion interaction features, combined with scene image feature vectors to enhance prediction accuracy.

Benefits of technology

It improves the accuracy of trajectory prediction and can more accurately predict the future trajectory of target objects, especially in complex scenes and multi-target object interactions, and enhances the decision-making support capabilities of autonomous driving and intelligent monitoring systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112000756B
    Figure CN112000756B
Patent Text Reader

Abstract

The present disclosure provides a method, device, electronic device and storage medium for trajectory prediction, including: determining multiple historical position information of a target object according to a motion trajectory of the target object; using one of the multiple historical position information as target historical position information, and determining a feature vector queue matching the target historical position information according to latent feature vectors corresponding to multiple historical position information before the target historical position information; and determining at least one predicted trajectory of the target object according to the last historical position information of the target object and the feature vector queue matching the last historical position information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of deep learning technology, and in particular to a trajectory prediction method, device, electronic device, and storage medium. Background Art

[0002] Trajectory prediction of target objects is an important task. It can predict the future trajectory of each target object in a complex scene by obtaining the historical movement trajectory of each target object. Specifically, trajectory prediction can be applied to application fields such as self-driving cars, mobile robots, and intelligent monitoring. For example, accurate prediction of the future trajectory of target objects in a scene can effectively help self-driving cars and robots plan safe paths, or predict possible collisions in monitoring scenes. Summary of the invention

[0003] In view of this, the present disclosure at least provides a trajectory prediction method, device, electronic device and storage medium.

[0004] In a first aspect, the present disclosure provides a trajectory prediction method, comprising:

[0005] Determine multiple historical position information of the target object according to the movement trajectory of the target object;

[0006] Taking one of the multiple historical location information as target historical location information, and determining a feature vector queue matching the target historical location information according to the latent feature vectors corresponding to the multiple historical location information before the target historical location information;

[0007] At least one predicted trajectory of the target object is determined according to the last historical position information of the target object and a feature vector queue matching the last historical position information.

[0008] By adopting the above method, for the target historical location information, a feature vector queue matching the target historical location information is determined by using the implicit feature vectors corresponding to multiple historical location information before the target historical location information, so that the feature vector queue corresponding to the obtained target historical location information includes the correlation features between the multiple historical location information in the time dimension. Therefore, when the predicted trajectory is determined based on the last historical location information that includes the correlation features between the multiple historical location information in the time dimension, the accuracy of the predicted trajectory is higher.

[0009] In a possible implementation manner, after determining the feature vector queue matching the target historical location information, the method further includes:

[0010] Generate a latent feature vector corresponding to the target historical location information according to the target historical location information and a feature vector queue matching the target historical location information;

[0011] Determining at least one predicted trajectory of the target object according to the last historical position information of the target object and a feature vector queue matching the last historical position information includes:

[0012] Generate a latent feature vector corresponding to the last historical position information according to the last historical position information of the target object and a feature vector queue matching the last historical position information;

[0013] At least one predicted trajectory of the target object is determined according to the latent feature vector corresponding to the last historical position information.

[0014] In a possible implementation manner, determining the latent feature vector corresponding to the target historical location information according to the following steps includes:

[0015] A latent feature vector corresponding to the target historical position information is generated based on the target historical position information, each latent feature vector in the feature vector queue that matches the target historical position information, and a memory feature vector corresponding to each latent feature vector.

[0016] Here, a feature vector queue corresponding to the target historical position information is matched, and the feature vector queue includes latent feature vectors corresponding to multiple historical position information before the target historical position information. A latent feature vector corresponding to the target historical position information is generated based on the latent feature vectors corresponding to the multiple historical position information before the target historical position information, the target historical position information, and the memory feature vector corresponding to each latent feature vector. The generated latent feature vector corresponding to the target historical position information contains the correlation features between the multiple historical position information before the target historical position information in the time dimension, which provides data support for the subsequent generation of a more accurate prediction trajectory.

[0017] In a possible implementation, generating a latent feature vector corresponding to the target historical location information based on the target historical location information, each latent feature vector in the feature vector queue matching the target historical location information, and a memory feature vector corresponding to each latent feature vector includes:

[0018] Based on each latent feature vector in the feature vector queue that matches the target historical position information, generating an average feature vector corresponding to the feature vector queue;

[0019] Generate a memory feature vector corresponding to the target historical position information based on the target historical position information, the average feature vector, each latent feature vector in the feature vector queue, and a memory feature vector corresponding to each latent feature vector in the feature vector queue;

[0020] Based on the target historical position information, the average feature vector, and the memory feature vector corresponding to the target historical position information, a latent feature vector corresponding to the target historical position information is generated.

[0021] Here, the steps of generating the latent feature vector corresponding to the target historical position information are explained, which provides data support for the subsequent generation of the predicted trajectory of the target object based on the latent feature vector corresponding to the last target historical position information of the target object and the image feature vector corresponding to the target object.

[0022] In a possible implementation manner, the target object is a plurality of target objects, and after generating a latent feature vector corresponding to the target historical location information according to the target historical location information and a feature vector queue matching the target historical location information, the method further includes:

[0023] Based on latent feature vectors corresponding to multiple historical position information of each target object among the multiple target objects, adjusting the latent feature vector corresponding to the target historical position information of a first target object and the latent feature vector corresponding to the historical position information before the target historical position information, to generate an adjusted latent feature vector corresponding to the target historical position information; the first target object is any target object among the multiple target objects;

[0024] Determining at least one predicted trajectory of the target object according to the latent feature vector corresponding to the last historical position information includes:

[0025] At least one predicted trajectory of the target object is determined according to the adjusted latent feature vector corresponding to the last historical position information.

[0026] Here, when at least one target object is multiple target objects, taking into account the mutual influence between the moving trajectories of different target objects, the latent feature vectors corresponding to the multiple historical position information of each target object in the multiple target objects can be used to adjust the latent feature vector corresponding to the target historical position information of the first target object and the latent feature vector corresponding to the historical position information before the target historical position information, so that the adjusted latent feature vector contains the motion interaction characteristics between different target objects, and then based on the adjusted latent feature vector, the predicted trajectory of each target object can be determined more accurately.

[0027] In a possible implementation, based on latent feature vectors corresponding to multiple historical position information of each target object among the multiple target objects, adjusting the latent feature vector corresponding to the target historical position information of the first target object and the latent feature vector corresponding to the historical position information before the target historical position information to generate the adjusted latent feature vector corresponding to the target historical position information includes:

[0028] Based on any latent feature vector to be adjusted corresponding to the first target object and latent feature vectors of other target objects in corresponding historical position information, generating association degrees between the first target object and the multiple target objects respectively, and generating a normalization factor based on each association degree;

[0029] Based on any latent feature vector to be adjusted, the normalization factor, the degree of association between the first target object and the multiple target objects, and the latent feature vectors after linear transformation corresponding to other target objects, an adjusted latent feature vector corresponding to any latent feature vector to be adjusted is generated.

[0030] In the above implementation, the adjustment process of the latent feature vector to be adjusted for each target object is described, which provides data support for subsequently generating a predicted trajectory of the target object based on the adjusted latent feature vector corresponding to the last historical position information of the target object and the image feature vector corresponding to the target object.

[0031] In a possible implementation manner, the method further includes:

[0032] Determining at least one image feature vector corresponding to the target object according to a scene image of the scene where the target object is located;

[0033] Determining at least one predicted trajectory of the target object according to the last historical position information of the target object and a feature vector queue matching the last historical position information includes:

[0034] At least one predicted trajectory of the target object is determined according to the last historical position information of the target object, a feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object.

[0035] In the disclosed embodiment, at least one predicted trajectory of each target object is generated based on the last position information of the target object, a feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object. Since the scene image has a high degree of influence on the trajectory prediction of the target object, for example, at an intersection, the target object has more movable directions; in a narrow alley, the target object has fewer movable directions. Therefore, by combining the image feature vector to determine the predicted trajectory of the target object, the accuracy of the predicted trajectory can be improved.

[0036] In a possible implementation, determining at least one predicted trajectory of the target object according to the last historical position information of the target object, a feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object includes:

[0037] Generate a latent feature vector corresponding to the last historical position information according to the last historical position information of the target object and a feature vector queue matching the last historical position information;

[0038] Concatenate the latent feature vector corresponding to the last historical position information with at least one image feature vector corresponding to the target object to generate at least one predicted feature vector;

[0039] Based on each of the predicted feature vectors, at least one predicted trajectory corresponding to the target object is generated.

[0040] In a possible implementation, determining at least one image feature vector corresponding to the target object according to the scene image includes:

[0041] Based on the scene image, determining a semantic image corresponding to the scene image;

[0042] Extracting features from the semantic image to obtain an intermediate feature vector corresponding to the semantic image;

[0043] Based on the intermediate feature vector and the multiple historical position information of the target object, obtaining a mean vector and a variance vector corresponding to the target object;

[0044] At least one image feature vector corresponding to the target object is generated based on the mean vector and the variance vector corresponding to the target object.

[0045] Under the above implementation, by generating a corresponding mean vector and variance vector for each target object, and then determining at least one corresponding image feature vector for each target object based on the mean vector and variance vector corresponding to each target object, and then when determining the predicted trajectory of the target object in combination with the at least one image feature vector corresponding to the target object, the accuracy of the predicted trajectory can be improved.

[0046] In a possible implementation manner, the trajectory prediction method is performed by a neural network, and the neural network is trained by the following steps:

[0047] Acquire training samples, wherein the training samples have annotated tracks, and each of the training samples includes a scene image sample and sample historical position information of a sample object;

[0048] Using the neural network, based on the training sample, generating at least one predicted trajectory corresponding to the training sample;

[0049] Randomly select two latent feature vectors from the latent feature vectors corresponding to the historical position information of each sample, and determine the regularization loss based on the two selected latent feature vectors; and generate the prediction loss based on the predicted trajectory and the labeled trajectory;

[0050] Based on the prediction loss and the regularization loss, the network parameters of the neural network are adjusted to obtain a trained neural network.

[0051] Here, considering that the moving trajectory of the target object is a coherent motion process, the motion features that are close in time are usually correlated, and the motion features that are far away in time are usually uncorrelated. Therefore, two latent feature vectors can be randomly selected from the latent feature vectors corresponding to the historical position information of each sample, and the regularization loss can be determined based on the two selected latent feature vectors. The neural network can be trained by predicting the loss and adding the regularization loss, so that the accuracy of the trained neural network can be higher.

[0052] The effects of the following devices, electronic devices, etc. are described in the description of the above method and will not be repeated here.

[0053] In a second aspect, the present disclosure provides a trajectory prediction device, comprising:

[0054] A first determining module, used to determine a plurality of historical position information of the target object according to the motion trajectory of the target object;

[0055] A second determination module is used to use one of the multiple historical location information as target historical location information, and determine a feature vector queue matching the target historical location information based on latent feature vectors corresponding to multiple historical location information before the target historical location information;

[0056] The third determination module is used to determine at least one predicted trajectory of the target object according to the last historical position information of the target object and the feature vector queue matching the last historical position information.

[0057] In a third aspect, the present disclosure provides an electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the trajectory prediction method described in the first aspect or any one of the embodiments are performed.

[0058] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the trajectory prediction method as described in the first aspect or any one of the embodiments are executed.

[0059] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0061] Figure 1 A schematic diagram of a flow chart of a trajectory prediction method provided by an embodiment of the present disclosure is shown;

[0062] Figure 2 A schematic diagram of a process of generating a latent feature vector corresponding to target historical position information in a method for predicting a trajectory provided by an embodiment of the present disclosure is shown;

[0063] Figure 3 A schematic diagram of a process for determining a predicted trajectory based on a neural network in a trajectory prediction method provided by an embodiment of the present disclosure is shown;

[0064] Figure 4 A schematic diagram of the architecture of a trajectory prediction device provided by an embodiment of the present disclosure is shown;

[0065] Figure 5 A schematic structural diagram of an electronic device 500 provided in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0067] At present, trajectory prediction of target objects, such as pedestrians and vehicles, can be applied to various fields such as autonomous driving, robotics, and intelligent monitoring. Accurate prediction of the trajectory of target objects can play an important role in the development of various fields such as autonomous driving, robotics, and intelligent monitoring. Therefore, in order to achieve accurate prediction of the trajectory of a target object, an embodiment of the present disclosure provides a trajectory prediction method.

[0068] To facilitate understanding of the embodiments of the present disclosure, a trajectory prediction method disclosed in the embodiments of the present disclosure is first introduced in detail.

[0069] See also Figure 1 FIG. 1 is a flow chart of a trajectory prediction method provided by an embodiment of the present disclosure, the method comprising S101-S103, wherein:

[0070] S101, determining multiple historical position information of the target object according to the movement trajectory of the target object.

[0071] S102: Use one piece of historical location information among the multiple pieces of historical location information as target historical location information, and determine a feature vector queue matching the target historical location information based on latent feature vectors corresponding to multiple pieces of historical location information before the target historical location information.

[0072] S103: Determine at least one predicted trajectory of the target object according to the last historical position information of the target object and a feature vector queue matching the last historical position information.

[0073] By adopting the above method, for the target historical location information, a feature vector queue matching the target historical location information is determined by using the implicit feature vectors corresponding to multiple historical location information before the target historical location information, so that the feature vector queue corresponding to the obtained target historical location information includes the correlation features between the multiple historical location information in the time dimension. Therefore, when the predicted trajectory is determined based on the last historical location information containing the correlation features between the multiple historical location information in the time dimension, the accuracy of the predicted trajectory is higher.

[0074] For S101:

[0075] Here, the motion trajectory of the target object is determined, and multiple historical position information is sampled from the motion trajectory of the target object. The motion trajectory of the target object can be a collection of position information of the target object moving in a historical time period, and the position information can be coordinate information in a set pixel coordinate system.

[0076] For example, a scene image may be obtained, which may be a bird's-eye view of any scene; and multiple continuous historical position information of each target object included in the scene image may be obtained, that is, the historical movement trajectory of each target object may be obtained. The number of target objects may be one or more; and the target object may be a pedestrian, a motor vehicle, a non-motor vehicle, etc.

[0077] For S102 and S103:

[0078] Here, each of the multiple historical location information is used as the target historical location information, and the feature vector queue matching the target historical location information is determined based on the hidden feature vectors corresponding to the multiple historical location information before the target historical location information. For example, the hidden feature vectors corresponding to the three historical location information before the target historical location information can be obtained; the feature vector queue composed of the three obtained hidden feature vectors is determined as the feature vector queue matching the target historical location information. Then, at least one predicted trajectory of the target object can be determined based on the last historical location information of the target object and the feature vector queue matching the last historical location information.

[0079] In a possible implementation manner, after determining the characteristic feature vector queue matching the target historical location information, the method further includes:

[0080] generating a latent feature vector corresponding to the target historical location information according to the target historical location information and a feature feature vector queue matching the target historical location information;

[0081] Determining at least one predicted trajectory of the target object according to the last historical position information of the target object and a feature vector queue matching the last historical position information includes:

[0082] Generate a latent feature vector corresponding to the last historical position information according to the last historical position information of the target object and a feature vector queue matching the last historical position information;

[0083] At least one predicted trajectory of the target object is determined according to the latent feature vector corresponding to the last historical position information.

[0084] Here, when there are multiple target objects, for each target object, the target historical position information can be selected in sequence from the multiple historical position information according to the motion trajectory of the target object. For example, for target object A, if ten consecutive historical positions of target object A are obtained, that is, the multiple consecutive historical position information of target object A includes historical position information M1, historical position information M2, ..., historical position information M 10 The moving trajectory of the target object is that the target object A first moves to the position corresponding to the historical position information M1, and finally moves to the position corresponding to the historical position information M 10 At the corresponding position, according to the motion trajectory of the target object, the historical position information M1 is first used as the target historical position information of the target object A, and then the historical position information M2 is used as the target historical position information of the target object A, until the historical position information M 10 As the target historical position information of target object A.

[0085] Here, the number of latent feature vectors included in the feature vector queue can be set as needed. If the feature vector queue includes 3 latent feature vectors, then the target historical position information M t The corresponding feature vector array can be That is, q = 3. Among them, h t-1 It can be the historical location information M t-1 The corresponding latent feature vector; h t-2 It can be historical location information M t-2 The corresponding latent feature vector, etc.

[0086] For example, the historical location information M1 may be used as the target historical location information of the target object A, and a feature vector queue matching the target historical location information may be obtained. Since there is no historical position information before the historical position information M1, this feature vector queue Each latent feature vector in can be a preset initial feature vector, h -2 、h -1, h0 are both initial feature vectors. The initial feature vector may be a feature vector with each feature value being a preset value, such as 0. Further, the historical location information M1 may be matched with the matching feature vector queue. Generate the latent feature vector h1 corresponding to the historical location information M1.

[0087] Next, the historical location information M2 can be used as the target historical location information of the target object A to obtain a feature vector queue matching the target historical location information. Among them, h -1 h0 and h1 are the initial feature vectors, and h2 is the hidden feature vector corresponding to the historical position information M1 generated in the above process. Generate the hidden feature vector h2 corresponding to the historical location information M2. Based on the same processing process, the historical location information M 10 As the target historical location information of target object A, obtain the feature vector queue matching the target historical location information Among them, h9 is the latent feature vector corresponding to the generated historical position information M9, h8 is the latent feature vector corresponding to the generated historical position information M8, and h7 is the latent feature vector corresponding to the generated historical position information M7. 10 The matching feature vector array Generate historical location information M 10 The corresponding latent feature vector h 10 That is, the latent feature vector corresponding to the last historical position information among multiple continuous historical position information is generated.

[0088] As an optional embodiment, the latent feature vector corresponding to the target historical location information can be determined according to the following steps: based on the target historical location information, each latent feature vector in the feature vector queue matching the target historical location information, and the memory feature vector corresponding to each latent feature vector, a latent feature vector corresponding to the target historical location information is generated.

[0089] Here, each latent feature vector corresponds to a memory feature vector, for example, the latent feature vector h 10 Corresponding to a memory feature vector c 10 Then the feature vector queue corresponds to a memory unit queue, for example, the feature vector queue Corresponding to a memory unit queue Here, the latent feature vector and the memory feature vector may be feature vectors generated by a long short-term memory unit in a long short-term memory network (LSTM).

[0090] Based on historical location information M 10 Taking the target historical location information as an example, based on the target historical location information M 10 , a feature vector queue matching the target historical location information Each latent eigenvector in , and the memory eigenvector corresponding to each latent eigenvector Generate the hidden feature vector h corresponding to the target historical position information 10 Here, c7 is the memory feature vector corresponding to the latent feature vector h7, c8 is the memory feature vector corresponding to the latent feature vector h8, and c9 is the memory feature vector corresponding to the latent feature vector h9.

[0091] In the above implementation manner, a feature vector queue corresponding to the target historical position information is matched, and the feature vector queue includes latent feature vectors corresponding to multiple historical position information before the target historical position information. A latent feature vector corresponding to the target historical position information is generated based on the latent feature vectors corresponding to the multiple historical position information before the target historical position information, the target historical position information, and the memory feature vector corresponding to each latent feature vector. The generated latent feature vector corresponding to the target historical position information contains the correlation features between the multiple historical position information before the target historical position information in the time dimension, thereby providing data support for the subsequent generation of a more accurate prediction trajectory.

[0092] As an optional implementation, based on the target historical position information, each latent feature vector in the feature vector queue matching the target historical position information, and the memory feature vector corresponding to each latent feature vector, generating a latent feature vector corresponding to the target historical position information includes:

[0093] 1. Based on each latent feature vector in the feature vector queue that matches the target historical position information, generate an average feature vector corresponding to the feature vector queue.

[0094] 2. Based on the target historical position information, the average feature vector, each latent feature vector in the feature vector queue, and the memory feature vector corresponding to each latent feature vector in the feature vector queue, a memory feature vector corresponding to the target historical position information is generated.

[0095] 3. Based on the target historical position information, the average feature vector, and the memory feature vector corresponding to the target historical position information, generate a latent feature vector corresponding to the target historical position information.

[0096] See also Figure 2 A schematic diagram of a process for generating a latent feature vector corresponding to target historical position information in a method for predicting a trajectory shown in FIG. Figure 2 Step 1, step 2, and step 3 are described respectively.

[0097] To explain step 1, each latent feature vector in the feature vector queue can be added and then averaged to obtain the average feature vector corresponding to the feature vector queue. That is, the average feature vector corresponding to the feature vector queue can be calculated using the following formula (1):

[0098]

[0099] Where q is the number of hidden feature vectors in the feature vector queue, is each latent feature vector in the feature vector queue corresponding to the target object i, i is the identifier of the target object, and q, i, and l are positive integers.

[0100] For example, for the target object A (the identifier i corresponding to the target object A may be 1), and the target historical location information (historical location information ) The matching feature vector sequence is Then the latent feature vector Hidden feature vector Hidden feature vector Add the corresponding eigenvalues ​​in and get the average to get the eigenvector queue The corresponding average eigenvector Here q is 3.

[0101] Step 2 is explained. Figure 2 It can be seen that first, based on the target historical location information Average eigenvector Get the first intermediate eigenvector And get the second intermediate eigenvector

[0102] Specifically, it can be calculated according to formula (2) Formula (2) is as follows:

[0103]

[0104] It can be calculated according to formula (3) Formula (3) is as follows:

[0105]

[0106] Among them, W u , U u 、b u is the first network unit parameter, W g , U g 、b gis the parameter of the second network unit. σ(·) is the activation function operation. W and U are different weight matrices, and b is the offset vector.

[0107] At the same time, the third intermediate feature vector corresponding to each latent feature vector can be generated based on the target historical position information and each latent feature vector in the feature vector queue That is, the feature vector corresponding to the forget gate included in LSTM Specifically, it can be calculated according to the following formula (4):

[0108]

[0109] Among them, W f , U f 、b f is the first network unit parameter, that is, Figure 2 In

[0110] Next, based on the first intermediate eigenvector The second intermediate eigenvector The third intermediate eigenvector corresponding to each latent eigenvector And the memory feature vector corresponding to each hidden feature vector in the feature vector queue Generate the memory feature vector corresponding to the target historical position information Specifically, it can be calculated according to the following formula (5):

[0111]

[0112] Among them, ⊙ is the operator symbol for element-wise multiplication.

[0113] Here, when the historical location information M1 is used as the target historical location information of the target object A, the feature vector queue matching the target historical location information is Since there is no historical position information before the historical position information M1, the feature vector queue Medium -2 、h -1 , h0 are both initial eigenvectors. At this time, the eigenvector queue The memory eigenvector corresponding to each latent eigenvector in is also the initial eigenvector, that is, the initial eigenvector can be a eigenvector with each eigenvalue being zero.

[0114] Explain step 3. At the same time, you can Average eigenvector Get the fourth intermediate eigenvector Specifically, it can be calculated according to formula (6) Formula (6) is as follows:

[0115]

[0116] Finally, the latent feature vector corresponding to the target historical position information can be generated according to the target historical position information, the average feature vector, and the memory feature vector corresponding to the target historical position information. Specifically, the latent feature vector corresponding to the target historical position information can be calculated according to formula (7):

[0117]

[0118] Then, based on the latent feature vector corresponding to the target historical position information and the latent feature vectors corresponding to the historical position information before the target historical position information, an updated feature vector queue can be generated, and based on the memory feature vector corresponding to the target historical position information and the memory feature vectors corresponding to the historical position information before the target historical position information, an updated memory unit queue can be generated, that is, the updated feature vector queue is Figure 2 In The updated memory cell queue is Figure 2 In The updated feature vector queue is also a feature vector queue corresponding to adjacent historical position information subsequent to the target historical position information.

[0119] For example, for target object A (the identifier i corresponding to target object A may be 1), and the target historical location information (historical location information ) The matching feature vector sequence is Then calculate the hidden feature vector corresponding to the target historical position information The process can be: using formula (1) to obtain the average feature vector corresponding to the feature vector queue The first intermediate feature vector corresponding to the target feature position information is obtained by using formula (2) and formula (3): and the second intermediate eigenvector Then, the third intermediate eigenvector corresponding to each latent eigenvector in the eigenvector queue is calculated using formula (4): And using formula (5) to obtain the memory feature vector corresponding to the target historical position information At the same time, the fourth intermediate eigenvector can be calculated using formula (6): Finally, the latent feature vector corresponding to the target historical location information is calculated using formula (7):

[0120] In the above implementation, the steps of generating the latent feature vector corresponding to the target historical position information are described, which provides data support for subsequently generating the predicted trajectory of the target object based on the latent feature vector corresponding to the last target historical position information of the target object and the image feature vector corresponding to the target object.

[0121] In specific implementation, the number of latent feature vectors included in the feature vector queue that matches the target historical position information can be set, that is, the number q described in the above process can be set. When q is 3, the latent feature vectors corresponding to the three historical position information before the target historical position information can be obtained, and the three obtained latent feature vectors constitute a feature vector queue that matches the target historical position information.

[0122] In the above implementation, a feature vector queue matching the target historical position information is obtained, and the feature vector queue includes latent feature vectors corresponding to multiple historical position information before the target historical position information, providing data support for determining the latent feature vector corresponding to the target historical position information.

[0123] In an optional implementation, when the target object is multiple target objects, after generating the latent feature vector corresponding to the target historical position information based on the target historical position information and a feature vector queue matching the target historical position information, it also includes: based on the latent feature vectors corresponding to multiple historical position information of each target object among the multiple target objects, adjusting the latent feature vector corresponding to the target historical position information of the first target object and the latent feature vector corresponding to the historical position information before the target historical position information, to generate an adjusted latent feature vector corresponding to the target historical position information; the first target object is any target object among the multiple target objects.

[0124] Determining at least one predicted trajectory of the target object according to the latent feature vector corresponding to the last historical position information includes: determining at least one predicted trajectory of the target object according to the adjusted latent feature vector corresponding to the last historical position information.

[0125] In the disclosed embodiment, it is considered that the movement trajectories of multiple target objects may have an impact, for example, the movement trajectory of target object A may have an impact on the movement trajectory of target object B. Therefore, after generating the latent feature vector corresponding to the target historical position information of each target object (i.e., the first target object), the multiple latent feature vectors of each target object may be adjusted to generate an adjusted latent feature vector corresponding to the target historical position information.

[0126] That is, after generating the latent feature vector corresponding to the target historical position information of any target object, the latent feature vector corresponding to the target historical position information can be used to update the feature vector queue corresponding to the target historical position information, and each latent feature vector in the updated feature vector queue can be adjusted to generate an adjusted feature vector queue, wherein the adjusted feature vector queue includes the adjusted latent feature vector corresponding to the target historical position information, and then the adjusted feature vector queue can be determined as the feature vector queue matching the next target historical position information.

[0127] For example, the target historical location information is generated The corresponding latent eigenvector The target's historical location information The corresponding feature vector array is Then the updated feature vector queue is And then we can Make adjustments and convert the adjusted Determine the historical location information of the next target The corresponding feature vector queue, adjusted The target's historical location information The corresponding, adjusted latent feature vector and the next target historical position information The corresponding feature vector queue is the adjusted feature vector queue Right now The latent feature vector included in and They are all generated adjusted latent feature vectors.

[0128] Exemplarily, for any target object (ie, the first target object), after obtaining the target historical location information of the first target object The corresponding latent eigenvector Afterwards, the historical location information of the first target can be The corresponding latent eigenvector Historical location information The corresponding latent eigenvector Historical location information The corresponding latent eigenvector Adjust and adjust the latent feature vector Adjusted latent feature vector Adjusted latent feature vector The next target historical location information determined as the first target object The corresponding feature vector array.

[0129] Here, when at least one target object is multiple target objects, taking into account the mutual influence between the moving trajectories of different target objects, the latent feature vectors corresponding to the multiple historical position information of each target object in the multiple target objects can be used to adjust the latent feature vector corresponding to the target historical position information of the first target object and the latent feature vector corresponding to the historical position information before the target historical position information, so that the adjusted latent feature vector contains the motion interaction characteristics between different target objects, and then based on the adjusted latent feature vector, the predicted trajectory of each target object can be determined more accurately.

[0130] In an optional implementation, based on latent feature vectors corresponding to multiple historical position information of each target object among multiple target objects, adjusting the latent feature vector corresponding to the target historical position information of the first target object and the latent feature vector corresponding to the historical position information before the target historical position information to generate the adjusted latent feature vector corresponding to the target historical position information may include:

[0131] Step 1: Based on any latent feature vector to be adjusted corresponding to the first target object and latent feature vectors of other target objects in corresponding historical position information, generate the degree of association between the first target object and multiple target objects respectively, and generate a normalization factor based on each degree of association.

[0132] Step 2: Based on any latent feature vector to be adjusted, a normalization factor, the degree of association between the first target object and multiple target objects, and the latent feature vectors corresponding to other target objects after linear transformation, an adjusted latent feature vector corresponding to any latent feature vector to be adjusted is generated.

[0133] In specific implementation, each latent feature vector to be adjusted of each target object can be adjusted by the following formula (8) and formula (9):

[0134]

[0135]

[0136] Wherein, N(i) is the number of neighbor target objects of target object i, that is, when the number of multiple target objects is 3, N(i) is 2, and j is the identifier of other target objects among the multiple target objects except target object i. is the degree of association between target object i and at least one neighbor target object, is the normalization factor, is the operator for element-wise addition. θ , W φ , W gare the adjusted network parameters.

[0137] For example, if the multiple target objects include target object A, target object B, and target object C, the latent feature vector to be adjusted corresponding to each target object includes Here, i=1, 2, 3, that is, the identifier i corresponding to the target object A is 1, the identifier i corresponding to the target object B is 2, and the identifier i corresponding to the target object C is 3, l=0, 1, 2, N(i) is 2, that is, j is 1, 2.

[0138] For the target object A, if we want to adjust the hidden feature vector of the target object A, , then according to the latent feature vector to be adjusted of the target object A Hidden feature vector of target object B And the latent feature vector of the target object C Using formula (8) and formula (9), we can get the adjusted latent feature vector of target object A: Furthermore, each adjusted latent feature vector corresponding to each target object can be obtained.

[0139] In the above implementation, the adjustment process of the latent feature vector to be adjusted for each target object is described, which provides data support for subsequently generating a predicted trajectory of the target object based on the adjusted latent feature vector corresponding to the last target historical position information of the target object and the image feature vector corresponding to the target object.

[0140] In a possible implementation, the method further includes: determining at least one image feature vector corresponding to the target object according to a scene image of the scene where the target object is located;

[0141] Determining at least one predicted trajectory of the target object based on the last historical position information of the target object and a feature vector queue matching the last historical position information, including: determining at least one predicted trajectory of the target object based on the last historical position information of the target object, a feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object.

[0142] Here, a scene image of the scene where the target object is located can be obtained, and the scene image can be a bird's-eye view including the target object, and then based on the scene image, at least one image feature vector corresponding to the target object is determined. Further, based on the last historical position information of the target object, the feature vector queue matching the last historical position information, and the at least one image feature vector corresponding to the target object, at least one predicted trajectory of the target object can be determined.

[0143] In the disclosed embodiment, at least one predicted trajectory of each target object is generated based on the last position information of the target object, a feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object. Since the scene image has a high degree of influence on the trajectory prediction of the target object, for example, at an intersection, the target object has more movable directions; in a narrow alley, the target object has fewer movable directions. Therefore, by combining the image feature vector to determine the predicted trajectory of the target object, the accuracy of the predicted trajectory can be improved.

[0144] Here, the predicted trajectory may be composed of a plurality of predicted position information. Among them, according to the last historical position information of the target object, the feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object, determining at least one predicted trajectory of the target object includes:

[0145] 1. Generate a latent feature vector corresponding to the last historical location information according to the last historical location information of the target object and the feature vector queue matching the last historical location information;

[0146] 2. Concatenate the latent feature vector corresponding to the last historical position information of each target object with at least one image feature vector corresponding to the target object determined according to the scene image to generate at least one predicted feature vector;

[0147] 3. Based on each predicted feature vector, generate at least one predicted trajectory corresponding to the target object.

[0148] In specific implementation, the latent feature vector corresponding to the last historical position information can be generated based on the last historical position information of the target object and the feature vector queue matching the last historical position information. The latent feature vector corresponding to the last historical position information can then be cascaded with at least one image feature vector corresponding to the target object to generate at least one predicted feature vector; and then at least one predicted trajectory corresponding to the target object is generated based on each predicted feature vector.

[0149] Exemplarily, if the image feature vectors corresponding to the target object A include: image feature vector one, image feature vector two, and image feature vector three, then the latent feature vector corresponding to the last historical position information of the target object A can be cascaded with image feature vector one to generate predicted feature vector one; the latent feature vector corresponding to the last historical position information of the target object A can be cascaded with image feature vector two to generate predicted feature vector two; the latent feature vector corresponding to the last historical position information of the target object A can be cascaded with image feature vector three to generate predicted feature vector three; and then three predicted trajectories of the target object A are generated based on predicted feature vector one, predicted feature vector two, and predicted feature vector three, respectively.

[0150] Wherein, determining at least one image feature vector corresponding to the target object according to the scene image may include:

[0151] 1. Based on the scene image, determine the semantic image corresponding to the scene image.

[0152] 2. Extract features from the semantic image and obtain the intermediate feature vector corresponding to the semantic image.

[0153] 3. Based on the intermediate feature vector and multiple historical position information corresponding to the target object, the mean vector and variance vector corresponding to the target object are obtained.

[0154] 4. Based on the mean vector and variance vector corresponding to the target object, generate at least one image feature vector corresponding to the target object.

[0155] Here, the scene image can be input into a pre-trained semantic detection neural network to generate a semantic image corresponding to the scene image. Alternatively, the size of the scene image can be adjusted (adjusted to a preset size), and the adjusted scene image can be input into a pre-trained semantic detection neural network to generate a semantic image corresponding to the scene image. Here, a pre-trained semantic detection neural network can be used in an offline manner to generate a semantic image corresponding to the scene image, thereby reducing the time for generating a predicted trajectory of the target object and improving the efficiency of generating the predicted trajectory.

[0156] Then, feature extraction can be performed on the semantic image to obtain an intermediate feature vector corresponding to the semantic image; the intermediate feature vector corresponding to the semantic image is fused with multiple historical position information corresponding to each target object, and the fused feature vector corresponding to each target object is input into the fully connected layer for processing to obtain the mean vector and variance vector corresponding to each target object. For example, the fusion method can be to add the intermediate feature vector corresponding to the semantic image and multiple continuous historical position information corresponding to each target object element by element to obtain the fused feature vector corresponding to the target object. Finally, based on the mean vector and variance vector corresponding to each target object, at least one image feature vector corresponding to the target object can be generated by using the reparameterization technique. For example, based on the mean vector and direction vector corresponding to target object A, a normal distribution corresponding to target object A can be obtained, and multiple sampling can be performed from the obtained normal distribution to obtain at least one image feature vector corresponding to target object A.

[0157] The number of at least one image feature vector corresponding to each target object can be determined according to the number of prediction trajectories to be obtained. For example, if the number of prediction trajectories corresponding to each target object is 3, then 3 image feature vectors corresponding to the target object can be generated based on the mean vector and variance vector corresponding to each target object.

[0158] In the above implementation, by generating a corresponding mean vector and variance vector for each target object, and then determining at least one corresponding image feature vector for each target object based on the mean vector and variance vector corresponding to each target object, and then determining the predicted trajectory of the target object in combination with the at least one image feature vector corresponding to the target object, the accuracy of the predicted trajectory can be improved.

[0159] In an optional implementation, the trajectory prediction method is performed by a neural network, and the neural network is trained by the following steps:

[0160] First, obtain training samples, where the training samples have labeled tracks, and each training sample includes a scene image sample and sample historical position information of the sample object.

[0161] 2. Using a neural network, based on the training samples, generate at least one predicted trajectory corresponding to the training samples.

[0162] 3. Randomly select two latent feature vectors from the latent feature vectors corresponding to the historical position information of each sample, and determine the regularization loss based on the two selected latent feature vectors; and generate the prediction loss based on the predicted trajectory and the labeled trajectory.

[0163] 4. Based on the prediction loss and regularization loss, adjust the network parameters of the neural network to obtain the trained neural network.

[0164] The training sample may include a scene image sample and sample historical position information of the sample object, wherein the sample historical position information is the position information of the sample object in the scene image. At the same time, the training sample has a labeled trajectory. When the acquired training sample is input into the neural network, at least one predicted trajectory corresponding to the training sample is generated. Furthermore, the loss value of the neural network can be determined, that is, the loss value adjusts the network parameters of the neural network until the neural network after the parameter adjustment meets the set conditions. The set conditions can be that the loss value of the neural network is less than the set loss threshold; or, the detection accuracy of the neural network can be greater than the set accuracy threshold, etc.

[0165] Here, the loss value of the neural network may include regularization loss and prediction loss, that is, the calculation formula of the loss value of the neural network may be the following formula (10):

[0166] Loss = λ × L c +L p ; (10)

[0167] Among them, L c is the regularization loss; L p is the prediction loss and λ is the trade-off parameter.

[0168] Regularization loss L c The calculation formula is as follows (11):

[0169]

[0170] in, are two randomly selected latent feature vectors. For example, for the target object A, q is 3, if the two latent feature vectors selected are Then |t1-t2|=5>3; if the two latent feature vectors selected are Then |t1-t2|=2<3. m is a hyperparameter. The smaller the value of m, the higher the degree of regularization. The value of m can be set as needed.

[0171] Prediction loss L p The calculation formula is as follows (12):

[0172]

[0173] in, is a plurality of predicted position information included in the predicted trajectory; The label track includes multiple label position information.

[0174] In the above implementation, considering that the moving trajectory of the target object is a coherent motion process, motion features that are close in time are usually correlated, and motion features that are far apart in time are usually uncorrelated. Therefore, two latent feature vectors can be randomly selected from the latent feature vectors corresponding to the historical position information of each sample, and the regularization loss can be determined based on the two selected latent feature vectors. The neural network can be trained by predicting the loss and adding the regularization loss, so that the accuracy of the trained neural network can be higher.

[0175] For example, see Figure 3 In a trajectory prediction method shown in FIG. 1 , a flowchart of determining a predicted trajectory based on a neural network is shown, combined with Figure 3 The process of generating prediction trajectories by the trained neural network is described. As can be seen from the figure, the scene image includes 3 target objects, and 3 prediction trajectories are determined for each target object.

[0176] Exemplarily, multiple historical location information of each of the three target objects is input into an encoder of a neural network (the neural network may be an LSTM), and an individual context module (ICM) in the encoder generates a context-sensitive information based on the target historical location information of each target object. A feature vector array that matches the target historical location information of each target object Generate target historical location information for each target object The corresponding latent eigenvector And get the updated feature vector queue Queue the updated feature vectors of each target object Input into the Social-aware Context Module (SCM) and Each latent feature vector in is adjusted to obtain the adjusted feature vector queue And the adjusted feature vector queue Determine the historical location information of the next target Matched feature vector queue, return to the next target historical position information and the historical location information of the next target The matched feature vector queue is input into the ICM module for processing until the adjusted latent feature vector corresponding to the last historical position information of each target object is obtained.

[0177] At the same time, the scene image is input into the pre-trained semantic detection neural network Pre-trained Network to obtain the semantic image Semantic Map corresponding to the scene image. Feature extraction is performed on the semantic image to obtain the image feature vector corresponding to the semantic image. The image feature vector is fused with multiple continuous historical position information of each target object, and the fused feature vector corresponding to each target object is input into the fully connected layer FC for processing to obtain the mean vector and variance vector corresponding to the target object. That is, here, the mean vector and variance vector of each of the three target objects can be obtained.

[0178] Then, for the mean vector and variance vector of each target object, the reparameterization technique can be used to generate the corresponding three image feature vectors z~N(μ,σ) for the target object. Here, for the mean vector and variance vector of each target object, the normal distribution of each target object can be obtained. The first sampling is performed from the normal distribution of each target object to obtain the first image feature vector corresponding to each target object; the second sampling is performed from the normal distribution of each target object to obtain the second image feature vector corresponding to each target object; the third sampling is performed from the normal distribution of each target object to obtain the third image feature vector corresponding to each target object. That is, three image feature vectors corresponding to each target object can be obtained.

[0179] Then the adjusted latent feature vector of each target object is Cascade with the corresponding three image feature vectors respectively (that is, the adjusted latent feature vector of the target object The three image feature vectors corresponding to the target object are concatenated to obtain three prediction feature vectors corresponding to each target object. The three prediction feature vectors corresponding to each target object are input into the decoder to obtain three prediction tracks corresponding to each target object.

[0180] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0181] Based on the same concept, the present disclosure also provides a trajectory prediction device, see Figure 4 As shown, it is a schematic diagram of the architecture of the device for trajectory prediction provided by an embodiment of the present disclosure, including a first determination module 401, a second determination module 402, a third determination module 403, a generation module 404, an adjustment module 405, a fourth determination module 406, and a training module 407. Specifically:

[0182] A first determining module 401 is used to determine a plurality of historical position information of the target object according to the movement trajectory of the target object;

[0183] The second determination module 402 is used to use one of the multiple historical location information as target historical location information, and determine a feature vector queue matching the target historical location information based on latent feature vectors corresponding to multiple historical location information before the target historical location information;

[0184] The third determination module 403 is used to determine at least one predicted trajectory of the target object according to the last historical position information of the target object and the feature vector queue matching the last historical position information.

[0185] In a possible implementation manner, after determining the feature vector queue matching the target historical location information, the device further includes:

[0186] A generating module 404, configured to generate a latent feature vector corresponding to the target historical location information according to the target historical location information and a feature vector queue matching the target historical location information;

[0187] The third determination module 403, when determining at least one predicted trajectory of the target object according to the last historical position information of the target object and the feature vector queue matching the last historical position information, is used to:

[0188] Generate a latent feature vector corresponding to the last historical position information according to the last historical position information of the target object and a feature vector queue matching the last historical position information;

[0189] At least one predicted trajectory of the target object is determined according to the latent feature vector corresponding to the last historical position information.

[0190] In a possible implementation, the generating module 404 is configured to determine the latent feature vector corresponding to the target historical location information according to the following steps:

[0191] A latent feature vector corresponding to the target historical position information is generated based on the target historical position information, each latent feature vector in the feature vector queue that matches the target historical position information, and a memory feature vector corresponding to each latent feature vector.

[0192] In a possible implementation manner, the generating module 404, when generating the latent feature vector corresponding to the target historical position information based on the target historical position information, each latent feature vector in the feature vector queue matching the target historical position information, and the memory feature vector corresponding to each latent feature vector, is configured to:

[0193] Based on each latent feature vector in the feature vector queue that matches the target historical position information, generating an average feature vector corresponding to the feature vector queue;

[0194] Generate a memory feature vector corresponding to the target historical position information based on the target historical position information, the average feature vector, each latent feature vector in the feature vector queue, and a memory feature vector corresponding to each latent feature vector in the feature vector queue;

[0195] Based on the target historical position information, the average feature vector, and the memory feature vector corresponding to the target historical position information, a latent feature vector corresponding to the target historical position information is generated.

[0196] In a possible implementation manner, the target object is a plurality of target objects, and after generating a latent feature vector corresponding to the target historical location information according to the target historical location information and a feature vector queue matching the target historical location information, the method further includes:

[0197] The adjustment module 405 is used to adjust the latent feature vector corresponding to the target historical position information of the first target object and the latent feature vector corresponding to the historical position information before the target historical position information based on the latent feature vectors corresponding to multiple historical position information of each target object among the multiple target objects, so as to generate an adjusted latent feature vector corresponding to the target historical position information; the first target object is any target object among the multiple target objects.

[0198] The third determination module 403 determines at least one predicted trajectory of the target object according to the latent feature vector corresponding to the last historical position information, including:

[0199] At least one predicted trajectory of the target object is determined according to the adjusted latent feature vector corresponding to the last historical position information.

[0200] In a possible implementation manner, the adjustment module 405, when adjusting the latent feature vector corresponding to the target historical position information of the first target object and the latent feature vector corresponding to the historical position information before the target historical position information based on the latent feature vectors corresponding to the multiple historical position information of each target object among the multiple target objects, to generate the adjusted latent feature vector corresponding to the target historical position information, is used to:

[0201] Based on any latent feature vector to be adjusted corresponding to the first target object and latent feature vectors of other target objects in corresponding historical position information, generating association degrees between the first target object and the multiple target objects respectively, and generating a normalization factor based on each association degree;

[0202] Based on any latent feature vector to be adjusted, the normalization factor, the degree of association between the first target object and the multiple target objects, and the latent feature vectors after linear transformation corresponding to other target objects, an adjusted latent feature vector corresponding to any latent feature vector to be adjusted is generated.

[0203] In a possible implementation manner, the device further includes:

[0204] A fourth determination module 406, configured to determine at least one image feature vector corresponding to the target object according to a scene image of the scene where the target object is located;

[0205] The third determination module 403, when determining at least one predicted trajectory of the target object according to the last historical position information of the target object and the feature vector queue matching the last historical position information, is used to:

[0206] At least one predicted trajectory of the target object is determined according to the last historical position information of the target object, a feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object.

[0207] In a possible implementation manner, the third determination module 403, when determining at least one predicted trajectory of the target object according to the last historical position information of the target object, the feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object, is configured to:

[0208] Generate a latent feature vector corresponding to the last historical position information according to the last historical position information of the target object and a feature vector queue matching the last historical position information;

[0209] Concatenate the latent feature vector corresponding to the last historical position information of each target object with at least one image feature vector corresponding to the target object to generate at least one predicted feature vector;

[0210] Based on each of the predicted feature vectors, at least one predicted trajectory corresponding to the target object is generated.

[0211] In a possible implementation manner, the fourth determination module 406, when determining at least one image feature vector corresponding to the target object according to the scene image, is configured to:

[0212] Based on the scene image, determining a semantic image corresponding to the scene image;

[0213] Extracting features from the semantic image to obtain an intermediate feature vector corresponding to the semantic image;

[0214] Based on the intermediate feature vector and the multiple historical position information of the target object, obtaining a mean vector and a variance vector corresponding to the target object;

[0215] At least one image feature vector corresponding to the target object is generated based on the mean vector and the variance vector corresponding to the target object.

[0216] In a possible implementation manner, the trajectory prediction method is performed by a neural network, and the device further includes a training module 407, wherein the training module 407 is used to train the neural network through the following steps:

[0217] Acquire training samples, wherein the training samples have annotated tracks, and each of the training samples includes a scene image sample and sample historical position information of a sample object;

[0218] Using the neural network, based on the training sample, generating at least one predicted trajectory corresponding to the training sample;

[0219] Randomly select two latent feature vectors from the latent feature vectors corresponding to the historical position information of each sample, and determine the regularization loss based on the two selected latent feature vectors; and generate the prediction loss based on the predicted trajectory and the labeled trajectory;

[0220] Based on the prediction loss and the regularization loss, the network parameters of the neural network are adjusted to obtain a trained neural network.

[0221] In some embodiments, the functions or templates contained in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0222] Based on the same technical concept, the embodiment of the present disclosure also provides an electronic device. Figure 5 As shown, it is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure, including a processor 501, a memory 502, and a bus 503. Among them, the memory 502 is used to store execution instructions, including a memory 5021 and an external memory 5022; the memory 5021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 501, and the data exchanged with the external memory 5022 such as a hard disk. The processor 501 exchanges data with the external memory 5022 through the memory 5021. When the electronic device 500 is running, the processor 501 communicates with the memory 502 through the bus 503, so that the processor 501 executes the following instructions:

[0223] Determine multiple historical position information of the target object according to the movement trajectory of the target object;

[0224] Taking one of the multiple historical location information as target historical location information, and determining a feature vector queue matching the target historical location information according to the latent feature vectors corresponding to the multiple historical location information before the target historical location information;

[0225] At least one predicted trajectory of the target object is determined according to the last historical position information of the target object and a feature vector queue matching the last historical position information.

[0226] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the trajectory prediction method described in the above method embodiment are executed.

[0227] The computer program product of the trajectory prediction method provided in the embodiment of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the trajectory prediction method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0228] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0229] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0230] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0231] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0232] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for trajectory prediction, characterized in that: include: Determining multiple historical position information of the target object according to the movement trajectory of the target object; Taking one of the multiple historical location information as target historical location information, and determining a feature vector queue matching the target historical location information according to the latent feature vectors corresponding to the multiple historical location information before the target historical location information; Determining at least one predicted trajectory of the target object according to the last historical position information of the target object and a feature vector queue matching the last historical position information; The method further comprises: determining at least one image feature vector corresponding to the target object according to a scene image of the scene where the target object is located; Determining at least one predicted trajectory of the target object according to the last historical position information of the target object and a feature vector queue matching the last historical position information, comprising: determining at least one predicted trajectory of the target object according to the last historical position information of the target object, a feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object; The method of determining at least one image feature vector corresponding to the target object based on the scene image includes: determining a semantic image corresponding to the scene image based on the scene image; performing feature extraction on the semantic image to obtain an intermediate feature vector corresponding to the semantic image; obtaining a mean vector and a variance vector corresponding to the target object based on the intermediate feature vector and the multiple historical position information of the target object; and generating at least one image feature vector corresponding to the target object based on the mean vector and the variance vector corresponding to the target object.

2. The method according to claim 1, characterized in that After determining the feature vector queue matching the target historical location information, the method further includes: Generate a latent feature vector corresponding to the target historical location information according to the target historical location information and a feature vector queue matching the target historical location information; Determining at least one predicted trajectory of the target object according to the last historical position information of the target object and a feature vector queue matching the last historical position information includes: Generate a latent feature vector corresponding to the last historical position information according to the last historical position information of the target object and a feature vector queue matching the last historical position information; At least one predicted trajectory of the target object is determined according to the latent feature vector corresponding to the last historical position information.

3. The method according to claim 2, characterized in that Determining the hidden feature vector corresponding to the target historical location information according to the following steps includes: A latent feature vector corresponding to the target historical position information is generated based on the target historical position information, each latent feature vector in the feature vector queue that matches the target historical position information, and a memory feature vector corresponding to each latent feature vector.

4. The method according to claim 3, characterized in that Generating a latent feature vector corresponding to the target historical position information based on the target historical position information, each latent feature vector in the feature vector queue matching the target historical position information, and a memory feature vector corresponding to each latent feature vector, including: Based on each latent feature vector in the feature vector queue that matches the target historical position information, generating an average feature vector corresponding to the feature vector queue; Generate a memory feature vector corresponding to the target historical position information based on the target historical position information, the average feature vector, each latent feature vector in the feature vector queue, and a memory feature vector corresponding to each latent feature vector in the feature vector queue; Based on the target historical position information, the average feature vector, and the memory feature vector corresponding to the target historical position information, a latent feature vector corresponding to the target historical position information is generated.

5. The method according to claim 2, characterized in that: The target object is a plurality of target objects, and after generating a latent feature vector corresponding to the target historical position information according to the target historical position information and a feature vector queue matching the target historical position information, the method further includes: Based on latent feature vectors corresponding to multiple historical position information of each target object among the multiple target objects, adjusting the latent feature vector corresponding to the target historical position information of a first target object and the latent feature vector corresponding to the historical position information before the target historical position information, to generate an adjusted latent feature vector corresponding to the target historical position information; the first target object is any target object among the multiple target objects; Determining at least one predicted trajectory of the target object according to the latent feature vector corresponding to the last historical position information includes: At least one predicted trajectory of the target object is determined according to the adjusted latent feature vector corresponding to the last historical position information.

6. The method according to claim 5, characterized in that Based on latent feature vectors corresponding to multiple historical position information of each target object among the multiple target objects, adjusting the latent feature vector corresponding to the target historical position information of the first target object and the latent feature vector corresponding to the historical position information before the target historical position information to generate an adjusted latent feature vector corresponding to the target historical position information, including: Based on any latent feature vector to be adjusted corresponding to the first target object and latent feature vectors of other target objects in corresponding historical position information, generating association degrees between the first target object and the multiple target objects respectively, and generating a normalization factor based on each association degree; Based on any latent feature vector to be adjusted, the normalization factor, the degree of association between the first target object and the multiple target objects respectively, and the latent feature vectors after linear transformation corresponding to other target objects, an adjusted latent feature vector corresponding to any latent feature vector to be adjusted is generated.

7. The method according to claim 1, characterized in that Determining at least one predicted trajectory of the target object according to the last historical position information of the target object, a feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object, including: Generate a latent feature vector corresponding to the last historical position information according to the last historical position information of the target object and a feature vector queue matching the last historical position information; Concatenate the latent feature vector corresponding to the last historical position information with at least one image feature vector corresponding to the target object to generate at least one predicted feature vector; Based on each of the predicted feature vectors, at least one predicted trajectory corresponding to the target object is generated.

8. The method according to any one of claims 1 to 7, characterized in that: The trajectory prediction method is performed by a neural network, and the neural network is trained by the following steps: Acquire training samples, wherein the training samples have annotated tracks, and each of the training samples includes a scene image sample and sample historical position information of a sample object; Using the neural network, based on the training sample, generating at least one predicted trajectory corresponding to the training sample; Randomly select two latent feature vectors from the latent feature vectors corresponding to the historical position information of each sample, and determine the regularization loss based on the two selected latent feature vectors; and generate the prediction loss based on the predicted trajectory and the labeled trajectory; Based on the prediction loss and the regularization loss, the network parameters of the neural network are adjusted to obtain a trained neural network.

9. A trajectory prediction device, characterized in that: include: A first determining module, used to determine a plurality of historical position information of the target object according to the motion trajectory of the target object; A second determination module is used to use one of the multiple historical location information as target historical location information, and determine a feature vector queue matching the target historical location information based on latent feature vectors corresponding to multiple historical location information before the target historical location information; A third determination module, configured to determine at least one predicted trajectory of the target object according to the last historical position information of the target object and a feature vector queue matching the last historical position information; The device further comprises: a fourth determination module, configured to determine at least one image feature vector corresponding to the target object according to a scene image of the scene where the target object is located; A third determination module, when determining at least one predicted trajectory of the target object according to the last historical position information of the target object and the feature vector queue matching the last historical position information, is used to: determine at least one predicted trajectory of the target object according to the last historical position information of the target object, the feature vector queue matching the last historical position information, and at least one image feature vector corresponding to the target object; The fourth determination module, when determining at least one image feature vector corresponding to the target object based on the scene image, is used to: determine a semantic image corresponding to the scene image based on the scene image; perform feature extraction on the semantic image to obtain an intermediate feature vector corresponding to the semantic image; obtain a mean vector and a variance vector corresponding to the target object based on the intermediate feature vector and the multiple historical position information of the target object; and generate at least one image feature vector corresponding to the target object based on the mean vector and the variance vector corresponding to the target object.

10. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the trajectory prediction method according to any one of claims 1 to 8 are performed.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the trajectory prediction method according to any one of claims 1 to 8 are executed.