[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2022222095A1 - Trajectory prediction method and apparatus, and computer device and storage medium - Google Patents

Trajectory prediction method and apparatus, and computer device and storage medium Download PDF

Info

Publication number
WO2022222095A1
WO2022222095A1 PCT/CN2021/088937 CN2021088937W WO2022222095A1 WO 2022222095 A1 WO2022222095 A1 WO 2022222095A1 CN 2021088937 W CN2021088937 W CN 2021088937W WO 2022222095 A1 WO2022222095 A1 WO 2022222095A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
trajectory
obstacle
predicted
target
Prior art date
Application number
PCT/CN2021/088937
Other languages
French (fr)
Chinese (zh)
Inventor
许家妙
Original Assignee
深圳元戎启行科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳元戎启行科技有限公司 filed Critical 深圳元戎启行科技有限公司
Priority to CN202180050157.3A priority Critical patent/CN115917559A/en
Priority to PCT/CN2021/088937 priority patent/WO2022222095A1/en
Publication of WO2022222095A1 publication Critical patent/WO2022222095A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology

Definitions

  • the present application relates to a trajectory prediction method, apparatus, computer equipment, storage medium and vehicle.
  • the autonomous vehicle In the process of autonomous driving, it is very necessary to predict the trajectory of obstacles in the surrounding environment within a certain period of time. By predicting the future trajectory of the obstacle, the autonomous vehicle can identify the intention of the obstacle earlier, and plan the driving route and driving speed according to the intention of the obstacle, so as to avoid collision and reduce the occurrence of safety accidents.
  • the traditional method is to extract features from the historical trajectory information and map information of obstacles through the existing trajectory prediction model to realize trajectory prediction.
  • the network handles raster images or vectorized information.
  • the existing trajectory prediction models can only roughly consider the correlation between the map information and the obstacle trajectory information, and cannot fully extract the deeper level between the map information and the obstacle information. , resulting in a low accuracy of trajectory prediction.
  • a trajectory prediction method comprising:
  • the mechanism Inputting the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and embedding the first trajectory matrix and the first map matrix to obtain a target matrix, based on multi-head attention
  • the mechanism performs feature extraction on the target matrix to obtain output features, and performs regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
  • a trajectory prediction device comprising:
  • the trajectory acquisition module is used to acquire the motion trajectory of the obstacle to be predicted
  • a map acquisition module configured to determine target map information corresponding to the to-be-predicted obstacle according to the motion trajectory
  • a matrix conversion module for converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix
  • a trajectory prediction module configured to input the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and perform embedding processing on the first trajectory matrix and the first map matrix to obtain a target Matrix, feature extraction is performed on the target matrix based on the multi-head attention mechanism to obtain output features, and regression processing is performed on the output features to obtain the predicted trajectory of the obstacle to be detected.
  • a computer device comprising a memory and one or more processors, the memory having computer-readable instructions stored therein, the computer-readable instructions, when executed by the processor, cause the one or more processors to execute The following steps:
  • the mechanism Inputting the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and embedding the first trajectory matrix and the first map matrix to obtain a target matrix, based on multi-head attention
  • the mechanism performs feature extraction on the target matrix to obtain output features, and performs regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
  • One or more computer storage media storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the following steps:
  • the mechanism Inputting the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and embedding the first trajectory matrix and the first map matrix to obtain a target matrix, based on multi-head attention
  • the mechanism performs feature extraction on the target matrix to obtain output features, and performs regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
  • a vehicle comprising the steps of executing the above trajectory prediction method.
  • FIG. 1 is an application environment diagram of the trajectory prediction method in one or more embodiments.
  • FIG. 2 is a schematic flowchart of a trajectory prediction method in one or more embodiments.
  • FIG. 3 is a schematic structural diagram of a trained trajectory prediction model in one or more embodiments.
  • FIG. 4 is a schematic flowchart of a step of embedding a first trajectory matrix and a first map matrix to obtain a target matrix in one or more embodiments.
  • FIG. 5 is a block diagram of a trajectory prediction apparatus in one or more embodiments.
  • FIG. 6 is a block diagram of a computer device in one or more embodiments.
  • the trajectory prediction method provided in this application can be applied to the application environment shown in FIG. 1 .
  • the onboard sensor 102 communicates with the onboard computer device 104 over a network.
  • the number of in-vehicle sensors can be one or more.
  • the in-vehicle computer equipment may be simply referred to as computer equipment.
  • the vehicle-mounted sensor 102 sends the collected drive test data to the computer device 104, and the computer device 104 performs detection, tracking and sampling processing on the drive test data to obtain the motion trajectory of the obstacle to be predicted in the road test data, and determines the to-be-predicted obstacle according to the motion trajectory
  • the target map information corresponding to the obstacle so as to convert the motion trajectory into the corresponding first trajectory matrix, and convert the target map information into the corresponding first map matrix, and then input the first trajectory matrix and the first map matrix into the trained
  • the first trajectory matrix and the first map matrix are embedded to obtain the target matrix, and the feature extraction is performed on the target matrix based on the multi-head attention mechanism to obtain the output features, and the output features are subjected to regression processing to obtain the target matrix.
  • the vehicle-mounted sensor 102 can be, but is not limited to, a lidar, a laser scanner.
  • a trajectory prediction method is provided, and the method is applied to the computer device in FIG. 1 as an example for description, including the following steps:
  • Step 202 acquiring the motion trajectory of the obstacle to be predicted.
  • the obstacles to be predicted refer to the dynamic obstacles around the vehicle during the driving process of the vehicle.
  • the obstacles to be predicted may include pedestrians, vehicles, and the like.
  • the sensors installed on the vehicle can send the collected road test data to the computer equipment.
  • the computer equipment can store the drive test data in units of frames, and record the data collection time and other information of each frame of the drive test data.
  • the vehicle sensor can be a lidar, a laser scanner, a camera, and the like.
  • the drive test data can be point cloud data or surrounding environment images.
  • the sensor is a lidar or a laser scanner
  • the collected point cloud data is sent to a computer device.
  • the sensor is a camera
  • the captured image of the surrounding environment is sent to the computer device.
  • the point cloud data refers to the data that the sensor records the scanned surrounding environment information in the form of a point cloud.
  • the surrounding environment information includes the obstacles to be predicted in the surrounding environment of the vehicle, and there can be multiple obstacles to be predicted.
  • the point cloud data may specifically include three-dimensional coordinates of each point, laser reflection intensity, color information, and the like. The three-dimensional coordinates are used to represent the position information of the obstacle surface to be predicted in the surrounding environment.
  • the surrounding environment image may be a panoramic image around the vehicle collected by a plurality of cameras.
  • the computer device Each time the computer device acquires drive test data within a preset time period, it performs target detection and target tracking on the drive test data to obtain a motion trajectory within the preset time period.
  • the preset time period may be 2s.
  • Object detection refers to detecting obstacles in drive test data and predicting the location and category of each obstacle.
  • Target tracking refers to predicting the position of the obstacle in the subsequent frame and determining the speed information of the obstacle to be predicted when the position of the obstacle in the initial frame is known.
  • the track information includes the position information, speed, orientation, etc. of the obstacle to be predicted in each frame of drive test data.
  • the location information refers to the location coordinates of the obstacles to be predicted in the world coordinates.
  • the computer equipment inputs the collected drive test data into the corresponding target detection model, locates the location area where each obstacle to be predicted is located, and uses a bounding box to frame the location area to obtain the corresponding object detection model for each obstacle to be predicted.
  • the bounding box includes the center point coordinates, size, orientation, etc. of each obstacle to be predicted.
  • the coordinates of the center point of the bounding box represent the position information of the obstacle to be predicted.
  • the computer device can input the bounding box of the current frame corresponding to the obstacle to be predicted and a continuous multi-frame bounding box composed of bounding boxes before the current frame into the pre-trained target tracking model to obtain the speed and acceleration of the obstacle to be predicted in the current frame.
  • the computer equipment obtains the trajectory information of the obstacle to be predicted in each frame by performing target detection and target tracking on each frame of drive test data.
  • a high-precision map is stored in the computer equipment, and the high-precision map contains rich and detailed road traffic information elements. High-precision maps not only have high-precision coordinates, but also include accurate road shapes, and also include data on the slope, curvature, heading, elevation, roll, etc. of each lane.
  • a high-resolution map will not only describe the road, but also how many lanes there are on a road, and will truly reflect the actual style of the road.
  • the computer device can sample and process the trajectory information of the obstacle to be predicted based on the high-precision map, and obtain a trajectory that satisfies the preset sampling conditions, thereby obtaining the motion trajectory of the obstacle to be predicted.
  • the preset sampling conditions refer to trajectories in the junction area, trajectories with changes in curvature and speed, and trajectories with lane changes and cut ins.
  • the motion trajectory includes a plurality of trajectory points, and each trajectory point includes coordinate values in the x-direction and the y-direction.
  • Step 204 Determine target map information corresponding to the obstacle to be predicted according to the motion trajectory.
  • the computer device searches for the lane centerline corresponding to the motion track, and the number of lane centerlines may be multiple.
  • the lane center line is sampled, and the lane center line is represented by a plurality of points obtained by sampling.
  • the multiple points obtained by sampling can be called location points. Therefore, the target map information corresponding to the obstacle to be predicted is obtained according to the center line of the lane.
  • the target map information may include a lane centerline corresponding to each motion track, and each motion track may correspond to multiple lane centerlines.
  • the lane centerline corresponding to each motion track can be referred to as a track map information, and a lane centerline can be referred to as a track lane information. Therefore, a track map information can contain multiple track lane information.
  • Each lane centerline includes a plurality of position points, and each position point includes coordinate values in the x-direction and the y-direction.
  • Step 206 converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix.
  • the motion trajectory can be converted into a first trajectory matrix
  • the target map information can be converted into a corresponding first map matrix.
  • the first trajectory matrix is in the format of N_1 ⁇ T1 ⁇ 2, where N_1 represents the number of trajectories in the motion trajectory, T1 represents the number of trajectory points in each trajectory, and 2 represents the x and y coordinate directions.
  • the second map matrix is an N_2 ⁇ T2 ⁇ 2 matrix format, where N_2 represents the number of track lane information in the target map information, T2 represents the number of location points in each track lane information, and 2 represents the x and y coordinate directions.
  • Step 208 Input the first trajectory matrix and the first map matrix into the trained trajectory prediction model, perform embedding processing on the first trajectory matrix and the first map matrix to obtain the target matrix, and perform the target matrix based on the multi-head attention mechanism. Feature extraction, output features are obtained, and regression processing is performed on the output features to obtain the predicted trajectory of the obstacle to be detected.
  • the target matrix refers to a matrix that identifies the positional relationship between the obstacle to be predicted and the corresponding target map information.
  • a trained trajectory prediction model is pre-stored in the computer device, and the trained trajectory prediction model is a model based on a multi-head attention network.
  • the multi-head attention network refers to the transformer network.
  • the trained trajectory prediction model is trained with a large amount of sample data.
  • Trained trajectory prediction models can include embedding networks, multi-head attention networks, and regression networks.
  • the embedding network may be composed of any existing one-dimensional convolutional network, and the embedding network is used to perform embedding processing on the first trajectory matrix and the first map matrix, and the embedding processing may include processing the first trajectory matrix and the first map matrix.
  • Position embedding refers to identifying the positional relationship between the obstacle to be predicted and the corresponding target map information.
  • the target matrix is used as the input of the multi-head attention network, and the feature extraction is performed on the target matrix through the multi-head attention network based on the multi-attention mechanism, and the output matrix is obtained.
  • the output matrix is a matrix obtained by concatenating matrices extracted by multiple attention heads.
  • the multi-attention mechanism refers to the feature extraction mechanism of the multi-head self-attention layer in the multi-head attention network, which can focus on the relationship between the obstacles to be predicted in the target matrix and the target map information from different positions. It can obtain richer and more comprehensive feature information and fully extract the deeper correlation between map information and obstacle information.
  • the regression network can be any of the existing one-dimensional convolutional neural networks.
  • the output matrix is input into the regression network, and the prediction operation is performed on the output matrix through the regression network to obtain the predicted trajectory of the obstacle to be predicted.
  • the predicted trajectory may be the motion trajectory of the obstacle to be predicted in the future, such as the motion trajectory in the next 3s.
  • the motion trajectory of the obstacle to be predicted is obtained, the target map information corresponding to the obstacle to be predicted is determined according to the motion trajectory, the motion trajectory is converted into a corresponding first trajectory matrix, and the target map information is converted into a corresponding first trajectory matrix.
  • the first map matrix of so that the motion trajectory and target map information meet the input requirements of the trajectory prediction model.
  • the first trajectory matrix and the first map matrix are input into the trained trajectory prediction model, the first trajectory matrix and the first map matrix are embedded to obtain the target matrix, and the feature extraction is performed on the target matrix based on the multi-head attention mechanism,
  • the output feature is obtained, and the output feature is subjected to regression processing to obtain the predicted trajectory of the obstacle to be detected.
  • the multi-head attention mechanism in the trajectory prediction model can pay attention to the relationship between the obstacles to be predicted in the target matrix and the target map information from different positions, more abundant and comprehensive feature information can be obtained, and the map information and obstacles can be fully extracted. Deeper correlation between object information improves the accuracy of trajectory prediction.
  • the motion trajectory and the target map information can be divided into information in the x direction and the y direction, so that the x direction It performs independent operation with the information in the y direction, which improves the efficiency of trajectory prediction.
  • acquiring the motion trajectory of the obstacle to be predicted includes: acquiring drive test data, performing perceptual processing on the drive test data, and obtaining trajectory information of the obstacle to be predicted in the drive test data; The trajectory information of the obstacle is sampled to obtain the motion trajectory corresponding to the obstacle to be predicted.
  • the road test data refers to the environmental information around the autonomous vehicle collected by the sensors during the autonomous driving process.
  • the computer equipment acquires the drive test data collected by the sensor, and performs perceptual processing on the drive test data.
  • Perceptual processing refers to target detection and target tracking on the drive test data.
  • the drive test data can be point cloud data or surrounding environment images.
  • the point cloud data can be detected by any target detection model, such as PointNet, PointPillar, PolarNet, Semantic Segment Models (semantic segmentation model), etc.
  • the coordinates of the center point represent the position information of the obstacle to be predicted.
  • target detection models can be used, such as SSD (Single Shot MultiBox Detector direct multi-target detection) model, RefineDet (Single-Shot Refinement neural network for Object Detection, fine direct multi-target detection), Mobilenet -SSD (Mobilenet based Single Shot MultiBox Detector, direct multi-target detection based on efficient convolutional neural network for mobile vision applications) model, YOLO (You Only Look Once, unified real-time target detection) model, etc.
  • the surrounding environment image is used for target detection, and the two-dimensional bounding box corresponding to the obstacle to be predicted is determined, including the coordinates, size, and orientation of the center point of the obstacle to be predicted.
  • the coordinates of the center point represent the position information of the obstacle to be predicted.
  • any one of the traditional trackers such as Kalman filter (KF), Unscented Kalman Filter (UKF) and other traditional trackers can be used to predict subsequent frames.
  • the speed information of the obstacle to be detected in By performing target detection and target tracking on each frame of drive test data, the trajectory information of the obstacle to be predicted in each frame is obtained. Since the trajectory information of the obstacle to be detected may be stationary or moving at a uniform speed, in order to improve the accuracy of the trajectory prediction, the trajectory information can be sampled, and only non-stationary or non-uniformly changing trajectories are sampled.
  • the computer equipment can sample and process the trajectory information of the obstacle to be predicted according to the preset sampling conditions, so as to obtain the motion trajectory of the obstacle to be predicted.
  • the preset sampling conditions refer to trajectories in the junction area, trajectories with changes in curvature and speed, and trajectories with lane changes and cut ins.
  • the motion trajectory includes a plurality of trajectory points, and each trajectory point includes coordinate values in the x-direction and the y-direction.
  • the track information of the obstacle to be predicted in the drive test data is obtained by perceptual processing of the drive test data, and sampling processing is performed on the track information of the obstacle to be predicted according to the preset sampling conditions, so as to obtain the corresponding information of the obstacle to be predicted. movement trajectory.
  • sampling processing is performed on the track information of the obstacle to be predicted according to the preset sampling conditions, so as to obtain the corresponding information of the obstacle to be predicted. movement trajectory.
  • determining the target map information corresponding to the obstacle to be predicted according to the motion trajectory includes: determining the corresponding lane center line according to the motion trajectory; sampling the lane center line to obtain the target map information corresponding to the obstacle to be predicted .
  • the position of the initial trajectory point of the motion trajectory For the motion trajectory of the obstacle to be predicted, determine the position of the initial trajectory point of the motion trajectory, and take the position as the center of the circle to determine a circular area with a radius of r, for example, r is 3m.
  • the computer device determines, based on the high-precision map, the lane centerlines that intersect with the circular area. There may be multiple lane centerlines that intersect, and the target map information corresponding to the motion trajectory is obtained according to the multiple lane centerlines that intersect. If the position of the initial trajectory point of the obstacle to be predicted is relatively close to the lane boundary (lane change may occur), then the lane centerline of the obstacle to be predicted includes the lane centerline where the initial trajectory point is located and the lane center to be changed. Wire.
  • the centerline of each lane corresponding to the motion trajectory can be uniformly sampled into N Points, that is, the sampled points represent each lane centerline, and each lane centerline includes N position points.
  • the number of sampling points can be set according to the duration of motion estimation and the duration of the trajectory to be predicted.
  • the corresponding lane centerline is determined according to the motion trajectory, and the lane centerline is sampled to obtain the target map information corresponding to the obstacle to be predicted, and the target map information related to the motion trajectory can be accurately obtained, which is conducive to improving the The accuracy of trajectory prediction.
  • the trained trajectory prediction model includes a multi-head attention network
  • the multi-head attention network includes a one-dimensional convolution layer
  • the one-dimensional convolution layer is used to perform feature extraction in the abscissa direction of the target matrix respectively and Feature extraction in the ordinate direction.
  • the trained trajectory prediction model includes sequentially connected embedding network, multi-head attention network and regression network.
  • the multi-head attention network is a transformer network, and " ⁇ N" indicates that the transformer network includes multiple multi-head attention layers and feed-forward neural network layers. There is an Add&Norm layer after the multi-head attention layer and the feed-forward neural network layer.
  • the multi-head attention layer extracts the feature of the target matrix through the multi-head attention mechanism, and the multi-head attention mechanism can pay attention to the trajectory points in different positions in the target matrix.
  • Inputting the computational paths of multiple trajectory points to the feedforward neural network layer makes the matrix-vector interactions in the multi-head attention network more interactive and can learn more complex relationships. Since the path has no dependencies in the feedforward unit, the output features can be obtained by executing the calculation path of multiple trajectory points in parallel through the feedforward neural network layer.
  • Add is a residual network, and the residual structure can eliminate the problem of information loss caused by deepening the number of layers.
  • Norm refers to Layer Normalization (layer normalization). Therefore, the Add&Norm unit is used to add and normalize the input and output of the multi-head attention layer or feedforward neural network layer.
  • Layer Normalization is used to convert the input into data with a mean of 0 and a variance of 1 to avoid the input falling into the saturation region of the subsequent activation function.
  • the traditional transformer network includes a Linear layer
  • the transformer network in this embodiment is an improved transformer network.
  • the specific method is to replace the Linear in the traditional transformer network with a one-dimensional convolution layer. Therefore, the feature extraction in the abscissa direction and the feature extraction in the ordinate direction can be performed on the target matrix through the one-dimensional convolution layer.
  • the data in the y direction is independently operated, which effectively improves the efficiency of trajectory prediction, and the accuracy of trajectory prediction is also improved.
  • the first trajectory matrix and the first map matrix are embedded, and the step of obtaining the target matrix includes:
  • Step 402 Perform feature extraction on the first trajectory matrix and the first map matrix respectively through the embedding network in the trained trajectory prediction model, obtain the channel number of the last convolutional layer of the embedding network, and obtain the first trajectory according to the channel data.
  • Step 404 Combine the first feature matrix and the second feature matrix to obtain a combined matrix.
  • Step 406 adding feature parameters to the combined matrix, and performing position embedding processing on the combined matrix after adding the feature parameters to obtain a target matrix.
  • the trained trajectory prediction model includes an embedding network, a multi-head attention network and a regression network, and the embedding network can be a one-dimensional convolutional network.
  • the embedding network is to convert the first trajectory matrix and the first map matrix into the matrix format required by the multi-head attention network, which can be used to capture the distance between the trajectory points in the first trajectory matrix and the position points in the first map matrix in a high-dimensional space Relationship.
  • the feature extraction is performed on the first trajectory matrix and the first map matrix respectively through the embedding network, and the first feature matrix corresponding to the first trajectory matrix and the first feature matrix corresponding to the first map matrix are generated according to the number of channels of the last convolutional layer of the embedding network. Two feature matrices.
  • the number of channels in the last convolutional layer can be represented by dim1.
  • the first feature matrix can be represented as N_1 ⁇ dim1 ⁇ 2, where N_1 represents the number of tracks in the first feature matrix, and 2 represents the x and y coordinate directions.
  • the second feature matrix may be represented as N_2 ⁇ dim1 ⁇ 2, where N_2 represents the number of track lane information in the second feature matrix, and 2 represents the x and y coordinate directions.
  • the first feature matrix and the second feature matrix are combined in the second dimension through the embedding network to obtain a combined matrix.
  • the combined matrix is a four-dimensional matrix.
  • the combined matrix can be expressed as N_1 ⁇ dim2 ⁇ dim_1 ⁇ 2, where dim2 represents After the first feature matrix and the second feature matrix are combined in the second dimension, the total number of features in the second dimension. dim2 can be preset, so that the computer device can combine the first feature matrix and the second feature matrix according to the preset value. In the merging process, each obstacle to be predicted is traversed.
  • the track lane information in the second feature matrix Randomly select dim2-1 track lane information from the data and merge the track of the obstacle to be predicted in the first feature matrix in the second dimension; if the number of track lane information corresponding to the track of the obstacle to be predicted in the second feature matrix +1 is less than dim2, you need to stack 0 matrices in the second dimension, so that the total number of features of the combined second dimension is dim2.
  • the combined matrix after adding the feature parameters can be expressed as N_1 ⁇ (1+dim2) ⁇ dim_1 ⁇ 2, where 1 represents the added feature parameter, which can be is an arbitrary numerical value.
  • Feature parameters are used to collect information on the map and obstacles to be predicted at scale for subsequent trajectory prediction.
  • the combined matrix after adding the feature parameters can be processed by position embedding to obtain the target matrix.
  • the positional relationship between the obstacles to be predicted and the map information in the matrix can be identified by position embedding, which is used to make up for the lack of positional information.
  • the target matrix can be directly input into the multi-head attention network for feature extraction.
  • feature extraction is performed on the first trajectory matrix and the first map matrix respectively through the embedding network, and the first feature matrix and the first feature matrix corresponding to the first trajectory matrix are obtained according to the number of channels of the last convolutional layer of the embedding network.
  • the second feature matrix corresponding to a map matrix can obtain the matrix format required by the multi-head attention network, and can be used to capture the relationship between the trajectory points in the first trajectory matrix and the position points in the first map matrix in a high-dimensional space.
  • the first feature matrix and the second feature matrix are combined to obtain a combined matrix, and feature parameters are added to the combined matrix, which can quickly collect information on the map and obstacles to be predicted for subsequent trajectory prediction.
  • Combining the matrix for position embedding processing can make up for the lack of position information between the obstacles to be predicted and the map information in the multi-head attention network, and can further improve the accuracy of trajectory prediction.
  • the method before acquiring the motion trajectory of the obstacle to be predicted, the method further includes: acquiring a training sample, where the training sample includes trajectory information of the target obstacle and sample map information corresponding to the target obstacle; converting the trajectory information into Be the corresponding second trajectory matrix, and convert the sample map information into the corresponding second map matrix; input the second trajectory matrix and the second map matrix into the trajectory prediction model to be trained, and output the future trajectory of the target obstacle;
  • the model loss of the trajectory prediction model to be trained is calculated according to the trajectory information and the future trajectory, and the model parameters of the trajectory prediction model to be trained are updated according to the model loss until the preset conditions are met, and the trained trajectory prediction model is obtained.
  • the training sample refers to the sample data used to train the trajectory prediction model, and the training sample includes the trajectory information of the target obstacle and the sample map information corresponding to the target obstacle.
  • the target obstacle refers to dynamic obstacles, such as vehicles, pedestrians, etc.
  • the computer device obtains the historical drive test data collected by the sensor, performs perception processing on the historical drive test data, and obtains the trajectory information of the dynamic obstacles in the historical drive test data.
  • Perceptual processing refers to target detection and target tracking, which is the same as the perceptual processing method in the application process of the above trajectory prediction model, and will not be repeated here.
  • the computer device performs sampling processing on the trajectory information of the dynamic obstacle according to the preset sampling conditions, and obtains a trajectory sample set corresponding to the dynamic obstacle.
  • the preset sampling conditions can be a trajectory in a junction area, a trajectory with a change in curvature and speed, a trajectory with a lane change and a cut in.
  • the trajectory sample set includes historical trajectories of multiple dynamic obstacles, and each historical trajectory includes multiple trajectory points.
  • each historical trajectory may include 50 trajectory points.
  • Each track point includes x-direction and y-direction coordinate values.
  • the track lane information corresponding to the dynamic obstacle is determined according to each historical track in the track sample set, and the map sample set corresponding to the dynamic obstacle is obtained.
  • the sampling method of the trajectory lane information is the same as the sampling method in the application process of the above trajectory prediction model, and will not be repeated here.
  • the trajectory information and sample map information corresponding to the target obstacle are respectively selected from the trajectory sample set and the map sample set to generate training samples.
  • the trajectory sample set and the map sample set can be divided into training samples, test sets and validation sets according to a preset ratio.
  • the preset ratio can be 3:1:1.
  • the purpose of dividing the trajectory sample set and the map sample set into three sets is to select the model with the highest accuracy and the best generalization ability.
  • the training process of the trajectory prediction model is the same as the trajectory prediction method in the application process, that is, the trajectory information in the training sample is converted into the corresponding second trajectory matrix, and the sample map information in the training sample is converted into the corresponding second map matrix, input the second trajectory matrix and the second map matrix into the trajectory prediction model to be trained, and output the future trajectory of the target obstacle.
  • the model loss of the trajectory prediction model to be trained is calculated according to the trajectory information and the future trajectory, and the model parameters are adjusted according to the model loss to obtain the trained trajectory prediction model.
  • the model loss can be existing loss functions such as MSE mean square error loss, cross entropy loss, etc.
  • the model parameters are adjusted through the output backpropagation of the loss function.
  • model training process is an iterative training process, it needs to go through multiple epoch, 1 epoch means that all training samples are used for training once, and each epoch will output a model parameter.
  • the model parameters with the highest accuracy can be determined through the validation set, that is, to determine which epoch outputs the model parameters to obtain a more accurate future trajectory.
  • the specific judgment method can be to determine whether the network loss value reaches the loss threshold, or whether the number of iterations reaches the iteration number.
  • the number of times threshold if the network loss value reaches the loss threshold, or the number of iterations reaches the threshold of the number of iterations, the model parameters output by the corresponding epoch can be used as the final model parameters, and the model is the trained trajectory prediction model.
  • a training sample is obtained, the training sample includes trajectory information of the target obstacle and sample map information corresponding to the target obstacle, the trajectory information is converted into a corresponding second trajectory matrix, and the sample map information is converted into a corresponding
  • the second map matrix, the second trajectory matrix and the second map matrix are input into the trajectory prediction model to be trained, the model loss of the trajectory prediction model to be trained is calculated, and the model parameters of the trajectory prediction model to be trained are updated according to the model loss, Get the trained trajectory prediction model. Since the multi-head attention mechanism in the trajectory prediction model can pay attention to the relationship between the target obstacle and the sample map information in the target matrix from different positions, it can obtain more abundant and comprehensive feature information, and fully extract map information and obstacles. The deeper correlation between information improves the accuracy of trajectory prediction.
  • a trajectory prediction apparatus including: a trajectory acquisition module 502, a map acquisition module 504, a matrix conversion module 506, and a trajectory prediction module 508, wherein:
  • the trajectory acquisition module 502 is used to acquire the motion trajectory of the obstacle to be predicted.
  • the map acquisition module 504 is configured to determine target map information corresponding to the obstacle to be predicted according to the motion trajectory.
  • the matrix conversion module 506 is configured to convert the motion trajectory into a corresponding first trajectory matrix, and convert the target map information into a corresponding first map matrix.
  • the trajectory prediction module 508 is configured to input the first trajectory matrix and the first map matrix into the trained trajectory prediction model, perform embedding processing on the first trajectory matrix and the first map matrix, and obtain the target matrix, based on the multi-head attention mechanism Perform feature extraction on the target matrix to obtain output features, and perform regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
  • the trained trajectory prediction model includes a multi-head attention network
  • the multi-head attention network includes a one-dimensional convolutional layer
  • the trajectory prediction module 508 is further configured to perform a horizontal cross-section on the target matrix according to the one-dimensional convolutional layer. Feature extraction in the coordinate direction and feature extraction in the ordinate direction.
  • the trajectory prediction module 508 is further configured to perform feature extraction on the first trajectory matrix and the first map matrix respectively through the embedding network in the trained trajectory prediction model to obtain the last convolutional layer of the embedding network According to the number of channels, the first feature matrix corresponding to the first trajectory matrix and the second feature matrix corresponding to the first map matrix are obtained according to the number of channels; the first feature matrix and the second feature matrix are merged to obtain a combined matrix; in the combined matrix Add feature parameters to , and perform position embedding processing on the combined matrix after adding feature parameters to obtain the target matrix.
  • the trajectory acquisition module 508 is further configured to acquire drive test data, perform perceptual processing on the drive test data, and obtain trajectory information of obstacles to be predicted in the drive test data; The trajectory information is sampled to obtain the motion trajectory corresponding to the obstacle to be predicted.
  • the map acquisition module 504 is further configured to determine the corresponding lane centerline according to the motion trajectory; perform sampling processing on the lane centerline to obtain target map information corresponding to the obstacle to be predicted.
  • the above-mentioned device further includes:
  • the sample acquisition module is used to acquire training samples, and the training samples include the trajectory information of the target obstacle and the sample map information corresponding to the target obstacle.
  • the sample conversion module is configured to convert the trajectory information into a corresponding second trajectory matrix, and convert the sample map information into a corresponding second map matrix.
  • the trajectory calculation module is used to input the second trajectory matrix and the second map matrix into the trajectory prediction model to be trained, and output the future trajectory of the target obstacle.
  • the parameter updating module is used to calculate the model loss of the trajectory prediction model to be trained according to the trajectory information and future trajectories, update the model parameters of the trajectory prediction model to be trained according to the model loss, and obtain the trained trajectory prediction model.
  • Each module in the above-mentioned trajectory prediction apparatus can be implemented in whole or in part by software, hardware and combinations thereof.
  • the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided, the internal structure of which can be shown in FIG. 6 .
  • the computer device includes a processor, memory, a communication interface, and a database connected by a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium, an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions and a database.
  • the internal memory provides an environment for the execution of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer device is used to store data for a trajectory prediction method.
  • the communication interface of the computer device is used to connect and communicate with an external terminal.
  • the computer readable instructions when executed by a processor, implement a trajectory prediction method.
  • FIG. 6 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • a computer device comprising a memory and one or more processors, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, makes the one or more processors execute the above methods to implement steps in the example.
  • One or more computer storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to perform the steps in each of the foregoing method embodiments.
  • the computer storage medium is a readable storage medium, and the readable storage medium may be non-volatile or volatile.
  • a vehicle is provided, the vehicle may specifically include an autonomous driving vehicle, and the vehicle includes the above computer device, which can execute the steps in the above embodiment of the trajectory prediction method.
  • Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Remote Sensing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Traffic Control Systems (AREA)

Abstract

A trajectory prediction method, comprising: acquiring a motion trajectory of an obstacle to be subjected to prediction (202); according to the motion trajectory, determining target map information corresponding to said obstacle (204); converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix (206); and inputting the first trajectory matrix and the first map matrix into a trained trajectory prediction model, performing embedding processing on the first trajectory matrix and the first map matrix, so as to obtain a target matrix, performing feature extraction on the target matrix on the basis of a multi-head attention mechanism, so as to obtain an output feature, and performing regression processing on the output feature, so as to obtain a predicted trajectory of said obstacle (208).

Description

轨迹预测方法、装置、计算机设备和存储介质Trajectory prediction method, device, computer equipment and storage medium 技术领域technical field
本申请涉及一种轨迹预测方法、装置、计算机设备、存储介质和交通工具。The present application relates to a trajectory prediction method, apparatus, computer equipment, storage medium and vehicle.
背景技术Background technique
在自动驾驶过程中,预测周围环境中的障碍物在一定时间内的轨迹,是非常有必要的。通过对障碍物的未来轨迹进行预测,能够使自动驾驶车辆更早识别障碍物的意图,并根据障碍物意图来规划行驶路线以及行驶速度,从而避免碰撞,减少安全事故的发生。传统方式是通过现有的轨迹预测模型对障碍物的历史轨迹信息和地图信息进行特征提取,实现轨迹预测,如将历史轨迹信息与地图信息预处理为栅格图或向量化信息,进而用深度网络处理栅格图或者向量化信息。In the process of autonomous driving, it is very necessary to predict the trajectory of obstacles in the surrounding environment within a certain period of time. By predicting the future trajectory of the obstacle, the autonomous vehicle can identify the intention of the obstacle earlier, and plan the driving route and driving speed according to the intention of the obstacle, so as to avoid collision and reduce the occurrence of safety accidents. The traditional method is to extract features from the historical trajectory information and map information of obstacles through the existing trajectory prediction model to realize trajectory prediction. The network handles raster images or vectorized information.
由于地图信息对障碍物的轨迹预测尤为重要,而现有的轨迹预测模型只能粗略地考虑地图信息与障碍物轨迹信息之间的相关性,无法充分提取地图信息与障碍物信息之间更深层次的相关性,导致轨迹预测的准确性较低。Since the map information is particularly important for the trajectory prediction of obstacles, the existing trajectory prediction models can only roughly consider the correlation between the map information and the obstacle trajectory information, and cannot fully extract the deeper level between the map information and the obstacle information. , resulting in a low accuracy of trajectory prediction.
发明内容SUMMARY OF THE INVENTION
根据本申请公开的各种实施例,提供一种轨迹预测方法、装置、计算机设备、存储介质和交通工具。According to various embodiments disclosed in the present application, a trajectory prediction method, apparatus, computer device, storage medium, and vehicle are provided.
一种轨迹预测方法,包括:A trajectory prediction method, comprising:
获取待预测障碍物的运动轨迹;Obtain the motion trajectory of the obstacle to be predicted;
根据所述运动轨迹确定所述待预测障碍物对应的目标地图信息;Determine the target map information corresponding to the obstacle to be predicted according to the motion trajectory;
将所述运动轨迹转换为对应的第一轨迹矩阵,以及将所述目标地图信息转换为对应的第一地图矩阵;及converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix; and
将所述第一轨迹矩阵和所述第一地图矩阵输入至已训练的轨迹预测模型中,对所述第一轨迹矩阵和所述第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对所述目标矩阵进行特征提取,得到输出特征,对所述输出特征进行回归处理,得到所述待检测障碍物的预测轨迹。Inputting the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and embedding the first trajectory matrix and the first map matrix to obtain a target matrix, based on multi-head attention The mechanism performs feature extraction on the target matrix to obtain output features, and performs regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
一种轨迹预测装置,包括:A trajectory prediction device, comprising:
轨迹获取模块,用于获取待预测障碍物的运动轨迹;The trajectory acquisition module is used to acquire the motion trajectory of the obstacle to be predicted;
地图获取模块,用于根据所述运动轨迹确定所述待预测障碍物对应的目标地图信息;a map acquisition module, configured to determine target map information corresponding to the to-be-predicted obstacle according to the motion trajectory;
矩阵转换模块,用于将所述运动轨迹转换为对应的第一轨迹矩阵,以及将所述目标地图信息转换为对应的第一地图矩阵;及a matrix conversion module for converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix; and
轨迹预测模块,用于将所述第一轨迹矩阵和所述第一地图矩阵输入至已训练的轨迹预测模型中,对所述第一轨迹矩阵和所述第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对所述目标矩阵进行特征提取,得到输出特征,对所述输出特征进行回归处理,得到所述待检测障碍物的预测轨迹。A trajectory prediction module, configured to input the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and perform embedding processing on the first trajectory matrix and the first map matrix to obtain a target Matrix, feature extraction is performed on the target matrix based on the multi-head attention mechanism to obtain output features, and regression processing is performed on the output features to obtain the predicted trajectory of the obstacle to be detected.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device comprising a memory and one or more processors, the memory having computer-readable instructions stored therein, the computer-readable instructions, when executed by the processor, cause the one or more processors to execute The following steps:
获取待预测障碍物的运动轨迹;Obtain the motion trajectory of the obstacle to be predicted;
根据所述运动轨迹确定所述待预测障碍物对应的目标地图信息;Determine the target map information corresponding to the obstacle to be predicted according to the motion trajectory;
将所述运动轨迹转换为对应的第一轨迹矩阵,以及将所述目标地图信息转换为对应的第一地图矩阵;及converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix; and
将所述第一轨迹矩阵和所述第一地图矩阵输入至已训练的轨迹预测模型中,对所述第一轨迹矩阵和所述第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对所述目标矩阵进行特征提取,得到输出特征,对所述输出特征进行回归处理,得到所述待检测障碍物的预测轨迹。Inputting the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and embedding the first trajectory matrix and the first map matrix to obtain a target matrix, based on multi-head attention The mechanism performs feature extraction on the target matrix to obtain output features, and performs regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
一个或多个存储有计算机可读指令的计算机存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more computer storage media storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the following steps:
获取待预测障碍物的运动轨迹;Obtain the motion trajectory of the obstacle to be predicted;
根据所述运动轨迹确定所述待预测障碍物对应的目标地图信息;Determine the target map information corresponding to the obstacle to be predicted according to the motion trajectory;
将所述运动轨迹转换为对应的第一轨迹矩阵,以及将所述目标地图信息转换为对应的第一地图矩阵;及converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix; and
将所述第一轨迹矩阵和所述第一地图矩阵输入至已训练的轨迹预测模型中,对所述第一轨迹矩阵和所述第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对所述目标矩阵进行特征提取,得到输出特征,对所述输出特征进行回归处理,得到所述待检测障碍物的预测轨迹。Inputting the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and embedding the first trajectory matrix and the first map matrix to obtain a target matrix, based on multi-head attention The mechanism performs feature extraction on the target matrix to obtain output features, and performs regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
一种交通工具,包括执行上述轨迹预测方法的步骤。A vehicle comprising the steps of executing the above trajectory prediction method.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below. Other features and advantages of the present application will be apparent from the description, drawings, and claims.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
图1为一个或多个实施例中轨迹预测方法的应用环境图。FIG. 1 is an application environment diagram of the trajectory prediction method in one or more embodiments.
图2为一个或多个实施例中轨迹预测方法的流程示意图。FIG. 2 is a schematic flowchart of a trajectory prediction method in one or more embodiments.
图3为一个或多个实施例中已训练的轨迹预测模型的结构示意图。FIG. 3 is a schematic structural diagram of a trained trajectory prediction model in one or more embodiments.
图4为一个或多个实施例中对第一轨迹矩阵和第一地图矩阵进行嵌入处理,得到目标矩阵步骤的流程示意图。FIG. 4 is a schematic flowchart of a step of embedding a first trajectory matrix and a first map matrix to obtain a target matrix in one or more embodiments.
图5为一个或多个实施例中轨迹预测装置的框图。FIG. 5 is a block diagram of a trajectory prediction apparatus in one or more embodiments.
图6为一个或多个实施例中计算机设备的框图。6 is a block diagram of a computer device in one or more embodiments.
具体实施方式Detailed ways
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
需要说明的是,本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.
本申请提供的轨迹预测方法,可以应用于如图1所示的应用环境中。车载传感器102与车载计算机设备104通过网络进行通信。车载传感器的数量可以为一个也可以为多个。车载计算机设备可以简称为计算机设备。车载传感器102将采集到的路测数据发送至计算机设备104,计算机设备104对路测数据进行检测、跟踪以及采样处理,得到路测数据中待预测障碍物的运动轨迹,根据运动轨迹确定待预测障碍物对应的目标地图信息,从而将运动轨迹转换为对应的第一轨迹矩阵,以及将目标地图信息转换为对应的第一地图矩阵,进而将第一轨迹矩阵和第一地图矩阵输入至已训练的轨迹预测模型中,对第一轨迹矩阵和第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对目标矩阵进行特征提取,得到输出特征,对输出特征进行回归处理,得到待检测障碍物的预测轨迹。车载传感器102可以但不限于是激光雷达、激光扫描仪。The trajectory prediction method provided in this application can be applied to the application environment shown in FIG. 1 . The onboard sensor 102 communicates with the onboard computer device 104 over a network. The number of in-vehicle sensors can be one or more. The in-vehicle computer equipment may be simply referred to as computer equipment. The vehicle-mounted sensor 102 sends the collected drive test data to the computer device 104, and the computer device 104 performs detection, tracking and sampling processing on the drive test data to obtain the motion trajectory of the obstacle to be predicted in the road test data, and determines the to-be-predicted obstacle according to the motion trajectory The target map information corresponding to the obstacle, so as to convert the motion trajectory into the corresponding first trajectory matrix, and convert the target map information into the corresponding first map matrix, and then input the first trajectory matrix and the first map matrix into the trained In the trajectory prediction model of , the first trajectory matrix and the first map matrix are embedded to obtain the target matrix, and the feature extraction is performed on the target matrix based on the multi-head attention mechanism to obtain the output features, and the output features are subjected to regression processing to obtain the target matrix. The predicted trajectory of the obstacle. The vehicle-mounted sensor 102 can be, but is not limited to, a lidar, a laser scanner.
在其中一个实施例中,如图2所示,提供了一种轨迹预测方法,以该方法应用于图1中的计算机设备为例进行说明,包括以下步骤:In one of the embodiments, as shown in FIG. 2, a trajectory prediction method is provided, and the method is applied to the computer device in FIG. 1 as an example for description, including the following steps:
步骤202,获取待预测障碍物的运动轨迹。 Step 202, acquiring the motion trajectory of the obstacle to be predicted.
待预测障碍物是指车辆在行驶过程中,车辆周围的动态障碍物。待预测障碍物可以包括行人、车辆等。The obstacles to be predicted refer to the dynamic obstacles around the vehicle during the driving process of the vehicle. The obstacles to be predicted may include pedestrians, vehicles, and the like.
车辆在驾驶的过程中,安装在车辆上的传感器可以将采集到的路测数据发送至计算机设备。计算机设备可以帧为单位保存路测数据,并记录每帧路测数据的数据采集时间等信息。其中,车载传感器可以是激光雷达、激光扫描仪、摄像头等。路测数据可以是点云数据或者周围环境图像。当传感器为激光雷达或激光扫描仪时,将采集的点云数据发送至计算机设备。当传感器为摄像头时,将采集到的周围环境图像发送至计算机设备。点云数据是指传感器将扫描到的周围环境信息以点云形式记录的数据,周围环境信息中包括车辆周围环境中的待预测障碍物,待预测障碍物可以为多个。点云数据具体可以包括各点的三维坐标、激光反射强度、颜色信息等。三维坐标用于表示周围环境中待预测障碍物表面的位置信息。周围环境图像可以是通过多个摄像头采集到的车辆周围的全景图像。When the vehicle is driving, the sensors installed on the vehicle can send the collected road test data to the computer equipment. The computer equipment can store the drive test data in units of frames, and record the data collection time and other information of each frame of the drive test data. Among them, the vehicle sensor can be a lidar, a laser scanner, a camera, and the like. The drive test data can be point cloud data or surrounding environment images. When the sensor is a lidar or a laser scanner, the collected point cloud data is sent to a computer device. When the sensor is a camera, the captured image of the surrounding environment is sent to the computer device. The point cloud data refers to the data that the sensor records the scanned surrounding environment information in the form of a point cloud. The surrounding environment information includes the obstacles to be predicted in the surrounding environment of the vehicle, and there can be multiple obstacles to be predicted. The point cloud data may specifically include three-dimensional coordinates of each point, laser reflection intensity, color information, and the like. The three-dimensional coordinates are used to represent the position information of the obstacle surface to be predicted in the surrounding environment. The surrounding environment image may be a panoramic image around the vehicle collected by a plurality of cameras.
计算机设备每获取到预设时间段内的路测数据,对路测数据进行目标检测以及目标跟踪,得到预设时间段内的运动轨迹。例如,预设时间段可以是2s。目标检测是指检测路测数据中的障碍物,并预测每个障碍物的位置和类别。目标跟踪是指在已知初始帧障碍物的位置的情况下,预测后续帧中该障碍物的位置,确定待预测障碍物的速度信息。轨迹信息包括待预测障碍物在每帧路测数据内的位置信息、速度、朝向等。位置信息是指待预测障碍物在世界坐标中的位置坐标。具体的,计算机设备将采集到的路测数据输入至对应的目标检测模型中,定位每个待预测障碍物所在的位置区域,并用包围框将位置区域框起来,得到每个待预测障碍物对应的包围框。包围框中包括每个待预测障碍物的中心点坐标、大小、朝向等。包围框的中心点坐标表示待预测障碍物的位置信息。通过识别每个待预测障碍物对应的包围框,能够准确区分不同的待预测障碍物。计算机设备可以将待预测障碍物对应的当前帧包围框以及当前帧之前的包围框组成的连续多帧包围框输入至预先训练的目标跟踪模型中,得到当前帧待预测障碍物的速度和加速度。计算机设备通过对每帧路测数据进行目标检测以及目标跟踪,得到待预测障碍物在每帧的轨迹信息。计算机设备中存储有高精度地图,精度地图中含有丰富、细致的道路交通信息元素。高精度地图不仅有高精度的坐标,同时还包括准确的道路形状,并且还包括每个车道的坡度、曲率、航向、高程、侧倾的数据等。高精度地图不仅会描绘道路,更会描绘出一条道路上有多少条车道,会真实地反映出道路的实际样式。计算机设备可以基于高精度地图对待预测障碍物的轨迹信息中采样处理,得到满足预设采样条件的轨迹,从而得到待预测障碍物的运动轨迹。预设采样条件是指交叉口(junction)区域的轨迹、曲率和速度大小发生变化的轨迹、发生换车道(lane change)以及超车道(cut in)的轨迹。运动轨迹包括多个轨迹点,每个轨迹点包括x方向和y方向坐标值。Each time the computer device acquires drive test data within a preset time period, it performs target detection and target tracking on the drive test data to obtain a motion trajectory within the preset time period. For example, the preset time period may be 2s. Object detection refers to detecting obstacles in drive test data and predicting the location and category of each obstacle. Target tracking refers to predicting the position of the obstacle in the subsequent frame and determining the speed information of the obstacle to be predicted when the position of the obstacle in the initial frame is known. The track information includes the position information, speed, orientation, etc. of the obstacle to be predicted in each frame of drive test data. The location information refers to the location coordinates of the obstacles to be predicted in the world coordinates. Specifically, the computer equipment inputs the collected drive test data into the corresponding target detection model, locates the location area where each obstacle to be predicted is located, and uses a bounding box to frame the location area to obtain the corresponding object detection model for each obstacle to be predicted. the bounding box. The bounding box includes the center point coordinates, size, orientation, etc. of each obstacle to be predicted. The coordinates of the center point of the bounding box represent the position information of the obstacle to be predicted. By identifying the bounding box corresponding to each obstacle to be predicted, different obstacles to be predicted can be accurately distinguished. The computer device can input the bounding box of the current frame corresponding to the obstacle to be predicted and a continuous multi-frame bounding box composed of bounding boxes before the current frame into the pre-trained target tracking model to obtain the speed and acceleration of the obstacle to be predicted in the current frame. The computer equipment obtains the trajectory information of the obstacle to be predicted in each frame by performing target detection and target tracking on each frame of drive test data. A high-precision map is stored in the computer equipment, and the high-precision map contains rich and detailed road traffic information elements. High-precision maps not only have high-precision coordinates, but also include accurate road shapes, and also include data on the slope, curvature, heading, elevation, roll, etc. of each lane. A high-resolution map will not only describe the road, but also how many lanes there are on a road, and will truly reflect the actual style of the road. The computer device can sample and process the trajectory information of the obstacle to be predicted based on the high-precision map, and obtain a trajectory that satisfies the preset sampling conditions, thereby obtaining the motion trajectory of the obstacle to be predicted. The preset sampling conditions refer to trajectories in the junction area, trajectories with changes in curvature and speed, and trajectories with lane changes and cut ins. The motion trajectory includes a plurality of trajectory points, and each trajectory point includes coordinate values in the x-direction and the y-direction.
步骤204,根据运动轨迹确定待预测障碍物对应的目标地图信息。Step 204: Determine target map information corresponding to the obstacle to be predicted according to the motion trajectory.
计算机设备查找运动轨迹对应的车道中心线,车道中心线的数量可以为多条。对车道中心线进行采样处理,将车道中心线用采样得到的多个点进行表示。采样得到的多个点可以称为位置点。从而根据车道中心线得到待预测障碍物对应的目标地图信息。目标地图信息可以包括每条运动轨迹对应的车道中心线,每条运动轨迹可以对应多条车道中心线。可以将每条运动轨迹对应的车道中心线称为一条轨迹地图信息,将一条车道中心线称为一条轨迹车道信息,因此,一条轨迹地图信息可以包含多条轨迹车道信息。每条车道中心线包括多个位置点,每个位置点包括x方向和y方向坐标值。The computer device searches for the lane centerline corresponding to the motion track, and the number of lane centerlines may be multiple. The lane center line is sampled, and the lane center line is represented by a plurality of points obtained by sampling. The multiple points obtained by sampling can be called location points. Therefore, the target map information corresponding to the obstacle to be predicted is obtained according to the center line of the lane. The target map information may include a lane centerline corresponding to each motion track, and each motion track may correspond to multiple lane centerlines. The lane centerline corresponding to each motion track can be referred to as a track map information, and a lane centerline can be referred to as a track lane information. Therefore, a track map information can contain multiple track lane information. Each lane centerline includes a plurality of position points, and each position point includes coordinate values in the x-direction and the y-direction.
步骤206,将运动轨迹转换为对应的第一轨迹矩阵,以及将目标地图信息转换为对应的第一地图矩阵。 Step 206 , converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix.
由于轨迹中包括x方向和y方向的坐标值,为了提高轨迹预测速度,可以将x方向和y方向进行分开运算。具体的,可以分别将运动轨迹转换为第一轨迹矩阵,将目标地图信息转换为对应的第一地图矩阵。第一轨迹矩阵为N_1×T1×2的格式,其中,N_1表示运动轨迹中的轨迹条数,T1表示每条轨迹中的轨迹点数,2表示x和y坐标方向。第二地图矩阵为N_2×T2×2的矩阵格式,其中,N_2表示目标地图信息中轨迹车道信息的条数,T2表示每条轨迹车道信息中的位置点数,2表示x和y坐标方向。Since the trajectory includes coordinate values in the x-direction and the y-direction, in order to improve the trajectory prediction speed, the x-direction and the y-direction can be separately calculated. Specifically, the motion trajectory can be converted into a first trajectory matrix, and the target map information can be converted into a corresponding first map matrix. The first trajectory matrix is in the format of N_1×T1×2, where N_1 represents the number of trajectories in the motion trajectory, T1 represents the number of trajectory points in each trajectory, and 2 represents the x and y coordinate directions. The second map matrix is an N_2×T2×2 matrix format, where N_2 represents the number of track lane information in the target map information, T2 represents the number of location points in each track lane information, and 2 represents the x and y coordinate directions.
步骤208,将第一轨迹矩阵和第一地图矩阵输入至已训练的轨迹预测模型中,对第一轨迹矩阵和第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对目标矩阵进行特征提取,得到输出特征,对输出特征进行回归处理,得到待检测障碍物的预测轨迹。Step 208: Input the first trajectory matrix and the first map matrix into the trained trajectory prediction model, perform embedding processing on the first trajectory matrix and the first map matrix to obtain the target matrix, and perform the target matrix based on the multi-head attention mechanism. Feature extraction, output features are obtained, and regression processing is performed on the output features to obtain the predicted trajectory of the obstacle to be detected.
目标矩阵是指标识有待预测障碍物与对应的目标地图信息的位置关系的矩阵。The target matrix refers to a matrix that identifies the positional relationship between the obstacle to be predicted and the corresponding target map information.
计算机设备中预先存储有已训练的轨迹预测模型,已训练的轨迹预测模型是基于多头注意力网络的模型。多头注意力网络是指transformer网络。已训练的轨迹预测模型是通过大量的样本数据训练得到的。已训练的轨迹预测模型可以包括嵌入网络、多头注意力网络以及回归网络。嵌入网络可以是现有的任意一种一维卷积网络构成的,嵌入网络用于对第一轨迹矩阵和第一地图矩阵进行嵌入处理,嵌入处理可以包括对第一轨迹矩阵和第一地图矩阵进行特征提取,以及对提取的特征矩阵进行位置嵌入,得到目标矩阵。位置嵌入是指标识待预测障碍物与对应的目标地图信息的位置关系。A trained trajectory prediction model is pre-stored in the computer device, and the trained trajectory prediction model is a model based on a multi-head attention network. The multi-head attention network refers to the transformer network. The trained trajectory prediction model is trained with a large amount of sample data. Trained trajectory prediction models can include embedding networks, multi-head attention networks, and regression networks. The embedding network may be composed of any existing one-dimensional convolutional network, and the embedding network is used to perform embedding processing on the first trajectory matrix and the first map matrix, and the embedding processing may include processing the first trajectory matrix and the first map matrix. Perform feature extraction, and perform position embedding on the extracted feature matrix to obtain the target matrix. Position embedding refers to identifying the positional relationship between the obstacle to be predicted and the corresponding target map information.
将目标矩阵作为多头注意力网络的输入,通过多头注意力网络基于多注意力机制对所述目标矩阵进行特征提取,得到输出矩阵。输出矩阵是由多个注意力头提取的矩阵进行连接得到的矩阵。多注意力机制是指多头注意力网络中的多头自注意力(multi-head self-attention)层的特征提取机制,能够从不同的位置关注目标矩阵中待预测障碍物与目标地图信息之间的 关系,可获取更为丰富、全面的特征信息,实现充分提取地图信息与障碍物信息之间更深层次的相关性。回归网络可以是现有的一维卷积神经网络中的任意一种。将输出矩阵输入至回归网络中,通过回归网络对输出矩阵进行预测运算,得到待预测障碍物的预测轨迹。预测轨迹可以是待预测障碍物在未来一段时间内的运动轨迹,如未来3s内的运动轨迹。The target matrix is used as the input of the multi-head attention network, and the feature extraction is performed on the target matrix through the multi-head attention network based on the multi-attention mechanism, and the output matrix is obtained. The output matrix is a matrix obtained by concatenating matrices extracted by multiple attention heads. The multi-attention mechanism refers to the feature extraction mechanism of the multi-head self-attention layer in the multi-head attention network, which can focus on the relationship between the obstacles to be predicted in the target matrix and the target map information from different positions. It can obtain richer and more comprehensive feature information and fully extract the deeper correlation between map information and obstacle information. The regression network can be any of the existing one-dimensional convolutional neural networks. The output matrix is input into the regression network, and the prediction operation is performed on the output matrix through the regression network to obtain the predicted trajectory of the obstacle to be predicted. The predicted trajectory may be the motion trajectory of the obstacle to be predicted in the future, such as the motion trajectory in the next 3s.
在本实施例中,通过获取待预测障碍物的运动轨迹,根据运动轨迹确定待预测障碍物对应的目标地图信息,将运动轨迹转换为对应的第一轨迹矩阵,以及将目标地图信息转换为对应的第一地图矩阵,使得运动轨迹以及目标地图信息满足轨迹预测模型的输入要求。将第一轨迹矩阵和第一地图矩阵输入至已训练的轨迹预测模型中,对第一轨迹矩阵和第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对目标矩阵进行特征提取,得到输出特征,对输出特征进行回归处理,得到待检测障碍物的预测轨迹。由于轨迹预测模型中的多头注意力机制能够从不同的位置关注目标矩阵中待预测障碍物与目标地图信息之间的关系,可获取更为丰富、全面的特征信息,实现充分提取地图信息与障碍物信息之间更深层次的相关性,提高了轨迹预测的准确性。另外,通过将运动轨迹转换为对应的第一轨迹矩阵,以及将目标地图信息转换为对应的第一地图矩阵,能够将运动轨迹以及目标地图信息划分为x方向和y方向的信息,使得x方向和y方向的信息进行独立运算,提高了轨迹预测效率。In this embodiment, the motion trajectory of the obstacle to be predicted is obtained, the target map information corresponding to the obstacle to be predicted is determined according to the motion trajectory, the motion trajectory is converted into a corresponding first trajectory matrix, and the target map information is converted into a corresponding first trajectory matrix. The first map matrix of , so that the motion trajectory and target map information meet the input requirements of the trajectory prediction model. The first trajectory matrix and the first map matrix are input into the trained trajectory prediction model, the first trajectory matrix and the first map matrix are embedded to obtain the target matrix, and the feature extraction is performed on the target matrix based on the multi-head attention mechanism, The output feature is obtained, and the output feature is subjected to regression processing to obtain the predicted trajectory of the obstacle to be detected. Since the multi-head attention mechanism in the trajectory prediction model can pay attention to the relationship between the obstacles to be predicted in the target matrix and the target map information from different positions, more abundant and comprehensive feature information can be obtained, and the map information and obstacles can be fully extracted. Deeper correlation between object information improves the accuracy of trajectory prediction. In addition, by converting the motion trajectory into the corresponding first trajectory matrix and converting the target map information into the corresponding first map matrix, the motion trajectory and the target map information can be divided into information in the x direction and the y direction, so that the x direction It performs independent operation with the information in the y direction, which improves the efficiency of trajectory prediction.
在其中一个实施例中,获取待预测障碍物的运动轨迹包括:获取路测数据,对路测数据进行感知处理,得到路测数据中待预测障碍物的轨迹信息;根据预设采样条件对待预测障碍物的轨迹信息进行采样处理,得到待预测障碍物对应的运动轨迹。In one embodiment, acquiring the motion trajectory of the obstacle to be predicted includes: acquiring drive test data, performing perceptual processing on the drive test data, and obtaining trajectory information of the obstacle to be predicted in the drive test data; The trajectory information of the obstacle is sampled to obtain the motion trajectory corresponding to the obstacle to be predicted.
路测数据是指在自动驾驶过程中,传感器采集的自动驾驶车辆周围的环境信息。The road test data refers to the environmental information around the autonomous vehicle collected by the sensors during the autonomous driving process.
计算机设备获取传感器采集的路测数据,对路测数据进行感知处理,感知处理是指对路测数据进行目标检测以及目标跟踪。路测数据可以是点云数据或者周围环境图像。当路测数据为点云数据时,可以通过目标检测模型,如PointNet、PointPillar、PolarNet、Semantic Segment Models(语义分割模型)等目标检测模型中的任意一种对点云数据进行目标检测,确定每个待预测障碍物对应的三维包围框,包括每个待预测障碍物的中心点坐标、大小、朝向等。中心点坐标表示待预测障碍物的位置信息。当路测数据为周围环境图像时,可以通过目标检测模型,如SSD(Single Shot MultiBox Detector直接多目标检测)模型、RefineDet(Single-Shot Refinement neural network for Object Detection,精细直接多目标检测)、Mobilenet-SSD(Mobilenet based Single Shot MultiBox Detector,基于针对移动端视觉应用的高效卷积神经网络的直接多目标检测)模型、YOLO(You Only Look Once,统一实时目标检测)模型等中的任意一种对周围环境图像进行目标检测,确定待预测障碍物对应的二维包围框,包括待预测障碍物的中心点坐标、大小、朝向等。中心点坐标表示待预测障碍物的位置信息。The computer equipment acquires the drive test data collected by the sensor, and performs perceptual processing on the drive test data. Perceptual processing refers to target detection and target tracking on the drive test data. The drive test data can be point cloud data or surrounding environment images. When the drive test data is point cloud data, the point cloud data can be detected by any target detection model, such as PointNet, PointPillar, PolarNet, Semantic Segment Models (semantic segmentation model), etc. A three-dimensional bounding box corresponding to each obstacle to be predicted, including the coordinates, size, and orientation of the center point of each obstacle to be predicted. The coordinates of the center point represent the position information of the obstacle to be predicted. When the drive test data is an image of the surrounding environment, target detection models can be used, such as SSD (Single Shot MultiBox Detector direct multi-target detection) model, RefineDet (Single-Shot Refinement neural network for Object Detection, fine direct multi-target detection), Mobilenet -SSD (Mobilenet based Single Shot MultiBox Detector, direct multi-target detection based on efficient convolutional neural network for mobile vision applications) model, YOLO (You Only Look Once, unified real-time target detection) model, etc. The surrounding environment image is used for target detection, and the two-dimensional bounding box corresponding to the obstacle to be predicted is determined, including the coordinates, size, and orientation of the center point of the obstacle to be predicted. The coordinates of the center point represent the position information of the obstacle to be predicted.
在目标跟踪过程中,可以通过目标跟踪模型,如卡尔曼滤波器(kalman filter,简称KF)、无迹卡尔曼滤波器(UnscentedKalman Filter,简称UKF)等传统跟踪器中的任意一种预测后续帧中待检测障碍物的速度信息。通过对每帧路测数据进行目标检测以及目标跟踪,得到待预测障碍物在每帧的轨迹信息。由于待检测障碍物的轨迹信息可能为静止或匀速运动,为了提高轨迹预测的准确性,可以对轨迹信息进行采样,只采样非静止或非匀速变化的轨迹。计算机设备可以根据预设采样条件对待预测障碍物的轨迹信息进行采样处理,得到待预测障碍物的运动轨迹。预设采样条件是指交叉口(junction)区域的轨迹、曲率和速度大小发生变化的轨迹、发生换车道(lane change)以及超车道(cut in)的轨迹。运动轨迹包括多个轨迹点,每个轨迹点包括x方向和y方向坐标值。In the process of target tracking, any one of the traditional trackers such as Kalman filter (KF), Unscented Kalman Filter (UKF) and other traditional trackers can be used to predict subsequent frames. The speed information of the obstacle to be detected in . By performing target detection and target tracking on each frame of drive test data, the trajectory information of the obstacle to be predicted in each frame is obtained. Since the trajectory information of the obstacle to be detected may be stationary or moving at a uniform speed, in order to improve the accuracy of the trajectory prediction, the trajectory information can be sampled, and only non-stationary or non-uniformly changing trajectories are sampled. The computer equipment can sample and process the trajectory information of the obstacle to be predicted according to the preset sampling conditions, so as to obtain the motion trajectory of the obstacle to be predicted. The preset sampling conditions refer to trajectories in the junction area, trajectories with changes in curvature and speed, and trajectories with lane changes and cut ins. The motion trajectory includes a plurality of trajectory points, and each trajectory point includes coordinate values in the x-direction and the y-direction.
在本实施例中,通过对路测数据进行感知处理,得到路测数据中待预测障碍物的轨迹信息,根据预设采样条件对待预测障碍物的轨迹信息进行采样处理,得到待预测障碍物对应的运动轨迹。通过采样具有代表性的轨迹信息,能够有效提高轨迹预测的准确性。In this embodiment, the track information of the obstacle to be predicted in the drive test data is obtained by perceptual processing of the drive test data, and sampling processing is performed on the track information of the obstacle to be predicted according to the preset sampling conditions, so as to obtain the corresponding information of the obstacle to be predicted. movement trajectory. By sampling representative trajectory information, the accuracy of trajectory prediction can be effectively improved.
在其中一个实施例中,根据运动轨迹确定待预测障碍物对应的目标地图信息包括:根据运动轨迹确定对应的车道中心线;对车道中心线进行采样处理,得到待预测障碍物对应的目标地图信息。In one embodiment, determining the target map information corresponding to the obstacle to be predicted according to the motion trajectory includes: determining the corresponding lane center line according to the motion trajectory; sampling the lane center line to obtain the target map information corresponding to the obstacle to be predicted .
针对待预测障碍物的运动轨迹,确定运动轨迹的初始轨迹点的位置,并以该位置为圆心,确定半径为r的圆区域,如r为3m。计算机设备基于高精度地图确定与该圆区域存在交集的车道中心线,存在交集的车道中心线可以为多条,根据存在交集的多条车道中心线得到运动轨迹对应的目标地图信息。如果待预测障碍物的初始轨迹点的位置离车道边界比较近(可能发生变道),那么待预测障碍物的车道中心线包括初始轨迹点的位置所在的车道中心线和即将变道的车道中心线。由于道路上的车辆都是沿着车道行驶的,轨迹旁边的地图信息对轨迹的预测至关重要,为了提高轨迹预测的准确性,可以将运动轨迹对应的每条车道中心线均匀采样为N个点,即通过采样的点来表示每条车道中心线,每条车道中心线中包括N个位置点。采样的点数可以根据运动估计的时长以及需要预测的轨迹时长来进行设置。For the motion trajectory of the obstacle to be predicted, determine the position of the initial trajectory point of the motion trajectory, and take the position as the center of the circle to determine a circular area with a radius of r, for example, r is 3m. The computer device determines, based on the high-precision map, the lane centerlines that intersect with the circular area. There may be multiple lane centerlines that intersect, and the target map information corresponding to the motion trajectory is obtained according to the multiple lane centerlines that intersect. If the position of the initial trajectory point of the obstacle to be predicted is relatively close to the lane boundary (lane change may occur), then the lane centerline of the obstacle to be predicted includes the lane centerline where the initial trajectory point is located and the lane center to be changed. Wire. Since the vehicles on the road all drive along the lane, the map information next to the trajectory is very important to the trajectory prediction. In order to improve the accuracy of the trajectory prediction, the centerline of each lane corresponding to the motion trajectory can be uniformly sampled into N Points, that is, the sampled points represent each lane centerline, and each lane centerline includes N position points. The number of sampling points can be set according to the duration of motion estimation and the duration of the trajectory to be predicted.
在本实施例中,根据运动轨迹确定对应的车道中心线,对车道中心线进行采样处理,得到待预测障碍物对应的目标地图信息,能够准确获取与运动轨迹相关的目标地图信息,有利于提高轨迹预测的准确性。In this embodiment, the corresponding lane centerline is determined according to the motion trajectory, and the lane centerline is sampled to obtain the target map information corresponding to the obstacle to be predicted, and the target map information related to the motion trajectory can be accurately obtained, which is conducive to improving the The accuracy of trajectory prediction.
在其中一个实施例中,已训练的轨迹预测模型包括多头注意力网络,多头注意力网络中包括一维卷积层,一维卷积层用于对目标矩阵分别进行横坐标方向的特征提取以及纵坐标方向的特征提取。In one of the embodiments, the trained trajectory prediction model includes a multi-head attention network, and the multi-head attention network includes a one-dimensional convolution layer, and the one-dimensional convolution layer is used to perform feature extraction in the abscissa direction of the target matrix respectively and Feature extraction in the ordinate direction.
如图3所示,为已训练的轨迹预测模型的结构示意图。已训练的轨迹预测模型中包括依 次连接的嵌入网络、多头注意力网络和回归网络。多头注意力网络为transformer网络,“×N”表示transformer网络包括多个多头注意力层和前馈神经网络层,多头注意力层和前馈神经网络层之后都存在一个Add&Norm层。As shown in Figure 3, it is a schematic diagram of the structure of the trained trajectory prediction model. The trained trajectory prediction model includes sequentially connected embedding network, multi-head attention network and regression network. The multi-head attention network is a transformer network, and "×N" indicates that the transformer network includes multiple multi-head attention layers and feed-forward neural network layers. There is an Add&Norm layer after the multi-head attention layer and the feed-forward neural network layer.
多头注意力层通过多头注意力机制对目标矩阵进行特征提取,多头注意力机制能够关注目标矩阵中不同位置的轨迹点。将多个轨迹点的计算路径输入至前馈神经网络层,使得多头注意力网络中的矩阵向量互动更多,能够学到更复杂的关系。由于路径在前馈单元中没有依赖关系,可以通过前馈神经网络层并行执行多个轨迹点的计算路径,得到输出特征。The multi-head attention layer extracts the feature of the target matrix through the multi-head attention mechanism, and the multi-head attention mechanism can pay attention to the trajectory points in different positions in the target matrix. Inputting the computational paths of multiple trajectory points to the feedforward neural network layer makes the matrix-vector interactions in the multi-head attention network more interactive and can learn more complex relationships. Since the path has no dependencies in the feedforward unit, the output features can be obtained by executing the calculation path of multiple trajectory points in parallel through the feedforward neural network layer.
Add是残差网络,残差结构能够很好的消除层数加深所带来的信息损失问题。Norm是指Layer Normalization(层标准化),因此,Add&Norm单元用于将多头注意力层,或者前馈神经网络层的输入和输出做加法运算,并进行标准化操作。Layer Normalization用于将输入转化成均值为0,方差为1的数据,避免输入落在后续激活函数的饱和区。Add is a residual network, and the residual structure can eliminate the problem of information loss caused by deepening the number of layers. Norm refers to Layer Normalization (layer normalization). Therefore, the Add&Norm unit is used to add and normalize the input and output of the multi-head attention layer or feedforward neural network layer. Layer Normalization is used to convert the input into data with a mean of 0 and a variance of 1 to avoid the input falling into the saturation region of the subsequent activation function.
传统的transformer网络中包括Linear层,而本实施例中的transformer网络是改进后的transformer网络,具体方法是将传统的transformer网络中的Linear更换为一维卷积层。由此可通过一维卷积层对目标矩阵分别进行横坐标方向的特征提取以及纵坐标方向的特征提取,transformer网络的嵌入网络和回归网络均采用的是一维卷积网络,实现x方向和y方向的数据进行独立运算,有效提高了轨迹预测效率,轨迹预测的准确性也有所提高。The traditional transformer network includes a Linear layer, and the transformer network in this embodiment is an improved transformer network. The specific method is to replace the Linear in the traditional transformer network with a one-dimensional convolution layer. Therefore, the feature extraction in the abscissa direction and the feature extraction in the ordinate direction can be performed on the target matrix through the one-dimensional convolution layer. The data in the y direction is independently operated, which effectively improves the efficiency of trajectory prediction, and the accuracy of trajectory prediction is also improved.
在其中一个实施例中,如图4所示,对第一轨迹矩阵和第一地图矩阵进行嵌入处理,得到目标矩阵步骤包括:In one embodiment, as shown in FIG. 4 , the first trajectory matrix and the first map matrix are embedded, and the step of obtaining the target matrix includes:
步骤402,通过已训练的轨迹预测模型中的嵌入网络对第一轨迹矩阵和第一地图矩阵分别进行特征提取,获取嵌入网络的最后一层卷积层的通道数目,根据通道数据得到第一轨迹矩阵对应的第一特征矩阵和第一地图矩阵对应的第二特征矩阵。Step 402: Perform feature extraction on the first trajectory matrix and the first map matrix respectively through the embedding network in the trained trajectory prediction model, obtain the channel number of the last convolutional layer of the embedding network, and obtain the first trajectory according to the channel data. The first feature matrix corresponding to the matrix and the second feature matrix corresponding to the first map matrix.
步骤404,将第一特征矩阵和第二特征矩阵进行合并,得到组合矩阵。Step 404: Combine the first feature matrix and the second feature matrix to obtain a combined matrix.
步骤406,在组合矩阵中添加特征参数,对添加特征参数后的组合矩阵进行位置嵌入处理,得到目标矩阵。 Step 406 , adding feature parameters to the combined matrix, and performing position embedding processing on the combined matrix after adding the feature parameters to obtain a target matrix.
已训练的轨迹预测模型中包括嵌入(embedding)网络、多头注意力网络和回归网络,嵌入网络可以是一维卷积网络。嵌入网络是为了将第一轨迹矩阵和第一地图矩阵转换为多头注意力网络所需的矩阵格式,可用于在高维空间捕捉第一轨迹矩阵中轨迹点和第一地图矩阵中位置点之间的关系。通过嵌入网络对第一轨迹矩阵和第一地图矩阵分别进行特征提取,根据嵌入网络的最后一层卷积层的通道数目生成第一轨迹矩阵对应的第一特征矩阵和第一地图矩阵对应的第二特征矩阵。最后一层卷积层的通道数目可以用dim1来表示。第一特征矩阵可以表示为N_1×dim1×2,其中,N_1表示第一特征矩阵中的轨迹条数,2表示x和y坐标方 向。第二特征矩阵可以表示为N_2×dim1×2,其中,N_2表示第二特征矩阵中轨迹车道信息的条数,2表示x和y坐标方向。The trained trajectory prediction model includes an embedding network, a multi-head attention network and a regression network, and the embedding network can be a one-dimensional convolutional network. The embedding network is to convert the first trajectory matrix and the first map matrix into the matrix format required by the multi-head attention network, which can be used to capture the distance between the trajectory points in the first trajectory matrix and the position points in the first map matrix in a high-dimensional space Relationship. The feature extraction is performed on the first trajectory matrix and the first map matrix respectively through the embedding network, and the first feature matrix corresponding to the first trajectory matrix and the first feature matrix corresponding to the first map matrix are generated according to the number of channels of the last convolutional layer of the embedding network. Two feature matrices. The number of channels in the last convolutional layer can be represented by dim1. The first feature matrix can be represented as N_1×dim1×2, where N_1 represents the number of tracks in the first feature matrix, and 2 represents the x and y coordinate directions. The second feature matrix may be represented as N_2×dim1×2, where N_2 represents the number of track lane information in the second feature matrix, and 2 represents the x and y coordinate directions.
通过嵌入网络将第一特征矩阵和第二特征矩阵在第二个维度进行合并,得到组合矩阵,组合矩阵为一个四维度矩阵,组合矩阵可以表示为N_1×dim2×dim_1×2,其中,dim2表示第一特征矩阵和第二特征矩阵在第二个维度进行合并后,该第二维度的总特征数。dim2可以预先设置的,以使计算机设备根据该预设值对第一特征矩阵和第二特征矩阵进行合并。在合并过程中,遍历每一个待预测障碍物,若第二特征矩阵中待预测障碍物的轨迹对应的轨迹车道信息的条数+1大于dim2,则在第二特征矩阵中轨迹车道信息的条数中随机选择dim2-1个轨迹车道信息与第一特征矩阵中待预测障碍物的轨迹在第二维度进行合并;若第二特征矩阵中待预测障碍物的轨迹对应的轨迹车道信息的条数+1小于dim2,则需要在第二维度堆栈0矩阵,使得合并后的第二维度的总特征数为dim2。The first feature matrix and the second feature matrix are combined in the second dimension through the embedding network to obtain a combined matrix. The combined matrix is a four-dimensional matrix. The combined matrix can be expressed as N_1×dim2×dim_1×2, where dim2 represents After the first feature matrix and the second feature matrix are combined in the second dimension, the total number of features in the second dimension. dim2 can be preset, so that the computer device can combine the first feature matrix and the second feature matrix according to the preset value. In the merging process, each obstacle to be predicted is traversed. If the number of track lane information corresponding to the track of the obstacle to be predicted in the second feature matrix + 1 is greater than dim2, then the track lane information in the second feature matrix Randomly select dim2-1 track lane information from the data and merge the track of the obstacle to be predicted in the first feature matrix in the second dimension; if the number of track lane information corresponding to the track of the obstacle to be predicted in the second feature matrix +1 is less than dim2, you need to stack 0 matrices in the second dimension, so that the total number of features of the combined second dimension is dim2.
通过嵌入网络在组合矩阵的第二个维度添加特征参数,添加特征参数后的组合矩阵可以表示为N_1×(1+dim2)×dim_1×2,其中,1表示添加的特征参数,该特征参数可以是任意的数值。特征参数用于按比例收集地图和待预测障碍物的信息,以进行后续的轨迹预测。By embedding the network to add feature parameters in the second dimension of the combined matrix, the combined matrix after adding the feature parameters can be expressed as N_1×(1+dim2)×dim_1×2, where 1 represents the added feature parameter, which can be is an arbitrary numerical value. Feature parameters are used to collect information on the map and obstacles to be predicted at scale for subsequent trajectory prediction.
由于多头注意力网络中没有针对待预测障碍物与地图信息间的位置关系的处理,可以对添加特征参数后的组合矩阵进行位置嵌入(position embedding)处理,得到目标矩阵。通过位置嵌入可以标识待预测障碍物与地图信息在该矩阵中的位置关系,用于弥补位置信息的缺失。目标矩阵可以直接输入多头注意力网络中进行特征提取。Since there is no processing of the positional relationship between the obstacles to be predicted and the map information in the multi-head attention network, the combined matrix after adding the feature parameters can be processed by position embedding to obtain the target matrix. The positional relationship between the obstacles to be predicted and the map information in the matrix can be identified by position embedding, which is used to make up for the lack of positional information. The target matrix can be directly input into the multi-head attention network for feature extraction.
在本实施例中,通过嵌入网络对第一轨迹矩阵和第一地图矩阵分别进行特征提取,根据嵌入网络的最后一层卷积层的通道数目得到第一轨迹矩阵对应的第一特征矩阵和第一地图矩阵对应的第二特征矩阵,能够得到多头注意力网络所需的矩阵格式,并且可用于在高维空间捕捉第一轨迹矩阵中轨迹点和第一地图矩阵中位置点之间的关系。将第一特征矩阵和第二特征矩阵进行合并,得到组合矩阵,在组合矩阵中添加特征参数,能够快速收集地图和待预测障碍物的信息,以进行后续的轨迹预测,对添加特征参数后的组合矩阵进行位置嵌入处理,能够弥补多头注意力网络中待预测障碍物与地图信息间位置信息的缺失,能够进一步提高轨迹预测的准确性。In this embodiment, feature extraction is performed on the first trajectory matrix and the first map matrix respectively through the embedding network, and the first feature matrix and the first feature matrix corresponding to the first trajectory matrix are obtained according to the number of channels of the last convolutional layer of the embedding network. The second feature matrix corresponding to a map matrix can obtain the matrix format required by the multi-head attention network, and can be used to capture the relationship between the trajectory points in the first trajectory matrix and the position points in the first map matrix in a high-dimensional space. The first feature matrix and the second feature matrix are combined to obtain a combined matrix, and feature parameters are added to the combined matrix, which can quickly collect information on the map and obstacles to be predicted for subsequent trajectory prediction. Combining the matrix for position embedding processing can make up for the lack of position information between the obstacles to be predicted and the map information in the multi-head attention network, and can further improve the accuracy of trajectory prediction.
在其中一个实施例中,在获取待预测障碍物的运动轨迹之前,上述方法还包括:获取训练样本,训练样本包括目标障碍物的轨迹信息和目标障碍物对应的样本地图信息;将轨迹信息转换为对应的第二轨迹矩阵,以及将样本地图信息转换为对应的第二地图矩阵;将第二轨迹矩阵和第二地图矩阵输入至待训练的轨迹预测模型中,输出目标障碍物的未来轨迹;根据轨迹信息以及未来轨迹计算待训练的轨迹预测模型的模型损失,根据模型损失更新待训练的 轨迹预测模型的模型参数,直至满足预设条件,得到已训练的轨迹预测模型。In one embodiment, before acquiring the motion trajectory of the obstacle to be predicted, the method further includes: acquiring a training sample, where the training sample includes trajectory information of the target obstacle and sample map information corresponding to the target obstacle; converting the trajectory information into Be the corresponding second trajectory matrix, and convert the sample map information into the corresponding second map matrix; input the second trajectory matrix and the second map matrix into the trajectory prediction model to be trained, and output the future trajectory of the target obstacle; The model loss of the trajectory prediction model to be trained is calculated according to the trajectory information and the future trajectory, and the model parameters of the trajectory prediction model to be trained are updated according to the model loss until the preset conditions are met, and the trained trajectory prediction model is obtained.
训练样本是指用于训练轨迹预测模型的样本数据,训练样本中包括目标障碍物的轨迹信息和目标障碍物对应的样本地图信息。目标障碍物是指动态障碍物,如车辆、行人等。具体的,计算机设备通过获取传感器采集的历史路测数据,对历史路测数据进行感知处理,得到历史路测数据中动态障碍物的轨迹信息。感知处理是指进行目标检测和目标跟踪,与上述轨迹预测模型在应用过程中的感知处理方式是相同的,此处不再赘述。同样的,计算机设备根据预设采样条件对动态障碍物的轨迹信息进行采样处理,得到动态障碍物对应的轨迹样本集。预设采样条件可以是交叉口(junction)区域的轨迹、曲率和速度大小发生变化的轨迹、发生换车道(lane change)以及超车道(cut in)的轨迹。轨迹样本集中包括多个动态障碍物的历史轨迹,每条历史轨迹包括多个轨迹点,如每条历史轨迹可以包括50个轨迹点。每个轨迹点包括x方向和y方向坐标值。进而根据轨迹样本集中每条历史轨迹确定动态障碍物对应的轨迹车道信息,得到动态障碍物对应的地图样本集。轨迹车道信息的采样方式和与上述轨迹预测模型在应用过程中的采样方式是相同的,此处不再赘述。在轨迹样本集和地图样本集中分别选取目标障碍物对应的轨迹信息和样本地图信息,生成训练样本。可以将轨迹样本集和地图样本集按照预设比例划分为训练样本、测试集和验证集。例如,预设比例可以为3:1:1。将轨迹样本集和地图样本集划分为三个集合,是为了选出准确性最高、泛化能力最佳的模型。The training sample refers to the sample data used to train the trajectory prediction model, and the training sample includes the trajectory information of the target obstacle and the sample map information corresponding to the target obstacle. The target obstacle refers to dynamic obstacles, such as vehicles, pedestrians, etc. Specifically, the computer device obtains the historical drive test data collected by the sensor, performs perception processing on the historical drive test data, and obtains the trajectory information of the dynamic obstacles in the historical drive test data. Perceptual processing refers to target detection and target tracking, which is the same as the perceptual processing method in the application process of the above trajectory prediction model, and will not be repeated here. Similarly, the computer device performs sampling processing on the trajectory information of the dynamic obstacle according to the preset sampling conditions, and obtains a trajectory sample set corresponding to the dynamic obstacle. The preset sampling conditions can be a trajectory in a junction area, a trajectory with a change in curvature and speed, a trajectory with a lane change and a cut in. The trajectory sample set includes historical trajectories of multiple dynamic obstacles, and each historical trajectory includes multiple trajectory points. For example, each historical trajectory may include 50 trajectory points. Each track point includes x-direction and y-direction coordinate values. Then, the track lane information corresponding to the dynamic obstacle is determined according to each historical track in the track sample set, and the map sample set corresponding to the dynamic obstacle is obtained. The sampling method of the trajectory lane information is the same as the sampling method in the application process of the above trajectory prediction model, and will not be repeated here. The trajectory information and sample map information corresponding to the target obstacle are respectively selected from the trajectory sample set and the map sample set to generate training samples. The trajectory sample set and the map sample set can be divided into training samples, test sets and validation sets according to a preset ratio. For example, the preset ratio can be 3:1:1. The purpose of dividing the trajectory sample set and the map sample set into three sets is to select the model with the highest accuracy and the best generalization ability.
轨迹预测模型的训练过程和应用过程中的轨迹预测方式是相同的,即将训练样本中的轨迹信息转换为对应的第二轨迹矩阵,以及将训练样本中的样本地图信息转换为对应的第二地图矩阵,将第二轨迹矩阵和第二地图矩阵输入至待训练的轨迹预测模型中,输出目标障碍物的未来轨迹。从而根据轨迹信息以及未来轨迹计算待训练的轨迹预测模型的模型损失,根据模型损失来调节模型参数,得到已训练的轨迹预测模型。例如,模型损失可以是MSE均方误差损失、交叉熵损失等现有的损失函数,通过损失函数的输出反向传播来调节模型参数,由于模型训练过程是一个迭代训练的过程,需要经过多个epoch,1个epoch表示使用所有的训练样本训练一次,每一个epoch会输出一个模型参数。通过验证集可以确定准确度最高的模型参数,即判断哪一个epoch输出的模型参数得到的未来轨迹更准确,具体判断方式可以是判断网络损失值是否达到损失阈值,也可以是迭代次数是否达到迭代次数阈值,若网络损失值达到损失阈值,或者迭代次数达到迭代次数阈值,可以将相应epoch输出的模型参数作为最终的模型参数,此时模型为已训练的轨迹预测模型。在得到已训练的轨迹预测模型后,可以使用测试集进行模型预测,以衡量该模型的性能。若测试集测试的模型性能较差,则可以利用训练样本去重新调整该模型的模型参数,直至得到准确度最高的模型参数。The training process of the trajectory prediction model is the same as the trajectory prediction method in the application process, that is, the trajectory information in the training sample is converted into the corresponding second trajectory matrix, and the sample map information in the training sample is converted into the corresponding second map matrix, input the second trajectory matrix and the second map matrix into the trajectory prediction model to be trained, and output the future trajectory of the target obstacle. Thus, the model loss of the trajectory prediction model to be trained is calculated according to the trajectory information and the future trajectory, and the model parameters are adjusted according to the model loss to obtain the trained trajectory prediction model. For example, the model loss can be existing loss functions such as MSE mean square error loss, cross entropy loss, etc. The model parameters are adjusted through the output backpropagation of the loss function. Since the model training process is an iterative training process, it needs to go through multiple epoch, 1 epoch means that all training samples are used for training once, and each epoch will output a model parameter. The model parameters with the highest accuracy can be determined through the validation set, that is, to determine which epoch outputs the model parameters to obtain a more accurate future trajectory. The specific judgment method can be to determine whether the network loss value reaches the loss threshold, or whether the number of iterations reaches the iteration number. The number of times threshold, if the network loss value reaches the loss threshold, or the number of iterations reaches the threshold of the number of iterations, the model parameters output by the corresponding epoch can be used as the final model parameters, and the model is the trained trajectory prediction model. After getting the trained trajectory prediction model, you can use the test set for model prediction to measure the performance of the model. If the performance of the model tested in the test set is poor, the model parameters of the model can be readjusted by using the training samples until the model parameters with the highest accuracy are obtained.
在本实施例中,获取训练样本,训练样本包括目标障碍物的轨迹信息和目标障碍物对应 的样本地图信息,将轨迹信息转换为对应的第二轨迹矩阵,以及将样本地图信息转换为对应的第二地图矩阵,将第二轨迹矩阵和第二地图矩阵输入至待训练的轨迹预测模型中,计算待训练的轨迹预测模型的模型损失,根据模型损失更新待训练的轨迹预测模型的模型参数,得到已训练的轨迹预测模型。由于轨迹预测模型中的多头注意力机制能够从不同的位置关注目标矩阵中目标障碍物与样本地图信息之间的关系,可获取更为丰富、全面的特征信息,实现充分提取地图信息与障碍物信息之间更深层次的相关性,提高了轨迹预测的准确性。In this embodiment, a training sample is obtained, the training sample includes trajectory information of the target obstacle and sample map information corresponding to the target obstacle, the trajectory information is converted into a corresponding second trajectory matrix, and the sample map information is converted into a corresponding The second map matrix, the second trajectory matrix and the second map matrix are input into the trajectory prediction model to be trained, the model loss of the trajectory prediction model to be trained is calculated, and the model parameters of the trajectory prediction model to be trained are updated according to the model loss, Get the trained trajectory prediction model. Since the multi-head attention mechanism in the trajectory prediction model can pay attention to the relationship between the target obstacle and the sample map information in the target matrix from different positions, it can obtain more abundant and comprehensive feature information, and fully extract map information and obstacles. The deeper correlation between information improves the accuracy of trajectory prediction.
在其中一个实施例中,如图5所示,提供了一种轨迹预测装置,包括:轨迹获取模块502、地图获取模块504、矩阵转换模块506和轨迹预测模块508,其中:In one embodiment, as shown in FIG. 5, a trajectory prediction apparatus is provided, including: a trajectory acquisition module 502, a map acquisition module 504, a matrix conversion module 506, and a trajectory prediction module 508, wherein:
轨迹获取模502,用于获取待预测障碍物的运动轨迹。The trajectory acquisition module 502 is used to acquire the motion trajectory of the obstacle to be predicted.
地图获取模块504,用于根据运动轨迹确定待预测障碍物对应的目标地图信息。The map acquisition module 504 is configured to determine target map information corresponding to the obstacle to be predicted according to the motion trajectory.
矩阵转换模块506,用于将运动轨迹转换为对应的第一轨迹矩阵,以及将目标地图信息转换为对应的第一地图矩阵。The matrix conversion module 506 is configured to convert the motion trajectory into a corresponding first trajectory matrix, and convert the target map information into a corresponding first map matrix.
轨迹预测模块508,用于将第一轨迹矩阵和第一地图矩阵输入至已训练的轨迹预测模型中,对第一轨迹矩阵和第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对目标矩阵进行特征提取,得到输出特征,对输出特征进行回归处理,得到待检测障碍物的预测轨迹。The trajectory prediction module 508 is configured to input the first trajectory matrix and the first map matrix into the trained trajectory prediction model, perform embedding processing on the first trajectory matrix and the first map matrix, and obtain the target matrix, based on the multi-head attention mechanism Perform feature extraction on the target matrix to obtain output features, and perform regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
在其中一个实施例中,已训练的轨迹预测模型包括多头注意力网络,多头注意力网络中包括一维卷积层,轨迹预测模块508还用于根据一维卷积层对目标矩阵分别进行横坐标方向的特征提取以及纵坐标方向的特征提取。In one embodiment, the trained trajectory prediction model includes a multi-head attention network, and the multi-head attention network includes a one-dimensional convolutional layer, and the trajectory prediction module 508 is further configured to perform a horizontal cross-section on the target matrix according to the one-dimensional convolutional layer. Feature extraction in the coordinate direction and feature extraction in the ordinate direction.
在其中一个实施例中,轨迹预测模块508还用于通过已训练的轨迹预测模型中的嵌入网络对第一轨迹矩阵和第一地图矩阵分别进行特征提取,获取嵌入网络的最后一层卷积层的通道数目,根据通道数目得到第一轨迹矩阵对应的第一特征矩阵和第一地图矩阵对应的第二特征矩阵;将第一特征矩阵和第二特征矩阵进行合并,得到组合矩阵;在组合矩阵中添加特征参数,对添加特征参数后的组合矩阵进行位置嵌入处理,得到目标矩阵。In one embodiment, the trajectory prediction module 508 is further configured to perform feature extraction on the first trajectory matrix and the first map matrix respectively through the embedding network in the trained trajectory prediction model to obtain the last convolutional layer of the embedding network According to the number of channels, the first feature matrix corresponding to the first trajectory matrix and the second feature matrix corresponding to the first map matrix are obtained according to the number of channels; the first feature matrix and the second feature matrix are merged to obtain a combined matrix; in the combined matrix Add feature parameters to , and perform position embedding processing on the combined matrix after adding feature parameters to obtain the target matrix.
在其中一个实施例中,轨迹获取模块508还用于获取路测数据,对路测数据进行感知处理,得到路测数据中待预测障碍物的轨迹信息;根据预设采样条件对待预测障碍物的轨迹信息进行采样处理,得到待预测障碍物对应的运动轨迹。In one embodiment, the trajectory acquisition module 508 is further configured to acquire drive test data, perform perceptual processing on the drive test data, and obtain trajectory information of obstacles to be predicted in the drive test data; The trajectory information is sampled to obtain the motion trajectory corresponding to the obstacle to be predicted.
在其中一个实施例中,地图获取模块504还用于根据运动轨迹确定对应的车道中心线;对车道中心线进行采样处理,得到待预测障碍物对应的目标地图信息。In one embodiment, the map acquisition module 504 is further configured to determine the corresponding lane centerline according to the motion trajectory; perform sampling processing on the lane centerline to obtain target map information corresponding to the obstacle to be predicted.
在其中一个实施例中,上述装置还包括:In one embodiment, the above-mentioned device further includes:
样本获取模块,用于获取训练样本,训练样本包括目标障碍物的轨迹信息和目标障碍物 对应的样本地图信息。The sample acquisition module is used to acquire training samples, and the training samples include the trajectory information of the target obstacle and the sample map information corresponding to the target obstacle.
样本转换模块,用于将轨迹信息转换为对应的第二轨迹矩阵,以及将样本地图信息转换为对应的第二地图矩阵。The sample conversion module is configured to convert the trajectory information into a corresponding second trajectory matrix, and convert the sample map information into a corresponding second map matrix.
轨迹运算模块,用于将第二轨迹矩阵和第二地图矩阵输入至待训练的轨迹预测模型中,输出目标障碍物的未来轨迹。The trajectory calculation module is used to input the second trajectory matrix and the second map matrix into the trajectory prediction model to be trained, and output the future trajectory of the target obstacle.
参数更新模块,用于根据轨迹信息以及未来轨迹计算待训练的轨迹预测模型的模型损失,根据模型损失更新待训练的轨迹预测模型的模型参数,得到已训练的轨迹预测模型。The parameter updating module is used to calculate the model loss of the trajectory prediction model to be trained according to the trajectory information and future trajectories, update the model parameters of the trajectory prediction model to be trained according to the model loss, and obtain the trained trajectory prediction model.
关于轨迹预测装置的具体限定可以参见上文中对于轨迹预测方法的限定,在此不再赘述。上述轨迹预测装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the trajectory prediction apparatus, reference may be made to the above limitation on the trajectory prediction method, which will not be repeated here. Each module in the above-mentioned trajectory prediction apparatus can be implemented in whole or in part by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
在其中一个实施例中,提供了一种计算机设备,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、通信接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储一种轨迹预测方法的数据。该计算机设备的通信接口用于与外部的终端连接通信。该计算机可读指令被处理器执行时以实现一种轨迹预测方法。In one of the embodiments, a computer device is provided, the internal structure of which can be shown in FIG. 6 . The computer device includes a processor, memory, a communication interface, and a database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The non-volatile storage medium stores an operating system, computer readable instructions and a database. The internal memory provides an environment for the execution of the operating system and computer-readable instructions in the non-volatile storage medium. The database of the computer device is used to store data for a trajectory prediction method. The communication interface of the computer device is used to connect and communicate with an external terminal. The computer readable instructions, when executed by a processor, implement a trajectory prediction method.
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 6 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
一种计算机设备,包括存储器及一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述各个方法实施例中的步骤。A computer device, comprising a memory and one or more processors, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, makes the one or more processors execute the above methods to implement steps in the example.
一个或多个存储有计算机可读指令的计算机存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述各个方法实施例中的步骤。One or more computer storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to perform the steps in each of the foregoing method embodiments.
其中,该计算机存储介质为可读存储介质,可读存储介质可以是非易失性,也可以是易失性的。Wherein, the computer storage medium is a readable storage medium, and the readable storage medium may be non-volatile or volatile.
在其中一个实施例中,提供了一种交通工具,该交通工具具体可以包括自动驾驶车辆,交通工具包括上述计算机设备,可以执行上述轨迹预测方法实施例中的步骤。In one of the embodiments, a vehicle is provided, the vehicle may specifically include an autonomous driving vehicle, and the vehicle includes the above computer device, which can execute the steps in the above embodiment of the trajectory prediction method.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计 算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile computer. In the readable storage medium, the computer-readable instructions, when executed, may include the processes of the foregoing method embodiments. Wherein, any reference to memory, storage, database or other medium used in the various embodiments provided in this application may include non-volatile and/or volatile memory. Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be noted that, for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (20)

  1. 一种轨迹预测方法,其特征在于,所述方法包括:A trajectory prediction method, characterized in that the method comprises:
    获取待预测障碍物的运动轨迹;Obtain the motion trajectory of the obstacle to be predicted;
    根据所述运动轨迹确定所述待预测障碍物对应的目标地图信息;Determine the target map information corresponding to the obstacle to be predicted according to the motion trajectory;
    将所述运动轨迹转换为对应的第一轨迹矩阵,以及将所述目标地图信息转换为对应的第一地图矩阵;及converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix; and
    将所述第一轨迹矩阵和所述第一地图矩阵输入至已训练的轨迹预测模型中,对所述第一轨迹矩阵和所述第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对所述目标矩阵进行特征提取,得到输出特征,对所述输出特征进行回归处理,得到所述待检测障碍物的预测轨迹。Inputting the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and embedding the first trajectory matrix and the first map matrix to obtain a target matrix, based on multi-head attention The mechanism performs feature extraction on the target matrix to obtain output features, and performs regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
  2. 根据权利要求1所述的方法,其特征在于,所述获取待预测障碍物的运动轨迹包括:The method according to claim 1, wherein the acquiring the motion trajectory of the obstacle to be predicted comprises:
    获取路测数据,对所述路测数据进行感知处理,得到所述路测数据中待预测障碍物的轨迹信息;及Acquiring drive test data, performing perception processing on the drive test data, and obtaining trajectory information of obstacles to be predicted in the drive test data; and
    根据预设采样条件对所述待预测障碍物的轨迹信息进行采样处理,得到所述待预测障碍物对应的运动轨迹。The trajectory information of the to-be-predicted obstacle is sampled according to preset sampling conditions to obtain a motion trajectory corresponding to the to-be-predicted obstacle.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述运动轨迹确定所述待预测障碍物对应的目标地图信息包括:The method according to claim 1, wherein the determining the target map information corresponding to the obstacle to be predicted according to the motion trajectory comprises:
    根据所述运动轨迹确定对应的车道中心线;及determining the corresponding lane centerline according to the motion trajectory; and
    对所述车道中心线进行采样处理,得到所述待预测障碍物对应的目标地图信息。Perform sampling processing on the lane center line to obtain target map information corresponding to the obstacle to be predicted.
  4. 根据权利要求1所述的方法,其特征在于,所述已训练的轨迹预测模型包括多头注意力网络,所述多头注意力网络中包括一维卷积层,所述一维卷积层用于对所述目标矩阵分别进行横坐标方向的特征提取以及纵坐标方向的特征提取。The method according to claim 1, wherein the trained trajectory prediction model comprises a multi-head attention network, the multi-head attention network comprises a one-dimensional convolution layer, and the one-dimensional convolution layer is used for The feature extraction in the abscissa direction and the feature extraction in the ordinate direction are respectively performed on the target matrix.
  5. 根据权利要求1所述的方法,其特征在于,所述对所述第一轨迹矩阵和所述第一地图矩阵进行嵌入处理,得到目标矩阵包括:The method according to claim 1, wherein the performing embedding processing on the first trajectory matrix and the first map matrix to obtain a target matrix comprises:
    通过所述已训练的轨迹预测模型中的嵌入网络对所述第一轨迹矩阵和所述第一地图矩阵分别进行特征提取,获取所述嵌入网络的最后一层卷积层的通道数目,根据所述通道数目得到所述第一轨迹矩阵对应的第一特征矩阵和所述第一地图矩阵对应的第二特征矩阵;Perform feature extraction on the first trajectory matrix and the first map matrix respectively through the embedding network in the trained trajectory prediction model, and obtain the number of channels of the last convolutional layer of the embedding network. The number of channels obtains the first feature matrix corresponding to the first trajectory matrix and the second feature matrix corresponding to the first map matrix;
    将所述第一特征矩阵和所述第二特征矩阵进行合并,得到组合矩阵;及combining the first feature matrix and the second feature matrix to obtain a combined matrix; and
    在所述组合矩阵中添加特征参数,对添加特征参数后的组合矩阵进行位置嵌入处理,得到目标矩阵。A feature parameter is added to the combined matrix, and a position embedding process is performed on the combined matrix after adding the feature parameter to obtain a target matrix.
  6. 根据权利要求1至5任意一项所述的方法,其特征在于,在所述获取待预测障碍物的运动轨迹之前,所述方法还包括:The method according to any one of claims 1 to 5, characterized in that before acquiring the motion trajectory of the obstacle to be predicted, the method further comprises:
    获取训练样本,所述训练样本包括目标障碍物的轨迹信息和所述目标障碍物对应的样本地图信息;acquiring training samples, the training samples including the trajectory information of the target obstacle and the sample map information corresponding to the target obstacle;
    将所述轨迹信息转换为对应的第二轨迹矩阵,以及将所述样本地图信息转换为对应的第二地图矩阵;converting the trajectory information into a corresponding second trajectory matrix, and converting the sample map information into a corresponding second map matrix;
    将所述第二轨迹矩阵和所述第二地图矩阵输入至待训练的轨迹预测模型中,输出所述目标障碍物的未来轨迹;及Inputting the second trajectory matrix and the second map matrix into the trajectory prediction model to be trained, and outputting the future trajectory of the target obstacle; and
    根据所述轨迹信息以及所述未来轨迹计算所述待训练的轨迹预测模型的模型损失,根据所述模型损失更新所述待训练的轨迹预测模型的模型参数,得到已训练的轨迹预测模型。The model loss of the trajectory prediction model to be trained is calculated according to the trajectory information and the future trajectory, and the model parameters of the trajectory prediction model to be trained are updated according to the model loss to obtain a trained trajectory prediction model.
  7. 一种轨迹预测装置,包括:A trajectory prediction device, comprising:
    轨迹获取模块,用于获取待预测障碍物的运动轨迹;The trajectory acquisition module is used to acquire the motion trajectory of the obstacle to be predicted;
    地图获取模块,用于根据所述运动轨迹确定所述待预测障碍物对应的目标地图信息;a map acquisition module, configured to determine target map information corresponding to the to-be-predicted obstacle according to the motion trajectory;
    矩阵转换模块,用于将所述运动轨迹转换为对应的第一轨迹矩阵,以及将所述目标地图信息转换为对应的第一地图矩阵;及a matrix conversion module for converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix; and
    轨迹预测模块,用于将所述第一轨迹矩阵和所述第一地图矩阵输入至已训练的轨迹预测模型中,对所述第一轨迹矩阵和所述第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对所述目标矩阵进行特征提取,得到输出特征,对所述输出特征进行回归处理,得到所述待检测障碍物的预测轨迹。A trajectory prediction module, configured to input the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and perform embedding processing on the first trajectory matrix and the first map matrix to obtain a target Matrix, feature extraction is performed on the target matrix based on the multi-head attention mechanism to obtain output features, and regression processing is performed on the output features to obtain the predicted trajectory of the obstacle to be detected.
  8. 根据权利要求7所述的装置,其特征在于,所述已训练的轨迹预测模型包括多头注意力网络,所述多头注意力网络中包括一维卷积层,所述轨迹预测模块还用于根据所述一维卷积层对所述目标矩阵分别进行横坐标方向的特征提取以及纵坐标方向的特征提取。The apparatus according to claim 7, wherein the trained trajectory prediction model comprises a multi-head attention network, the multi-head attention network includes a one-dimensional convolution layer, and the trajectory prediction module is further configured to The one-dimensional convolution layer performs feature extraction in the abscissa direction and feature extraction in the ordinate direction for the target matrix, respectively.
  9. 根据权利要求7所述的装置,其特征在于,所述轨迹预测模块还用于通过所述已训练的轨迹预测模型中的嵌入网络对所述第一轨迹矩阵和所述第一地图矩阵分别进行特征提取,获取所述嵌入网络的最后一层卷积层的通道数目,根据所述通道数目得到所述第一轨迹矩阵对应的第一特征矩阵和所述第一地图矩阵对应的第二特征矩阵;将所述第一特征矩阵和所述第二特征矩阵进行合并,得到组合矩阵;及在所述组合矩阵中添加特征参数, 对添加特征参数后的组合矩阵进行位置嵌入处理,得到目标矩阵。The device according to claim 7, wherein the trajectory prediction module is further configured to perform the first trajectory matrix and the first map matrix on the first trajectory matrix and the first map matrix respectively through an embedding network in the trained trajectory prediction model. Feature extraction, obtaining the number of channels of the last convolutional layer of the embedding network, and obtaining a first feature matrix corresponding to the first trajectory matrix and a second feature matrix corresponding to the first map matrix according to the number of channels ; Combine the first feature matrix and the second feature matrix to obtain a combined matrix; and add a feature parameter in the combined matrix, and perform position embedding processing on the combined matrix after adding the feature parameter to obtain a target matrix.
  10. 根据权利要求7所述的装置,其特征在于,所述轨迹获取模块还用于获取路测数据,对所述路测数据进行感知处理,得到所述路测数据中待预测障碍物的轨迹信息;及根据预设采样条件对所述待预测障碍物的轨迹信息进行采样处理,得到所述待预测障碍物对应的运动轨迹。The device according to claim 7, wherein the trajectory acquisition module is further configured to acquire drive test data, perform perceptual processing on the drive test data, and obtain trajectory information of obstacles to be predicted in the drive test data ; and perform sampling processing on the trajectory information of the obstacle to be predicted according to preset sampling conditions, to obtain a motion trajectory corresponding to the obstacle to be predicted.
  11. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device comprising a memory and one or more processors, the memory having computer-readable instructions stored in the memory that, when executed by the one or more processors, cause the one or more processors to Each processor performs the following steps:
    获取待预测障碍物的运动轨迹;Obtain the motion trajectory of the obstacle to be predicted;
    根据所述运动轨迹确定所述待预测障碍物对应的目标地图信息;Determine the target map information corresponding to the obstacle to be predicted according to the motion trajectory;
    将所述运动轨迹转换为对应的第一轨迹矩阵,以及将所述目标地图信息转换为对应的第一地图矩阵;及converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix; and
    将所述第一轨迹矩阵和所述第一地图矩阵输入至已训练的轨迹预测模型中,对所述第一轨迹矩阵和所述第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对所述目标矩阵进行特征提取,得到输出特征,对所述输出特征进行回归处理,得到所述待检测障碍物的预测轨迹。Inputting the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and embedding the first trajectory matrix and the first map matrix to obtain a target matrix, based on multi-head attention The mechanism performs feature extraction on the target matrix to obtain output features, and performs regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
  12. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:所述已训练的轨迹预测模型包括多头注意力网络,所述多头注意力网络中包括一维卷积层,所述一维卷积层用于对所述目标矩阵分别进行横坐标方向的特征提取以及纵坐标方向的特征提取。The computer device according to claim 11, wherein when the processor executes the computer-readable instructions, the processor further executes the following steps: the trained trajectory prediction model comprises a multi-head attention network, and the multi-head attention The network includes a one-dimensional convolution layer, and the one-dimensional convolution layer is used to perform feature extraction in the abscissa direction and feature extraction in the ordinate direction respectively for the target matrix.
  13. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:通过所述已训练的轨迹预测模型中的嵌入网络对所述第一轨迹矩阵和所述第一地图矩阵分别进行特征提取,获取所述嵌入网络的最后一层卷积层的通道数目,根据所述通道数目得到所述第一轨迹矩阵对应的第一特征矩阵和所述第一地图矩阵对应的第二特征矩阵;将所述第一特征矩阵和所述第二特征矩阵进行合并,得到组合矩阵;及在所述组合矩阵中添加特征参数,对添加特征参数后的组合矩阵进行位置嵌入处理,得到目标矩阵。The computer device according to claim 11, wherein, when the processor executes the computer-readable instructions, the processor further performs the following step: using an embedding network in the trained trajectory prediction model to analyze the first trajectory The feature extraction is performed on the matrix and the first map matrix respectively, the number of channels of the last convolutional layer of the embedding network is obtained, and the first feature matrix corresponding to the first trajectory matrix and the first feature matrix corresponding to the first trajectory matrix are obtained according to the number of channels A second feature matrix corresponding to the first map matrix; combining the first feature matrix and the second feature matrix to obtain a combined matrix; and adding a feature parameter to the combined matrix, the combination after adding the feature parameter The matrix is subjected to position embedding processing to obtain the target matrix.
  14. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:获取路测数据,对所述路测数据进行感知处理,得到所述路测数据中待预测障碍物的轨迹信息;及根据预设采样条件对所述待预测障碍物的轨迹信息 进行采样处理,得到所述待预测障碍物对应的运动轨迹。The computer device according to claim 11, wherein, when the processor executes the computer-readable instructions, the processor further performs the following steps: acquiring drive test data, performing perception processing on the drive test data, and obtaining the drive test data. The trajectory information of the obstacle to be predicted in the measured data; and the trajectory information of the obstacle to be predicted is sampled according to the preset sampling condition, and the motion trajectory corresponding to the obstacle to be predicted is obtained.
  15. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:根据所述运动轨迹确定对应的车道中心线;及对所述车道中心线进行采样处理,得到所述待预测障碍物对应的目标地图信息。The computer device according to claim 11, wherein when the processor executes the computer-readable instructions, the processor further executes the following steps: determining a corresponding lane centerline according to the motion trajectory; Perform sampling processing to obtain target map information corresponding to the obstacle to be predicted.
  16. 一个或多个存储有计算机可读指令的计算机存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more computer storage media storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the following steps:
    获取待预测障碍物的运动轨迹;Obtain the motion trajectory of the obstacle to be predicted;
    根据所述运动轨迹确定所述待预测障碍物对应的目标地图信息;Determine the target map information corresponding to the obstacle to be predicted according to the motion trajectory;
    将所述运动轨迹转换为对应的第一轨迹矩阵,以及将所述目标地图信息转换为对应的第一地图矩阵;及converting the motion trajectory into a corresponding first trajectory matrix, and converting the target map information into a corresponding first map matrix; and
    将所述第一轨迹矩阵和所述第一地图矩阵输入至已训练的轨迹预测模型中,对所述第一轨迹矩阵和所述第一地图矩阵进行嵌入处理,得到目标矩阵,基于多头注意力机制对所述目标矩阵进行特征提取,得到输出特征,对所述输出特征进行回归处理,得到所述待检测障碍物的预测轨迹。Inputting the first trajectory matrix and the first map matrix into the trained trajectory prediction model, and embedding the first trajectory matrix and the first map matrix to obtain a target matrix, based on multi-head attention The mechanism performs feature extraction on the target matrix to obtain output features, and performs regression processing on the output features to obtain the predicted trajectory of the obstacle to be detected.
  17. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:所述已训练的轨迹预测模型包括多头注意力网络,所述多头注意力网络中包括一维卷积层,所述一维卷积层用于对所述目标矩阵分别进行横坐标方向的特征提取以及纵坐标方向的特征提取。The storage medium according to claim 16, wherein the computer-readable instructions, when executed by the processor, further perform the following steps: the trained trajectory prediction model comprises a multi-head attention network, and the multi-head attention The force network includes a one-dimensional convolution layer, and the one-dimensional convolution layer is used to perform feature extraction in the abscissa direction and feature extraction in the ordinate direction respectively for the target matrix.
  18. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:通过所述已训练的轨迹预测模型中的嵌入网络对所述第一轨迹矩阵和所述第一地图矩阵分别进行特征提取,获取所述嵌入网络的最后一层卷积层的通道数目,根据所述通道数目得到所述第一轨迹矩阵对应的第一特征矩阵和所述第一地图矩阵对应的第二特征矩阵;将所述第一特征矩阵和所述第二特征矩阵进行合并,得到组合矩阵;及在所述组合矩阵中添加特征参数,对添加特征参数后的组合矩阵进行位置嵌入处理,得到目标矩阵。The storage medium according to claim 16, wherein when the computer-readable instructions are executed by the processor, the following step is further performed: performing the first step on the first Feature extraction is performed on the trajectory matrix and the first map matrix respectively, the number of channels of the last convolutional layer of the embedded network is obtained, and the first feature matrix corresponding to the first trajectory matrix and all the channels are obtained according to the number of channels. The second feature matrix corresponding to the first map matrix; the first feature matrix and the second feature matrix are combined to obtain a combined matrix; Combine the matrices for position embedding processing to obtain the target matrix.
  19. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:获取路测数据,对所述路测数据进行感知处理,得到所述路测数据中待预测障碍物的轨迹信息;及根据预设采样条件对所述待预测障碍物的轨迹信息进行采样处理,得到所述待预测障碍物对应的运动轨迹。The storage medium according to claim 16, wherein when the computer-readable instructions are executed by the processor, the following steps are further performed: acquiring drive test data, performing perceptual processing on the drive test data, and obtaining the drive test data. The trajectory information of the obstacle to be predicted in the drive test data; and performing sampling processing on the trajectory information of the obstacle to be predicted according to preset sampling conditions to obtain the motion trajectory corresponding to the obstacle to be predicted.
  20. 一种交通工具,包括执行根据权利要求1-6中任一项所述的轨迹预测方法。A vehicle comprising performing the trajectory prediction method according to any one of claims 1-6.
PCT/CN2021/088937 2021-04-22 2021-04-22 Trajectory prediction method and apparatus, and computer device and storage medium WO2022222095A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180050157.3A CN115917559A (en) 2021-04-22 2021-04-22 Trajectory prediction method, apparatus, computer device and storage medium
PCT/CN2021/088937 WO2022222095A1 (en) 2021-04-22 2021-04-22 Trajectory prediction method and apparatus, and computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/088937 WO2022222095A1 (en) 2021-04-22 2021-04-22 Trajectory prediction method and apparatus, and computer device and storage medium

Publications (1)

Publication Number Publication Date
WO2022222095A1 true WO2022222095A1 (en) 2022-10-27

Family

ID=83723549

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/088937 WO2022222095A1 (en) 2021-04-22 2021-04-22 Trajectory prediction method and apparatus, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN115917559A (en)
WO (1) WO2022222095A1 (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115047894A (en) * 2022-04-14 2022-09-13 中国民用航空总局第二研究所 Unmanned aerial vehicle track measuring and calculating method, electronic equipment and storage medium
CN115758153A (en) * 2022-11-21 2023-03-07 厦门海兰寰宇海洋信息科技有限公司 Target object track data processing method, device and equipment
CN116071925A (en) * 2023-02-13 2023-05-05 北京爱芯科技有限公司 Track prediction method and device and electronic processing device
CN116184352A (en) * 2023-04-26 2023-05-30 武汉能钠智能装备技术股份有限公司四川省成都市分公司 Radio frequency target detection system based on track estimation
CN116341721A (en) * 2023-03-02 2023-06-27 石家庄铁道大学 Operation destination prediction method and system based on vehicle track
CN116383616A (en) * 2023-03-31 2023-07-04 电子科技大学长三角研究院(衢州) Track GPS coordinate recovery method and frame based on track similarity and deep learning
CN116824407A (en) * 2023-06-21 2023-09-29 深圳市华赛睿飞智能科技有限公司 Target detection method, device and equipment based on patrol robot
CN117058472A (en) * 2023-10-12 2023-11-14 华侨大学 3D target detection method, device and equipment based on self-attention mechanism
CN117473337A (en) * 2023-12-25 2024-01-30 中国科学院自动化研究所 Track association method, track association device, track association equipment and storage medium
CN117493424A (en) * 2024-01-03 2024-02-02 湖南工程学院 Vehicle track prediction method independent of map information
CN117874529A (en) * 2024-03-12 2024-04-12 浪潮电子信息产业股份有限公司 Motion trail prediction method, model training method, device, equipment and medium
CN118351682A (en) * 2024-03-26 2024-07-16 东南大学 Two-stage expressway vehicle discrete point track reconstruction method and system based on deep learning
CN118674125A (en) * 2024-08-22 2024-09-20 广东海洋大学 Ocean current energy prediction method and system for target ocean region

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116558540B (en) * 2023-07-11 2023-10-03 新石器慧通(北京)科技有限公司 Model training method and device, and track generating method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111238523A (en) * 2020-04-23 2020-06-05 北京三快在线科技有限公司 Method and device for predicting motion trail
US20200283016A1 (en) * 2019-03-06 2020-09-10 Robert Bosch Gmbh Movement prediction of pedestrians useful for autonomous driving
CN112015847A (en) * 2020-10-19 2020-12-01 北京三快在线科技有限公司 Obstacle trajectory prediction method and device, storage medium and electronic equipment
CN112037506A (en) * 2020-07-29 2020-12-04 长安大学 Vehicle track prediction model construction method, vehicle track prediction method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200283016A1 (en) * 2019-03-06 2020-09-10 Robert Bosch Gmbh Movement prediction of pedestrians useful for autonomous driving
CN111238523A (en) * 2020-04-23 2020-06-05 北京三快在线科技有限公司 Method and device for predicting motion trail
CN112037506A (en) * 2020-07-29 2020-12-04 长安大学 Vehicle track prediction model construction method, vehicle track prediction method and system
CN112015847A (en) * 2020-10-19 2020-12-01 北京三快在线科技有限公司 Obstacle trajectory prediction method and device, storage medium and electronic equipment

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115047894B (en) * 2022-04-14 2023-09-15 中国民用航空总局第二研究所 Unmanned aerial vehicle track measuring and calculating method, electronic equipment and storage medium
CN115047894A (en) * 2022-04-14 2022-09-13 中国民用航空总局第二研究所 Unmanned aerial vehicle track measuring and calculating method, electronic equipment and storage medium
CN115758153A (en) * 2022-11-21 2023-03-07 厦门海兰寰宇海洋信息科技有限公司 Target object track data processing method, device and equipment
CN116071925B (en) * 2023-02-13 2024-04-12 北京爱芯科技有限公司 Track prediction method and device and electronic processing device
CN116071925A (en) * 2023-02-13 2023-05-05 北京爱芯科技有限公司 Track prediction method and device and electronic processing device
CN116341721A (en) * 2023-03-02 2023-06-27 石家庄铁道大学 Operation destination prediction method and system based on vehicle track
CN116341721B (en) * 2023-03-02 2023-10-31 石家庄铁道大学 Operation destination prediction method and system based on vehicle track
CN116383616A (en) * 2023-03-31 2023-07-04 电子科技大学长三角研究院(衢州) Track GPS coordinate recovery method and frame based on track similarity and deep learning
CN116184352A (en) * 2023-04-26 2023-05-30 武汉能钠智能装备技术股份有限公司四川省成都市分公司 Radio frequency target detection system based on track estimation
CN116184352B (en) * 2023-04-26 2023-08-22 武汉能钠智能装备技术股份有限公司四川省成都市分公司 Radio frequency target detection system based on track estimation
CN116824407A (en) * 2023-06-21 2023-09-29 深圳市华赛睿飞智能科技有限公司 Target detection method, device and equipment based on patrol robot
CN117058472A (en) * 2023-10-12 2023-11-14 华侨大学 3D target detection method, device and equipment based on self-attention mechanism
CN117058472B (en) * 2023-10-12 2024-02-20 华侨大学 3D target detection method, device and equipment based on self-attention mechanism
CN117473337B (en) * 2023-12-25 2024-03-22 中国科学院自动化研究所 Track association method, track association device, track association equipment and storage medium
CN117473337A (en) * 2023-12-25 2024-01-30 中国科学院自动化研究所 Track association method, track association device, track association equipment and storage medium
CN117493424A (en) * 2024-01-03 2024-02-02 湖南工程学院 Vehicle track prediction method independent of map information
CN117493424B (en) * 2024-01-03 2024-03-22 湖南工程学院 Vehicle track prediction method independent of map information
CN117874529A (en) * 2024-03-12 2024-04-12 浪潮电子信息产业股份有限公司 Motion trail prediction method, model training method, device, equipment and medium
CN117874529B (en) * 2024-03-12 2024-05-28 浪潮电子信息产业股份有限公司 Motion trail prediction method, model training method, device, equipment and medium
CN118351682A (en) * 2024-03-26 2024-07-16 东南大学 Two-stage expressway vehicle discrete point track reconstruction method and system based on deep learning
CN118674125A (en) * 2024-08-22 2024-09-20 广东海洋大学 Ocean current energy prediction method and system for target ocean region

Also Published As

Publication number Publication date
CN115917559A (en) 2023-04-04

Similar Documents

Publication Publication Date Title
WO2022222095A1 (en) Trajectory prediction method and apparatus, and computer device and storage medium
CN108171112B (en) Vehicle identification and tracking method based on convolutional neural network
CN110059558B (en) Orchard obstacle real-time detection method based on improved SSD network
CN112149550B (en) Automatic driving vehicle 3D target detection method based on multi-sensor fusion
WO2021134296A1 (en) Obstacle detection method and apparatus, and computer device and storage medium
US20230316742A1 (en) Image processing method, apparatus and device, and computer-readable storage medium
CN113516664A (en) Visual SLAM method based on semantic segmentation dynamic points
US20230222844A1 (en) Parking lot management and control method based on object activity prediction, and electronic device
Khurana et al. Point cloud forecasting as a proxy for 4d occupancy forecasting
Loktev et al. Diagnostics of external defects of railway infrastructure by analysis of its images
CN111753639B (en) Perception map generation method, device, computer equipment and storage medium
CN113592905B (en) Vehicle driving track prediction method based on monocular camera
CN115204044A (en) Method, apparatus and medium for generating trajectory prediction model and processing trajectory information
CN114648551B (en) Trajectory prediction method and apparatus
WO2021223116A1 (en) Perceptual map generation method and apparatus, computer device and storage medium
CN113239719A (en) Track prediction method and device based on abnormal information identification and computer equipment
CN112967388A (en) Training method and device for three-dimensional time sequence image neural network model
Kanchana et al. Computer vision for autonomous driving
CN115512175A (en) Model training method, point cloud data processing device, point cloud data processing equipment and storage medium
US20210383213A1 (en) Prediction device, prediction method, computer program product, and vehicle control system
CN112613418A (en) Parking lot management and control method and device based on target activity prediction and electronic equipment
JP2022035033A (en) Information processing system, information processing method, program and vehicle control system
CN115116128B (en) Self-constrained optimization human body posture estimation method and system
CN113361299A (en) Abnormal parking detection method and device, storage medium and electronic equipment
WO2022226837A1 (en) Time and space learning-based method and apparatus for predicting trajectory, and computer device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21937334

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21937334

Country of ref document: EP

Kind code of ref document: A1