This application claims priority to and the benefit of Korean Patent Application No. 10-2023-0093528, filed on Jul. 19, 2023, and No. 10-2023-0141326, filed on Oct. 20, 2023, the disclosures of which are incorporated herein by reference in its entirety.
The present invention relates to a method and apparatus for predicting future trajectories of vehicles around an autonomous driving car using an artificial neural network.
A typical autonomous driving system (ADS) drives a vehicle while performing the processes of recognition, determination, and control.
In the recognition process, the ADS uses data obtained from sensors, such as cameras, lidar, and the like, to find static and dynamic objects around the vehicle and track their locations. Further, the ADS recognizes lanes and nearby buildings, compares the recognized lanes and nearby buildings with those on a high-definition map (HD map), and then predicts a location and attitude of an autonomous driving car (hereinafter, referred to as “autonomous driving vehicle” or “autonomous car”).
In the determination process, the ADS generates multiple routes that fit the driving intention from results of the recognition and determines the degree of risk of each route to decide on one route. Lastly, in the control process, the ADS controls a steering angle and speed of the vehicle so that the vehicle can move along the route generated during the determination process.
In order to determine the degree of risk of each route in the determination process, it is essential to predict the future movement of nearby moving objects. For example, when an autonomous car changes lanes, the ADS should determine in advance whether there is a vehicle in the lane to which the autonomous car intends to move and whether the corresponding vehicle will cause a collision with the autonomous car in the future. To this end, it is very important to predict the future movement of the corresponding vehicle.
With the development of a deep neural network (DNN), many technologies for predicting the future trajectories of moving objects using a DNN have been proposed. In order to more accurately predict a future trajectory of a moving object, a DNN is designed to satisfy the following conditions (see
Condition (1). A high-definition map or a driving environment image is used for the prediction of a future trajectory (see
Condition (2). Interactions between moving objects are considered for the prediction of a future trajectory (see
Condition (3). Ambiguity in the movement of a moving object is resolved by predicting multiple future trajectories per object (see
Condition (1) is applied to reflect the fact that vehicles mainly move along lanes and people move along paths such as sidewalks or the like. Condition (2) is applied to reflect the fact that the movement of an object is affected by the movement of other objects around the object. Condition (3) is applied to reflect the fact that a future location of an object follows a multimodal distribution due to the ambiguity of the object's movement intention.
Meanwhile, although many artificial neural networks have been proposed to satisfy Condition (3), a problem of predicted trajectories distributed in an area between center lines of adjacent lanes often occurs, as shown in
The present invention is directed to providing a deep neural network structure that can resolve mode blur in an artificial neural network for predicting future trajectories of vehicles around an autonomous driving car, and a training method and apparatus for the same. More specifically, the present invention is directed to providing a structure for an artificial neural network that predicts a plurality of future trajectories of nearby vehicles using past location records of nearby vehicles and a high-definition map, and a method and apparatus for effectively training the corresponding artificial neural network.
Objects of the present invention are not limited to the above-described objects and other objects of the present invention that are not described may be clearly understood by those skilled in the art from the following description.
According to an aspect of the present invention, there is provided a method of predicting future trajectories of nearby vehicles around an autonomous driving car, which includes generating, based on locations of one or more nearby vehicles, past trajectories of the nearby vehicles, extracting local routes along which the nearby vehicles are travelable from a high-definition map on the basis of current locations of the nearby vehicles, encoding the past trajectories and the local routes and generating a past trajectory encoding and a local route encoding, selecting a target vehicle from among the nearby vehicles, and updating a local route encoding of the target vehicle by reflecting a correlation between the target vehicle and a local route of the target vehicle and a correlation between the target vehicle and nearby vehicles around the target vehicle, and generating a future trajectory of the target vehicle on the basis of the past trajectory encoding and the updated local route encoding.
According to another aspect of the present invention, there is provided an apparatus for predicting future trajectories of nearby vehicles around an autonomous driving car, which includes a memory configured to store instructions readable by a computer, and at least one processor configured to execute the instructions.
The at least one processor may be configured to, by executing the instructions, generate, based on locations of one or more nearby vehicles, past trajectories of the nearby vehicles, extract local routes along which the nearby vehicles are travelable from a high-definition map on the basis of current locations of the nearby vehicles, encode the past trajectories and the local routes and generate a past trajectory encoding and a local route encoding, select a target vehicle from among the nearby vehicles, and update a local route encoding of the target vehicle by reflecting a correlation between the target vehicle and a local route of the target vehicle and a correlation between the target vehicle and nearby vehicles around the target vehicle, and generate a future trajectory of the target vehicle on the basis of the past trajectory encoding and the updated local route encoding.
According to an embodiment of the present invention, the future trajectories of moving objects around an autonomous driving vehicle can be more accurately predicted through DNN learning that minimizes mode blur.
Effects obtainable in the present invention are not limited to the above-described effects and other effects that are not described may be clearly understood by those skilled in the art from the above detailed descriptions.
The above and other objects, features and advantages of the present invention will become more apparent to those of ordinary skill in the art by describing exemplary embodiments thereof in detail with reference to the accompanying drawings, in which:
The present invention relates to a method and apparatus for training an artificial neural network to predict future trajectories of nearby vehicles around an autonomous driving car. More specifically, the present invention proposes a structure for an artificial neural network that predicts a plurality of future trajectories of nearby vehicles using past location records of the nearby vehicles and a high-definition map, and introduces several technologies for effectively training the corresponding artificial neural network.
Advantages and features of the present invention and methods for achieving them will be made clear from embodiments described in detail below with reference to the accompanying drawings. However, the present invention may be embodied in many different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the scope of the present invention to those of ordinary skill in the technical field to which the present invention pertains. The present invention is defined only by the scope of the claims. Meanwhile, terms used herein are for the purpose of describing the embodiments and are not intended to limit the present invention. In this specification, the singular forms include the plural forms unless the context clearly indicates otherwise. It will be understood that the terms “comprise,” “comprising,” “include,” and/or “including” used herein specify some stated components, steps, operations and/or elements, but do not preclude the presence or addition of one or more other components, steps, operations and/or elements.
In description of the present invention, when it is determined that a detailed description of a related well-known function may unnecessarily obscure the gist of the present invention, the detailed description will be omitted.
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In description of the present invention, in order to facilitate overall understanding, like reference numerals are used for like elements even in different drawings.
The method of predicting the future trajectories of nearby vehicles around the autonomous driving car (hereinafter, referred to as a “future trajectory prediction method”) illustrated in
It is assumed that the future trajectory prediction method illustrated in
The future trajectory prediction apparatus 1000 predicts the future trajectories of the vehicles around the autonomous car through a deep neural network (DNN) learning and inference. In the present embodiment, the DNN consists of four modules that are a data reception module, a local route generation module, a data encoding module, and a future trajectory generation module, and the four modules respectively correspond to operations S100 to S400 in
Operation S100 is an operation of receiving location data for each vehicle. In this operation, the future trajectory prediction apparatus 1000 receives location data and attitude data of the vehicles around the autonomous car and stores and manages the received location data and attitude data for each vehicle. The future trajectory prediction apparatus 1000 receives the location data and attitude data of the vehicles around the autonomous car through sensors mounted on the autonomous car or through communication with an external source (e.g., another vehicle or computer system).
Operation S200 is an operation of generating drivable local routes for each vehicle. In this operation, the future trajectory prediction apparatus 1000 uses information on a current location and attitude of the vehicle to generate a local route (or lane center line information) along which the vehicle can travel from a high-definition map.
Operation S300 is an operation of encoding data. In this operation, the future trajectory prediction apparatus 1000 encodes the location data of the vehicle and the local routes.
Finally, operation S400 is an operation of generating future trajectories for each vehicle. In this operation, the future trajectory prediction apparatus 1000 predicts future trajectories for each vehicle for which data has been received.
Although the operations of the future trajectory prediction method according to the embodiment of the present invention illustrated in
Hereinafter, each operation of the future trajectory prediction method will be described in detail.
In operation S100, the future trajectory prediction apparatus 1000 detects or receives location data and attitude data for one or more nearby vehicles in real time and stores and manages the detected or received location data and attitude data for each vehicle. The attitude data includes heading angle data of the nearby vehicles.
The future trajectory prediction apparatus 1000 generates a past trajectory of the vehicle on the basis of the location data of the vehicle. A movement trajectory of a vehicle Ai for the past Tobs seconds that the future trajectory prediction apparatus 1000 can obtain at a current time t is expressed as Xi=[X(t-Hobs), . . . , xt]. Here, xt=[xt, yt] denotes a location of the vehicle Ai at the time t. Hobs=Tobs*a sampling rate (Hz). When a total of N vehicles are detected at the current time t, [X1, . . . , XN] may be obtained.
In operation S200, the future trajectory prediction apparatus 1000 extracts drivable local routes for each vehicle from the high-definition map on the basis of the location and the heading angle of the vehicle at the current time.
The future trajectory prediction apparatus 1000 extracts M local routes (or lane center lines) Li1:M that may be selected by the vehicle using the location and the heading angle of the vehicle Ai at the current time t, from the high-definition map. Here, Lin=[L0, . . . , LP] denotes an nth local route among the M local routes and consists of a series of two-dimensional (2D) coordinate values Lp=[xp, yp].
A lane center line of the high-definition map consists of consecutive segments, and one segment is defined by two coordinate values. Each segment has fixed start and end points and a vector direction defined by the two coordinate values. Segments within the same lane center line are connected to each other. When another segment B, which is connected to segment A, is ahead of segment A in a travelling direction of a lane, segment B is referred to as a leading segment of segment A, and conversely, segment A is referred to as a trailing segment of segment B.
Lastly, when the number of finally selected lane center lines (or local routes) is less than a specific value M, the future trajectory prediction apparatus 1000 adds a fake center line with all coordinate values of 0. Conversely, when the number of finally selected lane center lines is greater than M, the center lines are randomly removed so that the number of local routes for the corresponding vehicle becomes M (S270, adjustment of the number of local routes).
In operation S300, the future trajectory prediction apparatus 1000 encodes the location data of the vehicle and the local routes. The future trajectory prediction apparatus 1000 encodes data with continuous location coordinate values, such as a past trajectory {Xi}, a correct future trajectory {Yi}, and a local route {Li1:M} of the vehicle, through a long short-term memory (LSTM) network to generate a past trajectory encoding, a correct future trajectory encoding, and a local route encoding. The correct future trajectory encoding is necessary for training a DNN.
Hereinafter, a method in which the future trajectory prediction apparatus 1000 encodes a trajectory of a vehicle and local routes will be described.
First, a method in which the future trajectory prediction apparatus 1000 encodes a trajectory of a vehicle will be described. The future trajectory prediction apparatus 1000 performs preprocessing before encoding a trajectory Xi of a vehicle. The future trajectory prediction apparatus 1000 calculates a speed vt (units: m/s) and a heading ht (units: radians) of the vehicle at each pair of location coordinates xt=[xt, yt] and then adds the calculated speed and heading to a coordinate vector like xt=[xt, yt, vt, ht]. Then, the future trajectory prediction apparatus 1000 encodes the preprocessed Xi using an LSTM network. A result of the encoding is defined as {tilde over (X)}iϵRD
Next, a method in which the future trajectory prediction apparatus 1000 encodes local routes will be described. The future trajectory prediction apparatus 1000 performs preprocessing before encoding an nth local route Lin=[L0, . . . , Lp] for an ith vehicle. The future trajectory prediction apparatus 1000 calculates a tangent vector Vp=[vxp, vyp] and a direction vdp (units: radians) of the tangent vector at each pair of coordinates Lp=[xp, yp] and then adds the calculated tangent vector and direction of the tangent vector to a coordinate vector like Lp=[xp, yp, vxp, vyp, vdp]. Then, the future trajectory prediction apparatus 1000 encodes the preprocessed Lin using an LSTM network. A result of the encoding is defined as {tilde over (L)}inϵRD
The reason for performing preprocessing of the vehicle trajectories and lane center lines in this way is that the direction of the vehicle is generally maintained parallel to the tangent vector of the lane center lines.
In operation S400, the future trajectory prediction apparatus 1000 predicts the future trajectories of vehicles around an autonomous car. The future trajectory prediction apparatus 1000 selects a target vehicle for predicting a future trajectory from among the vehicles around the autonomous car, updates the local route encoding of the target vehicle by reflecting a correlation between the target vehicle and a local route thereof and a correlation between the target vehicle and vehicles around the target vehicle, and generates a future trajectory of the target vehicle on the basis of the past trajectory encoding of the target vehicle and the updated local route encoding of the target vehicle.
In the present invention, the future trajectories of the nearby vehicles recognized by the autonomous car are predicted independently. Therefore, operation S400 may be performed simultaneously for each vehicle through parallel processing. Hereinafter, in describing operation S400 in detail, it is assumed that future trajectories are predicted using an ith vehicle Ai as a target vehicle for future trajectory prediction. Therefore, data required to predict the future trajectories includes 1) a past trajectory encoding {umlaut over (X)}i, of the target vehicle, 2) a future trajectory encoding {tilde over (Y)}i, of the target vehicle (for training), 3) a past trajectory encoding {{umlaut over (X)}j}j≠i of nearby vehicles around the target vehicle, and 4) a local route encoding {umlaut over (L)}i1:M.
Operation S410 is an operation of updating a local route encoding.
The future trajectory prediction apparatus 1000 updates the local route encoding of a target vehicle by reflecting an interaction between the target vehicle and a local route thereof and an interaction between the target vehicle and nearby vehicles around the target vehicle in the local route encoding of the target vehicle. When the future trajectory prediction apparatus 1000 predicts future trajectories using each local route or predicts the probability of moving to a specific local route, the future trajectory prediction apparatus 1000 updates a local route encoding {tilde over (L)}i1:M to increase accuracy. For example, an nth local route encoding {umlaut over (L)}in of an ith vehicle is updated as shown in Equation 1.
Here, [;] denotes a concatenation operation. αnϵR2×D
Here, wmϵR1 denotes a weight representing a correlation between a past trajectory encoding {umlaut over (X)}i and a local route encoding {umlaut over (L)}i1:M, and satisfies
For example, in a situation where the vehicle Ai changes from an nth lane to an mth lane, a value of the weight wm will be close to 1 and remaining {wk}k≠m values will be close to 0. Therefore, a local route encoding {tilde over (L)}in that satisfies αn≈[{umlaut over (L)}in;{umlaut over (L)}im] and is updated using Equation 1 can well express movements such as lane changes and the like when used in future trajectory prediction. The future trajectory prediction apparatus 1000 may obtain the weight wm through an attention operation between {tilde over (X)}i and {umlaut over (L)}i1:M.
Next, the future trajectory prediction apparatus 1000 first separately selects all nearby vehicles around the vehicle Ai that are present at a predetermined distance τ or less from Lin in order to obtain βnϵRD
Therefore, the local route encoding Lin updated using Equation 1 includes information on the nearby vehicles that are present along the nth local route, and eventually, when the future trajectories are predicted, interactions with the nearby vehicles may be reflected, and thus the accuracy of predicting future trajectories may be increased.
Referring to
Operation S420 is an operation of calculating a local route selection probability. In this operation, the future trajectory prediction apparatus 1000 uses the updated local route encoding to calculate the probability that the target vehicle Ai will select each local route. The future trajectory prediction apparatus 1000 generates a driving environment context vector representing a local route through a concatenation operation on the basis of the past trajectory encoding and updated local route encoding of the target vehicle. The driving environment context vector representing the nth local route may be expressed as cin=[{tilde over (X)}′i:{tilde over (L)}in] The future trajectory prediction apparatus 1000 may calculate a local route selection probability Pi as shown in Equation 4 using a multi-layer perceptron (MLP) on the basis of the driving environment context vector.
Here, an nth element value of the local route selection probability Pi is the probability that the vehicle Ai will select the nth local route.
Operation S430 is an operation of generating a future trajectory of a target vehicle. The future trajectory prediction apparatus 1000 generates a future trajectory of the target vehicle by reflecting the local route selection probability on the basis of the past trajectory encoding of the target vehicle and the updated local route encoding of the target vehicle.
The future trajectory prediction apparatus 1000 independently generates a future trajectory from each local route. In this case, the future trajectory prediction apparatus 1000 determines the number of future trajectories generated based on each local route in proportion to the probability Pi(n) that the corresponding local route will be selected. For example, it is assumed that 100 future trajectories are generated for the vehicle Ai. Further, it is assumed that Pi(1)=0.9, Pi(2)=0.1, and Pi(2)= . . . =Pi(M)=0. In this case, the future trajectory prediction apparatus 1000 generates 90 future trajectories from a driving environment context vector ci1 corresponding to a local route Li1 and generates 10 future trajectories from a driving environment context vector ci2 corresponding to a local route Li2. No future trajectories are generated from the remaining local routes.
When the future trajectory prediction apparatus 1000 generates future trajectories using a driving environment context vector cin, the future trajectory prediction apparatus 1000 may use a method in which a latent variable, such as a variational autoencoder (VAE) or a generative adversarial network (GAN), is used.
When a VAE is used, the future trajectory prediction apparatus 1000 may calculate as follows. First, two artificial neural networks MLPpost and MLPprior are defined. Usually, MLPpost is called a recognizer network and MLPprior is called a prior network. Each network generates a mean vector μϵRD
MLPpost is used when training a DNN, and as shown in Equation 5, not only the driving environment context vector, but also a correct future trajectory encoding {tilde over (Y)}i is input, and the mean vector and the standard deviation vector of the Gaussian probability distribution are generated. MLPprior is used for the prediction of the future trajectories, and as shown in Equation 6, the driving environment context vector is input, and a mean vector and a standard deviation vector of a Gaussian probability distribution are generated.
Each of the mean vector and the standard deviation vector is used to generate Gaussian random vectors zpostϵRD
The future trajectory prediction apparatus 1000 extracts Gaussian random vectors for each local route from the Gaussian probability distribution defined by the mean vector and standard deviation vector generated by Equation 5 or 6. In this case, the future trajectory prediction apparatus 1000 may determine the number of random vectors to be extracted in proportion to the local route selection probability. That is, the future trajectory prediction apparatus 1000 generates the Gaussian random vectors by reflecting the local route selection probability on the basis of the mean vector and standard deviation vector of the Gaussian probability distribution. Since as many future trajectories as the number of random vectors are generated, the number of future trajectories generated based on each local route is determined in proportion to the probability Pi(n) that the corresponding local route will be selected.
The future trajectory prediction apparatus 1000 generates different random vectors and then generates the future trajectories using Equation 7, and thus the same effect as sampling the future trajectories from modes of the probability distribution of the predicted future trajectories (modes of a probability distribution corresponding to the local route Lin) may be obtained.
In addition, in an artificial neural network learning process proposed in the present invention, future trajectories are generated using zpost, and in a test process, future trajectories are generated using zprior.
“Feature Extraction (FE)” in
Hereinafter, a method in which the future trajectory prediction apparatus 1000 trains a DNN for future trajectory prediction will be described.
The future trajectory prediction apparatus 1000 trains the DNN so that an evidence lower bound (ELBO) is minimized. Equation 8 represents an ELBO loss function (ELBO loss).
Here, β is an arbitrary constant and KL (∥) denotes Kullback-Leibler divergence (KLD). Q and P denote Gaussian distributions defined by outputs μ and σ of a recognizer network and prior network, respectively.
Further, the future trajectory prediction apparatus 1000 induces the DNN to learn the probability that the vehicle will select a specific local route, and the future trajectory prediction apparatus 1000 induces the DNN to learn the local route selection probability so that a binary cross entropy loss function as shown in Equation 9 is minimized.
Here, Pi is a predicted value of the probability that a vehicle Ai will select each local route, and is defined by Equation 4.
Therefore, a loss that the future trajectory prediction apparatus 1000 should finally minimize for training a DNN is defined as Equation 10.
Here, λ is an arbitrary constant.
The above-described future trajectory prediction method has been described with reference to the flowcharts illustrated in the drawings. For simplicity of description, the method has been illustrated and described as a series of blocks, but the present invention is not limited to the order of the blocks. Some blocks may occur simultaneously or in a different order than shown and described herein with other blocks, and various other branches, flow paths, and sequences of blocks that achieve the same or similar results may be implemented. Further, not all blocks shown may be required for implementation of the methods described herein.
Meanwhile, in the description referring to
Referring to
Therefore, the embodiments of the present invention may be implemented as a computer-implemented method or as a non-transitory computer-readable medium in which computer-executable instructions are stored. In one embodiment, when executed by the processor, the computer-readable instructions may perform the method according to at least one aspect of the present invention.
The communication device 1020 may transmit or receive wired signals or wireless signals.
Further, the method according to the embodiment of the present invention may be implemented in the form of program instructions that can be executed through various computer devices, and recorded on computer-readable media.
The computer-readable media may include program instructions, data files, data structures, or combinations thereof. The program instructions recorded on the computer-readable media may be specially designed and configured for the embodiments of the invention or may be instructions known and usable by those skilled in the field of computer software. The computer-readable media may include a hardware device that is configured to store and perform the program instructions. Examples of the computer-readable media include magnetic media such as a hard disk, a floppy disk, and a magnetic tape, optical media such as a compact disc read-only memory (CD-ROM) and a digital video disc (DVD), magneto-optical media such as a floptical disk, a ROM, a RAM, a flash memory, etc. Examples of the program instruction include machine code generated by a compiler and high-level language code that can be executed by a computer using an interpreter and the like.
Meanwhile, the content of
Further, the content of
While exemplary embodiments of the present invention and their advantages have been described above in detail, it should be understood that various changes, substitutions and alterations may be made herein without departing from the scope of the present invention as defined by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2023-0093528 | Jul 2023 | KR | national |
10-2023-0141326 | Oct 2023 | KR | national |