An intention trajectory prediction method combined with social generative adversarial network
By combining the intention trajectory prediction method of socially generated adversarial networks and long-term memory networks, the problem of simple interaction characteristics of socially generated adversarial networks between vehicles is solved. By identifying driver intentions and encoding lane change information, the accuracy of trajectory prediction is improved. and stability, achieving higher predictive performance.
Patent Information
- Application Number
- CN202010482632.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-01
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-06-01
AI Technical Summary
In the prior art, socially generated adversarial networks are simple in terms of inter-vehicle interaction characteristics, and fail to effectively consider the impact of driver behavior on vehicle trajectory, resulting in a low accuracy of trajectory prediction.
Using the intent trajectory prediction method combined with socially generated adversarial networks, the vehicle trajectory data is preprocessed, driving intentions are identified and feature vectors are generated, and the trajectory output module composed of generators and discriminators is used to combine long-term memory networks and multi-layer perceptrons. Encode historical trajectory information and driving intentions to predict future trajectories.
The accuracy and stability of vehicle trajectory prediction are improved, and the performance is better than traditional methods, especially in driver intention recognition and lane change information encoding. The experimental results show that the accuracy is the highest.
Smart Images

Figure CN111930110B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vehicle trajectory prediction, and in particular relates to an intention trajectory prediction method combined with a social generative adversarial network. Background Art
[0002] With the continuous increase in the number of cars, the traffic safety problems caused by it are becoming more and more serious. Although traditional automobile safety control systems can improve the safety of automobile driving to a certain extent, since such systems generally do not consider the factors of people and environment during the driving process of the car, their role is still very limited. Therefore, trajectory prediction based on neural networks has gradually become a hot spot in the field of trajectory prediction research. In view of the simple interaction characteristics between vehicles in the social generative adversarial network in the neural network method, and the impact of the driver's own behavior on the vehicle trajectory is not considered, an intention trajectory prediction method combined with the social generative adversarial network is invented to perform trajectory prediction tasks based on autonomous driving data sets, and better prediction results are achieved than existing studies. Vehicle trajectory prediction methods are mainly divided into three categories: trajectory prediction methods based on neural networks, trajectory prediction methods based on Markov models, and trajectory prediction based on frequent trajectory patterns. Among them, the trajectory prediction method based on the Markov model has low accuracy and high computational complexity; the trajectory prediction method based on frequent trajectory patterns can only be used for targets that follow similar paths every day in specific scenarios. Compared with the above trajectory prediction methods, the trajectory prediction method based on neural networks improves the defects of the above methods. Autonomous vehicles need to solve the following two problems: interaction between vehicles; and driver intention. In summary, in order to further improve the level of automobile intelligence, it is particularly important to use neural network trajectory prediction methods and predict driver behavior. Summary of the invention
[0003] The purpose of the present invention is to provide an intention trajectory prediction method combined with a social generative adversarial network, which solves the problem that the social generative adversarial network in the prior art has simple vehicle interaction characteristics and does not consider the impact of the driver's own behavior on the vehicle trajectory.
[0004] The technical solution adopted by the present invention is a method for predicting intention trajectories combined with a social generative adversarial network, which is specifically implemented according to the following steps:
[0005] Step 1: preprocess vehicle trajectory data;
[0006] Step 2: Identify driving intention based on the data preprocessed in step 1, mark the data, and generate a feature vector;
[0007] Step 3: The social generative adversarial network constitutes a trajectory output module. The encoding layer in the trajectory output module encodes the historical trajectory information into a context vector, and the decoding layer combines the context vector and the identified driving intention information to predict the future trajectory.
[0008] The present invention is also characterized in that:
[0009] The preprocessed vehicle trajectory data in step 1 is in, is the historical trajectory information of the predicted vehicle; E (t) is the environmental information; e represents the predicted vehicle; t represents the current time.
[0010] The historical trajectory information of the predicted vehicle in step 1 Among them, x (t) is the predicted vehicle lateral coordinate; y (t) is the longitudinal coordinate of the predicted vehicle; is the absolute speed of the predicted vehicle; t represents the current time; e represents the predicted vehicle.
[0011] The environmental information E( t ) consists of the historical trajectory information of the neighboring vehicles to the left, front, right, left, rear, and right of the predicted vehicle and two flags of the predicted vehicle, the two flags are the right lane flag Left lane sign Environmental Information (t) Expressed as
[0012]
[0013] In the formula, where Δx i (t) is the lateral relative distance between the vehicle at the i-th position and the predicted vehicle; i is a value between 1 and 6; t represents the current time; Δy i (t) is the longitudinal relative distance between the vehicle at the ith position and the predicted vehicle; is the absolute speed of the vehicle at the i-th position; is the right lane sign, r represents the right lane, where if the predicted vehicle has a right lane, then is 1, otherwise is 0; is the left lane sign, l represents the left lane, where if the predicted vehicle has a left lane, then is 1, otherwise is 0.
[0014] In step 2, the driving intention and data labeling are identified as follows: the trajectory segments are divided into three categories: left lane change, right lane change, and straight driving, and the corresponding labels are attached: left lane change is marked as 1, right lane change is marked as 2, and straight driving is marked as 3. The classification basis is: first, the intersection point of the vehicle trajectory and the lane line is found, and the intersection point is defined as the lane change point. The vehicle lateral coordinate x (t) and the vertical coordinate y (t) Calculate the vehicle's heading angle θ, which is expressed as
[0015]
[0016] Then, the heading angle θ of each sampling point is traversed from the lane change point in the reverse direction of the time axis. If |θ|≤θ of three consecutive sampling points in the trajectory sequence, s ,θ s represents the heading angle threshold of the lane change starting point, then the first time the threshold is reached is s The position of is defined as the starting point of lane change; finally, the heading angle θ of each sampling point is traversed from the positive direction of the time axis of the lane change point. If |θ|≤θ of three consecutive sampling points in the trajectory sequence e ,θ e represents the heading angle threshold of the lane change termination point, then the first time the threshold is reached is e The position of is defined as the lane change end point.
[0017] The specific steps of generating feature vectors in step 2 are as follows:
[0018] The preprocessed vehicle trajectory data I in step 1 (t) After being processed by the fully connected network, it is then input into the long short-term memory network. The fully connected network includes 128 neurons, and the activation function of the fully connected network is ReLU. The long short-term memory network reads the pre-processed vehicle trajectory data I at the current moment. (t) The hidden state of the historical trajectory information output at the previous moment is used to update the hidden state at the current moment. The hidden state at the current moment is input into the logistic regression function, and the probability matrix Ω = (ω1, ω2, ω3) is output, where ω1 represents the probability of changing lanes to the left, ω2 represents the probability of driving in a straight line, and ω3 represents the probability of changing lanes to the right. The classification cross entropy is used as the loss function to identify the driving intention. The optimizer uses the random optimization Adam algorithm, and the learning rate and decay rate are both set to 0.9. Finally, the probability matrix Ω = (ω1, ω2, ω3) is input into the fully connected network, and the fixed-length feature vector h is output. t .
[0019] In step 3, the trajectory output module consists of a generator and a discriminator. The generator includes an encoding layer, a decoding layer, and a pooling module. The discriminator consists of an encoding layer, a fully connected network, and a multi-layer perceptron. The trajectory output module is back-propagated and optimized through the loss function to reduce the loss value of each layer. The generator is based on the preprocessed vehicle trajectory data I (t) As input, the prediction result is output; the discriminator takes the prediction result as input and outputs the classification result. During training, the discriminator is trained once alone in each iteration, and then the generator is trained once alone.
[0020] Step 3 is as follows:
[0021] Step 3.1: pre-process the vehicle trajectory data I in step 1 (t) Input the encoding layer in the generator, obtain a fixed-length vector through the fully connected network, input it into the long short-term memory network, and output the hidden state of all vehicles;
[0022] Step 3.2: The pooling module includes a maximum pooling layer and a multi-layer perceptron. The hidden states of all vehicles are input into the pooling module to calculate the relative position information between vehicles at the current moment. The merged vector matrix is obtained through the multi-layer perceptron. The maximum value in the vector matrix is selected as the relative position information P between vehicles through the maximum pooling layer. t , where t represents the current moment, and then the randomly generated Gaussian noise Z is combined with the hidden state output by the encoding layer at the previous moment, the relative position information between vehicles P t , and the eigenvector h t Perform matrix addition to obtain the trajectory encoding vector r, which is used as the input of the decoding layer;
[0023] Step 3.3: Input the trajectory encoding vector r and the hidden state output by the decoding layer at the previous moment into the decoding layer, obtain the hidden state at the current moment through the long short-term memory network, and calculate the hidden state at each moment through the multi-layer perceptron to obtain the predicted trajectory point in represents the horizontal coordinate of the predicted trajectory point, Represents the longitudinal coordinate of the predicted trajectory point, t is a value between 1 and n, and n represents a natural number;
[0024] Step 3.4: Connect the actual trajectory of the vehicle to the corresponding predicted trajectory points Input the discriminator, convert it into a fixed-length vector through the fully connected layer, input the long short-term memory network for processing, and then input the multi-layer perceptron to obtain the classification result. The threshold of the true trajectory is set to [0.7~1.2]. After the calculation is completed, the discriminator determines whether the classification result belongs to the true trajectory according to the threshold;
[0025] Step 3.5: Calculate the loss value through the loss function: The loss function is composed of L GAN (G,D) function, LL2 (G) function consists of two parts, where G represents the generator, D represents the discriminator, and L GAN (G, D) represents the adversarial training loss value of the generator and the discriminator, L L2 (G) represents the actual trajectory and predicted trajectory points The minimum difference of L GAN (G,D) and L L2 The loss value of (G), the loss function L formula is:
[0026] L=L GAN (G,D)+λ·L L2 (G)
[0027] The adversarial training loss value L between the generator and the discriminator GAN The (G,D) formula is:
[0028]
[0029] Where: E is the expected value; D() represents the classification result output by the discriminator, where T is the true trajectory; G(I (t) ) represents the prediction result output by the generator; I (t) represents the preprocessed vehicle trajectory data, where t is the current time;
[0030] Real trajectory and predicted trajectory points The minimum difference L L2 (G) The formula is:
[0031]
[0032] Where k represents the number of sampling times; Y represents the actual trajectory corresponding to the predicted trajectory point; G(I (t) ) represents the prediction result output by the generator; I( t ) represents the preprocessed vehicle trajectory data, where t is the current time;
[0033] The purpose of the discriminator is to make D(T i ) is close to 1, let D(G(X i ,z)) is close to 0, so the discriminator should maximize L GAN (G,D), and the generator should minimize L GAN (G,D); Select multiple trajectories from the prediction results and select L L2 (G) The smallest trajectory is taken as the predicted trajectory point;
[0034] Step 3.6, repeat the above steps 3.1 to 3.5, and circulate the training alternately until the discriminator cannot distinguish the source of the sample. At this point, the training prediction is completed by combining the trajectory prediction method for identifying driving intentions in step 2.
[0035] The beneficial effect of the present invention is that a method for predicting intention trajectory combined with a social generative adversarial network is used to apply the generative adversarial network to the vehicle trajectory prediction problem, and an LSTM network is selected to implement the encoding layer-decoding layer structure. At the same time, in order to increase the stability of long-term prediction results, the recognition of driving intention is introduced, and the driver's lane change information is encoded into a feature vector to learn the vehicle operation law. This method is compared with the existing method through various comparative tests. The experimental results show that the driving intention recognition and trajectory prediction method based on the social generative adversarial network performs better than the existing related methods. Compared with different model structures, the method using the generative adversarial network has the highest accuracy; compared with the support vector machine (SVM) classifier, the classifier based on the LSTM network has better effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of trajectory prediction process in a method for predicting intention trajectories in combination with a social generative adversarial network of the present invention;
[0037] Figure 2 This is a network structure diagram of an intention trajectory prediction method combined with a social generative adversarial network of the present invention;
[0038] Figure 3 It is an LSTM neural network structure used in the intention trajectory prediction method combined with a social generative adversarial network in the present invention. DETAILED DESCRIPTION
[0039] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] The present invention provides a method for predicting intention trajectories by combining social generative adversarial networks, and the flowchart is as follows: Figure 1 As shown, the specific implementation steps are as follows:
[0041] Step 1: preprocess vehicle trajectory data;
[0042] The preprocessed vehicle trajectory data in step 1 is in, is the historical trajectory information of the predicted vehicle; E (t) is the environmental information; e represents the predicted vehicle; t represents the current time.
[0043] The historical trajectory information of the predicted vehicle in step 1 Among them, x (t) is the predicted vehicle lateral coordinate; y (t) is the longitudinal coordinate of the predicted vehicle; is the absolute speed of the predicted vehicle; t represents the current time; e represents the predicted vehicle.
[0044] The environmental information E( t ) consists of the historical trajectory information of the neighboring vehicles to the left, front, right, left, rear, and right of the predicted vehicle and two flags of the predicted vehicle, the two flags are the right lane flag Left lane sign Environmental Information (t) Expressed as
[0045]
[0046] In the formula, where Δx i (t) is the lateral relative distance between the vehicle at the i-th position and the predicted vehicle; i is a value between 1 and 6; t represents the current time; Δy i (t) is the longitudinal relative distance between the vehicle at the ith position and the predicted vehicle; is the absolute speed of the vehicle at the i-th position; is the right lane sign, r represents the right lane, where if the predicted vehicle has a right lane, then is 1, otherwise is 0; is the left lane sign, l represents the left lane, where if the predicted vehicle has a left lane, then is 1, otherwise is 0.
[0047] Step 2: Identify driving intention based on the data preprocessed in step 1, mark the data, and generate a feature vector;
[0048] like Figure 2 As shown in Figure 2, driving intention and data labeling are identified in step 2. Specifically, the trajectory segments are divided into three categories: left lane change, right lane change, and straight driving, and the corresponding labels are attached: left lane change is marked as 1, right lane change is marked as 2, and straight driving is marked as 3. The classification basis is: first, the intersection point of the vehicle trajectory and the lane line is found, and the intersection point is defined as the lane change point. The vehicle lateral coordinate x (t) and the vertical coordinate y (t) Calculate the vehicle's heading angle θ, which is expressed as
[0049]
[0050] Then, the heading angle θ of each sampling point is traversed from the lane change point in the reverse direction of the time axis. If |θ|≤θ of three consecutive sampling points in the trajectory sequence, s ,θ s represents the heading angle threshold of the lane change starting point, then the first time the threshold is reached is sThe position of is defined as the starting point of lane change; finally, the heading angle θ of each sampling point is traversed from the positive direction of the time axis of the lane change point. If |θ|≤θ of three consecutive sampling points in the trajectory sequence e ,θ e represents the heading angle threshold of the lane change termination point, then the first time the threshold is reached is e The position of is defined as the lane change end point.
[0051] The specific steps of generating feature vectors in step 2 are as follows:
[0052] The preprocessed vehicle trajectory data I in step 1 (t) After being processed by the fully connected network, it is then input into the long short-term memory network. The fully connected network includes 128 neurons, and the activation function of the fully connected network is ReLU. The long short-term memory network reads the pre-processed vehicle trajectory data I at the current moment. (t) The hidden state of the historical trajectory information output at the previous moment is used to update the hidden state at the current moment. The hidden state at the current moment is input into the logistic regression function, and the probability matrix Ω = (ω1, ω2, ω3) is output, where ω1 represents the probability of changing lanes to the left, ω2 represents the probability of driving in a straight line, and ω3 represents the probability of changing lanes to the right. The classification cross entropy is used as the loss function to identify the driving intention. The optimizer uses the random optimization Adam algorithm, and the learning rate and decay rate are both set to 0.9. Finally, the probability matrix Ω = (ω1, ω2, ω3) is input into the fully connected network, and the fixed-length feature vector h is output. t .
[0053] like Figure 3 As shown, in step 3, the social generative adversarial network constitutes a trajectory output module. The encoding layer in the trajectory output module encodes the historical trajectory information into a context vector, and the decoding layer combines the context vector and the identified driving intention information to predict the future trajectory.
[0054] In step 3, the trajectory output module consists of a generator and a discriminator. The generator includes an encoding layer, a decoding layer, and a pooling module. The discriminator consists of an encoding layer, a fully connected network, and a multi-layer perceptron. The trajectory output module is back-propagated and optimized through the loss function to reduce the loss value of each layer. The generator is based on the preprocessed vehicle trajectory data I (t) As input, the prediction result is output; the discriminator takes the prediction result as input and outputs the classification result. During training, the discriminator is trained once alone in each iteration, and then the generator is trained once alone.
[0055] Step 3 is as follows:
[0056] Step 3.1: pre-process the vehicle trajectory data I in step 1 (t) Input the encoding layer in the generator, obtain a fixed-length vector through the fully connected network, input it into the long short-term memory network, and output the hidden state of all vehicles;
[0057] Step 3.2: The pooling module includes a maximum pooling layer and a multi-layer perceptron. The hidden states of all vehicles are input into the pooling module to calculate the relative position information between vehicles at the current moment. The merged vector matrix is obtained through the multi-layer perceptron. The maximum value in the vector matrix is selected as the relative position information P between vehicles through the maximum pooling layer. t , where t represents the current moment, and then the randomly generated Gaussian noise Z is combined with the hidden state output by the encoding layer at the previous moment, the relative position information between vehicles P t , and the eigenvector h t Perform matrix addition to obtain the trajectory encoding vector r, which is used as the input of the decoding layer;
[0058] Step 3.3: Input the trajectory encoding vector r and the hidden state output by the decoding layer at the previous moment into the decoding layer, obtain the hidden state at the current moment through the long short-term memory network, and calculate the hidden state at each moment through the multi-layer perceptron to obtain the predicted trajectory point in represents the horizontal coordinate of the predicted trajectory point, Represents the longitudinal coordinate of the predicted trajectory point, t is a value between 1 and n, and n represents a natural number;
[0059] Step 3.4: Connect the actual trajectory of the vehicle to the corresponding predicted trajectory points Input the discriminator, convert it into a fixed-length vector through the fully connected layer, input the long short-term memory network for processing, and then input the multi-layer perceptron to obtain the classification result. The threshold of the true trajectory is set to [0.7~1.2]. After the calculation is completed, the discriminator determines whether the classification result belongs to the true trajectory according to the threshold;
[0060] Step 3.5: Calculate the loss value through the loss function: The loss function is composed of L GAN (G,D) function, L L2 (G) function consists of two parts, where G represents the generator, D represents the discriminator, and L GAN (G, D) represents the adversarial training loss value of the generator and the discriminator, L L2 (G) represents the actual trajectory and predicted trajectory points The minimum difference of L GAN (G,D) and L L2 The loss value of (G), the loss function L formula is:
[0061] L=L GAN (G,D)+λ·L L2 (G)
[0062] The adversarial training loss value L between the generator and the discriminator GAN The (G,D) formula is:
[0063]
[0064] Where: E is the expected value; D() represents the classification result output by the discriminator, where T is the true trajectory; G(I (t) ) represents the prediction result output by the generator; I (t) represents the preprocessed vehicle trajectory data, where t is the current time;
[0065] Real trajectory and predicted trajectory points The minimum difference L L2 (G) The formula is:
[0066]
[0067] Where k represents the number of sampling times; Y represents the actual trajectory corresponding to the predicted trajectory point; G(I (t) ) represents the prediction result output by the generator; I( t ) represents the preprocessed vehicle trajectory data, where t is the current time;
[0068] The purpose of the discriminator is to make D(T i ) is close to 1, let D(G(X i ,z)) is close to 0, so the discriminator should maximize L GAN (G,D), and the generator should minimize L GAN (G,D); Select multiple trajectories from the prediction results and select L L2 (G) The smallest trajectory is taken as the predicted trajectory point;
[0069] Step 3.6, repeat the above steps 3.1 to 3.5, and circulate the training alternately until the discriminator cannot distinguish the source of the sample. At this point, the training prediction is completed by combining the trajectory prediction method for identifying driving intentions in step 2.
[0070] The present invention provides an intention trajectory prediction method combining social generative adversarial network, and the embodiments are as follows:
[0071] The present invention is a method for predicting intention trajectories combined with a social generative adversarial network. Aiming at the problem of simple interaction characteristics between vehicles in the social generative adversarial network in the neural network method, the long short-term memory network LSTM is used to realize the recognition of the vehicle's lane change intention, and the social generative adversarial network is combined to predict the vehicle's future driving trajectory. The trajectory data comes from real road data collected in Beijing, which is collected using cameras and radars, and includes vehicles, pedestrians, bicycles and other motor vehicles and non-motor vehicles. Each road data file contains one minute of obstacle data, with a sampling frequency of 2 Hz per second, and each line of labeled data contains the vehicle's ID, position, size, direction, speed and acceleration information.
[0072] Preprocess vehicle trajectory data, including the predicted vehicle's historical trajectory information and environmental information. The historical trajectory information includes vehicle speed, lateral coordinates, and longitudinal coordinates; the environmental information includes the historical trajectory information of the predicted vehicle's left front, front, right front, left rear, rear, and right rear neighboring vehicles and the right lane marker. Left lane sign To identify driving intention, the pre-processed vehicle trajectory data needs to be divided into three categories: left lane change, right lane change and straight driving, and the corresponding marks are attached: left lane change is marked as 1, right lane change is marked as 2, and straight driving is marked as 3. Assuming that the lateral coordinate of the lane line is 5, then the lane change point is close to this coordinate, and the lane change point is calculated based on the lateral coordinate x of the vehicle. (t) and the vertical coordinate y (t) Calculate the vehicle heading angle θ. The horizontal coordinate is 5, the vertical coordinate is 4, and the horizontal coordinate of the vehicle 3 seconds ago was 2, and the vertical coordinate was 2, so the vehicle heading angle is 56°. Similarly, traverse the three sampling points in the reverse direction, and define the point that reaches the threshold of 60° for the first time as the lane change starting point; then traverse the three sampling points in the positive direction of the lane change point time axis, and define the point that reaches the threshold of 60° for the first time as the lane change end point. Finally, the preprocessed vehicle trajectory data is divided into three categories according to the lane change starting point and lane change end point: left lane change, right lane change, and straight driving, and the corresponding marks are attached as the input for identifying driving intentions.
[0073] The preprocessed vehicle trajectory data I in step 1 (t) After being processed by the fully connected network, it is then input into the long short-term memory network to output a 6*4 hidden state. The fully connected network includes 128 neurons, and the activation function of the fully connected network is ReLU. The hidden state is input into the logistic regression function, and a 3*1 probability matrix is output. Finally, the probability matrix is input into the fully connected network to output a 23*1 feature vector, recorded as h t .
[0074] The present invention uses a generative adversarial network. During each iteration of training, the discriminator is trained once, and then the generator is trained once. First, the discriminator is trained. The pre-processed vehicle trajectory data is input into the encoding layer to obtain a 23*1 fixed-length vector through the fully connected network, and then input into the long short-term memory network to output a 6*4 hidden state. The hidden state is input into the pooling module to obtain a 6*2 vector matrix, denoted as P t The Gaussian noise Z with normal distribution between [0-1] is combined with the hidden state output by the encoding layer at the previous moment and the relative position information P between vehicles. t , and the eigenvector h tPerform matrix addition to obtain a 23*1 trajectory encoding vector, denoted as r, as the input of the decoding layer. Input the trajectory encoding vector r into the long short-term memory network to obtain a 6*4 hidden state, and calculate the hidden state through a multi-layer perceptron to obtain a 10*2 predicted trajectory point. Connect the vehicle's actual trajectory to the corresponding trajectory prediction point, input the discriminator, and convert it into a 23*1 fixed-length vector through a fully connected layer. Input the long short-term memory network for processing and then input the multi-layer perceptron to obtain a classification result of [01.2]. Set the threshold of the true trajectory to [0.71.2]. The classification result within the threshold range is considered to be the true trajectory. By calculating the adversarial training loss value L between the generator and the discriminator GAN (G, D) Back propagation optimizes the discriminator. Then train the generator, pre-process the vehicle trajectory data and input it into the generator to get the prediction result, input the real trajectory and the corresponding predicted trajectory points into the discriminator, and calculate L GAN (G,D) and L L2 (G). By L GAN (G,D) and L L2 (G) Calculate L and optimize the generator by backpropagation based on L.
[0075] The present invention selects the long short-term memory network to realize the encoding layer-decoding layer structure. The long short-term memory network structure used in the experiment is Figure 3 , indicating that the activation function sigmoid is used as the forget gate and input gate, the activation function tanh is used as the output gate, and the number of hidden units is 128. The classification cross entropy is used as the loss function for identifying driving intentions, and the optimizer uses the random optimization Adam algorithm. The learning rate and decay rate are both set to 0.9. The Gaussian noise Z is a normal distribution with a dimension of 8. The discriminator and generator are set to be trained once each iteration.
Claims
1. A method for predicting intention trajectories by combining social generative adversarial networks, It is characterized in that Follow the steps below to implement it: Step 1: preprocess vehicle trajectory data; Step 2: Identify driving intention based on the data preprocessed in step 1, mark the data, and generate a feature vector; In step 2, the driving intention and data labeling are identified as follows: the trajectory segments are divided into three categories: left lane change, right lane change and straight driving, and the corresponding labels are attached: left lane change is marked as 1, right lane change is marked as 2, and straight driving is marked as 3. The classification basis is: first, the intersection point of the vehicle trajectory and the lane line is obtained, and the intersection point is defined as the lane change point. The vehicle lateral coordinate x (t) and the vertical coordinate y (t) Calculate the vehicle's heading angle θ, which is expressed as Then, the heading angle θ of each sampling point is traversed from the lane change point in the reverse direction of the time axis. If the trajectory sequence has |θ≤θ for three consecutive sampling points, s ,θ s represents the heading angle threshold of the lane change starting point, then the first time the threshold is reached is s The position is defined as the lane change starting point; Finally, the heading angle θ of each sampling point is traversed from the positive direction of the time axis of the lane change point. If the trajectory sequence has three consecutive sampling points with |θ≤θ e ,θ e represents the heading angle threshold of the lane change termination point, then the first time the threshold is reached is e The position is defined as the lane change end point; The feature vector generated in step 2 is specifically as follows: The preprocessed vehicle trajectory data I in step 1 (t) After being processed by the fully connected network, it is then input into the long short-term memory network. The fully connected network includes 128 neurons, and the activation function of the fully connected network is ReLU. The long short-term memory network reads the pre-processed vehicle trajectory data I at the current moment. (t) And the hidden state of the historical trajectory information output at the previous moment, to update the hidden state at the current moment, input the hidden state at the current moment into the logistic regression function, and output the probability matrix Ω=(ω 1 ,ω 2 ,ω 3 ), where ω 1 represents the probability of changing lane to the left, ω 2 represents the probability of straight-line driving, ω 3 represents the probability of changing lanes to the right. The classification cross entropy is used as the loss function to identify the driving intention. The optimizer uses the random optimization Adam algorithm. The learning rate and decay rate are both set to 0.
9. Finally, the probability matrix Ω=(ω 1 ,ω 2 ,ω 3 ) Input the fully connected network and output a fixed-length feature vector h t ; Step 3: The social generative adversarial network forms a trajectory output module. The encoding layer in the trajectory output module encodes the historical trajectory information into a context vector. The decoding layer combines the context vector and the identified driving intention information to predict the future trajectory. In step 3, the trajectory output module consists of a generator and a discriminator. The generator includes a coding layer, a decoding layer and a pooling module. The discriminator consists of a coding layer, a fully connected network and a multi-layer perceptron. The trajectory output module is back-propagated and optimized through a loss function to reduce the loss value of each layer. Generator to preprocess vehicle trajectory data I (t) As input, the prediction result is output; the discriminator takes the prediction result as input and outputs the classification result. During training, the discriminator is trained once separately in each iteration, and then the generator is trained once separately. The step 3 is as follows: Step 3.1: pre-process the vehicle trajectory data I in step 1 (t) Input the encoding layer in the generator, obtain a fixed-length vector through the fully connected network, input it into the long short-term memory network, and output the hidden state of all vehicles; Step 3.2: The pooling module includes a maximum pooling layer and a multi-layer perceptron. The hidden states of all vehicles are input into the pooling module to calculate the relative position information between vehicles at the current moment. The merged vector matrix is obtained through the multi-layer perceptron. The maximum value in the vector matrix is selected as the relative position information P between vehicles through the maximum pooling layer. t , where t represents the current moment, and t is a value between 1 and n. Then the randomly generated Gaussian noise Z is combined with the hidden state output by the encoding layer at the previous moment, the relative position information between vehicles P t , and the eigenvector h t Perform matrix addition to obtain the trajectory encoding vector m, which is used as the input of the decoding layer; Step 3.3: Input the trajectory encoding vector m and the hidden state output by the decoding layer at the previous moment into the decoding layer, obtain the hidden state at the current moment through the long short-term memory network, and calculate the hidden state at each moment through the multi-layer perceptron to obtain the predicted trajectory point in represents the horizontal coordinate of the predicted trajectory point, Represents the longitudinal coordinate of the predicted trajectory point, t represents the current time, t is a value between 1 and n, and n represents a natural number; Step 3.4: Connect the actual trajectory of the vehicle to the corresponding predicted trajectory points Input the discriminator, convert it into a fixed-length vector through the fully connected layer, input the long short-term memory network for processing, and then input the multi-layer perceptron to obtain the classification result. The threshold of the true trajectory is set to [0.7~1.2]. After the calculation is completed, the discriminator determines whether the classification result belongs to the true trajectory according to the threshold; Step 3.5: Calculate the loss value through the loss function: The loss function is composed of L GAN (G,D) function, L L2 (G) function consists of two parts, where G represents the generator, D represents the discriminator, and L GAN (G, D) represents the adversarial training loss value of the generator and the discriminator, L L2 (G) represents the actual trajectory and predicted trajectory points The minimum difference of L GAN (G,D) and L L2 The loss value of (G), the loss function L formula is: L=L GAN (G,D)+λ·L L2 (G) The adversarial training loss value L between the generator and the discriminator GAN The (G,D) formula is: Where: E is the expected value; D() represents the classification result output by the discriminator, where T is the true trajectory; G(I (t) ) represents the prediction result output by the generator; I ( t ) represents the preprocessed vehicle trajectory data, where t is the current time; Real trajectory and predicted trajectory points The minimum difference L L2 (G) The formula is: Where k represents the number of sampling times; Y represents the actual trajectory corresponding to the predicted trajectory point; G(I (t) ) represents the prediction result output by the generator; I( t ) represents the preprocessed vehicle trajectory data, where t is the current time; The purpose of the discriminator is to make D(T i ) is close to 1, let D(G(X i ,z)) is close to 0, so the discriminator should maximize L GAN (G,D), and the generator should minimize L GAN (G,D); Select multiple trajectories from the prediction results and select L L2 (G) The smallest trajectory is taken as the predicted trajectory point; Step 3.6, repeat the above steps 3.1 to 3.5, and circulate the training alternately until the discriminator cannot distinguish the source of the sample. At this point, the training prediction is completed by combining the trajectory prediction method for identifying driving intentions in step 2.
2. According to claim 1, a method for predicting intention trajectories combined with a social generative adversarial network, It is characterized in that The preprocessed vehicle trajectory data in step 1 is: in, is the historical trajectory information of the predicted vehicle; E (t) is the environmental information; e represents the predicted vehicle; t represents the current time.
3. According to claim 2, a method for predicting intention trajectories combined with a social generative adversarial network, It is characterized in that The historical trajectory information of the vehicle predicted in step 1 Among them, x (t) is the predicted vehicle lateral coordinate; y (t) is the longitudinal coordinate of the predicted vehicle; is the absolute speed of the predicted vehicle; t represents the current moment, and t is a value between 1 and n; e represents the predicted vehicle.
4. The intention trajectory prediction method combined with a social generative adversarial network according to claim 2, It is characterized in that The environmental information E( t ) consists of the historical trajectory information of the neighboring vehicles to the left, front, right, left, rear, and right of the predicted vehicle and two flags of the predicted vehicle, the two flags are the right lane flag Left lane sign Environmental Information (t) Expressed as In the formula, in is the lateral relative distance between the vehicle at the i-th position and the predicted vehicle; i is a value between 1 and 6; t represents the current time; Δy i (t) is the longitudinal relative distance between the vehicle at the ith position and the predicted vehicle; is the absolute speed of the vehicle at the i-th position; is the right lane sign, r represents the right lane, where if the predicted vehicle has a right lane, then is 1, otherwise is 0; is the left lane sign, l represents the left lane, where if the predicted vehicle has a left lane, then is 1, otherwise is 0.
