Training and evaluation methods for trajectory prediction models
By decomposing the trajectory prediction model into sub-trajectory segments and refining the evaluation metrics, the problem of insufficient training and evaluation of existing models is solved, achieving higher prediction accuracy and more precise performance evaluation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SAIC VOLKSWAGEN AUTOMOTIVE CO LTD
- Filing Date
- 2022-11-14
- Publication Date
- 2026-05-26
AI Technical Summary
Existing trajectory prediction models use global distance functions in their training methods, resulting in low prediction accuracy. Furthermore, the evaluation metrics of existing methods are not refined enough to accurately assess model performance.
The predicted trajectory and the actual trajectory of the trajectory prediction model are divided into multiple sub-trajectory segments. The angle between the lateral and longitudinal vectors and the L2 distance loss are calculated and used as loss functions to optimize the model parameters. The model performance is evaluated by subdivided evaluation indicators such as the average displacement error of the lateral and longitudinal directions and the final displacement error.
This improves the training accuracy and evaluation precision of the trajectory prediction model, enabling the model to adapt to training samples more quickly and predict target trajectories more accurately.
Smart Images

Figure CN115730652B_ABST
Abstract
Description
Technical Field
[0001] This invention relates primarily to the field of autonomous driving, and more particularly to a training method and an evaluation method for a trajectory prediction model. Background Technology
[0002] In the field of autonomous driving, understanding the behavior of surrounding targets (such as pedestrians, vehicles, and other traffic participants) is a crucial aspect of autonomous driving systems. Target trajectory prediction aims to predict the future trajectory of a target based on its current or historical trajectory and environmental information.
[0003] Deep learning models are commonly used for target trajectory prediction. However, existing trajectory prediction models are trained using only an overall distance function as the loss function, resulting in low prediction accuracy. Furthermore, current evaluation methods rely solely on overall metrics such as Average Displacement Error (ADE) and Final Displacement Error (FDE), leading to imprecise performance assessments.
[0004] Therefore, there is an urgent need for a training method and evaluation method for trajectory prediction models with more refined loss functions and evaluation metrics. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a training method and an evaluation method for a trajectory prediction model, which solves the problems that the loss function of the existing training method is not precise enough and the evaluation index of the existing evaluation method is not precise enough.
[0006] To address the aforementioned technical problems, this invention provides a training method for a trajectory prediction model, comprising: obtaining a predicted trajectory of a target from the trajectory prediction model, and dividing the predicted trajectory into multiple predicted sub-trajectory segments; obtaining the true trajectory of the target, and dividing the true trajectory into multiple true sub-trajectory segments, wherein the number of true sub-trajectory segments corresponds to the number of predicted sub-trajectory segments; calculating the vector angles between the predicted sub-trajectory segments and the true sub-trajectory segments, wherein the vector angles include lateral vector angles and longitudinal vector angles; calculating the L2 distance loss between the predicted sub-trajectory segments and the true sub-trajectory segments; calculating lateral distance loss and longitudinal distance loss based on the vector angles and the L2 distance loss; and using the lateral distance loss and the longitudinal distance loss as loss functions of the trajectory prediction model to optimize the parameters of the trajectory prediction model.
[0007] Optionally, obtaining the predicted trajectory of the target from the trajectory prediction model includes: obtaining the target's historical trajectory and the target's surrounding environment information, wherein the target's surrounding environment information includes lane line information and trajectory information of surrounding vehicles; and inputting the target's historical trajectory and the target's surrounding environment information into the trajectory prediction model.
[0008] Alternatively, the angle between the longitudinal vectors can be calculated using the following formula:
[0009]
[0010] in, Let v be the angle between the longitudinal vectors. i For the i-th real sub-trajectory segment, The i-th predicted sub-trajectory segment.
[0011] Alternatively, the lateral angle can be calculated using the following formula:
[0012]
[0013] in, The lateral angle is the included angle. The angle between the longitudinal vectors is denoted as .
[0014] Alternatively, the lateral distance loss can be calculated using the following formula:
[0015]
[0016] in, For the lateral distance loss, For the L2 distance loss, The lateral angle is the angle between the two sides.
[0017] Alternatively, the longitudinal distance loss can be calculated using the following formula:
[0018]
[0019] in, For the longitudinal distance loss, For the L2 distance loss, The longitudinal angle is the angle between the two points.
[0020] Optionally, using the lateral distance loss and the longitudinal distance loss as the loss function of the trajectory prediction model includes: calculating a combined loss function based on the lateral distance loss and the longitudinal distance loss, and using the combined loss function as the loss function of the trajectory prediction model.
[0021] Alternatively, the combined loss function can be calculated using the following formula:
[0022]
[0023] Where Loss is the combined loss function, and N is the number of predicted sub-trajectory segments. For the lateral distance loss, The longitudinal distance loss is defined as follows: λ1 is the first weight, and λ2 is the second weight.
[0024] To address the aforementioned technical problems, this invention provides an evaluation method for trajectory prediction models, comprising:
[0025] The vector angle and L2 distance loss are obtained using the training method of the trajectory prediction model described above; the average displacement error (ADE) and final displacement error (FDE) of the trajectory prediction model are calculated; the lateral average displacement error, longitudinal average displacement error, lateral final displacement error, and longitudinal final displacement error are calculated based on the vector angle, average displacement error (ADE), and final displacement error (FDE); the trajectory prediction model is evaluated based on the lateral average displacement error, the longitudinal average displacement error, the lateral final displacement error, and the longitudinal final displacement error.
[0026] Optionally, calculating the lateral average displacement error, longitudinal average displacement error, lateral final displacement error, and longitudinal final displacement error based on the vector angle, average displacement error ADE, and final displacement error FDE includes: calculating the lateral average displacement error based on the lateral vector angle and average displacement error ADE; calculating the longitudinal average displacement error based on the longitudinal vector angle and average displacement error ADE; calculating the lateral final displacement error based on the lateral vector angle and final displacement error FDE; and calculating the longitudinal final displacement error based on the longitudinal vector angle and final displacement error FDE.
[0027] To address the aforementioned technical problems, this invention provides an evaluation method for a trajectory prediction model, comprising: obtaining the vector angle and the L2 distance loss using the trajectory prediction model training method described above; calculating the average displacement error (ADE) of the trajectory prediction model; calculating the average cosine similarity error based on the vector angle and the average displacement error (ADE); and evaluating the trajectory prediction model based on the average cosine similarity error.
[0028] To address the aforementioned technical problems, the present invention provides an evaluation apparatus for a trajectory prediction model, comprising: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement the trajectory prediction model evaluation method described above.
[0029] Compared with the prior art, the present invention has the following advantages:
[0030] The training method of the trajectory prediction model of the present invention segments the predicted trajectory and the future true trajectory according to time frames, calculates the predicted sub-trajectory segment and the true sub-trajectory segment for each frame, and calculates the lateral distance loss and the longitudinal distance loss based on the predicted sub-trajectory segment and the true sub-trajectory segment, respectively. Using the lateral distance loss and the longitudinal distance loss as the loss function of the trajectory prediction model allows the trajectory prediction model to quickly adapt to the training samples, and the trained trajectory prediction model has higher prediction accuracy. The evaluation method of the trajectory prediction model of the present invention decomposes the evaluation index into lateral average displacement error, longitudinal average displacement error, lateral final displacement error, and longitudinal final displacement error, which can more accurately evaluate the performance of the trajectory prediction model. Attached Figure Description
[0031] The accompanying drawings are included to provide a further understanding of this application; they are incorporated into and constitute a part of this application. The drawings illustrate embodiments of this application and, together with this specification, serve to explain the principles of the invention. In the drawings:
[0032] Figure 1 This is a flowchart of a training method for a trajectory prediction model according to an embodiment of the present invention.
[0033] Figure 2 This is a flowchart of an evaluation method for a trajectory prediction model according to an embodiment of the present invention.
[0034] Figure 3 This is a flowchart of an evaluation method for a trajectory prediction model according to another embodiment of the present invention.
[0035] Figure 4 This is a system block diagram of an evaluation device for a trajectory prediction model according to an embodiment of the present invention. Detailed Implementation
[0036] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some examples or embodiments of this application. For those skilled in the art, these drawings can be applied to other similar scenarios without creative effort. Unless obvious from the context or otherwise specified, the same reference numerals in the drawings represent the same structures or operations.
[0037] As indicated in this application and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not specifically singular and may include plural forms. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.
[0038] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of this application. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following drawings denote similar items; therefore, once an item is defined in one drawing, it need not be further discussed in subsequent drawings.
[0039] Flowcharts are used in this application to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, various steps can be processed in reverse order or simultaneously. Furthermore, other operations may be added to these processes, or one or more steps may be removed from these processes.
[0040] Figure 1 This is a flowchart of a training method for a trajectory prediction model according to an embodiment of the present invention. Figure 1 As shown, the training method 100 for the trajectory prediction model includes the following steps:
[0041] Step S11: Obtain the predicted trajectory of the target from the trajectory prediction model and divide the predicted trajectory into multiple predicted sub-trajectory segments;
[0042] In some embodiments, obtaining the predicted trajectory of a target from a trajectory prediction model includes:
[0043] 1) Obtain the target's historical trajectory. Specifically, receive information from the perception fusion module provided by the autonomous vehicle to obtain the predicted target's historical trajectory information. Assume timing begins from the trajectory's occurrence, designated as time t19. The preceding 20 frames can be denoted as t0, t1, t2...t19. The trajectory point corresponding to time t0 is denoted as p0, represented by two coordinates (x0, y0). The trajectory points at other times follow the same logic, and will not be elaborated further here. Obtaining the target's historical trajectory includes writing the historical trajectory points from t0 to t19 into an array container, denoted as {p0, p1, p2, p3, ..., p...}. 19 This application does not limit the number of trajectory points included in the historical trajectory of the target.
[0044] 2) Acquire information about the target's surrounding environment, including lane line information and the trajectory information of surrounding vehicles. Specifically, based on the coordinates of the positioning point, input into a high-precision map to obtain the lane line numbers around the target. Using these lane line numbers, obtain the information of points on the lane lines using the high-precision map's Application Programming Interface (API). Finally, acquire the trajectory information of other vehicles in the vicinity through a perception fusion module.
[0045] 3) Input the target's historical trajectory and surrounding environmental information into the trajectory prediction model. Specifically, firstly, the target's historical trajectory is encoded. The encoding format for each moment can be a one-dimensional array or other encoding formats. This patent does not limit the specific encoding format for the target's historical trajectory. Taking a one-dimensional array encoding format as an example, one instance is: (x,y,Δx,Δy,step,0,0,0,0,vector_id) where x and y represent the coordinates of the trajectory, and Δx and Δy represent the coordinate vectors of the trajectory, equivalent to subtracting the coordinate difference from the previous moment, expressed by the formula (Δx,Δy). t =p t -p t-1 `vector_id` represents the vehicle trajectory number to which the current trajectory encoding vector belongs. Therefore, the 20 time points from step 0 to step 19 can be represented as a 20x10 encoding matrix.
[0046] Then, the surrounding environment information of the target is encoded. Based on the obtained lane line number, information about each lane segment on that lane line is obtained through a map interface. This information is then encoded according to the obtained lane line segment information. One embodiment of the encoding format is as follows:
[0047] (x,y,Δx,Δy,traffic_ctrl,is_turns,is_intersect,vector_id)
[0048] Where x and y are the coordinates of the center point of the line segment, Δx and Δy are the unitized vector directions of the line segment based on the center point, traffic_ctrl is the traffic control signal, for example, 0 indicates traffic control (red light), 1 indicates no traffic control (green light), is_turns represents turning information, for example, (1,0) represents the left turn lane, (0,1) represents the right turn lane, (0,0) represents the straight lane, is_intersect represents intersection information, 0 indicates a non-intersection, 1 indicates an intersection, and vector_id represents the lane number to which the current lane encoding vector belongs. The above is an example of vehicle surrounding environment encoding described in this application, and this patent does not limit the specific encoding format.
[0049] Finally, the encoded historical trajectory of the target and the encoded information about the target's surrounding environment are input into the trajectory prediction model. The trajectory prediction model is built on a deep learning model, where the input consists of encoded trajectory information and encoded information about the target's surrounding environment. These two are concatenated dimensionally to form a numerical matrix, which serves as the standard input to the model. The trained model will output the trajectory for a future period. For example, if it needs to predict the trajectory for 30 frames, the model will output one or more arrays. Taking a model that outputs the trajectory for the next 30 frames as an example, the output format is a 1*30*2 or N*30*2 matrix, where 1 or N represents one or N trajectories, 30 represents the predicted position of the point in the next 30 frames, and 2 represents the x and y coordinates of each point. Simultaneously, the model also provides corresponding probability values for the values of these one or N trajectories, selecting the trajectory with the highest probability from the one or N trajectories. Continuing with the last frame p of the historical trajectory... 19 For example, the predicted trajectory of a target can be denoted as...
[0050] Dividing the predicted trajectory into multiple predicted sub-trajectory segments involves calculating the predicted sub-trajectory segments based on the predicted trajectory points. The predicted trajectory of the target is used as... For example, calculate the predicted sub-trajectory segment. in, When i=20, This refers to the trajectory point of the last frame of the historical trajectory.
[0051] Step S12: Obtain the target's true trajectory and divide the true trajectory into multiple true sub-trajectory segments, with the number of true sub-trajectory segments corresponding to the number of predicted sub-trajectory segments.
[0052] The system receives information from the perception fusion module provided by the autonomous vehicle to obtain the target's true trajectory. Taking the current reference time t19 as an example, the next 30 frames can be denoted as t20, t21, ..., t49. The true trajectory points from t20 to t49 are then written into an array container, denoted as {p 20 p 21 p 22 p 23 ...p 49}. Using the last frame of the historical trajectory p 19 Starting from point (p), based on the trajectory point (p) 19 p 20 p 21 p 22 p 23 ...p 49 ) Calculate the true sub-trajectory segment v 20 ,v 21 ,v 22 ,v 23 ,……v 49 , where v i =p i ,-p i-1 , when i=20, v 20 =p 20 -p 19 .
[0053] Step S13: Calculate the vector angle between the predicted sub-trajectory segment and the true sub-trajectory segment respectively. The vector angle includes the horizontal vector angle and the vertical vector angle.
[0054] The angle between the longitudinal vectors of the predicted sub-trajectory segment and the true sub-trajectory segment is calculated using the following formula:
[0055]
[0056] in, The angle between the vertical vectors, v i For the i-th real sub-trajectory segment, The i-th predicted sub-trajectory segment.
[0057] The lateral angle between the predicted sub-trajectory segment and the actual sub-trajectory segment is calculated using the following formula:
[0058]
[0059] in, The included angle is measured laterally. The angle between the vertical vectors.
[0060] Step S14: Calculate the L2 distance loss between the predicted sub-trajectory segment and the actual sub-trajectory segment respectively.
[0061] The L2 distance loss between the predicted sub-trajectory segment and the true sub-trajectory segment is calculated using the following formula:
[0062]
[0063] in For L2 distance loss, P i Let i be the i-th real trajectory point. The i-th predicted trajectory point, where m is the frame number of the first predicted trajectory point, and n is the frame number of the predicted trajectory. Taking the first predicted trajectory point as having 20 frames and predicting 30 frames as an example, the value of n is 20, and the value of m is 49.
[0064] Step S15: Calculate the lateral distance loss and longitudinal distance loss based on the vector angle and L2 distance loss.
[0065] In some embodiments, the lateral distance loss is calculated using the following formula:
[0066]
[0067] in, For lateral distance loss, For L2 distance loss, The angle is measured horizontally.
[0068] The longitudinal distance loss is calculated using the following formula:
[0069]
[0070] in, For longitudinal distance loss, For L2 distance loss, The included angle is measured longitudinally.
[0071] Step S16: Use the lateral distance loss and longitudinal distance loss as the loss functions of the trajectory prediction model to optimize the parameters of the trajectory prediction model.
[0072] Using lateral and longitudinal distance losses as loss functions in the trajectory prediction model involves: calculating a combined loss function based on the lateral and longitudinal distance losses, and then using this combined loss function as the loss function for the trajectory prediction model. Specifically, the combined loss function is calculated using the following formula:
[0073]
[0074] Where Loss is the combined loss function, and N is the number of predicted sub-trajectory segments. For lateral distance loss, For the longitudinal distance loss, λ1 is the first weight and λ2 is the second weight.
[0075] Choose a suitable optimizer to optimize the parameters using gradient descent, such as Adam, Adagrad, and RMSProp. Obtain the trained and optimized model parameters. This application does not limit the choice of optimizer.
[0076] The training method of the trajectory prediction model of this invention segments the predicted trajectory and the future true trajectory according to time frames, calculates the predicted sub-trajectory segment and the true sub-trajectory segment for each frame, and calculates the lateral distance loss and the longitudinal distance loss based on the predicted sub-trajectory segment and the true sub-trajectory segment, respectively. Using the lateral distance loss and the longitudinal distance loss as the loss function of the trajectory prediction model allows the trajectory prediction model to quickly adapt to the training samples, and the trained trajectory prediction model has higher prediction accuracy.
[0077] Figure 2 This is a flowchart of an evaluation method for a trajectory prediction model according to an embodiment of the present invention. Figure 2 As shown, the evaluation method 200 for the trajectory prediction model includes the following steps:
[0078] Step S21: Use the training method of the trajectory prediction model described above to obtain the vector angle and L2 distance loss.
[0079] Step S22: Calculate the average displacement error ADE and the final displacement error FDE of the trajectory prediction model.
[0080] The Average Displacement Error (ADE) represents the average Euclidean distance between the predicted trajectory and the actual trajectory across the entire prediction range.
[0081] The final displacement error (FDE) represents the Euclidean distance between the predicted trajectory point and the actual trajectory point in the last step of the prediction process.
[0082] To predict trajectories and the true trajectory (p 20 p 21 p 22 p 23 ...p 49 Taking (e.g.) as an example, the average displacement error ADE and the final displacement error FDE are calculated using the following formulas:
[0083]
[0084]
[0085] Where ADE is the average displacement error ADE, FDE is the final displacement error FDE, and P i Let i be the i-th real trajectory point. The i-th predicted trajectory point, Let be the Euclidean distance to the i-th point, and n be the number of samples.
[0086] Step S23: Calculate the lateral average displacement error, longitudinal average displacement error, lateral final displacement error, and longitudinal final displacement error based on the vector angle, average displacement error ADE, and final displacement error FDE.
[0087] The lateral average displacement error can be calculated using the following formulas based on the lateral vector angle and the average displacement error ADE, and the lateral final displacement error can be calculated based on the lateral vector angle and the final displacement error FDE.
[0088]
[0089]
[0090] Where t_ADE is the average lateral displacement error, and t_FDE is the final lateral displacement error. Let be the angle between the horizontal vectors of the i-th point.
[0091] The longitudinal average displacement error can be calculated using the following formula based on the longitudinal vector angle and the average displacement error ADE, and the longitudinal final displacement error can be calculated based on the longitudinal vector angle and the final displacement error FDE.
[0092]
[0093]
[0094] Where lon_ADE is the longitudinal average displacement error and lon_FDE is the longitudinal final displacement error. Let be the angle between the longitudinal vectors of the i-th point.
[0095] Step S24: Evaluate the trajectory prediction model based on the lateral average displacement error, longitudinal average displacement error, lateral final displacement error, and longitudinal final displacement error.
[0096] In some embodiments, a combination of various index parameters can be used to grade and evaluate the model. For example, the trajectory prediction model can be divided into four levels: excellent, good, average, and poor, as shown in Table 1 below.
[0097] As shown in Table 1, a trajectory prediction model can only be evaluated as excellent if it simultaneously satisfies the following conditions: the lateral average displacement error t-ADE is within the interval [0,3], the lateral final displacement error t-FDE is within the interval [0,6], the longitudinal average displacement error lon-ADE is within the interval [0,4], and the longitudinal final displacement error lon-FDE is within the interval [0,9]. The conditions for other levels are also detailed in Table 1 and will not be repeated here. This application does not limit the numerical values or levels of the indicators.
[0098] Table 1
[0099]
[0100] The trajectory prediction model evaluation method of the present invention decomposes the evaluation index into lateral average displacement error, longitudinal average displacement error, lateral final displacement error and longitudinal final displacement error, which can more accurately evaluate the performance of the trajectory prediction model.
[0101] Figure 3 This is a flowchart of an evaluation method for a trajectory prediction model according to another embodiment of the present invention.
[0102] like Figure 3 As shown, the evaluation method 300 for the trajectory prediction model includes the following steps:
[0103] Step S31: Use the training method of the trajectory prediction model described above to obtain the vector angle and L2 distance loss.
[0104] Step S32: Calculate the average displacement error ADE of the trajectory prediction model.
[0105] Step S33: Calculate the mean cosine similarity error based on the vector angle and the average displacement error ADE, and evaluate the trajectory prediction model based on the mean cosine similarity error. Specifically, the mean cosine similarity error can be calculated using the following formula:
[0106]
[0107] Where cos_ADE is the mean cosine similarity error. Let be the angle between the longitudinal vectors of the i-th point.
[0108] The cosine similarity algorithm is used to evaluate the performance of the model's output metrics. The cosine of the angle between two vectors in a vector space measures the difference between the two individuals. A cosine value close to 1 and the angle close to 0 indicates that the two vectors are more similar. A cosine value close to 0 and the angle close to 90 degrees indicates that the two vectors are less similar. Therefore, a threshold can be set to evaluate the grade of the trajectory prediction model. For example, setting the threshold to 0.7 means that if the average cosine similarity error is greater than or equal to 0.7, the trajectory prediction model is considered satisfactory; if the average cosine similarity error is less than 0.7, the trajectory prediction model is considered unsatisfactory.
[0109] The trajectory prediction model evaluation method of the present invention decomposes the evaluation index into a finer sub-index, which is the mean cosine similarity error. The mean cosine similarity error is used to measure the trajectory similarity, which can more accurately evaluate the performance of the trajectory prediction model.
[0110] Figure 4 This is a system block diagram of an evaluation device for a trajectory prediction model according to an embodiment of the present invention. Figure 4 As shown, the evaluation device 400 may include an internal communication bus 401, a processor 402, a read-only memory (ROM) 403, a random access memory (RAM) 404, and a communication port 405. When applied to a personal computer, the evaluation device 400 may also include a hard disk 406. The internal communication bus 401 enables data communication between the components of the evaluation device 400. The processor 402 can make judgments and issue prompts. In some embodiments, the processor 402 may consist of one or more processors. The communication port 405 enables data communication between the evaluation device 400 and external systems. In some embodiments, the evaluation device 400 can send and receive information and data from a network through the communication port 405. The evaluation device 400 may also include different forms of program storage units and data storage units, such as the hard disk 406, the read-only memory (ROM) 403, and the random access memory (RAM) 404, capable of storing various data files used for computer processing and / or communication, as well as possible program instructions executed by the processor 402. The processor executes these instructions to implement the main part of the method. The results processed by the processor are transmitted to the user device through the communication port and displayed on the user interface.
[0111] The above-described evaluation method can be implemented as a computer program, stored in hard disk 406, and loaded into processor 402 for execution to implement the evaluation method of this application.
[0112] It should be understood that the embodiments described above are merely illustrative. The embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementation, the processor may be implemented within one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, and / or other electronic units designed to perform the functions described herein, or combinations thereof.
[0113] Some aspects of this application can be executed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The aforementioned hardware or software may be referred to as a "data block," "module," "engine," "unit," "component," or "system." The processor may be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. Furthermore, aspects of this application may manifest as computer products residing in one or more computer-readable media, including computer-readable program code. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, magnetic tapes, etc.), optical discs (e.g., compressed CDs, digital multifunction DVDs, etc.), smart cards, and flash memory devices (e.g., cards, sticks, key drives, etc.).
[0114] The basic concepts have been described above. Obviously, for those skilled in the art, the above disclosure is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore remain within the spirit and scope of the exemplary embodiments of this application.
[0115] Furthermore, this application uses specific terms to describe embodiments of the application. For example, "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic related to at least one embodiment of the application. Therefore, it should be emphasized and noted that "an embodiment," "one embodiment," or "an alternative embodiment" mentioned twice or more in different locations in this specification do not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of the application can be appropriately combined.
[0116] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments of the invention, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this disclosure method does not imply that the subject matter of the application requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.
[0117] Although this application has been described with reference to specific embodiments, those skilled in the art should recognize that the above embodiments are only used to illustrate this application, and various equivalent changes or substitutions can be made without departing from the spirit of this application. Therefore, any changes or modifications to the above embodiments within the essential spirit of this application will fall within the scope of the claims of this application.
Claims
1. A training method for a trajectory prediction model, characterized in that, include: The predicted trajectory of the target is obtained from the trajectory prediction model, and the predicted trajectory is divided into multiple predicted sub-trajectory segments; Obtain the target's true trajectory, and divide the true trajectory into multiple true sub-trajectory segments, the number of which corresponds to the number of predicted sub-trajectory segments; Calculate the vector angle between the predicted sub-trajectory segment and the actual sub-trajectory segment, whereby the vector angle includes the lateral vector angle and the longitudinal vector angle. Calculate the L2 distance loss between the predicted sub-trajectory segment and the actual sub-trajectory segment respectively; Calculate the lateral distance loss and longitudinal distance loss based on the vector angle and the L2 distance loss; The lateral distance loss and the longitudinal distance loss are used as loss functions of the trajectory prediction model to optimize the parameters of the trajectory prediction model; The angle between the longitudinal vectors and the angle between the transverse vectors are calculated using the following formulas: in, The angle between the longitudinal vectors, For the i-th real sub-trajectory segment, Predict the sub-trajectory segment for the i-th segment; in, The angle between the horizontal vectors, The angle between the longitudinal vectors is denoted as .
2. The method as described in claim 1, characterized in that, The predicted trajectory of a target obtained from the trajectory prediction model includes: Acquire the target's historical trajectory and surrounding environment information, including lane line information and trajectory information of surrounding vehicles; The target's historical trajectory and surrounding environment information are input into the trajectory prediction model.
3. The method as described in claim 1, characterized in that, The lateral distance loss is calculated using the following formula: in, For the lateral distance loss, For the L2 distance loss, The angle between the horizontal vectors, Let i be the i-th real trajectory point. Let i be the i-th predicted trajectory point.
4. The method as described in claim 1, characterized in that, The longitudinal distance loss is calculated using the following formula: in, For the longitudinal distance loss, For the L2 distance loss, The angle between the longitudinal vectors, Let i be the i-th real trajectory point. Let i be the i-th predicted trajectory point.
5. The method as described in claim 1, characterized in that, Using the lateral distance loss and the longitudinal distance loss as loss functions of the trajectory prediction model includes: A combined loss function is calculated based on the lateral distance loss and the longitudinal distance loss, and the combined loss function is used as the loss function of the trajectory prediction model.
6. The method as described in claim 5, characterized in that, The combined loss function is calculated using the following formula: in, Let N be the combined loss function, and N be the number of predicted sub-trajectory segments. For the lateral distance loss, For the longitudinal distance loss, As the first weight, As the second weight, Let i be the i-th real trajectory point. Let i be the i-th predicted trajectory point.
7. An evaluation method for a trajectory prediction model, characterized in that, include: The vector angle and the L2 distance loss are obtained by the method described in any one of claims 1-6; Calculate the average displacement error (ADE) and final displacement error (FDE) of the trajectory prediction model; Calculate the lateral average displacement error, longitudinal average displacement error, lateral final displacement error, and longitudinal final displacement error based on the vector angle, average displacement error ADE, and final displacement error FDE. The trajectory prediction model is evaluated based on the lateral average displacement error, the longitudinal average displacement error, the lateral final displacement error, and the longitudinal final displacement error.
8. The method as described in claim 7, characterized in that, The calculation of the lateral average displacement error, longitudinal average displacement error, lateral final displacement error, and longitudinal final displacement error based on the vector angle, average displacement error ADE, and final displacement error FDE includes: The lateral average displacement error is calculated based on the lateral vector angle and the average displacement error ADE; the longitudinal average displacement error is calculated based on the longitudinal vector angle and the average displacement error ADE. The final lateral displacement error is calculated based on the included angle of the lateral vectors and the final displacement error FDE, and the final longitudinal displacement error is calculated based on the included angle of the longitudinal vectors and the final displacement error FDE.
9. An evaluation method for a trajectory prediction model, characterized in that, include: The vector angle and the L2 distance loss are obtained by the method described in any one of claims 1-6; Calculate the average displacement error (ADE) of the trajectory prediction model; The mean cosine similarity error is calculated based on the vector angle and the mean displacement error ADE, and the trajectory prediction model is evaluated based on the mean cosine similarity error.
10. An evaluation device for a trajectory prediction model, characterized in that, include: Memory is used to store instructions that can be executed by the processor; A processor for executing the instructions to implement the method as described in any one of claims 7-9.