Training method, device, equipment and storage medium of trajectory prediction model
By smoothly preprocessing the training trajectory points in the autonomous driving system and inputting them to the trajectory prediction model, the problem of unstable trajectory prediction value is solved, the continuity and stability of vehicle trajectory coordinates are achieved, and the prediction accuracy and reliability are improved. .
Patent Information
- Application Number
- CN202210655850.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-10
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-06-10
AI Technical Summary
The trajectory prediction value in the autonomous driving system is unstable, resulting in high volatility and discontinuity of the predicted vehicle trajectory coordinates, which reduces the prediction accuracy.
By smoothing the preprocessing of each original training trajectory point in the pre-acquisitioned set of training trajectory points, the target training trajectory point is obtained and input it into the pre-created original trajectory prediction model to obtain the target trajectory prediction model. This method fully takes into account the uncertainty of movement among traffic participants and the uncertainty of the surrounding environment.
This makes the final predicted vehicle trajectory coordinates continuity and stability, improves the prediction accuracy while ensuring the reliability of the predicted trajectory.
Smart Images

Figure CN114987546B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a training method, device, equipment and storage medium for a trajectory prediction model. Background Art
[0002] In the trajectory prediction method of the autonomous driving system, the existing technology mainly uses rule-based dynamic equations or deep learning-based methods to predict the future trajectory of the vehicle. Although the rule-based dynamic equation is simple to construct, it lacks generalization and cannot consider more unexpected situations; the deep learning-based method predicts the future trajectory of the vehicle through a neural network, which has the characteristics of strong generalization. When predicting the future trajectory of the vehicle, methods such as direct regression of the vehicle's coordinates are used. The coordinate values of the direct regression vehicle trajectory are heavily dependent on the accuracy of the learning data. In actual implementation, the past trajectory of the vehicle is obtained through the perception module. Due to the fluctuation of the perception module, the trajectory points of the obtained learning data are also fluctuating and unstable. At the same time, the method of directly predicting the trajectory points of the vehicle does not consider the correlation and continuity between the vehicle trajectory coordinate values, so the predicted trajectory points have the characteristics of large fluctuation and discontinuity, which makes the trajectory prediction value in the autonomous driving system unstable and discontinuous, reducing the accuracy of the prediction.
[0003] Public Content
[0004] In view of this, the present invention provides a training method, device, equipment and medium for a trajectory prediction model, which can solve the problem of unstable trajectory prediction values in an automatic driving system, so that the final predicted vehicle trajectory coordinates have continuity and stability, improve the prediction accuracy and ensure the reliability of the predicted trajectory.
[0005] According to one aspect of the present invention, an embodiment of the present invention provides a method for training a trajectory prediction model, the method comprising:
[0006] Performing smoothing preprocessing on each original training trajectory point in the pre-acquired training trajectory point set to obtain a corresponding target training trajectory point, wherein the training trajectory point set includes a plurality of trajectory points in a historical driving trajectory of a target obstacle corresponding to a target vehicle;
[0007] The target training trajectory points are input into a pre-created original trajectory prediction model to obtain a corresponding target trajectory prediction model.
[0008] According to another aspect of the present invention, an embodiment of the present invention further provides a method and device for training a trajectory prediction model, the device comprising:
[0009] A training trajectory point acquisition module is used to perform smoothing preprocessing on each original training trajectory point in a pre-acquired training trajectory point set to obtain a corresponding target training trajectory point, wherein the training trajectory point set includes a plurality of trajectory points in a historical driving trajectory of a target obstacle corresponding to a target vehicle;
[0010] The trajectory prediction model acquisition module is used to input the target training trajectory points into a pre-created original trajectory prediction model to obtain a corresponding target trajectory prediction model.
[0011] According to another aspect of the present invention, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0012] at least one processor; and
[0013] a memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the training method of the trajectory prediction model described in any embodiment of the present invention.
[0015] According to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the training method of the trajectory prediction model described in any embodiment of the present invention when executed.
[0016] The above-mentioned technical scheme of the embodiment of the present invention obtains the corresponding target training trajectory point by smoothing preprocessing each original training trajectory point in the pre-acquired training trajectory point set, and inputs the target training trajectory point into the pre-created original trajectory prediction model to obtain the corresponding target trajectory prediction model. It can solve the problem of unstable trajectory prediction values in the automatic driving system, and fully consider the movement uncertainty of traffic participants and the uncertainty of the surrounding environment in the trajectory prediction model, so that the final predicted vehicle trajectory coordinates have continuity and stability, thereby improving the prediction accuracy while ensuring the reliability of the predicted trajectory.
[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A flowchart of a method for training a trajectory prediction model provided by one embodiment of the present invention;
[0020] Figure 2 A schematic diagram of a flow chart of a network structure provided by an embodiment of the present invention;
[0021] Figure 3 A schematic diagram of a network component provided by an embodiment of the present invention;
[0022] Figure 4 A flowchart of a method for training a trajectory prediction model provided by one embodiment of the present invention;
[0023] Figure 5 A structural block diagram of a trajectory prediction model training device provided by one embodiment of the present invention;
[0024] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0026] It should be noted that the term "target" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] In one embodiment, Figure 1 This is a flow chart of a method for training a trajectory prediction model provided by an embodiment of the present invention. This embodiment is applicable to the case of predicting the movement trajectory of an object. The method can be executed by a training device for a trajectory prediction model. The training device for a trajectory prediction model can be implemented in the form of hardware and / or software. The training device for a trajectory prediction model can be configured in an electronic device. Figure 1 As shown, the method includes:
[0028] S110, performing smoothing preprocessing on each original training trajectory point in the pre-acquired training trajectory point set to obtain a corresponding target training trajectory point, wherein the training trajectory point set includes multiple trajectory points in the historical driving trajectory of the target obstacle corresponding to the target vehicle.
[0029] Among them, the training trajectory point set can be understood as a training trajectory point set that stores each trajectory point of the target obstacle, which is a trajectory point of at least one obstacle in the relevant video pre-collected by the target vehicle. The original training trajectory point can be understood as each trajectory point formed by the target obstacle before the current moment, which is a driving trajectory point of the target obstacle collected in advance. The target training trajectory point can be understood as the trajectory point corresponding to the target obstacle to be trained. The target vehicle can be understood as a vehicle that is currently in the process of automatic driving. The target obstacle can be understood as a related obstacle that affects the normal driving of the target vehicle, such as pedestrians, other vehicles, objects, etc. Of course, the target obstacle can be a related obstacle in a static form or a related obstacle in a dynamic form, and the number of target obstacles can be one or more. This embodiment does not limit the state and number of obstacles. Smoothing preprocessing can be understood as smoothing preprocessing of the trajectory point of each target obstacle that needs to be trained.
[0030] In this embodiment, the training trajectory point set includes multiple trajectory points in the historical driving trajectory of the target obstacles corresponding to the target vehicle. The more the number of target obstacles is, the more trajectory points are formed.
[0031] In this embodiment, each original training trajectory point in the pre-acquired training trajectory point set needs to be smoothed and pre-processed to obtain the corresponding target training trajectory point. Specifically, the corresponding sliding window angle mean of the current training trajectory point can be determined by the set composed of sliding window angles, using the sliding window angles between each training trajectory point included in the pre-configured training trajectory point subset and the current training trajectory point, to obtain the corresponding target training trajectory point.
[0032] S120: Input the target training trajectory points into a pre-created original trajectory prediction model to obtain a corresponding target trajectory prediction model.
[0033] The pre-created original trajectory prediction model can be understood as a trajectory prediction model structure with angle constraints, and can be, for example, a transformer structure network, which can be used as a feature encoder and decoder. The target trajectory prediction model can be understood as a trajectory prediction model for the target obstacle, which is used to perform corresponding trajectory prediction for obstacles around the vehicle.
[0034] In this embodiment, the target training trajectory points can be input into a pre-created original trajectory prediction model to output a predicted driving trajectory of the target obstacle through the original trajectory prediction model, and a trajectory loss value is determined from the predicted driving trajectory of the target obstacle and the target real trajectory point of the target obstacle. The trajectory loss value is compared with a preset loss threshold value, and the corresponding target trajectory prediction model is obtained through the comparison result.
[0035] In this embodiment, the predicted driving trajectory of the target obstacle can be determined by the original trajectory prediction model to perform corresponding output. Figure 2 A schematic diagram of a flow chart of a network structure provided by an embodiment of the present invention. In this embodiment, other vehicles and pedestrians are used as examples to illustrate target obstacles. Figure 3 A schematic diagram of a network component provided by an embodiment of the present invention. Figure 2As shown in the figure, the target obstacle, for example, the 2-second trajectory of a vehicle or pedestrian, is sampled at 10 Hz to obtain the corresponding feature matrix, and the local high-precision map information is downsampled to obtain the corresponding feature matrix. The feature matrix corresponding to the target obstacle and the feature matrix corresponding to the high-precision map are concatenated to obtain the final feature matrix that describes the information of vehicles, pedestrians, and roads. The feature matrix corresponding to the target obstacle and the feature matrix corresponding to the high-precision map are concatenated through the multi-self-attention module to perform feature fusion, and each feature matrix is fused into a 128 feature vector to obtain the fused feature matrix H. The size of the feature matrix H can be expressed as (number of vehicles + number of pedestrians + number of roads) × 128. The features of vehicles, pedestrians, and roads are interactively fused through the multi-self-attention module to obtain a new feature matrix H. The size of the feature matrix H is (number of vehicles + number of pedestrians + number of roads) × 128. The feature matrix H_v corresponding to vehicles and pedestrians is intercepted from the feature matrix H. The size of the feature matrix H_v can be (number of vehicles + number of pedestrians) × 128; the feature matrix H_l corresponding to the road is intercepted from the feature matrix H. The size of the feature matrix H_l is the number of roads × 128. The feature matrix H_v is fused through the multi-self-attention module to obtain the fused feature matrix H_v. The size of H_v is (number of vehicles + number of pedestrians) × 128. The feature matrix H_l is fused through the multi-self-attention module to obtain the fused feature matrix H_l. The size of the feature matrix H_l is the number of roads × 128. The feature matrix H_v (the matrix composed of vehicles and pedestrians) and the feature matrix H_l (the matrix composed of roads) are interacted through mult-cross_attention to obtain the feature matrix H_vl, and the size of the feature matrix H_vl is (the number of vehicles + the number of pedestrians) × 128. The feature matrix H_l (the matrix composed of roads) and the feature matrix H_vl are interacted through mult-cross_attention to obtain the feature matrix H_lvl, and the size of the feature matrix H_lvl is (the number of roads × 128). The feature matrix H_v (the matrix composed of vehicles and pedestrians) and the feature matrix H_lvl are interacted through mult-cross_attention to obtain the feature matrix H_vlvl, and the size of the feature matrix H_vlvl is (the number of vehicles + the number of pedestrians) × 128. The feature matrix H_vlvl is output through a layer of mobile positioning protocol (MLP) and a linear layer to represent the final 3-second predicted trajectory points of vehicles and pedestrians (30 points, each point contains two values of x and y).
[0036] The above-mentioned technical scheme of the embodiment of the present invention obtains the corresponding target training trajectory point by smoothing preprocessing each original training trajectory point in the pre-acquired training trajectory point set, and can use the training data to smooth and denoise the angle information, and input the target training trajectory point into the pre-created original trajectory prediction model to obtain the corresponding target trajectory prediction model. It can solve the problem of unstable trajectory prediction values in the automatic driving system, and fully consider the movement uncertainty of traffic participants and the uncertainty of the surrounding environment in the trajectory prediction model, so that the final predicted vehicle trajectory coordinates have continuity and stability, thereby improving the prediction accuracy while ensuring the reliability of the predicted trajectory.
[0037] In one embodiment, a trajectory prediction method includes:
[0038] Obtaining a historical driving trajectory of at least one obstacle around the target vehicle;
[0039] Inputting the historical driving trajectory into a pre-created target trajectory prediction model to obtain the predicted driving trajectory of the obstacle;
[0040] Automatically control the target vehicle's driving trajectory according to the predicted driving trajectory.
[0041] Among them, the historical driving trajectory can be understood as the relevant historical driving trajectory of obstacles around the vehicle. The target obstacle can be in front of the vehicle, behind the vehicle, or on the side of the vehicle. This embodiment does not limit the location of the target obstacle. It should be noted that each target obstacle has a corresponding historical behavior trajectory, and the historical behavior trajectory can be composed of multiple trajectory points of the target obstacle. The pre-created target trajectory prediction model can be understood as the corresponding target trajectory prediction model obtained by inputting the target training trajectory points into the pre-created original trajectory prediction model.
[0042] In this embodiment, the historical driving trajectory of at least one obstacle around the vehicle in the current situation can be obtained, and the historical driving trajectory can be input into a pre-created target trajectory prediction model to obtain the predicted driving trajectory of at least one obstacle around the vehicle through the target trajectory prediction model, so as to automatically control the driving trajectory of the target vehicle according to the predicted driving trajectory of at least one obstacle.
[0043] In one embodiment, Figure 4A flowchart of another method for training a trajectory prediction model provided by an embodiment of the present invention. Based on the above embodiments, this embodiment performs smoothing preprocessing on each original training trajectory point in the pre-acquired training trajectory point set to obtain a corresponding target training trajectory point, and inputs the target training trajectory point into a pre-created original trajectory prediction model to obtain a corresponding target trajectory prediction model, which is further refined, such as Figure 4 As shown, the training method of the trajectory prediction model in this embodiment may specifically include the following steps:
[0044] S410: Determine a sliding window angle between each training trajectory point in a preconfigured training trajectory point subset and the current training trajectory point.
[0045] The training trajectory point subset is a target number of training trajectory points selected from the training trajectory point set, and the time points of the training trajectory points in the training trajectory point subset are before the time point of the current training trajectory point.
[0046] Among them, the pre-configured training trajectory point subset can be understood as a set consisting of other training trajectory points excluding the current training trajectory point. The current training trajectory point can be understood as the training trajectory point that currently needs to be calculated. The sliding window angle can be understood as the angle between the current training trajectory point and each other training trajectory point in the training trajectory point subset. For example, the current training trajectory point is represented as p3, and each training trajectory point in the training trajectory point subset contains p0, p1, and p2. The angle formed between p0 and p3, p1 and p3, and p2 and p3 can be called a sliding window angle, and the set of angle sequences composed of these sliding window angles can be called a sliding window angle set. It should be noted that the sliding window angle is an angle period value of 0-360.
[0047] In this embodiment, the sliding window angle set formed between each training trajectory point in the pre-configured training trajectory point subset and the current training trajectory point can be determined by respectively calculating the sliding window angle between each training trajectory point in the pre-configured training trajectory point subset and the current training trajectory point. It should be noted that the training trajectory point subset is a certain number of continuous training trajectory points selected from the training trajectory point set, for example, 4 consecutive, 3 consecutive, 5 consecutive, etc., and the time point of the training trajectory point in the training trajectory point subset needs to be before the time point of the current training trajectory point.
[0048] In this embodiment, if there is only one trajectory point, namely the current training trajectory point, no processing is performed on the trajectory point; if the training trajectory point subset contains one training trajectory point, it is necessary to calculate the sliding window angle between the training trajectory point and the current training trajectory point; if the training trajectory point subset contains three training trajectory points, it is necessary to calculate the sliding window angle between the three training trajectory points contained in the subset and the current training trajectory point, and so on.
[0049] For example, a training trajectory point set includes 5 consecutive training trajectory points, and the coordinates of the 5 trajectory points are respectively expressed as p0 = (x0, y0), p1 = (x1, y1), p2 = (x2, y2), p3 = (x3, y3) and p4 = (x4, y4), wherein each training trajectory point in the training trajectory point subset includes p0, p1, p2 and p3, and the current training trajectory point is expressed as p4. The sliding window angles between p0 and p4, p1 and p4, p2 and p4, and p3 and p4 are calculated respectively to obtain the corresponding sliding window angle set, which can be expressed as θ0, θ1, θ2, θ3. Where θ i =arctan((y i -y4),(x i -x4)), i is 1, 2, 3.
[0050] S420. Determine the sliding window angle mean of the current training trajectory point according to the sliding window angle of the target number.
[0051] Among them, the target number of sliding window angles can be understood as a certain number of sliding window angles, which is related to the number of training trajectory points in the training trajectory point subset. For example, if the training trajectory points included in the training trajectory point subset are 5, then the number of sliding window angles can be determined to be 5; if the training trajectory points included in the training trajectory point subset are 2, then the number of sliding window angles can be determined to be 2; this embodiment is not limited here.
[0052] In this embodiment, the mean sliding window angle of the current training trajectory point can be determined by calculating the mean of the cosine value of the sliding window angle and the mean of the sine value of the sliding window angle. For example, if the target number of sliding window angles n is 4, the mean of the cosine value of the sliding window angle can be expressed as The mean of the sine values of the sliding window angle can be expressed as The obtained sliding window angle mean can be expressed as θ'=arctan(S / C).
[0053] S430: Using the sliding window angle mean as the sliding window angle of the current training trajectory point, until smoothing preprocessing of each original training trajectory point is completed to obtain the corresponding target training trajectory point.
[0054] In this embodiment, the obtained sliding window angle mean is used as the sliding window angle of the current training trajectory point until the smoothing preprocessing of each original training trajectory point is completed to obtain the corresponding target training trajectory point.
[0055] S440: Input the target training trajectory point into a pre-created original trajectory prediction model to output a predicted driving trajectory of the target obstacle through the original trajectory prediction model.
[0056] The predicted driving trajectory may be understood as a related driving trajectory of a target obstacle predicted by a pre-created original trajectory prediction model.
[0057] In this embodiment, the target training trajectory point may be input into a pre-created original trajectory prediction model, so as to output a predicted driving trajectory of the target obstacle through the original trajectory prediction model.
[0058] S450: Determine a trajectory loss value according to the predicted driving trajectory and the target real trajectory point of the target obstacle.
[0059] The target real track point is a track point of at least one obstacle in the relevant video collected in advance by the target vehicle. For example, if the collected video contains a 10-second driving track, the last 3 seconds of the target obstacle's driving track can be used as the target real track point.
[0060] In this embodiment, the corresponding trajectory loss value is determined based on the predicted driving trajectory and the target real trajectory point of the target obstacle. There are two ways to determine the trajectory loss value. One is: determine the coordinate loss value based on the coordinate prediction value of each predicted trajectory point in the predicted driving trajectory and the coordinate real value of the corresponding target real trajectory point, and determine the angle loss value based on the sliding window prediction angle of each predicted trajectory point in the predicted driving trajectory and the sliding window real angle of the corresponding target real trajectory point, so as to determine the trajectory loss value based on the obtained coordinate loss value and angle loss value; the other is: determine the weight coefficient of the angle loss value on the basis of determining the coordinate loss value and the angle loss value, and determine the trajectory loss value based on the weight coefficient, the coordinate loss value and the angle loss value.
[0061] In one embodiment, before determining the trajectory loss value according to the predicted driving trajectory and the actual driving trajectory of the target obstacle, the method further includes:
[0062] Each original real trajectory point in the real driving trajectory of the target obstacle is smoothed and preprocessed to obtain the corresponding target real trajectory point.
[0063] In this embodiment, each original real trajectory point in the real driving trajectory of the target obstacle is smoothed and pre-processed to obtain the corresponding target real trajectory point. Specifically, the sliding window angle between each training trajectory point in the pre-configured training trajectory point subset and the current training trajectory point can be determined, and the sliding window angle mean of the current training trajectory point can be determined based on the corresponding number of sliding window angles, and the sliding window angle mean is used as the sliding window angle of the current training trajectory point until the smoothing pre-processing of each original training trajectory point is completed to obtain the corresponding target training trajectory point.
[0064] In one embodiment, determining a trajectory loss value according to a predicted driving trajectory and a target actual driving trajectory of a target obstacle includes:
[0065] Determine the coordinate loss value according to the coordinate prediction value of each predicted trajectory point in the predicted driving trajectory and the coordinate true value of the corresponding target true trajectory point;
[0066] Determine an angle loss value according to a sliding window prediction angle of each predicted trajectory point in the predicted driving trajectory and a sliding window real angle of a corresponding target real trajectory point;
[0067] The trajectory loss value is determined based on the coordinate loss value and the angle loss value.
[0068] In this embodiment, the predicted coordinate value of the predicted trajectory point corresponds to the trajectory point of the actual coordinate value of the target actual trajectory point. Exemplarily, if the predicted trajectory point of the predicted coordinate value is the third trajectory point, then the target actual trajectory point corresponding to the actual coordinate value is also the third trajectory point. The predicted coordinate value can be called a trajectory point regression value.
[0069] In this embodiment, the sliding window prediction angle of each predicted trajectory point in the predicted driving trajectory corresponds to the trajectory point of the sliding window real angle of the target real trajectory point, that is, when the sliding window prediction angle of the predicted trajectory point takes which predicted trajectory point, the corresponding sliding window real angle is which target real trajectory point, so as to determine the corresponding angle loss value according to the sliding window prediction angle and the sliding window real angle. Exemplarily, if the prediction point corresponding to the sliding window prediction angle is the first prediction point, then the target real trajectory point corresponding to the sliding window real angle is also the first prediction point; if the prediction point corresponding to the sliding window prediction angle is the second prediction point, then the target real trajectory point corresponding to the sliding window real angle is also the second prediction point, and this embodiment does not make any limitation here.
[0070] In this embodiment, the coordinate loss value can be determined based on the coordinate prediction value of each predicted trajectory point in the predicted driving trajectory and the coordinate actual value of the corresponding target real trajectory point; and the angle loss value can be determined by the sliding window prediction angle of each predicted trajectory point in the predicted driving trajectory and the sliding window actual angle of the corresponding target real trajectory point, and the trajectory loss value is determined by the coordinate loss value and the angle loss value.
[0071] For example, while outputting the position of the regression trajectory point in the pre-created original trajectory prediction model, an angle is regressed for each trajectory point. The true value of the angle can be calculated by the sliding window angle mean. The loss function for the angle is calculated using smoothhl1. The smoothhl1 calculation formula is as follows: Where, at the angle loss value x = θ 真 -θ 预 ; In the coordinate loss value, x = p prei -p i , the final calculation formula for trajectory loss is Loss tra =L tra +L 1angular Among them, L tra The calculation is to pass the coordinate loss value x = p prei -p i Bring in We can obtain the following equation: prei Indicates the coordinate value of the i-th trajectory point predicted by the model, p i represents the true value of the coordinates of the ith trajectory point. It should be noted that when the value of the trajectory point is greater than 1, the value of x is calculated as the average value of multiple predicted trajectory points. For example, when the number of trajectory points is 3, the value of x is calculated as p of the first three trajectory points. prei -p i The value of , and then the average of the calculated three trajectory point values is taken as the current x value. 1angular The calculation of the angle loss value x = θ 真 -θ 预 Bring to We can obtain 真 represents the true value of the angle, θ 预 It indicates the predicted value of the model. It should be noted that when the value of the trajectory point is greater than 1, the value of x is calculated as the average value of multiple predicted trajectory points. For example, when the number of trajectory points is 3, the value of x is the θ of the first three trajectory points. 真 -θ 预 The value of , and then take the average of the calculated 3 trajectory point values as the current x value.
[0072] In one embodiment, determining a trajectory loss value according to a predicted driving trajectory and a target actual driving trajectory of a target obstacle includes:
[0073] Determine the coordinate loss value according to the coordinate prediction value of each predicted trajectory point in the predicted driving trajectory and the coordinate true value of the corresponding target true trajectory point;
[0074] Determine an angle loss value according to a sliding window prediction angle of each predicted trajectory point in the predicted driving trajectory and a sliding window real angle of a corresponding target real trajectory point;
[0075] Determine the weight coefficient of the angle loss value;
[0076] The trajectory loss value is determined based on the weight coefficient, the coordinate loss value and the angle loss value.
[0077] In this embodiment, the coordinate loss value can be determined based on the coordinate prediction value of each predicted trajectory point in the predicted driving trajectory and the coordinate actual value of the corresponding target real trajectory point, and the angle loss value can be determined based on the sliding window prediction angle of each predicted trajectory point in the predicted driving trajectory and the sliding window actual angle of the corresponding target real trajectory point. On this basis, the weight coefficient of the angle loss value is determined, and the trajectory loss value is determined based on the weight coefficient, the coordinate loss value and the angle loss value.
[0078] Exemplarily, the angle value is calculated by performing step 1 on the value of the predicted trajectory point, and then the loss of the predicted trajectory point is weighted by calculating the difference between the angle value and the true value, wherein the loss weight w is calculated as follows: Among them, L1 is expressed as Therefore, the final trajectory loss value calculation is expressed as Among them, p prei Indicates the coordinate value of the i-th trajectory point predicted by the model, p i Represents the true value of the coordinates of the i-th point.
[0079] S460: When the trajectory loss value reaches a preset loss threshold, the original trajectory prediction model is retrained until the trajectory loss value is lower than the preset loss threshold, thereby obtaining a corresponding target trajectory prediction model.
[0080] Among them, the preset loss threshold can be understood as a pre-set loss threshold, which is used to determine whether the trajectory loss value reaches the preset loss threshold. The preset loss threshold can be set accordingly based on experience or based on actual conditions, and this embodiment does not limit this.
[0081] In this embodiment, when the trajectory loss value reaches a preset loss threshold, the original trajectory prediction model needs to be retrained until the trajectory loss value is lower than the preset loss threshold, and the trajectory training model is used as the target trajectory prediction model.
[0082] The above technical solution of the embodiment of the present invention determines the sliding window angle between each training trajectory point and the current training trajectory point in the pre-configured training trajectory point subset, determines the sliding window angle mean of the current training trajectory point according to the sliding window angle of the target number, and uses the sliding window angle mean as the sliding window angle of the current training trajectory point until the smoothing preprocessing of each original training trajectory point is completed to obtain the corresponding target training trajectory point, and can use the training data to smooth and denoise the angle information, and take the angle constraint into account in the coordinate value regression process of the target trajectory in a smoothing window manner; the target training trajectory point is input into the pre-created original trajectory prediction model to output the predicted driving trajectory of the target obstacle through the original trajectory prediction model, and the trajectory loss value is determined according to the predicted driving trajectory and the target real trajectory point of the target obstacle. When the trajectory loss value reaches the preset loss threshold, the original trajectory prediction model is retrained until the trajectory loss value is lower than the preset loss threshold, and the corresponding target trajectory prediction model is obtained, which can further solve the problem of unstable trajectory prediction value in the automatic driving system, and fully consider the movement uncertainty of traffic participants and the uncertainty of the surrounding environment in the trajectory prediction model, so that the final predicted vehicle trajectory coordinates have continuity and stability, improve the prediction accuracy while ensuring the reliability of the predicted trajectory.
[0083] In one embodiment, Figure 5 This is a structural block diagram of a trajectory prediction model training device provided by an embodiment of the present invention. The device is suitable for screening abnormal metering point files of charging piles. The device can be implemented by hardware / software. It can be configured in an electronic device to implement a trajectory prediction model training method in an embodiment of the present invention. Figure 5 As shown, the device includes: a training trajectory point acquisition module 510 and a trajectory prediction model acquisition module 520.
[0084] The training trajectory point acquisition module 510 is used to perform smoothing preprocessing on each original training trajectory point in the pre-acquired training trajectory point set to obtain a corresponding target training trajectory point, wherein the training trajectory point set includes multiple trajectory points in the historical driving trajectory of the target obstacle corresponding to the target vehicle;
[0085] The trajectory prediction model acquisition module 520 is used to input the target training trajectory points into a pre-created original trajectory prediction model to obtain a corresponding target trajectory prediction model.
[0086] In the embodiment of the present invention, the training trajectory point acquisition module obtains the corresponding target training trajectory point by performing smoothing preprocessing on each original training trajectory point in the pre-acquired training trajectory point set, and the trajectory prediction model acquisition module inputs the target training trajectory point into the pre-created original trajectory prediction model to obtain the corresponding target trajectory prediction model. The problem of unstable trajectory prediction values in the automatic driving system can be solved. The uncertainty of the movement of traffic participants and the uncertainty of the surrounding environment are fully considered in the trajectory prediction model, so that the final predicted vehicle trajectory coordinates have continuity and stability, thereby improving the prediction accuracy while ensuring the reliability of the predicted trajectory.
[0087] In one embodiment, the training trajectory point acquisition module 510 includes:
[0088] a window angle determination unit, configured to determine a sliding window angle between each training trajectory point in a pre-configured training trajectory point subset and a current training trajectory point, wherein the training trajectory point subset is a target number of training trajectory points selected from the training trajectory point set, and a time point of the training trajectory point in the training trajectory point subset is before a time point of the current training trajectory point;
[0089] A mean value determining unit, configured to determine a mean value of the sliding window angles of the current training trajectory points according to a target number of sliding window angles;
[0090] The trajectory point obtaining unit is used to use the sliding window angle mean as the sliding window angle of the current training trajectory point until the smoothing preprocessing of each original training trajectory point is completed to obtain the corresponding target training trajectory point.
[0091] In one embodiment, the trajectory prediction model obtaining module 520 includes:
[0092] A driving trajectory output unit, used for inputting the target training trajectory point into a pre-created original trajectory prediction model, so as to output a predicted driving trajectory of the target obstacle through the original trajectory prediction model;
[0093] a trajectory loss value determining unit, configured to determine a trajectory loss value according to the predicted driving trajectory and a target real trajectory point of the target obstacle;
[0094] The prediction model obtaining unit is used to retrain the original trajectory prediction model when the trajectory loss value reaches a preset loss threshold, until the trajectory loss value is lower than the preset loss threshold, so as to obtain the corresponding target trajectory prediction model.
[0095] In one embodiment, the loss value determining unit includes:
[0096] The real trajectory point obtaining subunit is used to perform smoothing preprocessing on each original real trajectory point in the real driving trajectory of the target obstacle before determining the trajectory loss value according to the predicted driving trajectory and the real driving trajectory of the target obstacle to obtain the corresponding target real trajectory point.
[0097] In one embodiment, the trajectory loss value determining unit further includes:
[0098] A first coordinate loss value determination subunit, used to determine a coordinate loss value according to a coordinate prediction value of each predicted trajectory point in the predicted driving trajectory and a coordinate true value of a corresponding target true trajectory point;
[0099] A first angle loss value determination subunit is used to determine an angle loss value according to a sliding window prediction angle of each predicted trajectory point in the predicted driving trajectory and a sliding window real angle of a corresponding target real trajectory point;
[0100] The first loss value determining subunit is used to determine a track loss value according to the coordinate loss value and the angle loss value.
[0101] In one embodiment, the trajectory loss value determining unit further includes:
[0102] A second coordinate loss value determination subunit determines a coordinate loss value according to a coordinate prediction value of each predicted trajectory point in the predicted driving trajectory and a coordinate true value of a corresponding target true trajectory point;
[0103] A second angle loss value determination subunit determines an angle loss value according to a sliding window prediction angle of each predicted trajectory point in the predicted driving trajectory and a sliding window real angle of a corresponding target real trajectory point;
[0104] A coefficient determination subunit, used to determine a weight coefficient of the angle loss value;
[0105] The second loss value determination subunit determines a trajectory loss value according to the weight coefficient, the coordinate loss value and the angle loss value.
[0106] In one embodiment, the trajectory prediction device includes:
[0107] A trajectory acquisition module, used to acquire a historical driving trajectory of at least one obstacle around the target vehicle;
[0108] A trajectory acquisition module, used for inputting the historical driving trajectory into a pre-created target trajectory prediction model to obtain a predicted driving trajectory of the obstacle;
[0109] The trajectory control module is used to automatically control the driving trajectory of the target vehicle according to the predicted driving trajectory.
[0110] The training device for the trajectory prediction model provided in the embodiment of the present invention can execute the training method for the trajectory prediction model provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.
[0111] In one embodiment, Figure 6 A schematic diagram of the structure of an electronic device provided for Embodiment 5 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0112] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0113] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0114] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the training method of the trajectory prediction model.
[0115] In some embodiments, the training method of the trajectory prediction model may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the training method of the trajectory prediction model described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the training method of the trajectory prediction model in any other appropriate manner (e.g., by means of firmware).
[0116] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0117] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0118] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0119] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0120] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0121] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0122] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0123] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for training a trajectory prediction model, characterized in that: include: Performing smoothing preprocessing on each original training trajectory point in the pre-acquired training trajectory point set to obtain a corresponding target training trajectory point, wherein the training trajectory point set includes a plurality of trajectory points in a historical driving trajectory of a target obstacle corresponding to a target vehicle; Input the target training trajectory point into a pre-created original trajectory prediction model to obtain a corresponding target trajectory prediction model; wherein the pre-created original trajectory prediction model is a transformer structure network with angle constraints; The step of performing smoothing preprocessing on each original training trajectory point in the pre-acquired training trajectory point set to obtain a corresponding target training trajectory point includes: Determine a sliding window angle between each training trajectory point in a preconfigured training trajectory point subset and the current training trajectory point, wherein the training trajectory point subset is a target number of training trajectory points selected from the training trajectory point set, and the time point of the training trajectory point in the training trajectory point subset is before the time point of the current training trajectory point; Determine the sliding window angle mean of the current training trajectory point according to the sliding window angle of the target number; The sliding window angle mean is used as the sliding window angle of the current training trajectory point until the smoothing preprocessing of each original training trajectory point is completed to obtain the corresponding target training trajectory point.
2. The method according to claim 1, characterized in that The step of inputting the target training trajectory point into a pre-created original trajectory prediction model to obtain a corresponding target trajectory prediction model includes: Inputting the target training trajectory point into a pre-created original trajectory prediction model to output a predicted driving trajectory of the target obstacle through the original trajectory prediction model; Determining a trajectory loss value according to the predicted driving trajectory and a target real trajectory point of the target obstacle; When the trajectory loss value reaches a preset loss threshold, the original trajectory prediction model is retrained until the trajectory loss value is lower than the preset loss threshold, thereby obtaining a corresponding target trajectory prediction model.
3. The method according to claim 2, characterized in that Before determining the trajectory loss value according to the predicted driving trajectory and the actual driving trajectory of the target obstacle, the method further includes: Smoothing preprocessing is performed on each original real trajectory point in the real driving trajectory of the target obstacle to obtain a corresponding target real trajectory point.
4. The method according to claim 2 or 3, characterized in that: Determining a trajectory loss value according to the predicted driving trajectory and the target real driving trajectory of the target obstacle includes: Determine the coordinate loss value according to the coordinate prediction value of each predicted trajectory point in the predicted driving trajectory and the coordinate true value of the corresponding target true trajectory point; Determine an angle loss value according to a sliding window prediction angle of each predicted trajectory point in the predicted driving trajectory and a sliding window real angle of a corresponding target real trajectory point; A track loss value is determined according to the coordinate loss value and the angle loss value.
5. The method according to claim 2 or 3, characterized in that: Determining a trajectory loss value according to the predicted driving trajectory and the target real driving trajectory of the target obstacle includes: Determine the coordinate loss value according to the coordinate prediction value of each predicted trajectory point in the predicted driving trajectory and the coordinate true value of the corresponding target true trajectory point; Determine an angle loss value according to a sliding window prediction angle of each predicted trajectory point in the predicted driving trajectory and a sliding window real angle of a corresponding target real trajectory point; Determining a weight coefficient of the angle loss value; A trajectory loss value is determined according to the weight coefficient, the coordinate loss value and the angle loss value.
6. A trajectory prediction method, which is trained by using the trajectory prediction model training method according to any one of claims 1 to 5, characterized in that: include: Obtaining a historical driving trajectory of at least one obstacle around the target vehicle; Inputting the historical driving trajectory into a pre-created target trajectory prediction model to obtain a predicted driving trajectory of the obstacle; The driving trajectory of the target vehicle is automatically controlled according to the predicted driving trajectory.
7. A training device for a trajectory prediction model, characterized in that: include: A training trajectory point acquisition module is used to perform smoothing preprocessing on each original training trajectory point in a pre-acquired training trajectory point set to obtain a corresponding target training trajectory point, wherein the training trajectory point set includes a plurality of trajectory points in a historical driving trajectory of a target obstacle corresponding to a target vehicle; A trajectory prediction model acquisition module is used to input the target training trajectory point into a pre-created original trajectory prediction model to obtain a corresponding target trajectory prediction model; wherein the pre-created original trajectory prediction model is a transformer structure network with angle constraints; Wherein, the training trajectory point acquisition module includes: a window angle determination unit, configured to determine a sliding window angle between each training trajectory point in a pre-configured training trajectory point subset and a current training trajectory point, wherein the training trajectory point subset is a target number of training trajectory points selected from the training trajectory point set, and a time point of the training trajectory point in the training trajectory point subset is before a time point of the current training trajectory point; A mean value determining unit, configured to determine a mean value of the sliding window angles of the current training trajectory points according to a target number of sliding window angles; The trajectory point obtaining unit is used to use the sliding window angle mean as the sliding window angle of the current training trajectory point until the smoothing preprocessing of each original training trajectory point is completed to obtain the corresponding target training trajectory point.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the training method of the trajectory prediction model described in any one of claims 1-5 or the trajectory prediction method in claim 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the trajectory prediction model training method described in any one of claims 1 to 5 or the trajectory prediction method described in claim 6 when executed.
Citation Information
Patent Citations
Target pedestrian trajectory prediction model training method and device, electronic equipment and storage medium
CN111767475A
BP neural network algorithm-based trajectory prediction method and device
CN112612001A
Trajectory prediction model training method and device, trajectory prediction method and device, equipment and medium
CN114021080A
Detection method, detection device and computer readable storage medium
CN114219759A