Disclosure of Invention
The application provides a track prediction method based on denoising and related equipment, which can solve the problem of low track prediction accuracy.
In a first aspect, an embodiment of the present application provides a denoising-based trajectory prediction method, where the trajectory prediction method includes:
Acquiring a historical track of a target vehicle, and acquiring a historical track of each neighbor vehicle of the target vehicle;
encoding the historical track of the target vehicle to obtain a historical track hiding code of the target vehicle, and encoding the historical track of each neighbor vehicle to obtain a historical track hiding code of each neighbor vehicle;
Calculating a final social code of the target vehicle according to the historical track hidden codes of all the neighbor vehicles, wherein the final social code is used for describing interaction information of the target vehicle and all the neighbor vehicles;
Track prediction is carried out on the target vehicle based on the historical track hiding code and the final social code of the target vehicle to obtain future track distribution, wherein the future track distribution is used for describing the future track generated by each maneuvering mode executed by the target vehicle at the future moment and the probability of executing each maneuvering mode executed by the target vehicle at the future moment;
and sampling the future track distribution to obtain a noise future track, and denoising the noise future track by utilizing all the historical tracks to obtain a final future track of the target vehicle.
Optionally, encoding the historical track of the target vehicle to obtain a historical track hidden code of the target vehicle, including:
encoding the historical track of the target vehicle to obtain a historical track code of the target vehicle;
And performing secondary encoding on the historical track codes to obtain the historical track hidden codes.
Optionally, calculating a final social code of the target vehicle according to the historical track hidden codes of all neighboring vehicles, including:
respectively aiming at each neighbor vehicle, generating social codes corresponding to the neighbor vehicles based on historical track hidden codes of the neighbor vehicles, and calculating amplitude embedding and phase embedding of the neighbor vehicles by using the social codes;
calculating a spatial characterization of each neighboring vehicle based on all amplitude embeddings and all phase embeddings;
constructing an initial social code of the target vehicle according to all the spatial characterizations;
And calculating the initial social code by using a attention mechanism to obtain the final social code of the target vehicle.
Optionally, calculating the amplitude embedding and the phase embedding of the neighboring vehicle using social codes includes:
By the formula:
zj=Plain-FC(hj,Wz)
θj=Plain-FC(hj,Wθ)
Calculating an amplitude embedding z j and a phase embedding theta j of the j-th neighbor vehicle;
Where h j represents social coding of the j-th neighbor vehicle, plain-FC () represents na iotave full connection, W z represents computing an amplitude-embedded learnable parameter matrix, W θ represents computing a phase-embedded learnable parameter matrix, j=1, 2.
Optionally, calculating a spatial representation of each neighboring vehicle based on all amplitude embeddings and all phase embeddings includes:
By the formula:
calculating a spatial representation o j of the j-th neighbor vehicle;
wherein, the Representing a complex value of the complex, Representing the amplitude embedding and phase embedding of all neighboring vehicles,Representing a combination of amplitude embedding and phase embedding for the 1 st neighbor vehicle,Representing a combination of amplitude embedding and phase embedding for the 2 nd neighbor vehicle,Representing a combination of amplitude embedding and phase embedding for the nth neighbor vehicle, M pos represents a neighbor vehicle position mask matrix, W t,AndAll represent a learnable weight matrix, z k represents the amplitude embedding of the kth neighbor vehicle, theta k represents the phase embedding of the kth neighbor vehicle, and z k⊙cosθk represents a complex valueZ k⊙sinθk represents a complex valueIs a virtual value of k e (1, 2, once again, n), k+.j.
Optionally, track prediction is performed on the target vehicle based on the historical track hiding code and the final social code of the target vehicle to obtain future track distribution, including:
adding the historical track hiding code and the final social code of the target vehicle and carrying out standardization processing to obtain an interaction information vector;
Carrying out self-adaptive fusion on the interaction information vector and the mapping matrix of all maneuvering modes to obtain a fusion vector;
multiplying the fusion vector and the interaction information vector to obtain a final vector, and calculating the final vector to obtain future track distribution Wherein, the Representing the mean value of the target vehicle's position at a future time,Representing the variance of the target vehicle's position at a future time,Representing the correlation coefficient.
Optionally, adaptively fusing the interaction information and the mapping matrix of all maneuvering modes to obtain a fusion vector, including:
By the formula:
Computing fusion vectors
Wherein c t-t′ represents an element corresponding to the t-t' th historical moment in the interaction information, A combined vector representing the mapping matrix of all maneuver modalities, Representing the elements corresponding to the first T h historical moments in the mapping matrix containing all maneuver modalities,Representing the element corresponding to the first 2 historical moments in the mapping matrix containing all maneuver modalities,Representing the element corresponding to the first 1 historic moment in the mapping matrix containing all maneuver modalities, The vector of interaction information is represented as such,The interactive information corresponding to the T-T h historical time is represented, c t-2 represents the interactive information corresponding to the T-2 historical time, c t-1 represents the interactive information corresponding to the T-1 historical time, and T represents the current time.
Optionally, sampling the future track distribution to obtain a noise future track includes:
And taking the maneuver mode corresponding to the probability of the largest value in the future track distribution as a final maneuver mode, and taking the future track generated by the target vehicle executing the final maneuver mode as a noise future track.
Optionally, denoising the future track of noise by using all the historical tracks to obtain a final future track of the target vehicle, including:
By the formula:
Calculating future track of noise after denoising in the r step
Wherein alpha r,All of which represent parameters of the diffusion process,Represents the future track of the noise after the r+1 step denoising,Represents estimated noise, z represents noise, z-N (z; 0,I), I represents identity matrix, f ∈ () represents noise estimation model,Representing spatiotemporal embedding, X tar represents the historical track of the target vehicle,Representing the historic trajectories of all neighbor vehicles, f context () representing the information encoder, r=1, 2,..r, R representing the number of steps of the denoising process, and when r=1, denoising the 1 st step of the future trajectory of the noiseAs the final future trajectory of the target vehicle.
In a second aspect, an embodiment of the present application provides a denoising-based trajectory prediction apparatus, including:
the acquisition module acquires the historical track of the target vehicle and acquires the historical track of each neighbor vehicle of the target vehicle;
the system comprises an encoding module, a history track hiding module and a dynamic information processing module, wherein the encoding module encodes the history track of the target vehicle to obtain a history track hiding code of the target vehicle, and encodes the history track of each neighbor vehicle to obtain a history track hiding code of each neighbor vehicle;
the calculation module is used for calculating the final social code of the target vehicle according to the historical track hidden codes of all the neighbor vehicles, wherein the final social code is used for describing the interaction information of the target vehicle and all the neighbor vehicles;
The track prediction module is used for predicting the track of the target vehicle based on the historical track hiding code and the final social code of the target vehicle to obtain future track distribution, wherein the future track distribution is used for describing the future track generated by each maneuvering mode executed by the target vehicle at the future moment and the probability of executing each maneuvering mode executed by the target vehicle at the future moment;
The sampling module is used for sampling the future track distribution to obtain a noise future track, and denoising the noise future track by utilizing all the historical tracks to obtain a final future track of the target vehicle.
In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the denoising-based trajectory prediction method described above when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the denoising-based trajectory prediction method described above.
The scheme of the application has the following beneficial effects:
In the embodiment of the application, the historical track of the target vehicle is obtained, the historical track of each neighbor vehicle of the target vehicle is obtained, then the historical track of the target vehicle is encoded to obtain the historical track hiding code of the target vehicle, the historical track of each neighbor vehicle is encoded to obtain the historical track hiding code of each neighbor vehicle, then the final social code of the target vehicle is calculated according to the historical track hiding codes of all neighbor vehicles, then the track prediction is carried out on the target vehicle based on the historical track hiding codes and the final social code of the target vehicle to obtain future track distribution, finally the future track distribution is sampled to obtain the future track of noise, and the future track of noise is denoised by utilizing all the historical tracks to obtain the final future track of the target vehicle. The method comprises the steps of calculating the final social code of the target vehicle according to the historical track hidden code of the neighbor vehicle, and fully analyzing the interaction information between the target vehicle and the neighbor vehicle, so that the final social code can accurately describe the interaction information between the target vehicle and all the neighbor vehicles, the accuracy of future track distribution is high according to the accurate final social code calculation, then the future track distribution is sampled and denoised, the uncertainty of the track can be reduced, and the accuracy of track prediction is further improved.
In addition, the process of obtaining future track distribution and then obtaining the final future track through sampling and denoising is realized, track prediction from thick to thin stages is realized, interaction between vehicles can be well captured, multi-mode tracks of the vehicles can be modeled, and most importantly, uncertainty of the future track can be gradually reduced through sampling and gradual denoising.
Other advantageous effects of the present application will be described in detail in the detailed description section which follows.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Aiming at the problem of low accuracy of the existing track prediction, the embodiment of the application provides a track prediction method based on denoising, which comprises the steps of obtaining a historical track of a target vehicle, obtaining a historical track of each neighbor vehicle of the target vehicle, then encoding the historical track of the target vehicle to obtain a historical track hidden code of the target vehicle, encoding the historical track of each neighbor vehicle to obtain a historical track hidden code of each neighbor vehicle, calculating a final social code of the target vehicle according to the historical track hidden codes of all neighbor vehicles, then predicting the track of the target vehicle based on the historical track hidden codes and the final social code of the target vehicle to obtain future track distribution, finally sampling the future track distribution to obtain a noise future track, and denoising the noise future track by utilizing all the historical tracks to obtain the final future track of the target vehicle. The method comprises the steps of calculating the final social code of the target vehicle according to the historical track hidden code of the neighbor vehicle, and fully analyzing the interaction information between the target vehicle and the neighbor vehicle, so that the final social code can accurately describe the interaction information between the target vehicle and all the neighbor vehicles, the accuracy of future track distribution is high according to the accurate final social code calculation, then the future track distribution is sampled and denoised, the uncertainty of the track can be reduced, and the accuracy of track prediction is further improved.
In addition, the process of obtaining future track distribution and then obtaining the final future track through sampling and denoising is realized, track prediction from thick to thin stages is realized, interaction between vehicles can be well captured, multi-mode tracks of the vehicles can be modeled, and most importantly, uncertainty of the future track can be gradually reduced through sampling and gradual denoising.
The following describes an exemplary denoising-based trajectory prediction method provided by the present application.
As shown in fig. 1, the track prediction method based on denoising provided by the application comprises the following steps:
Step 11, acquiring a historical track of the target vehicle, and acquiring a historical track of each neighbor vehicle of the target vehicle.
The target vehicle is a vehicle needing track prediction, the neighboring vehicle is a vehicle adjacent to the target vehicle, the history track is a motion track of the vehicle in a history time period before the current moment, if the current moment is 9 points, the history track can be a motion track of a half-vehicle from 7 points to 8 points, and the neighboring vehicle is a neighboring vehicle of the target vehicle in the history time period.
In some embodiments of the present application, the historical track may be obtained using a positioning system of the target vehicle and the neighboring vehicle.
And step 12, encoding the historical track of the target vehicle to obtain a historical track hiding code of the target vehicle, and encoding the historical track of each neighbor vehicle to obtain a historical track hiding code of each neighbor vehicle.
The history track hiding code is used for describing dynamic information of the history track, such as moving direction, speed and the like of the vehicle when the history track runs.
In some embodiments of the present application, the step of encoding the historical track of the target vehicle to obtain the hidden encoding of the historical track of the target vehicle specifically includes:
First, the historical track of the target vehicle is encoded, and the historical track code of the target vehicle is obtained.
For example, the historical track of the target vehicle may be encoded by using a multi-layer perceptron to obtain a historical track code of the target vehicle.
And secondly, performing secondary coding on the historical track codes to obtain the historical track hidden codes.
For example, the historical track code may be secondarily encoded using a long and short term memory network to obtain a historical track hidden code.
It should be noted that, the process of encoding the history track of each neighboring vehicle to obtain the history track hidden code of each neighboring vehicle is the same as the process of obtaining the history track hidden code of the target vehicle, that is, encoding the history track of the neighboring vehicle to obtain the history track code of the neighboring vehicle, and then secondarily encoding the history track code to obtain the history track hidden code.
And step 13, calculating the final social code of the target vehicle according to the historical track hidden codes of all the neighbor vehicles.
The final social code is used for describing interaction information of the target vehicle and all the neighbor vehicles, such as the distance between the neighbor vehicles and the target vehicle, the relative speed between the neighbor vehicles and the target vehicle, and the like.
In some embodiments of the present application, the step of calculating the final social code of the target vehicle according to the historical track hidden codes of all neighboring vehicles specifically includes:
the method comprises the steps of firstly, respectively aiming at each neighbor vehicle, generating social codes corresponding to the neighbor vehicles based on historical track hiding codes of the neighbor vehicles, and calculating amplitude embedding and phase embedding of the neighbor vehicles by using the social codes.
In some embodiments of the present application, the step of generating the social code corresponding to the neighboring vehicles based on the historical track hiding code of the neighboring vehicles specifically includes expanding a mask matrix mask representing a positional relationship between the target vehicle and each neighboring vehicle to a shape consistent with a historical time period corresponding to the historical track. A new tensor representation social code is then created, which is initialized to an all zero tensor of the same shape as the mask matrix. And then, using a mask_scanner_function of pytorch to fill the historical track hiding codes of the neighbor vehicles into the social codes according to a mask matrix. Specifically, mask_mask_allows a specific value of one tensor to be bit-inserted into another tensor according to one boolean mask, i.e. for the position where the mask is True, the corresponding value in the historical track hidden code of the neighboring vehicle is filled into the social code, and for the position where the mask is False, the social code remains the same.
The steps of calculating the amplitude embedding and the phase embedding of the neighbor vehicle by using the social codes specifically comprise:
By the formula:
zj=Plain-FC(hj,Wz)
θj=Plain-FC(hj,Wθ)
The amplitude embedding z j and phase embedding θ j of the j-th neighbor vehicle are calculated.
Where h j represents social coding of the j-th neighbor vehicle, plain-FC () represents naive full connection, W z represents amplitude embedded learnable weight matrix, W θ represents phase embedded learnable weight matrix, j=1, 2.
Second, a spatial characterization of each neighboring vehicle is computed based on all amplitude embeddings and all phase embeddings.
Specifically, the formula is as follows:
The spatial characterization o j of the j-th neighbor vehicle is calculated.
Wherein, the Representing a complex value of the complex, Representing the amplitude embedding and phase embedding of all neighboring vehicles,Representing a combination of amplitude embedding and phase embedding for the 1 st neighbor vehicle,Representing a combination of amplitude embedding and phase embedding for the 2 nd neighbor vehicle,Representing a combination of amplitude embedding and phase embedding for the nth neighbor vehicle, M pos represents a neighbor vehicle position mask matrix, W t,AndAll represent a learnable weight matrix, z k represents the amplitude embedding of the kth neighbor vehicle, theta k represents the phase embedding of the kth neighbor vehicle, and z k⊙cosθk represents a complex valueZ k⊙sinθk represents a complex valueIs a virtual value of k e (1, 2, once again, n), k+.j.
The above-mentioned surrouding-FC is calculated by extracting phase embedding and amplitude embedding for the neighboring vehicle through convolution operation. The phase embedding and amplitude embedding are then developed by the euler formula to capture the relative interactions and spatiotemporal relationships between vehicles. These features are then re-weighted using adaptive pooling so that the individual features can be automatically adjusted according to relative importance. Finally, further processing is performed by a multi-layer perceptron (MLP) to generate a spatial representation with enhanced phase information and interaction characteristics.
And thirdly, constructing an initial social code of the target vehicle according to all the spatial characterizations.
It should be noted that, for the spatial representation o j, it is a vector formed by a plurality of elements, where the plurality of elements are in one-to-one correspondence with a plurality of historical moments, and are used to describe spatial information of neighboring vehicles at each historical moment. For a historical moment, integrating elements corresponding to the historical moment in all the spatial characterizations to obtain social interaction characterizations, and integrating the social interaction characterizations at all the historical moments to obtain an initial social code Wherein, the Representing social interaction characterization at the T-T h historical time, h t-2 representing social interaction characterization at the T-2 historical time, and h t-1 representing social interaction characterization at the T-1 historical time.
And fourthly, calculating the initial social code by using an attention mechanism to obtain the final social code of the target vehicle.
Specifically, the initial social code is used as the input of the attention mechanism, a query matrix (Q), a key matrix (K) and a value matrix (V) are calculated based on the self-attention mechanism, and then the dot product of the query matrix and the key matrix is calculated to obtain the attention score, so that the dependency relationship between the historical moments, namely the relationship between the characteristics of different historical moments, is captured. Then, normalizing the attention score by using softmax to ensure that the attention distribution at each historical moment is a probability distribution and the sum is 1, weighting and summing the value matrix according to the calculated attention score to obtain a new historical moment characteristic, and finally combining the results of different attention heads to obtain the final social codeThe expression is:
Wherein Concat denotes a splicing operation, head 1 denotes an output of the 1 st attention head, head 2 denotes an output of the 2 nd attention head, and head k denotes an output of the k th attention head.
It is worth mentioning that the final social code of the target vehicle is calculated according to the historical track hidden code of the neighbor vehicle, so that the interaction information between the target vehicle and the neighbor vehicles is fully analyzed, and the final social code can accurately describe the interaction information between the target vehicle and all the neighbor vehicles.
And 14, carrying out track prediction on the target vehicle based on the historical track hiding code and the final social code of the target vehicle to obtain future track distribution.
The future track profile described above is used to describe the future track generated by the target vehicle at the future time instant for each maneuver mode, and the probability that the target vehicle will execute each maneuver mode at the future time instant. The maneuver modes are used to describe the motion conditions of the target vehicle, such as left lane change, right lane change, lane keeping, acceleration, speed keeping, and the like.
In some embodiments of the present application, the step of predicting the track of the target vehicle based on the historical track hiding code and the final social code of the target vehicle to obtain the future track distribution specifically includes:
And the first step is to add the historical track hiding code and the final social code of the target vehicle and perform normalization processing to obtain an interaction information vector.
Illustratively, the normalization process may be performed using existing normalization formulas.
And secondly, carrying out self-adaptive fusion on the interaction information vector and the mapping matrix of all maneuvering modes to obtain a fusion vector.
Specifically, the formula is as follows:
Computing fusion vectors
Wherein c t-t′ represents an element corresponding to the t-t' th historical moment in the interaction information, A combined vector representing the mapping matrix of all maneuver modalities, Representing the elements corresponding to the first T h historical moments in the mapping matrix containing all maneuver modalities,Representing the element corresponding to the first 2 historical moments in the mapping matrix containing all maneuver modalities,Representing the element corresponding to the first 1 historic moment in the mapping matrix containing all maneuver modalities, The vector of interaction information is represented as such,The interactive information corresponding to the T-T h historical time is represented, c t-2 represents the interactive information corresponding to the T-2 historical time, c t-1 represents the interactive information corresponding to the T-1 historical time, and T represents the current time.
It should be noted that, the mapping matrix of the maneuver mode is preset according to the maneuver condition of the maneuver mode, where the mapping matrix has a plurality of elements, and the plurality of elements are in one-to-one correspondence with a plurality of historical moments.
Thirdly, multiplying the fusion vector and the interaction information vector to obtain a final vector, and calculating the final vector to obtain future track distributionWherein, the Representing the mean value of the target vehicle's position at a future time,Representing the variance of the target vehicle's position at a future time,Representing the correlation coefficient.
For example, the final vector may be calculated using a long and short term memory network to obtain the future track distribution. The future trajectory distribution is a gaussian distribution.
It is worth mentioning that the accuracy of the future track distribution obtained by calculating according to the accurate final social coding is high, and the probability of each maneuvering mode of the target vehicle to be executed at the future moment can be accurately described.
And step 15, sampling future track distribution to obtain a noise future track, and denoising the noise future track by utilizing all the historical tracks to obtain a final future track of the target vehicle.
In some embodiments of the present application, the step of sampling the future track distribution to obtain a noise future track, and denoising the noise future track by using all the historical tracks to obtain a final future track of the target vehicle specifically includes:
And in the first step, sampling future track distribution to obtain a noise future track.
Specifically, the maneuver mode corresponding to the probability of the largest value in the future track distribution is taken as the final maneuver mode, and the future track generated by the target vehicle executing the final maneuver mode is taken as the noise future track.
And secondly, denoising the future track of the noise by using all the historical tracks to obtain the final future track of the target vehicle.
Specifically, the formula is as follows:
Calculating future track of noise after denoising in the r step
Wherein alpha r,All of which represent parameters of the diffusion process,Represents the future track of the noise after the r+1 step denoising,Represents estimated noise, z represents noise, z-N (z; 0,I), I represents identity matrix, f ∈ () represents noise estimation model,Representing spatiotemporal embedding, X tar represents the historical track of the target vehicle,Representing the historic trajectories of all neighbor vehicles, f context () representing the information encoder, r=1, 2,..r, R representing the number of steps of the denoising process, and when r=1, denoising the 1 st step of the future trajectory of the noiseAs the final future trajectory of the target vehicle.
In the above formula, when r=r,Future trajectories for the incoming noise. The above described denoising process is a reverse process from the last step to the 1 st step (a reverse diffusion process similar to the diffusion model). The information encoder may be a transducer-based encoder.
For example, the method of the present application may be implemented on an NVIDIA 3090 GPU (Instrida 3090 graphics processing unit) server using a Pytorch framework. The parameters were set by using a 13 x5 grid defined centered on the target vehicle with each column corresponding to one lane, each row being 15 feet apart. When the hidden codes of the historical track are calculated, a multi-layer perceptron and a long-short-term memory network are adopted, the hidden characteristic of the multi-layer perceptron is set to be 32, and the activation function is ReL u. To train the framework corresponding to the method of the present application, a two-stage training strategy is considered, wherein the first stage trains the denoising module (i.e., the formula involved in step 15 of the present application), and the second stage focuses on training the spatiotemporal interaction module (i.e., the formulas, models, etc. involved in steps 11 to 14 of the present application). Each historical track is segmented over a sensing range (i.e., 8 s) containing past (3 s) and future (5 s) locations of 5 Hz. And dividing the data set formed by all the history tracks after being divided into segments into a training set, a verification set and a test set, wherein the dividing ratio is 7:2:1, and the data set is used for executing the method of the application and performing training, verification and test.
It is worth mentioning that the final social code of the target vehicle is calculated according to the historical track hidden code of the neighbor vehicle, so that the interaction information between the target vehicle and the neighbor vehicles is fully analyzed, the final social code can accurately describe the interaction information between the target vehicle and all the neighbor vehicles, the accuracy of future track distribution is high according to the accurate final social code calculation, then the future track distribution is sampled and denoised, the uncertainty of the track can be reduced, and the accuracy of track prediction is further improved.
In addition, the process of obtaining future track distribution and then obtaining the final future track through sampling and denoising is realized, track prediction from thick to thin stages is realized, interaction between vehicles can be well captured, multi-mode tracks of the vehicles can be modeled, and most importantly, uncertainty of the future track can be gradually reduced through sampling and gradual denoising.
The following describes an exemplary denoising-based trajectory prediction apparatus provided by the present application.
As shown in fig. 2, an embodiment of the present application provides a denoising-based trajectory prediction apparatus 200, which includes:
an acquisition module 201 that acquires a history track of the target vehicle and acquires a history track of each neighboring vehicle of the target vehicle;
The encoding module 203 encodes the historical track of the target vehicle to obtain a historical track hiding code of the target vehicle, and encodes the historical track of each neighboring vehicle to obtain a historical track hiding code of each neighboring vehicle;
The calculation module 204 is used for calculating the final social code of the target vehicle according to the historical track hidden codes of all the neighbor vehicles, wherein the final social code is used for describing the interaction information of the target vehicle and all the neighbor vehicles;
the track prediction module 205 predicts the track of the target vehicle based on the historical track hiding code and the final social code of the target vehicle to obtain future track distribution, wherein the future track distribution is used for describing the future track generated by each maneuvering mode executed by the target vehicle at the future moment and the probability of executing each maneuvering mode executed by the target vehicle at the future moment;
the sampling module 206 samples the future track distribution to obtain a noise future track, and denoises the noise future track by using all the historical tracks to obtain a final future track of the target vehicle.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
As shown in fig. 3, an embodiment of the present application provides a terminal device D10 of the embodiment comprising at least one processor D100 (only one processor is shown in fig. 3), a memory D101 and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, the processor D100 implementing the steps of any of the respective method embodiments described above when executing the computer program D102.
Specifically, when the processor D100 executes the computer program D102, the historical track of the target vehicle is obtained, the historical track of each neighboring vehicle of the target vehicle is obtained, then the historical track of the target vehicle is encoded to obtain the historical track hiding code of the target vehicle, the historical track of each neighboring vehicle is encoded to obtain the historical track hiding code of each neighboring vehicle, then the final social code of the target vehicle is calculated according to the historical track hiding codes of all neighboring vehicles, then the track prediction is performed on the target vehicle based on the historical track hiding codes and the final social codes of the target vehicle to obtain the future track distribution, finally the future track distribution is sampled to obtain the future track of noise, and the future track of noise is denoised by utilizing all the historical tracks to obtain the final future track of the target vehicle. The method comprises the steps of calculating the final social code of the target vehicle according to the historical track hidden code of the neighbor vehicle, and fully analyzing the interaction information between the target vehicle and the neighbor vehicle, so that the final social code can accurately describe the interaction information between the target vehicle and all the neighbor vehicles, the accuracy of future track distribution is high according to the accurate final social code calculation, then the future track distribution is sampled and denoised, the uncertainty of the track can be reduced, and the accuracy of track prediction is further improved.
The Processor D100 may be a central processing Unit (CPU, centralProcessing Unit), and the Processor D100 may also be other general purpose processors, digital signal processors (DSP, digital Signal Processor), application SPECIFIC INTEGRATED Circuits (ASIC), off-the-shelf programmable gate arrays (FPGA, field-Programmable GateArray) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory D101 may in some embodiments be an internal storage unit of the terminal device D10, for example a hard disk or a memory of the terminal device D10. The memory D101 may also be an external storage device of the terminal device D10 in other embodiments, for example, a plug-in hard disk, a smart memory card (SMC, smartMedia Card), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the terminal device D10. Further, the memory D101 may also include both an internal storage unit and an external storage device of the terminal device D10. The memory D101 is used for storing an operating system, an application program, a boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory D101 may also be used to temporarily store data that has been output or is to be output.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product enabling a terminal device to carry out the steps of the method embodiments described above when the computer program product is run on the terminal device.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium can include at least any entity or device capable of carrying computer program code to a denoising-based trajectory prediction method device/terminal device, a recording medium, a computer memory, a Read-only memory (ROM), a random access memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
While the foregoing is directed to the preferred embodiments of the present application, it will be appreciated by those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present application, and such modifications and adaptations are intended to be comprehended within the scope of the present application.