Disclosure of Invention
In order to solve the problem that a trace prediction model fits with a false true value during training caused by true value jitter of a training sample, the invention provides a method for improving the stability of the trace prediction model by denoising the training sample.
In order to achieve the above object, an embodiment of the present invention provides a trajectory prediction denoising method based on a deep learning model, which is characterized by comprising:
obtaining training samples from a track prediction training sample set;
acquiring tracking track data from a training sample;
analyzing all track points corresponding to the track true value from the track data;
calculating Euclidean distance between a starting point and an end point of the tracking track;
traversing all the track points, calculating Euclidean distances of adjacent track points and summing;
and calculating a jitter value according to the Euclidean distance between the starting point and the end point and the sum of the Euclidean distances between adjacent track points, and deleting the training samples with the jitter value larger than the jitter threshold value from the track prediction training sample set.
In order to achieve the above object, an embodiment of the present invention further provides a trajectory prediction denoising apparatus based on a deep learning model, which is characterized by comprising:
the training sample extraction module is used for obtaining training samples from the track prediction training sample set;
the tracking track data extraction module is used for acquiring tracking track data from the training samples;
the track analysis module is used for analyzing all track points corresponding to the track true value from the track tracing data;
the first calculation module is used for calculating Euclidean distance between the starting point and the end point of the tracking track;
the second calculation module is used for traversing all the track points, calculating Euclidean distances of adjacent track points and summing;
the third calculation module is used for calculating a jitter value according to the sum of Euclidean distances between the starting point and the end point and the Euclidean distance between the adjacent track points;
the comparison module is used for comparing the jitter value with the jitter threshold value;
and the filtering module is used for deleting the training samples with jitter values larger than the jitter threshold value from the track prediction training sample set.
To achieve the above object, an embodiment of the present invention further provides an apparatus, including a memory, a processor, and a program stored in the memory and executable on the processor, where the program when executed by the processor implements the steps of the trajectory prediction denoising method based on the deep learning model.
To achieve the above object, an embodiment of the present invention further provides a storage medium, where the storage medium stores at least one program, and the at least one program is executable by at least one processor to implement the steps of the trajectory prediction denoising method based on the deep learning model.
The invention has the beneficial effects that:
the track prediction denoising method based on the deep learning model can effectively clean training data and screen out high-quality training samples, so that model prediction problems caused by the quality problems of the training samples are reduced, and the accuracy and stability of track prediction are improved.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. It should be understood that the drawings and examples of the present application are for illustrative purposes only and are not intended to limit the scope of the present application.
Example 1
The embodiment provides a track prediction denoising method based on a deep learning model, as shown in fig. 1, including:
step 101, obtaining training samples from a training sample set of a track prediction model based on deep learning. The training samples consisted essentially of the following data: the method comprises the steps of taking historical x-second tracks of obstacles around a vehicle to be predicted and the vehicle to be predicted, map elements around the vehicle to be predicted and future y-second tracks of the vehicle to be predicted, wherein the historical x-second tracks of the obstacles around the vehicle to be predicted and the vehicle to be predicted, the map elements around the vehicle to be predicted are used as inputs of a track prediction model, and the future y-second tracks of the vehicle to be predicted are used as true values of the track prediction model to be output.
Through interface get_agent_ids (), tracking track IDs of all training samples in the database can be obtained, and the tracking track IDs correspond to the training samples one by one, so that corresponding training samples are obtained.
Step 102, obtaining tracking track data, namely future y seconds track data of the vehicle to be predicted, from the training sample.
By inputting the trace track ID to the interface get_track_by_id (), trace track data corresponding to the training sample can be returned from the database.
And step 103, analyzing all track points corresponding to the track true value by utilizing the existing analysis method from the track data of the training sample.
Step 104, the euclidean distance between the start point and the end point of the trace track is calculated and denoted as traj_len.
Step 105, traversing all track points of the training sample, calculating Euclidean distances of every two adjacent track points, and summing, and recording as a per.
And 106, calculating a jitter value score according to the Euclidean distance between the starting point and the ending point and the sum of the Euclidean distances between the adjacent track points, and deleting the training samples with the jitter value larger than the jitter threshold value from the track prediction training sample set.
Step 107, obtaining the next training sample, and repeating the steps 101-106 until all training samples are traversed.
Where score=spectrometer/traj_len, for a smooth track, the jitter value should be close to 1, and the jitter value is too large, indicating that the predicted track is abnormal, and the quality of the corresponding training sample is low. The jitter threshold can be set reasonably according to the expected target of track tracking. The training samples with jitter values larger than the jitter threshold value are deleted from the track prediction training sample set, namely the training samples with low quality and jitter of the track true value are deleted, and the training sample set is subjected to noise removal and cleaning, so that the model cannot be fitted with false true values during training, the model prediction problem caused by the quality problem of the training samples is reduced, and the accuracy and the stability of track prediction are improved.
The track prediction denoising method based on the deep learning model of the embodiment is mainly applied to a behavior or track prediction module in an automatic driving technology, and a prediction model developed on the basis of the deep learning technology at the front edge often needs a specific form of input. Particularly, in the model training stage, for the self-sampling data which are dynamically and continuously expanded, correct and available training and testing samples can be obtained, and the prediction track quality of the prediction model can be better improved from the data side.
Example 2
The embodiment provides a track prediction denoising method based on a deep learning model, which comprises steps 101-107 in embodiment 1, as shown in fig. 2, after cleaning a training sample in step 107 and deleting the training sample with a track true value jitter value, the method further comprises:
and step 108, for each remaining training sample in the track prediction training sample set, acquiring tracking track data, analyzing to obtain all track points corresponding to the track true value, traversing all track points, and calculating the curvature of the track points and the curvature variation of the adjacent track points.
The curvature calculation of each track point is carried out by taking every 3 adjacent track points as a group to determine a circle, and the curvature of every two adjacent track points is subtracted to obtain the absolute value of the curvature variation.
And 109, screening out training samples with track point curvature absolute values larger than a curvature threshold value or track point curvature abrupt changes.
Step 109 specifically includes: setting a curvature threshold value and a curvature variation threshold value, comparing the curvature absolute value of the track point with the curvature threshold value, comparing the curvature variation of the adjacent track point with the curvature variation threshold value, and judging that the curvature of the track point has abrupt change when the curvature variation of the adjacent track point is larger than the curvature variation threshold value. When the absolute value of curvature of a certain track point is larger than the curvature threshold value or the curvature variation of two adjacent track points is larger than the curvature variation threshold value, namely the curvature of the track point has abrupt change, the prediction effect of the track prediction model is affected. In the embodiment, the screened training samples with excessive track true curvature or mutation are put into a training sample set to be repaired for repairing, so that the model prediction problem caused by the quality problem of the training samples can be further reduced, and the accuracy and stability of track prediction are improved. The curvature threshold value and the curvature variation threshold value can be reasonably set according to a desired target tracked by the track.
Example 3
The embodiment provides a track prediction denoising device based on a deep learning model, which comprises a training sample extraction module 1, a tracking track data extraction module 2, a track analysis module 3, a first calculation module 4, a second calculation module 5, a third calculation module 6, a comparison module 7 and a filtering module 8 as shown in fig. 3. The training sample extraction module 1 acquires training samples from the track prediction training sample set and inputs the training samples into the tracking track data extraction module 2, the tracking track data extraction module 2 acquires tracking track data from the training samples and inputs the tracking track data into the track analysis module 3, and the track analysis module 3 analyzes all track points corresponding to the track true values from the tracking track data by utilizing the prior art. The first calculation module 4 reads the start point and end point data of the tracking track, and calculates the euclidean distance between the start point and the end point. The second calculation module 5 traverses all the trajectory points, calculates the euclidean distance of every two adjacent trajectory points and sums them. The third calculation module 6 inputs the sum of the euclidean distance between the start point and the end point and the euclidean distance between the adjacent track points, and calculates the jitter value by using the following formula: score = per/traj_len, where score represents the jitter value, traj_len represents the euclidean distance of the start point from the end point, and per represents the sum of the euclidean distances of adjacent track points. The comparison module 7 inputs the calculated jitter value, compares the jitter value with the jitter threshold value, and inputs the comparison result into the filtering module 8. When the track true value jitter value of a certain training sample is greater than the jitter threshold value, the filtering module 8 acquires a corresponding training sample according to the tracking track ID of the training sample, and deletes the training sample with the jitter value greater than the jitter threshold value from the track prediction training sample set.
Example 4
The embodiment provides a track prediction denoising device based on a deep learning model, which comprises a training sample extraction module 1, a tracking track data extraction module 2, a track analysis module 3, a first calculation module 4, a second calculation module 5, a third calculation module 6, a comparison module 7, a filtering module 8 of the embodiment 3, and a fourth calculation module 9, a fifth calculation module 10 and a screening module 11 as shown in fig. 4. After cleaning the training samples with trace truth value jitter through the filtering module 8, the multiplexing training sample extracting module 1 of the embodiment acquires training samples from the rest training sample set, the multiplexing tracking trace data extracting module 2 acquires the tracking trace data of the training samples, the multiplexing trace analyzing module 3 analyzes all trace points corresponding to the trace truth value of the training samples, then the fourth calculating module traverses all trace points to calculate the curvature of the trace points, the fifth calculating module 10 traverses all trace points to subtract the curvature of adjacent trace points to obtain the curvature variation of the adjacent trace points, and finally the screening module 11 screens out the training samples with overlarge curvature absolute values of the trace points or abrupt changes of the curvature of the trace points, and puts the training samples into the training sample set to be repaired for repairing, thereby further reducing the model prediction problem caused by the quality problem of the training samples and improving the accuracy and stability of the trace prediction.
As shown in fig. 5, the screening module 11 includes a first comparing unit 1101 for comparing an absolute value of curvature of the trajectory point with a curvature threshold value; a second comparing unit 1102, configured to compare the curvature variation of the adjacent track points with a curvature variation threshold, and determine that there is a sudden change in curvature of the track points when the curvature variation of the adjacent track points is greater than the curvature variation threshold; the first comparing unit 1101 and the second comparing unit 1102 output the comparison result to the screening unit 1103, and the screening unit 1103 extracts a training sample with an absolute value of the curvature of the track point larger than the curvature threshold value or with a mutation of the curvature of the track point, and puts the training sample into a training sample set to be repaired for repairing.
Example 5
The present embodiment provides an apparatus including a memory, a processor, and a program stored on the memory and executable on the processor, where the program when executed by the processor implements the steps of the track prediction denoising method based on the deep learning model in the foregoing embodiment.
Example 6
The present embodiment provides a storage medium storing at least one program executable by at least one processor to implement the steps of the trajectory prediction denoising method based on the deep learning model in the above embodiment.
Those of ordinary skill in the art will appreciate that: the foregoing description is only a preferred embodiment of the present application, and is not intended to limit the present application, but although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the technical solutions described in the foregoing embodiments, or that equivalents may be substituted for part of the technical features thereof. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.