End-to-end multi-modal trajectory prediction method based on dynamic graph convolution

By using the DG-Trajector network model, dynamic graph convolution and multi-head attention mechanisms are employed to extract trajectory features, generate and filter trajectory endpoint information, and solve the problem of insufficient capture of interaction relationships in dynamic environments by traditional trajectory prediction methods, thus achieving more efficient and accurate trajectory prediction.

CN118885753APending Publication Date: 2024-11-01GUANGXI NORMAL UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410983125.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

Traditional trajectory prediction methods are limited by static scene representation and cannot effectively capture the complex interaction relationships between agents in dynamic environments, resulting in a lack of robustness and accuracy in the prediction results.

Method used

An end-to-end multimodal trajectory prediction method based on dynamic graph convolution is adopted. The DG-Trajector network model, including the DGANet feature extraction module, endpoint generation module and trajectory prediction module, is used to extract trajectory features by dynamic graph convolution and multi-head attention mechanism, generate trajectory endpoint information and perform scoring and screening.

Benefits of technology

It effectively captures the spatiotemporal correlation information of trajectory data in dynamic environments, improves the accuracy and efficiency of trajectory prediction, and solves the performance deficiencies of traditional methods in complex interactive situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885753A_ABST
    Figure CN118885753A_ABST
Patent Text Reader

Abstract

The invention provides an end-to-end multi-modal trajectory prediction method based on dynamic graph convolution, the prediction method is realized through a DG-Trajector network model, the DG-Trajector network model comprises a DGANet feature extraction module, an end point generation module and a trajectory prediction module, the DGANet feature extraction module carries out feature coding and feature extraction on vectorized features, and the end point generation module carries out feature extraction on the vectorized features; and inputting the extracted features and the anchor points into an end point generation module, further generating position information of track end points, and finally predicting a group of tracks by utilizing the generated track end point information through a track prediction module. Besides, the DG-Trajector model comprehensively considers endpoint loss, prediction loss and prediction score loss, target prediction and trajectory prediction tasks can be comprehensively optimized, and the performance and generalization ability of the model are improved, so that the DG-Trajector model can better adapt to various complex actual scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of machine learning and computer vision, and relates to the technical field of trajectory prediction and analysis, and in particular to an end-to-end multimodal trajectory prediction method based on dynamic graph convolution. Background Art

[0002] In order to realize intelligent transportation systems and smart cities, improve the safety and reliability of autonomous driving systems, and reduce the incidence of traffic accidents, trajectory prediction in the field of autonomous driving has become a concern. Traditional trajectory prediction methods are often limited to static scene representations and cannot effectively capture the complex interactions between agents in dynamic environments. Secondly, traditional methods often have difficulty handling uncertain and multimodal prediction results, resulting in a lack of robustness and accuracy in prediction results. Summary of the invention

[0003] In view of the above, it is necessary to provide an end-to-end multimodal trajectory prediction method based on dynamic graph convolution, which is used to accurately predict the vehicle trajectory. The vectorized features are encoded and extracted through the DGANet feature extraction module, and the extracted features and anchor points are input into the endpoint generation module to further generate the position information of the trajectory endpoints. Finally, the trajectory prediction module is used to predict a set of trajectories using the generated trajectory endpoint information.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is:

[0005] An end-to-end multimodal trajectory prediction method based on dynamic graph convolution is implemented by a DG-Trajector network model, which includes a DGANet feature extraction module, an endpoint generation module and a trajectory prediction module; the prediction method includes the following steps:

[0006] Step S1, training the DG-Trajector network model;

[0007] Step S2, input trajectory data into the DG-Trajector network model for preprocessing, obtain a vector polyline set by preprocessing, and also sample anchor points;

[0008] Step S3, the vector polyline set is input into the DGANet feature extraction module to obtain vectorized features, and the DGANet feature extraction module then performs feature encoding and feature extraction on the vectorized features to obtain global features;

[0009] Step S4: Use the endpoint generation module to combine the global features and anchor points to generate a set of candidate endpoints and endpoint confidences, and select the top n optimal endpoints according to the confidences to generate trajectory endpoint information;

[0010] Step S5: The generated track endpoint information is combined with the global features through the trajectory prediction module to generate a set of candidate trajectories, which are input into the trajectory scorer for scoring. The K trajectories with the highest scores are selected as the final prediction results according to the scoring results.

[0011] Step S6: calculate the endpoint loss according to the endpoint confidence obtained in step S4, and calculate the prediction loss and prediction score loss according to the prediction result obtained in step S5; when the calculated endpoint loss, prediction loss, and prediction score loss all reach the minimum threshold or fluctuate within a small range, the prediction trajectory obtained in step S5 is the final prediction result, otherwise continue training.

[0012] Furthermore, in step S1, during training, the train dataset in the Argoverse prediction dataset is used as the training set, and the val dataset is used as the validation set for verification.

[0013] Furthermore, the DG-Trajector network model uses VectorNet data representation in a structured way to represent maps and agents using vector representations during preprocessing, creating an independent connectivity graph for each scene element, where trajectory data and map information are converted into polylines to form a vector polyline set, and lane centerline points are sampled as candidate locations for anchor points.

[0014] Furthermore, the DGANet feature extraction module is mainly composed of multi-layer dynamic graph convolution layers and multi-head attention mechanisms. The structure of each layer of dynamic graph convolution layers is the same. The multi-layer dynamic graph convolution layers integrate the input vectorized features, and then use the multi-head attention mechanism to model the global relationship between different polylines and output global features.

[0015] Furthermore, in the DGANet feature extraction module, each dynamic graph convolution layer includes a convolution layer, a normalization layer and an activation function; in each dynamic graph convolution layer, the input original polyline features are first converted into a higher-level abstract representation through a linear layer and normalized, and then a dynamic adjacency matrix is ​​generated according to the normalized polyline features, and a softmax operation is performed on the dynamic adjacency matrix to generate an attention score, and the attention score is multiplied by the normalized polyline features to obtain a weighted feature, which is then convolved with the dynamic adjacency matrix graph, and then the polyline feature distribution after activation function and regularization, plus nonlinear transformation, the generated intermediate polyline features are spliced ​​with the normalized polyline features to obtain the final polyline features of this layer of dynamic graph convolution layer.

[0016] Furthermore, all the polyline features obtained after the dynamic graph convolution layer are globally aggregated through batch encoding and aggregation operations, and the global tensor is obtained through the linear layer and activation function. The global tensor is calculated by the calculation formula of the multi-head attention mechanism to obtain the global feature. The calculation formula of the multi-head attention mechanism is:

[0017]

[0018] Among them, VQ h (L g ), VK h (L g ) and VV h (L g ) are the node feature matrices V(L g ) is the linear projection of the head h of the attention head, and d is the dimension of each attention head.

[0019] Furthermore, the endpoint generation module of step S4 includes an endpoint corrector, a confidence evaluator, and a series of linear layers and activation functions; when the endpoint generation module combines the global feature and the anchor point, the global feature is first expanded multiple times in the second dimension, the number of times being the same as the number of anchor points, to obtain the expanded feature, which is spliced ​​with the anchor point, and after splicing, it is processed by a linear layer and normalization to obtain the target feature of the endpoint generation module; then, the endpoint corrector generates the correction amount and confidence of the endpoint position according to the target feature, specifically, after the target feature is processed by a linear layer and normalization, it is mapped to the correction amount space through a series of linear transformations and activation functions to obtain the correction amount of the target position, and the correction amount is added to the anchor point to obtain the final target position feature, at the same time, the confidence evaluator maps the target feature to the confidence score space through linear transformations and activation functions to obtain the confidence score of each endpoint position after the dimensionality reduction operation; the endpoint generation module then selects the top n targets as the optimal endpoints according to the confidence score, and extracts the corresponding anchor point, offset and endpoint to generate trajectory endpoint information.

[0020] Furthermore, the trajectory prediction module of step S5 includes a trajectory predictor and a trajectory scorer; the trajectory predictor combines the target features and global features of the trajectory endpoint information, performs feature transformation through a linear layer and an activation function, combines the transformed features with the target features again, obtains an intermediate representation of the trajectory features, and finally outputs the predicted trajectory through a linear layer to obtain a group of candidate trajectories; the trajectory scorer flattens the trajectory features of the candidate trajectories, combines the flattened trajectory features with the global features, performs feature transformation through a linear layer and an activation function, combines the transformed features with the flattened trajectory features again, and finally outputs the scores of the candidate trajectories through a linear layer; the trajectory prediction module selects the top K trajectories as the final predicted trajectories according to the scoring results.

[0021] Furthermore, the endpoint loss L in step S6 is Endpoint It is calculated by the following endpoint loss function:

[0022]

[0023] L Endpoint =L offset +L confs

[0024] Where P closest Represents the endpoint set P p The distance to the true endpoint P extracted from gt The nearest element, H δ represents the Huber loss with parameter δ, represents the predicted endpoint offset; BCE represents the binary cross entropy loss, YesP closest The index of the element, expressed in onehot format, is the confidence of each predicted endpoint, L offset Indicates the offset loss, L confs Represents the confidence loss.

[0025] Furthermore, the prediction loss L in step S6 is trajde It is calculated by the prediction loss function, and the prediction score loss is calculated by the prediction score loss function; among them,

[0026] The prediction loss function is:

[0027]

[0028] In the formula, H δ represents the Huber loss with parameter δ, T traj It is the real trajectory. is the predicted trajectory;

[0029] The prediction score loss function is:

[0030]

[0031] In the formula, It represents the similarity between the predicted trajectory and the true trajectory value, which is represented by the maximum distance of all paired points between the predicted trajectory and the true trajectory value. BCE represents the binary cross entropy loss. represents the true confidence probability, represents the prediction confidence probability, L sorce Represents the trajectory confidence.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] 1. The present invention uses dynamic graph convolution to extract local polyline features, adapts to polyline data of different shapes and structures through the learned dynamic adjacency matrix, and performs graph convolution operations on this basis, which can effectively capture the feature information of local polyline and has strong generalization ability and applicability.

[0034] 2. The present invention uses a multi-head attention mechanism to extract global features, which can effectively model the global relationship between different polylines, thereby abstracting more advanced polyline structure information, which helps to extract feature representations with more semantics and context.

[0035] 3. The present invention uses an endpoint generation module and a trajectory prediction module, which can generate and screen endpoint positions according to global features, further generate candidate trajectories and screen them through trajectory scores, avoiding multiple iterations and optimization processes, and improving the efficiency and speed of trajectory prediction.

[0036] 4. The DG-Trajector network model used in the prediction method of the present invention can solve the problem that the traditional trajectory prediction method is limited to static scene representation and cannot effectively capture the complex interaction relationship between intelligent agents in a dynamic environment. It achieves excellent performance in complex interaction situations. Among them, the DGANet module of the DG-Trajector network model combines the generation of a dynamic adjacency matrix on the basis of a multi-head attention mechanism, and effectively captures the spatiotemporal correlation information in the trajectory data by performing feature extraction and dynamic relationship modeling on the input trajectory data. In addition, the model adopts a modular design, which makes the model highly flexible and scalable. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is the DG-Trajector network flow chart of the present invention;

[0038] Figure 2 It is the structural diagram of DGANet in the present invention;

[0039] Figure 3 It is a structural diagram of the dynamic graph convolution (DGConvLayer) in the present invention;

[0040] Figure 4 This is a flow chart of the endpoint generation and trajectory prediction module in the present invention;

[0041] Figure 5 This is the visualization result of the verification of the present invention on the Argoverse verification set.

[0042] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0043] See also Figures 1 to 5 In a preferred embodiment of the present invention, an end-to-end multimodal trajectory prediction method based on dynamic graph convolution is implemented by a DG-Trajector network model, which includes a DGANet feature extraction module, an endpoint generation module and a trajectory prediction module. The prediction method includes the following steps:

[0044] Step S1: Train the DG-Trajector network model. During training, the train dataset in the Argoverse prediction dataset is used as the training set, and the val dataset is used as the validation set for verification.

[0045] Step S2: Input trajectory data to the DG-Trajector network model for preprocessing, and obtain a vector polyline set by preprocessing, and also sample anchor points. Specifically, when preprocessing the input trajectory data, the VectorNet data representation method is used to represent the map and the agent in a structured manner using vector representation, and a connected graph is created independently for each scene element, wherein the trajectory data and map information are converted into polylines to form a vector polyline set, and the lane centerline points are sampled as candidate locations for anchor points. These centerlines represent the paths that the vehicle may travel along the road.

[0046] That is to say, in the process of forming a vector polyline set, all entities in the scene are approximated as polylines defined by multiple control points, and all of these polylines can be represented as a set of vectors. For example, the geographic range of a road feature can be a point, polygon, or curve in geographic coordinates: a lane can be represented as a spline consisting of multiple control points; an intersection can be regarded as a polygon; a road sign is a point. For map features, a starting point and direction are selected, and key points are sampled uniformly on the spline at the same spatial distance, and adjacent key points are connected in series to form vectors; for trajectories, key points are sampled at fixed time intervals (such as 0.1 seconds) and connected to form vectors. When the given time-space interval is small enough, the polyline can be approximated to the original map and trajectory.

[0047] When the candidate positions of the anchor points are determined, the points on the lane centerline are collected, because the centerline represents the path that the vehicle may travel along the road. For each candidate anchor point, a polyline or curve method is used to approximate the vehicle's driving path based on the lane centerline points near it. Among them, the polyline sampling algorithm (such as straight driving) generates straight line segments between the lane centerline points to approximate the vehicle's driving path. The polyline sampling algorithm samples a certain number of points on each polyline at equal intervals as anchor points. The curve sampling algorithm performs curve fitting on each polyline for the curve that fits the polyline, and samples a certain number of points on the fitting curve at equal intervals as anchor points. The points sampled on each polyline are aggregated together to form an anchor point set. These anchor point positions simulate the possible driving trajectory of the vehicle, and the last anchor point is selected as the final position where the vehicle may appear. In implementation, for each candidate anchor point, the difference with other anchor points is calculated to ensure that the generated anchor points are not repeated.

[0048] The vector polyline set and anchor points obtained through preprocessing are respectively used in the DGANet feature extraction module and the endpoint generation module, as shown in step S3 and step S4.

[0049] Step S3: The vector polyline set is input into the DGANet feature extraction module to obtain vectorized features. The DGANet feature extraction module then performs feature encoding and feature extraction on the vectorized features to obtain global features.

[0050] Specifically, the DGANet feature extraction module is mainly composed of a multi-layer dynamic graph convolution layer and a multi-head attention mechanism, wherein each layer of the dynamic graph convolution layer has the same structure, and the multi-layer dynamic graph convolution layer integrates the input vectorized features, and then models the global relationship between different broken lines through the multi-head attention mechanism, and outputs the global features. That is to say, the DGANet feature extraction module of the present invention is mainly composed of two parts: the first part is a multi-layer dynamic graph convolution, which is set to four layers in this embodiment, and the specific structure of each layer is as follows: Figure 3 As shown; the second part is the multi-head attention mechanism, which is used to extract global features.

[0051] See also Figure 2 and Figure 3Each dynamic graph convolution layer includes a convolution layer, a normalization layer, and an activation function. In each dynamic graph convolution layer, the input original polyline features are first converted into a higher-level abstract representation through a linear layer, and then normalized to facilitate the network to learn richer feature information through a higher-level abstract representation. Normalization can enhance the representation ability of features. Then, a dynamic adjacency matrix is ​​generated based on the normalized polyline features, and a softmax operation is performed on the dynamic adjacency matrix to generate an attention score. The attention score is multiplied with the normalized polyline features to obtain a weighted feature. The weighted feature is then convolved with the dynamic adjacency matrix graph, and then the polyline feature distribution after activation function and regularization is normalized, and the generated intermediate polyline features are spliced ​​with the normalized polyline features by nonlinear transformation to obtain the final polyline features of this layer of dynamic graph convolution layer. That is, local spatial information is extracted through graph convolution operation, and before performing graph convolution operation, the present invention first initializes a learnable dynamic adjacency matrix based on the input polyline features (that is, the normalized polyline features) to represent the relationship between each point in the polygon. For example, according to the polyline feature tensor x, a [20,20] dynamic adjacency matrix A is initialized, and the matrix A is subjected to softmax operation to generate an attention score, and the polyline feature tensor x is multiplied by the attention score to obtain weighted features, and then the obtained weighted features and the dynamic adjacency matrix A are passed to the GCN feature extraction module for graph convolution operation to realize the conversion and extraction of the input features, and the output result of the dynamic graph convolution layer of this layer is obtained by splicing.

[0052] The graph convolution operation is performed in sequence according to the number of layers of the dynamic graph convolution layer in the DGANet feature extraction module to achieve step-by-step deep feature extraction. For example, in this embodiment, for a four-layer dynamic graph convolution layer, four graph convolution operations are performed according to the above method. In this way, when the input feature is [4,200,20,14], after four layers of dynamic graph convolution, the output features of each layer of dynamic graph convolution layer are [4,200,20,28], [4,200,20,56], [4,200,20,112], [4,200,20,224] respectively.

[0053] In this way, after multi-layer feature extraction and feature representation of time series information fusion, the DG-Trajector network of the present invention has richer semantic information and better time series modeling capability.

[0054] All polyline features are batch encoded and aggregated, and finally integrated into a tensor for global aggregation. They are processed through a linear layer and a ReLU activation function as the final global tensor with a shape of [4,200,20,224].

[0055] All the polyline features obtained after the dynamic graph convolution layer are globally aggregated through batch encoding and aggregation operations, and integrated into a tensor. After processing through the linear layer and ReLU activation function, the final global tensor is obtained, such as a global tensor with a shape of [4,200,20,224]. The global tensor is a representation of a graph, and its global features are calculated through the calculation formula of the multi-head attention mechanism, that is, the multi-head attention mechanism is applied to capture the global relationship and context information between polylines. The calculation formula of the multi-head attention mechanism is:

[0056]

[0057] Among them, VQ h (L g ), VK h (L g ) and VV h (L g ) are the node feature matrices V(L g ) is the linear projection of the head h of the attention head, and d is the dimension of each attention head.

[0058] Specifically, in the multi-head attention mechanism, the query, key, and value are calculated, and then the features are weighted and summed through the attention weights. The query, key, and value are reshaped into a multi-head format, the dot product of the query and key is calculated, and normalized through the softmax operation to obtain the attention weights. Then, the value is weighted and summed according to the attention weights to obtain the weighted features. The weighted features are reshaped back to their original shape, and then further processed through linear layers and activation functions to obtain attention features. Finally, the original features (that is, the global tensor) and the attention features are spliced ​​to obtain the global features.

[0059] In this embodiment, the global tensor obtained by processing the multi-layer dynamic graph convolution layer has a shape of [4,200,20,224]. It is input into the multi-head attention mechanism. The shape of query, key, and value of the multi-head attention mechanism is [4,200,20,224]. After being reshaped into a multi-head format, the shape is [4*16,200,14], where 16 is the number of attention heads. The dot product of query and key is calculated and normalized by a softmax operation to obtain the attention weights, which has a shape of [64,200,200]. According to weights, the value is weighted and summed to obtain the weighted features features, which has a shape of [64,200,14]. The features are reshaped back to their original shape to obtain [4,200,20,224]. Further processing is performed through a linear layer and an activation function to obtain the attention feature. Finally, the global tensor and the attention feature are concatenated to obtain the global feature with a shape of [4, 128], where 128 is the output feature dimension of the linear layer.

[0060] That is, the global feature generated after the multi-head attention mechanism is a tensor, which contains the global context information of the input polyline and the relationship between it and other polylines. Therefore, the prediction method of the present invention combined with dynamic graph convolution and multi-head attention mechanism can make full use of local polyline features and global polyline relationships.

[0061] Step S4: Use the endpoint generation module to combine the global features and anchor points to generate a set of candidate endpoints and endpoint confidences, and select the top n optimal endpoints based on the confidences to generate trajectory endpoint information. This process is completed through a neural network composed of multiple linear layers, including some parameterized corrections and confidence calculations. The step-by-step prediction of the endpoints and the entire trajectory is introduced to comprehensively consider information at different levels.

[0062] Specifically, the endpoint generation module includes an endpoint corrector, a confidence evaluator, and a series of linear layers and activation functions. When combining global features and anchor points, the endpoint generation module first expands the global features in the second dimension multiple times, the same number of times as the number of anchor points, to obtain the expanded features, which are then concatenated with the anchor points. After concatenation, the linear layer and normalization are performed to obtain the target features of the endpoint generation module. The target features contain preliminary prediction information of the endpoint position, which provides a basis for subsequent endpoint correction and confidence evaluation. Next, the endpoint corrector generates the correction value and confidence of the endpoint position based on the target features. Specifically, after the target features are processed by the linear layer and normalization, they are mapped to the correction value space through a series of linear transformations and activation functions to obtain the correction value of the target position. The correction value is added to the anchor point to obtain the final target position feature. At the same time, the confidence evaluator maps the target features to the confidence score space through linear transformation and activation function to obtain the confidence score of each endpoint position after the dimensionality reduction operation; the endpoint generation module then selects the top n targets as the optimal endpoints based on the confidence scores, and extracts the corresponding anchor points, offsets and endpoints to generate trajectory endpoint information.

[0063] In order to further illustrate the endpoint generation module of the present invention, an example will be given in combination with the above data processing:

[0064] The global feature output by the DGANet feature extraction module, with a shape of [4,128], is input into the endpoint generation module. At the same time, 75 anchor points are also input into the endpoint generation module. In the endpoint generation module, the global feature is repeatedly expanded 75 times in the second dimension to obtain the expanded feature with a shape of [4,75,256]. This feature is concatenated with the anchor point to obtain a shape of [4,75,258]. After the linear layer and normalization processing, the target feature is obtained with a shape of [4,75,64]. In the endpoint corrector, the target feature is first processed by a linear layer and layer normalization to obtain a shape of [4,75,128]; then, the correction amount offsets of the target position is obtained through a linear layer, and the shape is [4,75,2]. The final target position feature is obtained by adding offsets to the anchor point, and the shape is [4,75,2]. While obtaining the correction amount, confidences is obtained through another linear layer, and the shape is [4,75,1]. A squeeze operation is performed on the last dimension to become [4,75]; finally, the first n targets are selected as the optimal endpoints according to confidences, and the corresponding anchor points, offsets and endpoints are extracted to generate trajectory endpoint information, which is input into the trajectory prediction module for trajectory prediction, as shown in step S5.

[0065] Step S5: The trajectory prediction module combines the generated trajectory endpoint information with the global features to generate a set of candidate trajectories, which are input into the trajectory scorer for scoring, and the K trajectories with the highest scores are selected as the final prediction results according to the scoring. That is, the trajectory prediction module uses the generated trajectory endpoint information to predict the future direction of the trajectory through another neural network model, Trajectory Forecaster.

[0066] Specifically, the trajectory prediction module includes a trajectory predictor and a trajectory scorer; the trajectory predictor combines the target features and global features of the trajectory endpoint information, performs feature transformation through a linear layer and an activation function, combines the transformed features with the target features again, obtains an intermediate representation of the trajectory features, and finally outputs the predicted trajectory through a linear layer to obtain a set of candidate trajectories; the trajectory scorer flattens the trajectory features of the candidate trajectories, combines the flattened trajectory features with the global features, performs feature transformation through a linear layer and an activation function, combines the transformed features with the flattened trajectory features again, and finally outputs the scores of the candidate trajectories through a linear layer; the trajectory prediction module selects the top K trajectories as the final predicted trajectories based on the scoring results. For this embodiment, through the above processing, the predicted trajectory obtained is a tensor with a shape of [8, N, trajectory length, 2], which represents the trajectory corresponding to each target position. The score of the output candidate trajectory is a tensor with a shape of [batch size, ntrajectories], which represents the score of each trajectory. The top K trajectories obtained by screening are tensors with a shape of [batch size, ntrajectories, trajectory length, 2].

[0067] In this way, the feature decoding part composed of the endpoint generation module and the trajectory prediction module can combine the features extracted by the DGANet feature extraction module with the pre-sampled anchor points to further generate the location information of the trajectory endpoints, and use the generated trajectory endpoint information to predict the future direction of the trajectory.

[0068] In addition, in order to enable the DG-Trajector network model of the present invention to comprehensively optimize the target prediction and trajectory prediction tasks, improve the performance and generalization ability of the model, and thus better adapt to various complex practical scenarios, the present invention also comprehensively considers endpoint loss, prediction loss and prediction score loss, so as to guide the training process of the model by calculating various losses and optimize the network, as shown in step S6.

[0069] Step S6, calculate the endpoint loss according to the endpoint confidence obtained in step S4, and calculate the prediction loss and prediction score loss according to the prediction result obtained in step S5; when the calculated endpoint loss, prediction loss and prediction score loss all reach the minimum threshold or fluctuate within a small range, the predicted trajectory obtained in step S5 is the final prediction result, otherwise continue training to retrain the model, and perform feature encoding, extraction and trajectory prediction.

[0070] In this step, endpoint loss is used to quantify the accuracy of endpoint position estimation; prediction loss is used to measure the distance between the trajectory predicted by the model and the actual trajectory. It uses Huber loss to balance the accuracy and robustness of the predicted trajectory, helping the model to better predict the motion trajectory of the endpoint; prediction score loss is used to evaluate the model's confidence in the predicted trajectory, which helps the model better estimate the quality of the predicted trajectory and improve the robustness of the model in complex scenarios. During the training process of the model, the endpoint generation module and the trajectory prediction module generate endpoints and future trajectories. The corresponding loss functions calculate the loss based on the generated endpoints and trajectories, which can measure the difference between the model prediction results and the actual labels. In this way, the model can minimize the loss function by continuously adjusting parameters during the training process, making the network more accurate.

[0071] Specifically, the endpoint loss L Endpoint It is calculated by the following endpoint loss function:

[0072]

[0073] L Endpoint =L offset +L confs

[0074] Where P closest Represents the endpoint set P p The distance to the true endpoint P extracted from gt The nearest element, H δ represents the Huber loss with parameter δ, represents the predicted endpoint offset; BCE represents the binary cross entropy loss, YesP closest The index of the element, expressed in onehot format, is the confidence of each predicted endpoint, ranging from [0,1], L offset Indicates the offset loss, L confs Represents the confidence loss.

[0075] That is, when calculating the endpoint loss, first find the nearest point, that is, expand the true trajectory to the same dimension as the anchor point, calculate the distance from each point in the anchor point to the true trajectory, and find the nearest anchor point index; then, generate a onehot vector corresponding to the nearest anchor point index, and calculate the binary cross entropy loss between the predicted confidence and the true confidence, which is the confidence loss. At the same time, extract the closest anchor point and the corresponding offset, and calculate the Huber loss between the predicted offset and the true offset, which is the offset loss. Finally, add the confidence loss and the offset loss to get the endpoint loss.

[0076] Prediction loss L trajde It is calculated through the prediction loss function, which is:

[0077]

[0078] In the formula, H δ represents the Huber loss with parameter δ, T traj It is the real trajectory. is the predicted trajectory; during the training process of trajectory evaluation, Using the true endpoints of the trajectories makes the learning more stable.

[0079] That is, when calculating the prediction loss, the true trajectory is expanded to the same dimension as the predicted trajectory, and the Huber loss between the predicted trajectory and the expanded true trajectory is calculated, which is the prediction loss.

[0080] The prediction score loss is calculated by the prediction score loss function, which is:

[0081]

[0082] In the formula, It represents the similarity between the predicted trajectory and the true trajectory value, which is represented by the maximum distance of all paired points between the predicted trajectory and the true trajectory value. BCE represents the binary cross entropy loss. represents the true confidence probability, represents the prediction confidence probability, L sorce Represents the trajectory confidence. It first represents the similarity between trajectories by calculating the maximum distance between all paired points between the predicted trajectory and the true trajectory value. The size of the negative value is usually related to the degree of error, so the softmax of the negative value is calculated and used as the true distribution At the same time, binary cross entropy loss is used to train the model to output a reliable trajectory confidence L sorce .

[0083] That is, when calculating the prediction score loss, the true trajectory is expanded to the same dimension as the predicted trajectory, the maximum distance between the predicted trajectory and the expanded true trajectory is calculated, and scaled by the temperature parameter; then, the distance is converted into the confidence probability of the true trajectory through the softmax operation, and the predicted confidence is processed in the same way to obtain the confidence probability of the predicted trajectory; finally, the binary cross entropy loss between the predicted confidence probability and the true confidence probability is calculated to obtain the trajectory confidence.

[0084] Finally, based on the processing of the above data, the present invention obtains the following Figure 5 The DG-Trajector network model shown is visualized on the Argoverse validation set. Figure 5 In the figure, we visualized the model on the Argoverse validation set, where the gray line represents the lane around the target vehicle, the dark blue represents the observed historical trajectory of the agent, and the green line is multiple prediction results, which is the output of the model. The dark green is the real future trajectory. These visualization results clearly show that the predicted trajectory of the DG-Trajector network model in the case of single mode (K=1) in Figure (a) and multi-modality (K=6) in Figure (b) can highly overlap with the real future trajectory, and can effectively predict the agent, that is, it shows that it is effective for the trajectory prediction task. Therefore, the present invention applies dynamic graph convolution to the trajectory prediction task, which solves the problems of long-term dependency modeling and not considering the impact of driving scene dynamics on trajectory prediction, so as to better complete the trajectory prediction task.

[0085] The above description is a detailed description of the preferred feasible embodiments of the present invention, but the embodiments are not intended to limit the scope of the patent application of the present invention. All equivalent changes or modified changes completed under the technical spirit suggested by the present invention should fall within the patent scope covered by the present invention.

Claims

1. An end-to-end multimodal trajectory prediction method based on dynamic graph convolution, characterized in that: The prediction method is implemented through the DG-Trajector network model, which includes a DGANet feature extraction module, an endpoint generation module and a trajectory prediction module; the prediction method includes the following steps: Step S1, training the DG-Trajector network model; Step S2, input trajectory data into the DG-Trajector network model for preprocessing, obtain a vector polyline set by preprocessing, and also sample anchor points; Step S3, the vector polyline set is input into the DGANet feature extraction module to obtain vectorized features, and the DGANet feature extraction module then performs feature encoding and feature extraction on the vectorized features to obtain global features; Step S4: Use the endpoint generation module to combine the global features and anchor points to generate a set of candidate endpoints and endpoint confidences, and select the top n optimal endpoints according to the confidences to generate trajectory endpoint information; Step S5: The generated track endpoint information is combined with the global features through the trajectory prediction module to generate a set of candidate trajectories, which are input into the trajectory scorer for scoring. The K trajectories with the highest scores are selected as the final prediction results according to the scoring results. Step S6: calculate the endpoint loss according to the endpoint confidence obtained in step S4, and calculate the prediction loss and prediction score loss according to the prediction result obtained in step S5; when the calculated endpoint loss, prediction loss, and prediction score loss all reach the minimum threshold or fluctuate within a small range, the prediction trajectory obtained in step S5 is the final prediction result, otherwise continue training.

2. According to claim 1, the end-to-end multimodal trajectory prediction method based on dynamic graph convolution is characterized in that: In step S1, during training, the train dataset in the Argoverse prediction dataset is used as the training set, and the val dataset is used as the validation set for verification.

3. The end-to-end multimodal trajectory prediction method based on dynamic graph convolution according to claim 1, characterized in that: When preprocessing the DG-Trajector network model, the VectorNet data representation method is adopted, and vector representation is used to represent the map and intelligent agent in a structured way. A connected graph is created independently for each scene element, in which the trajectory data and map information are converted into polylines to form a vector polyline set, and the lane centerline points are sampled as candidate locations for anchor points.

4. The end-to-end multimodal trajectory prediction method based on dynamic graph convolution according to claim 1, characterized in that: The DGANet feature extraction module is mainly composed of multi-layer dynamic graph convolution layers and multi-head attention mechanisms. The structure of each layer of dynamic graph convolution layers is the same. The multi-layer dynamic graph convolution layers integrate the input vectorized features, and then use the multi-head attention mechanism to model the global relationship between different polylines and output global features.

5. The end-to-end multimodal trajectory prediction method based on dynamic graph convolution according to claim 3 is characterized in that: In the DGANet feature extraction module, each dynamic graph convolution layer includes a convolution layer, a normalization layer and an activation function. In each dynamic graph convolution layer, the input original polyline features are first converted into a higher-level abstract representation through a linear layer and normalized. Then, a dynamic adjacency matrix is ​​generated based on the normalized polyline features. The dynamic adjacency matrix is ​​subjected to a softmax operation to generate an attention score. The attention score is multiplied by the normalized polyline features to obtain a weighted feature. The weighted feature is then convolved with the dynamic adjacency matrix graph. Then, the polyline feature distribution after activation function and regularization, combined with nonlinear transformation, is generated. The intermediate polyline features are concatenated with the normalized polyline features to obtain the final polyline features of this dynamic graph convolution layer.

6. The end-to-end multimodal trajectory prediction method based on dynamic graph convolution according to claim 5, characterized in that: All the polyline features obtained after the dynamic graph convolution layer are globally aggregated through batch encoding and aggregation operations, and the global tensor is obtained through the linear layer and activation function. The global tensor is calculated by the calculation formula of the multi-head attention mechanism to obtain the global feature. The calculation formula of the multi-head attention mechanism is: Among them, VQ h (L g ), VK h (L g ) and VV h (L g ) are the node feature matrices V(L g ) is the linear projection of the head h of the attention head, and d is the dimension of each attention head.

7. The end-to-end multimodal trajectory prediction method based on dynamic graph convolution according to claim 1, characterized in that: The endpoint generation module of step S4 includes an endpoint corrector, a confidence evaluator, and a series of linear layers and activation functions; when combining the global features and the anchor points, the endpoint generation module first expands the global features in the second dimension for multiple times, the number of times being the same as the number of anchor points, to obtain the expanded features, which are then spliced ​​with the anchor points, and then processed by a linear layer and normalization to obtain the target features of the endpoint generation module; then, the endpoint corrector generates the correction amount and confidence of the endpoint position according to the target feature, specifically, after the target feature is processed by a linear layer and normalization, it is mapped to the correction amount space through a series of linear transformations and activation functions to obtain the correction amount of the target position, and the correction amount is added to the anchor point to obtain the final target position feature, and at the same time, the confidence evaluator maps the target feature to the confidence score space through linear transformations and activation functions to obtain the confidence score of each endpoint position after the dimensionality reduction operation; The endpoint generation module then selects the top n targets as the optimal endpoints based on the confidence scores, extracts the corresponding anchor points, offsets and endpoints, and generates trajectory endpoint information.

8. The end-to-end multimodal trajectory prediction method based on dynamic graph convolution according to claim 1, characterized in that: The trajectory prediction module of step S5 includes a trajectory predictor and a trajectory scorer; the trajectory predictor combines the target features and global features of the trajectory endpoint information, performs feature transformation through a linear layer and an activation function, combines the transformed features with the target features again, obtains an intermediate representation of the trajectory features, and finally outputs the predicted trajectory through a linear layer to obtain a group of candidate trajectories; the trajectory scorer flattens the trajectory features of the candidate trajectories, combines the flattened trajectory features with the global features, performs feature transformation through a linear layer and an activation function, combines the transformed features with the flattened trajectory features again, and finally outputs the scores of the candidate trajectories through a linear layer; the trajectory prediction module selects the top K trajectories as the final predicted trajectories based on the scoring results.

9. The end-to-end multimodal trajectory prediction method based on dynamic graph convolution according to claim 1, characterized in that: The endpoint loss L in step S6 Endpoint It is calculated by the following endpoint loss function: L Endpoint =L offset +L confs Where P closest Represents the endpoint set P p The distance to the true endpoint P extracted from gt The nearest element, H δ represents the Huber loss with parameter δ, represents the predicted endpoint offset; BCE represents the binary cross entropy loss, YesP closest The index of the element, expressed in onehot format, is the confidence of each predicted endpoint, L offset Indicates the offset loss, L confs Represents the confidence loss.

10. The end-to-end multimodal trajectory prediction method based on dynamic graph convolution according to claim 1, characterized in that: The prediction loss L in step S6 trajde It is calculated by the prediction loss function, and the prediction score loss is calculated by the prediction score loss function; among them, The prediction loss function is: In the formula, H δ represents the Huber loss with parameter δ, T traj It is the real trajectory. is the predicted trajectory; The prediction score loss function is: In the formula, It represents the similarity between the predicted trajectory and the true trajectory value, which is represented by the maximum distance of all paired points between the predicted trajectory and the true trajectory value. BCE represents the binary cross entropy loss. represents the true confidence probability, Represents the prediction confidence probability, L sorce Represents the trajectory confidence.

Citation Information

Cited By

  • Multi-modal trajectory prediction and path tracking control method based on path coding

    CN122379576A

  • A path coding-based multi-modal trajectory prediction and path tracking control method

    CN122379576B