Patent Description:
This specification relates to predicting the future behavior of an agent in an environment.

The environment may be a real-world environment, and the agent may be, e.g., an agent in the vicinity of an autonomous vehicle navigating through the environment.

Autonomous vehicles include self-driving cars, boats, and aircraft. Autonomous vehicles use a variety of on-board sensors and computer systems to detect nearby objects and use such detections to make control and navigation decisions.

<CIT> describes a pedestrian trajectory prediction method based on a space-time attention mechanism which comprises the following steps: acquiring image information in a scene, and extracting position information of a pedestrian in an image coordinate system; performing data preprocessing to obtain historical track coordinates of each pedestrian in the scene; by adopting an encoder, encoding the historical trajectory of the pedestrian, and outputting a feature tensor; and by adopting a decoder, iteratively predicting future trajectory coordinates of the pedestrian, wherein the encoder integrates the historical track information of each pedestrian and the interaction information among different pedestrians in the same scene through an attention mechanism.

The paper "<NPL>et al describes the prediction of pedestrians' redlight crossing intention using pose estimation (keypoint detection) to generate pedestrians' variables from videos.

This specification generally describes a system implemented as computer programs on one or more computers in one or more locations that generates behavior predictions for one or more target agents, e.g., pedestrians, cyclists, scooter riders, or other humans, in an environment.

Each behavior prediction is a prediction of the behavior of the target agent starting from a current time point.

In some implementations, the behavior prediction includes (i) a crossing action prediction, (ii) a trajectory prediction, or (iii) both.

A crossing action prediction is a score that represents the likelihood that the target agent is currently crossing a roadway in the environment, i.e., performing a crossing action.

A trajectory prediction is a prediction that defines the future trajectory of the corresponding target agent starting from a current time point.

For example, after training, the system can be used to make behavior predictions by an on-board computer system of an autonomous vehicle navigating through the environment and the target agents may be agents that have been detected by the sensors of the autonomous vehicle. An autonomous vehicle can be a fully-autonomous vehicle that makes autonomous driving decisions or a semi-autonomous vehicle that makes driving suggestions to a human operator. The behavior predictions can then be used by the on-board system to control the autonomous vehicle, i.e., to plan the future motion of the vehicle based in part on the likely future motion of other agents in the environment.

As another example, after training, the system can be used to make behavior predictions in a computer simulation of a real-world environment being navigated through by a simulated autonomous vehicle and the target agents. Generating these predictions in simulation may assist in controlling the simulated vehicle, in testing the realism of certain situations encountered in the simulation, and in ensuring that the simulation includes surprising interactions that are likely to be encountered in the real-world. More generally, generating these predictions in simulation can be part of testing the control software of a real-world autonomous vehicle before the software is deployed on-board the autonomous vehicle, of training one or more machine learning models that will later be deployed on-board the autonomous vehicle or both.

As used in this specification, a future trajectory for an agent is a sequence that includes a respective agent state for the agent for each of a plurality of future time points, i.e., time points that are after the current time point at which the trajectory prediction is made. Each agent state identifies at least a waypoint location for the corresponding time point, i.e., identifies a location of the agent at the corresponding time point. In some implementations, each agent state also includes other information about the state of the agent at the corresponding time point, e.g., the predicted heading of the agent at the corresponding time point.

An embedding of a given input, as used in this specification, is an ordered collection of numeric values, e.g., a vector of floating point or other numeric values.

The subject matter described in this specification can be implemented in particular embodiments so as to realize one or more of the following advantages. Accurate understanding and prediction of human behaviors are important for autonomous vehicles, especially in highly dynamic and interactive scenarios such as intersections in dense urban areas.

Accordingly, this specification describes techniques for accurately predicting the future behavior of pedestrians or other agents, e.g., cyclists, scooter riders, and so on. For example, the techniques described in this specification can accurately identify crossing agents, accurately predict their future trajectories, or both. For these tasks, the system makes use of not only the context information of road geometry and other traffic participants, but also need fine-grained information of the human pose, motion and activity, which the system infers from human keypoints. That is, the system incorporates human keypoints, e.g., 3D human keypoints, into the prediction in order to provide the fine-grained information needed to accurately predict the behavior of these agents. As a particular example, the described system can implement a multi-task learning framework to perform both pedestrian crossing action recognition and trajectory prediction in parallel by using 3D human keypoints extracted from sensor data to capture rich information on human pose and activity. This specification also describes two auxiliary tasks and contrastive learning to enable auxiliary supervisions to improve the learned keypoints representation, which further enhances the performance of behavior prediction tasks.

This specification describes how a vehicle, e.g., an autonomous or semi-autonomous vehicle, can use a trained machine learning model, referred to in this specification as a "behavior prediction system," to generate a respective behavior prediction for each of one or more surrounding agents in the vicinity of the vehicle in an environment. Each surrounding agent can be, e.g., a pedestrian, cyclist, scooter rider, or other human. An agent can be referred to as being within the "vicinity" of the vehicle if the agent is within sensing range of at least one of the sensors of the vehicle.

This specification also describes how training examples generated by vehicles or other sources can be used to effectively train the behavior prediction system to accurately and reliably make predictions.

<FIG> is a diagram of an example system <NUM>. The system <NUM> includes an on-board system <NUM> and a training system <NUM>.

The on-board system <NUM> is located on-board a vehicle <NUM>. The vehicle <NUM> in <FIG> is illustrated as an automobile, but the on-board system <NUM> can be located on-board any appropriate vehicle type.

In some cases, the vehicle <NUM> is an autonomous vehicle. An autonomous vehicle can be a fully autonomous vehicle that determines and executes fully-autonomous driving decisions in order to navigate through an environment. An autonomous vehicle can also be a semi-autonomous vehicle that uses predictions to aid a human driver. For example, the vehicle <NUM> can autonomously apply the brakes if a prediction indicates that a human driver is about to collide with another vehicle. As another example, the vehicle <NUM> can have an advanced driver assistance system (ADAS) that assists a human driver of the vehicle <NUM> in driving the vehicle <NUM> by detecting potentially unsafe situations and alerting the human driver or otherwise responding to the unsafe situation. As a particular example, the vehicle <NUM> can alert the driver of the vehicle <NUM> or take an autonomous driving action when an obstacle is detected, when the vehicle departs from a driving lane, or when an object is detected in a blind spot of the human driver.

The on-board system <NUM> includes one or more sensor subsystems <NUM>. The sensor subsystems <NUM> include a combination of components that receive reflections of electromagnetic radiation, e.g., lidar systems that detect reflections of laser light, radar systems that detect reflections of radio waves, and camera systems that detect reflections of visible light.

The sensor data generated by a given sensor generally indicates a distance, a direction, and an intensity of reflected radiation. For example, a sensor can transmit one or more pulses of electromagnetic radiation in a particular direction and can measure the intensity of any reflections as well as the time that the reflection was received. A distance can be computed by determining how long it took between a pulse and its corresponding reflection. The sensor can continually sweep a particular space in angle, azimuth, or both. Sweeping in azimuth, for example, can allow a sensor to detect multiple objects along the same line of sight.

The sensor subsystems <NUM> or other components of the vehicle <NUM> can also classify groups of one or more raw sensor measurements from one or more sensors as being measures of another agent. A group of sensor measurements can be represented in any of a variety of ways, depending on the kinds of sensor measurements that are being captured. For example, each group of raw laser sensor measurements can be represented as a three-dimensional point cloud, with each point having an intensity and a position in a particular two-dimensional or three-dimensional coordinate space. In some implementations, the position is represented as a range and elevation pair. Each group of camera sensor measurements can be represented as an image patch, e.g., an RGB image patch.

Once the sensor subsystems <NUM> classify one or more groups of raw sensor measurements as being measures of respective other agents, the sensor subsystems <NUM> can compile the raw sensor measurements into a set of raw data <NUM>, and send the raw data <NUM> to a data representation system <NUM>.

The data representation system <NUM>, also on-board the vehicle <NUM>, receives the raw sensor data <NUM> from the sensor system <NUM> and generates context data <NUM>. The context data <NUM> characterizes the current state of the environment surrounding the vehicle <NUM> as of the current time point.

For example, the context data <NUM> can characterize, for all surrounding agents in the environment, a current state at the current time point and a previous state at one or more respective previous time points. In other words, the scene data can include, for all surrounding agents in the environment, data that characterizes a previous trajectory of the agent in the environment up to the current time point. The state of an agent at a time point can include the location of the agent at the time point and, optionally, values for a predetermined set of motion parameters at the time point. As a particular example, the motion parameters can include a heading for the agent, a velocity of the agent, and/or an acceleration of the agent.

The context data <NUM> can also include data characterizing a current state of the vehicle <NUM> at the current time point and a previous state of the vehicle at one or more respective previous time points.

In some implementations, the context data <NUM> also includes roadgraph data characterizing road elements in the scene, e.g., lanes, traffic signals, traffic signs, and so on. These features can include (i) dynamic features of the environment, e.g., traffic light states at the current time point, (ii) static features of the environment, e.g., road graph data characterizing one or more of lane connectivity, lane type, stop lines, speed limits, and so on, or (iii) both.

The data representation system <NUM> also generates, for each of one or more target agents, keypoint data <NUM> for the target agent. For example, the system <NUM> can generate keypoint data <NUM> for each human agent that is within range of one of the sensors of the vehicle or for only a specified subset of the human agents.

The keypoint data <NUM> for a given target agent includes, for each of a plurality of keypoints on the body of the target agent, respective three-dimensional coordinates of the keypoint at the current time point and one or more preceding time points. That is, each keypoint corresponds to a different point on the body of the target agent, e.g., a different joint or other point that has been determined to be relevant for the motion of the agent. In other words, the system <NUM> uses 3D, rather than 2D, keypoints that specify the locations of the keypoints in a three-dimensional coordinate system. In contrast to the 2D information, 3D human keypoints contain appearance information that is invariant to view angle and in the same coordinate system as is used for trajectory prediction.

The system <NUM> can generate the keypoint data <NUM>, e.g., based on the output of a trained machine learning model that receives an input generated from sensor data, e.g., input image data, lidar data, or both, collected at a given time point and processes the data to generate estimates for the coordinates of the keypoints at the given time point. As a particular example, the system <NUM> can extract the keypoint data <NUM> from laser points generated by the lidar sensor(s) of the vehicle <NUM>. While any appropriate keypoint extraction technique can be used, one example technique for extracting keypoint data <NUM> from laser points or, more generally, 3D point clouds, is described in Multi-modal 3D Human Pose Estimation with 2D Weak Supervision in Autonomous Driving, arXiv: <NUM>.

The data representation system <NUM> provides the context data <NUM> and the keypoint data <NUM> to a behavior prediction system <NUM>, also on-board the vehicle <NUM>.

For each target agent, the behavior prediction system <NUM> processes the context data <NUM> and the keypoint data <NUM> for the target agent using one or more neural network components to generate a behavior prediction <NUM> for the target agent. At a high level, the neural network components can include respective encoder neural networks for the context data <NUM> and the keypoint data <NUM> and one or more decoder neural networks that generate the behavior prediction <NUM> from the outputs of the encoder neural networks.

Each behavior prediction is a prediction of the behavior of the target agent starting from a current time point. In some implementations, the behavior prediction includes (i) a crossing action prediction, (ii) a trajectory prediction, or (iii) both.

Thus, the behavior prediction system <NUM> incorporates the keypoint data <NUM> into generating the behavior prediction <NUM> in order to generate more accurate behavior predictions, i.e., more accurate predictions than could be generated using only the context data <NUM>.

Generating the behavior predictions <NUM> will be described in more detail below with reference to <FIG> and <FIG>.

The on-board system <NUM> also includes a planning system <NUM>. The planning system <NUM> can make autonomous or semi-autonomous driving decisions for the vehicle <NUM>, e.g., by generating a planned vehicle path that characterizes a path that the vehicle <NUM> will take in the future.

The on-board system <NUM> can provide the behavior predictions <NUM> generated by the behavior prediction system <NUM> to one or more other on-board systems of the vehicle <NUM>, e.g., the planning system <NUM> and/or a user interface system <NUM>.

When the planning system <NUM> receives the behavior predictions <NUM>, the planning system <NUM> can use the behavior predictions <NUM> to generate planning decisions that plan a future trajectory of the vehicle, i.e., to generate a new planned vehicle path. For example, the behavior predictions may contain a prediction that a particular surrounding agent is likely crossing a roadway that the vehicle is traveling on. In this example, the planning system <NUM> can generate a new planned vehicle path that yields to the surrounding agent to allow the surrounding agent to finish crossing the roadway. As another example, the behavior predictions may contain a prediction that the future trajectory of the particular surrounding agent will take the surrounding agent close to the edge of the roadway. In this example, the planning system <NUM> can generate a new planned vehicle path that reduces the speed of the vehicle to allow the vehicle to yield if the surrounding agent enters the roadway.

When the user interface system <NUM> receives the behavior prediction outputs <NUM>, the user interface system <NUM> can use the behavior predictions <NUM> to present information to the driver of the vehicle <NUM> to assist the driver in operating the vehicle <NUM> safely. The user interface system <NUM> can present information to the driver of the agent <NUM> by any appropriate means, for example, by an audio message transmitted through a speaker system of the vehicle <NUM> or by alerts displayed on a visual display system in the agent (e.g., an LCD display on the dashboard of the vehicle <NUM>). In a particular example, the behavior predictions <NUM> may contain a prediction that a particular surrounding agent is likely crossing the roadway in front of the vehicle <NUM>. In this example, the user interface system <NUM> can present an alert message to the driver of the vehicle <NUM> with instructions to adjust the trajectory of the vehicle <NUM> to allow the agent to cross or notifying the driver of the vehicle <NUM> that a human is in the roadway.

To generate the behavior predictions <NUM>, the behavior prediction system <NUM> can use trained parameter values <NUM>, i.e., trained model parameter values of the neural network components of the behavior prediction system <NUM>, obtained from a behavior prediction model parameters store <NUM> in the training system <NUM>.

The training system <NUM> is typically hosted within a data center <NUM>, which can be a distributed computing system having hundreds or thousands of computers in one or more locations.

The training system <NUM> includes a training data store <NUM> that stores training data used to train the behavior prediction system i.e., to determine the trained parameter values <NUM> of the neural network components of the behavior prediction system <NUM>. The training data store <NUM> receives raw training examples from, e.g., agents operating in the real world, from computer simulations of the real-world, or one or more computer programs that generate synthetic navigation scenarios by modifying real-world data.

For example, the training data store <NUM> can receive a raw training example <NUM> from the vehicle <NUM> and one or more other agents that are in communication with the training system <NUM>. The raw training example <NUM> can be processed by the training system <NUM> to generate a new training example. The raw training example <NUM> can include context data and keypoint data for a target agent, i.e., like the scene data <NUM> and the keypoint data <NUM>, that can be used as input for a new training example. The raw training example <NUM> can also include outcome data characterizing the state of the environment surrounding the vehicle <NUM> at one or more future time points. This outcome data can be used to generate ground truth behavior predictions for the target agent. For example, the outcome data can be used to determine whether the target agent was crossing a roadway at the last time point in the context data. As another example, the outcome data can be used to determine a ground truth trajectory for the target agent. Each ground truth trajectory identifies the actual trajectory (as derived from the outcome data) traversed by the corresponding agent at the future time points. For example, the ground truth trajectory can identify spatial locations in an agent-centric coordinate system to which the agent moved at each of multiple future time points.

The training data store <NUM> provides training examples <NUM> to a training engine <NUM>, also hosted in the training system <NUM>. The training engine <NUM> uses the training examples <NUM> to update model parameters that will be used by the behavior prediction system <NUM>, and provides the updated model parameters <NUM> to the behavior prediction model parameters store <NUM>. Once the parameter values of the behavior prediction system <NUM> have been fully trained, the training system <NUM> can send the trained parameter values <NUM> to the behavior prediction system <NUM>, e.g., through a wired or wireless connection.

Training the behavior prediction system <NUM> is described in more detail below with reference to <FIG>.

<FIG> shows an example of the operation of the behavior prediction system <NUM> to generate a behavior prediction for a target agent.

As shown in <FIG>, the behavior prediction system <NUM> includes a context data encoder neural network <NUM>, a keypoint encoder neural network <NUM>, and one or more decoder neural networks <NUM>.

To generate a behavior prediction, the system <NUM> obtains data characterizing a scene in an environment that includes a plurality of agents at a current time point. The agents include the target agent for which the behavior prediction will be generated and one or more context agents, i.e., agents whose behavior may influence the behavior of the target. The context agents can include other humans, other vehicles, or both.

For example, the data characterizing the scene can include data generated from sensor data captured by the sensors of the autonomous vehicle.

More specifically, the data includes context data <NUM> that includes data characterizing historical trajectories of the plurality of agents up to the current time point. The context data can also include roadgraph data characterizing road elements in the scene, e.g., lanes, traffic signals, traffic signs, and so on.

The data also includes keypoint data <NUM> for the target agent. The keypoint data includes, for each of a plurality of keypoints on the body of the target agent, respective three-dimensional coordinates of the keypoint at the current time point and one or more preceding time points. That is, each keypoint corresponds to a different point on the body of the target agent, e.g., a different joint or other point that has been determined to be relevant for the motion of the agent. By making use of three-dimensional (3D) keypoints rather than 2D keypoints, the system can effectively leverage the view invariant appearance information that is available from 3D keypoints that is not available from 2D keypoints. The appearance information can provide useful cues for motion prediction, especially when the agent is performing special activities (e.g., bending down, waving hands) or interacting with objects (e.g., pushing a cart, riding a scooter).

As described above, the keypoint data can be generated, e.g., based on the output of a trained machine learning model that receives as input image data, lidar data, or both at a given time point and process the data to generate estimates for the coordinates of the keypoints at the given time point.

The system <NUM> processes the context data <NUM> using the context data encoder neural network <NUM> to generate a context embedding <NUM> for the target agent and processes the keypoint data <NUM> using the keypoint encoder neural network <NUM> to generate a keypoint embedding <NUM> for the target agent.

The context data encoder neural network <NUM> can have any appropriate architecture that allows the neural network <NUM> to map the context data <NUM> to the context embedding <NUM>, i.e., to a tensor, e.g., a vector or a matrix, of numeric values having a specified dimensionality.

As one example, the system can obtain or represent the context data <NUM> as a rasterized top-down view image of the environment. In this example, the context data encoder neural network <NUM> can be a convolutional neural network or a vision Transformer neural network that maps the top-down view image to the context embedding <NUM>.

As another example, the system can obtain or represent the context data <NUM> as a vectorized representation. That is, the system can represent the roadgraph data and the trajectories of context traffic participants which may have interactions with the target agent as respective sets of vectors. In this example, the neural network <NUM> uses the vectorized representation to generate, for each road element and each agent, a respective embedding and then processes the respective embeddings for each road element and each agent to generate an updated embedding for at least the target agent. The neural network <NUM> then uses, as the context embedding <NUM> for the target agent, the updated embedding for the target agent generated by the context encoder neural network.

More specifically, the roadgraph (lanes, traffic signs) and trajectories are transformed into polylines with a variable number of vectors respectively. Each polyline is used to construct a subgraph where each node represents a certain vector within the polyline. Next, the polyline subgraphs are used to construct a fully-connected global interaction graph and the context encoder neural network <NUM> applies multiple rounds of message passing to model the agent-agent and agent-road interactions between the scene elements and to generate a global context embedding for each modeled agent. The neural network <NUM> then selects, as the context embedding <NUM>, the global context embedding for the target agent.

The keypoint encoder neural network <NUM> can have any appropriate architecture that allows the neural network <NUM> to map the keypoint data <NUM> to the keypoint embedding <NUM>, i.e., to a tensor, e.g., a vector or a matrix, of numeric values having a specified dimensionality.

As a particular example, to allow the neural network <NUM> to model the spatial and temporal relationships between the keypoints, the neural network <NUM> can represent the keypoint data <NUM> as a spatio-temporal graph.

More specifically, the neural network <NUM> can generate graph data representing a spatio-temporal graph of the keypoint data <NUM>. The spatio-temporal graph has nodes that represent keypoints, spatial edges that represent spatial relationships between keypoints on the body of the target agent, and temporal edges that represent connections between the same keypoint at different time points.

The neural network <NUM> can then process the graph data using a neural network that is configured to process spatio-temporal graph data to generate a feature tensor and then generate the keypoint embedding <NUM> for the target agent from the feature tensor. For example, the feature tensor can reflect both spatial and temporal patterns in the keypoint data at one or more scales. One example of such a neural network is a spatio-temporal graph convolutional neural network. Spatio-temporal graph convolutional neural networks are described in more detail in Spatial Temporal Graph Convolutional Networks for Skeleton-Based Action Recognition, available at arXiv:<NUM>. Another example of such a neural network is a spatio-temporal Transformer. Spatio-temporal Transformers are described in more detail in Spatial Temporal Transformer Network for Skeleton-based Action Recognition, available at arXiv:<NUM>.

As a particular example, the neural network <NUM> can apply a dimensionality reducing operation to the feature tensor to reduce the feature tensor to have the dimensionality required for the keypoint embedding <NUM>. The operation can be, e.g., a global average pooling operation.

The system <NUM> generates a combined embedding for the target agent from the context embedding <NUM> and the keypoint embedding <NUM> and processes the combined embedding using the decoder neural network <NUM> to generate a behavior prediction <NUM> for the target agent that characterizes predicted behavior of the target agent after the current time point.

The system can generate the combined embedding from the context embedding <NUM> and the keypoint embedding <NUM> in any of a variety of ways.

As one example, the system can concatenate the context embedding <NUM> and the keypoint embedding <NUM> to generate the combined embedding.

As another example, the system can sum or average the context embedding <NUM> and the keypoint embedding <NUM> to generate the combined embedding.

As another example, the system can process the context embedding <NUM>, the keypoint embedding <NUM>, or both using one or more neural network layers and then generate the combined embedding from the output of the neural network layers.

As described above, in some cases, the behavior prediction output <NUM> includes both a crossing action prediction and a trajectory prediction for the target agent.

In these cases, the decoder neural network <NUM> includes a crossing action decoder neural network <NUM> and a trajectory prediction decoder neural network <NUM>. When the behavior prediction output <NUM> includes only one of the crossing action prediction or the trajectory prediction, the decoder neural network <NUM> can include only the corresponding one of the crossing action decoder <NUM> or the trajectory prediction decoder <NUM>.

When a crossing action prediction is to be generated, the system <NUM> processes the combined embedding using the crossing action decoder neural network <NUM> to generate the crossing action prediction. The crossing action prediction <NUM> includes a crossing score that represents a likelihood that the target agent is crossing a roadway in the environment at the current time point. For example, the crossing action prediction <NUM> can include only the crossing score or can include one or more additional scores, e.g., a score that represents the likelihood that the agent is not crossing, one or more other scores that correspond to other possible crossing behaviors, or both. As a particular example, the crossing agent decoder neural network <NUM> can be a multi-layer perceptron (MLP) that processes the combined embedding to generate the crossing action prediction neural network.

When a trajectory prediction is to be generated, the system <NUM> processes the combined embedding using the trajectory prediction decoder neural network <NUM> to generate the trajectory prediction. The system can generate the trajectory prediction in any of a variety of ways, i.e., by using any of a variety of trajectory prediction decoders.

For example, the trajectory prediction decoder neural network <NUM> can make use of a "target-driven" trajectory prediction approach. In this approach, for each of a plurality of candidate locations in the environment, the decoder <NUM> is configured to process data specifying the candidate location and the combined embedding to generate a predicted trajectory for the target agent given that the target agent intends to navigate to the candidate location. As a particular example, the decoder <NUM> can select a first set of initial candidate locations in the environment, e.g., randomly or by sampling points along the roadgraph or along a fixed grid, and then score each of the points using the context embedding. The decoder <NUM> can then select a fixed number of highest scoring initial locations as the plurality of candidate locations. Alternatively, the decoder <NUM> can use all of the initial locations as the plurality of candidate locations, without performing the scoring. The decoder <NUM> is then configured to process at least the predicted trajectory (and, optionally, one or more of: the combined embedding, the context data, or the keypoint data) to generate a score for the predicted trajectory that represents the likelihood that the target agent will follow the predicted trajectory. Thus, in these cases, the trajectory prediction includes a set of predicted trajectories and a score for each predicted trajectory.

As another example, the decoder <NUM> can be a Multi-Path decoder that generates the trajectory prediction as the parameters of a probability distribution, e.g., a Gaussian mixture model, over the space of possible future trajectories for the target agent.

As another example, the decoder <NUM> can be an MLP or a recurrent neural network that directly regress the states of the future trajectory, i.e., that processes the combined embedding to regress a respective predicted future state for each future time point in the future trajectory for the target agent.

<FIG> is a flow diagram of an example process <NUM> for generating a behavior prediction for a target agent in the vicinity of the vehicle. For convenience, the process <NUM> will be described as being performed by a system of one or more computers located in one or more locations. For example, a behavior prediction system, e.g., the behavior prediction system <NUM> of <FIG>, appropriately programmed in accordance with this specification, can perform the process <NUM>.

In particular, the system performs the process <NUM> to generate a respective behavior prediction for each of one or more target agents that are in the vicinity of the vehicle. An agent being in the vicinity of the vehicle refers to the agent being within range of one or more of the sensors of the vehicle.

The system obtains data characterizing a scene in an environment that includes a plurality of agents at a current time point (step <NUM>). The agents include the target agent for which the behavior prediction will be generated and one or more context agents, i.e., agents whose behavior may influence the behavior of the target.

More specifically, the data includes context data that includes data characterizing historical trajectories of the plurality of agents up to the current time point. The context data can also include roadgraph data characterizing road elements in the scene, e.g., lanes, traffic signals, traffic signs, and so on.

The data also includes keypoint data for the target agent. The keypoint data includes, for each of a plurality of keypoints on a body of the target agent, respective three-dimensional coordinates of the keypoint at the current time point and one or more preceding time points. That is, each keypoint corresponds to a different point on the body of the target agent, e.g., a different joint or other point that has been determined to be relevant for the motion of the agent. The keypoint data can be generated, e.g., based on the output of a trained machine learning model that receives as input image data, lidar data, or both at a given time point and process the data to generate estimates for the coordinates of the keypoints at the given time point.

The system processes the context data using a context data encoder neural network to generate a context embedding for the target agent (step <NUM>) and processes the keypoint data using a keypoint encoder neural network to generate a keypoint embedding for the target agent (step <NUM>).

The system then processes the context embedding and the keypoint embedding to generate the behavior prediction for the target agent (step <NUM>).

As described above, prior to using the components of the behavior prediction system, i.e., the context encoder neural network, the candidate encoder neural network, and the decoder neural network, the training system trains these components so that the behavior prediction system can accurately generate behavior predictions given a set of context data and a set of keypoint data.

In particular, the training system trains the components on a set of training examples. Each training example includes at least context data and keypoint data for a given agent as of a first time point and a ground truth behavior prediction output for the given agent after the first time point. For example, when the system generates both a crossing action prediction and a trajectory prediction, each training example includes (i) a ground truth crossing action output that indicates whether the given agent was crossing at the first time point and (ii) a ground truth agent trajectory for the agent that identifies the actual trajectory followed by the agent after the first time point.

The system trains the components on training data to minimize a loss function that measures errors in behavior predictions relative to the corresponding ground truth behavior prediction output.

For example, when the system generates both a crossing action prediction and a trajectory prediction, the loss function includes a first loss that measures an error between the crossing action prediction and the ground truth crossing action output and a second loss that measures an error between the trajectory prediction and the ground truth agent trajectory for the agent that identifies the actual trajectory followed by the agent after the first time point. For example, the first loss can be a cross-entropy loss between the crossing action prediction and the ground truth crossing action output. The second loss can be made up of one or more trajectory prediction error terms, the structure of which depends on the type of trajectory prediction decoder that is used by the system. As a particular example, when the system uses target-driven trajectory prediction, the second loss can include one term that measures errors in the future trajectories given the ground truth trajectory output and another term that measures errors in the scores assigned to the future trajectories given the ground truth trajectory output. As another example, when the system generates parameters of a probability distribution over the space of possible trajectories, the second loss can include a term that measures the probability assigned to the ground truth trajectory by the probability distribution. As yet another example, when the system directly regresses a predicted trajectory, the second loss can include a term, e.g., a mean squared error loss term, that measures the error between the predicted trajectory and the ground truth trajectory.

In other words, the training system trains the decoder neural network, the context data encoder neural network, and the keypoint encoder neural network jointly on an objective function, e.g., a loss function, that includes one or more terms that measure errors in crossing action predictions and one or more terms that measure errors in trajectory predictions.

In some implementations, the loss function is a weighted sum between the first and second losses.

In some other implementations, the loss function also includes a respective auxiliary loss for each of one or more auxiliary tasks. These losses and tasks are referred to as "auxiliary" because they are used during training to improve the training of the components of the behavior prediction systems but are not used after training is completed. That is, the predictions corresponding to these "auxiliary" losses and tasks are not used after training, i.e., when making predictions on-board the vehicle.

One example of an auxiliary task that the training system can use to improve the training of the components of the behavior prediction system is a keypoint prediction task. This task aims to infer future keypoint locations based on a sequence of history observations, which requires more fine-grained understanding on human pose dynamics than trajectory prediction.

When this task is used, the system also makes use of an auxiliary decoder head (a "keypoint prediction head") during training. The keypoint prediction head is a neural network, e.g., an MLP, which takes as input the keypoint embedding and that is configured to generate respective predicted keypoint coordinates for each of the keypoints of the target agent at one or more future time steps. In this example, the auxiliary loss for this task is a loss that measures errors between the predicted future keypoint locations and the ground truth future keypoint locations. For example, the system can use a mean-squared error loss across the future time points identified in the training example. Thus, during training, the system processes the keypoint embedding using the keypoint prediction head to generate respective predicted keypoint coordinates for each of the keypoints at one or more future time steps and trains the keypoint prediction head and the keypoint encoder based on the error between the respective predicted keypoint coordinates and ground truth coordinates for each of the keypoints at the one or more future time steps. During training, the system can backpropagate gradients through the keypoint prediction head and into the keypoint encoder neural network to improve the representations generated by the keypoint encoder neural network.

Two additional examples of auxiliary tasks are illustrated in <FIG>.

<FIG> shows two examples of auxiliary tasks for improving the training of the behavior prediction system.

The first example shown in <FIG> is a keypoint jigsaw puzzle auxiliary task <NUM>. The goal of solving this task is to identify the correct permutation of a given keypoint sequence <NUM> in which subsequences ("segments") are randomly shuffled. Incorporating this task encourages the keypoint encoder to learn temporal relations among different temporal segments of keypoint data.

To perform this auxiliary task during training, the system generates shuffled keypoint data <NUM> by applying a random shuffling operation to the keypoint data <NUM>. For example, as shown in <FIG>, the system can divide the time points in the input keypoint data into segments <NUM> and then randomly shuffle, i.e., by applying a randomly selected shuffling operation from a set of possible shuffling operations, the order of the segments <NUM> within the input keypoint data. In some implementations, instead of shuffling the original coordinates of the keypoint sequences, the system fixes the center location of human skeletons at each frame and only shuffles the relative coordinates of keypoints with respect to the skeleton center. This can encourage the model to capture subtle patterns of human pose dynamics and avoid the shortcut of just capturing the change of center locations for the inference of the correct permutation.

The system then processes the shuffled keypoint data <NUM> using the keypoint encoder neural network to generate a shuffled keypoint embedding.

The system then processes the shuffled keypoint embedding using the auxiliary decoder head corresponding to this auxiliary task, i.e., that is configured to generate a probability distribution that includes a respective probability for each of a plurality of possible shuffling operations that represents a likelihood that the possible shuffling operation was applied to the keypoint data to generate the shuffled keypoint data. The auxiliary decoder head can be, e.g., an MLP. In the example of <FIG>, each possible shuffling operation can correspond to a different permutation of the segments of the keypoint data.

The system then trains the auxiliary decoder head and the keypoint encoder based on a keypoint jigsaw puzzle loss, e.g., an error between the probability distribution and a target distribution that identifies the applied random shuffling operation as the shuffling operation that was applied to the keypoint data. For example, the keypoint jigsaw puzzle loss can be a cross-entropy loss between the probability distribution and the target distribution. During training, the system can backpropagate gradients through the auxiliary decoder head and into the keypoint encoder neural network to improve the representations generated by the keypoint encoder neural network.

The second example shown in <FIG> is a keypoint contrastive learning task <NUM>. The goal of this task is to cause the model to learn high-level temporal similarity among keypoint sequences.

To perform this task during training, the system generates a plurality of different shuffled keypoint data by applying a plurality of different random shuffling operations to the keypoint data <NUM>, e.g., as described above. As shown in <FIG>, the system generates two different shuffled keypoint data <NUM>.

The system then processes the plurality of different shuffled keypoint data <NUM> using the keypoint encoder neural network <NUM> to generate a respective shuffled keypoint embedding for each shuffled keypoint data <NUM>. In particular, as shown in <FIG>, the system generates two different shuffled keypoint embeddings for the two different shuffled keypoint data.

The system then trains the keypoint encoder neural network <NUM> on a contrastive learning objective ("contrastive loss") <NUM> that measures similarities between the respective shuffled keypoint embeddings and shuffled keypoint embeddings for shuffled keypoint data generated from keypoint data for other target agents.

As shown in <FIG>, the system uses a projection head <NUM> to project each keypoint embedding into the feature space in which the contrastive loss is applied and then applies the contrastive loss on the output embeddings generated by the projection head <NUM>. The projection head <NUM> is a neural network. e.g., an MLP. The system can use any appropriate contrastive loss that encourages keypoint embeddings of shuffled keypoint embeddings generated from keypoint data for the same target to be more similar to each other than to shuffled keypoint embeddings generated from keypoint data for other target agents. For example, the system can use a cosine similarity - based contrastive learning loss, e.g., the simCLR loss or a different contrastive learning loss.

The apparatus can also be, or further include, off-the-shelf or custom-made parallel processing subsystems, e.g., a GPU or another kind of special-purpose processing subsystem.

A computer program which may also be referred to or described as a program, software, a software application, an app, a module, a software module, a script, or code) can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A program can be stored in a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, subprograms, or portions of code.

To provide for interaction with a user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and pointing device, e.g., a mouse, trackball, or a presence sensitive display or other surface by which the user can provide input to the computer. Also, a computer can interact with a user by sending text messages or other forms of message to a personal device, e.g., a smartphone, running a messaging application, and receiving responsive messages from the user in return.

Claim 1:
A method performed by one or more computers, the method comprising:
obtaining (<NUM>) data characterizing a scene in an environment that includes a plurality of agents at a current time point, the plurality of agents including a target agent and one or more context agents, the data comprising:
(i) context data (<NUM>), the context data comprising data characterizing historical trajectories of the plurality of agents up to the current time point;
(ii) keypoint data (<NUM>) for the target agent, the keypoint data comprising, for each of a plurality of keypoints on a body of the target agent, respective three-dimensional coordinates of the keypoint at the current time point and one or more preceding time points;
processing (<NUM>) the context data using a context data encoder neural network (<NUM>) to generate a context embedding (<NUM>) for the target agent;
processing (<NUM>) the keypoint data using a keypoint encoder neural network (<NUM>) to generate a keypoint embedding (<NUM>) for the target agent;
generating a combined embedding for the target agent from the context embedding and the keypoint embedding; and
processing (<NUM>) the combined embedding using a decoder neural network (<NUM>) to generate a behavior prediction output (<NUM>) for the target agent that characterizes predicted behavior of the target agent after the current time point.