Discrete Residual Flow for Probabilistic Pedestrian Behavior Prediction

Ajay Jain, Sergio Casas, Renjie Liao, Yuwen Xiong, Song Feng, Sean Segal, Raquel Urtasun

Introduction

In order to plan a safe maneuver, a self-driving vehicle must predict the future motion of surrounding vehicles and pedestrians. Motion prediction is challenging in realistic city environments. In Figure 1, we illustrate several challenges for pedestrian prediction. Gaussian distributions often poorly fit state posteriors (Fig. 1-a). Further, pedestrians have inherently multimodal behavior, as they can move in arbitrary directions and have unknown and changing goals, each achievable with multiple trajectories (Fig. 1-b). Even with strong evidence for a particular action, such as a road crossing, partially observed environments increase uncertainty in the timing of the action (Fig. 1-c). However, a self-driving vehicle motion planner needs actor predictions to be associated with time. Additional challenges include efficiently integrating spatial and temporal information, the mixed continuous-discrete nature of trajectories and maps, and availability of realistic data.

In the context of self-driving, most prior work represents behaviors through trajectories. Future trajectories can be predicted with a recurrent neural network (RNN) , a convolutional neural network (CNN) , or with constant velocity, constant acceleration, or expert-designed heuristics. However, a trajectory that minimizes the mean-squared error with respect to the true path can only capture the conditional average of the posterior . The conditional average trajectory does not represent all possible future behaviors and may even be infeasible, lying between feasible trajectories.

To express multiple possible behaviors, a fixed number of future trajectories can be predicted , or several can be sampled . Still, in realistic environments, posterior predictive distributions are complex and a large number of samples are needed to capture the space of possibilities. Such models tradeoff prediction completeness and latency from repeated sampling. Further, the number of possible trajectories increases exponentially over long time horizons, and uncertainty grows rapidly.

Instead of predicting trajectories, in this work, we take a probabilistic approach, predicting distributions over pedestrian state at each timestep that can directly be used for cost-based self-driving vehicle planning. Conditioning on a spatio-temporal rasterization of agent histories aligned to the local map, we leverage deep convolutional neural network architectures for implicit multi-agent reasoning, and mimic human dynamics through a discrete residual flow network, which we refer to as DRF-Net. We summarize our contributions as follows:

We develop a deep probabilistic formulation of actor motion prediction that provides marginal distributions over state at each future timestep without expensive marginalization or sampling. Our discrete residual flow equation is motivated by autoregressive generative models, and better captures temporal dependencies than time-independent baselines.

We propose the convolutional Discrete Residual Flow Network that predicts actor state over long time horizons with highly expressive discretized distributions.

We thoroughly benchmark model variants and demonstrate the benefit of belief discretization on a large scale, real-world dataset. We evaluate the likelihood, displacement error, multimodality, entropy, semantic mass ratio and calibration of the predictions, using a novel ModePool operator for estimating the number of modes of a discrete distribution.

Related work

Prior work on pedestrian prediction has largely modeled trajectories, goals, or high-level intent.

Human trajectory forecasting The pedestrian prediction literature is reviewed in . Multi-pedestrian interactions have been modeled via pooling or game theory . Becker et al. 2018 predict future trajectories with a recurrent encoder and MLP decoder, reporting lower error than more elaborate multi-agent schemes, and find that behaviors are multimodal and strongly influenced by the scene. Social GAN is a sequence-to-sequence generative model where trajectory samples vary in speed and turning angle, trained with a variety loss to encourage diversity. However, the runtime of the sampling approach scales with the number of samples (150150 ms for 1212 trajectories), even without using a local map, and many samples are needed. SoPhie is another sampling strategy integrating external overhead camera imagery. In contrast, we predict entire expressive spatial distributions rather than individual samples and incorporate a local map into prediction.

Goal directed prediction Ziebart et al. 2009 use historical paths to pre-compute a prior distribution over pedestrian goals indoors, then develop an MDP to infer a posterior distribution over future trajectories. Wu et al. 2018 use a heuristic to identify possible goal locations in a mapped environment and a Markov chain to predict the next-time occupancy grid. Rehder et al. use a two-stage deep model to predict a Gaussian mixture over goals, then construct distributions at intermediate timesteps with a planning network. Still, the number of mixture components must be tuned, and the mixture is discretized during inference, which is computationally expensive. Fisac and Bajcsy specify known goals for each human indoors, then estimate unimodal state distributions by assuming humans approximately maximize utility i.e. progress toward the goal measured by Euclidean norm. They estimate prediction confidence from model performance and return uninformative distributions at low confidence. Confidence estimation is complementary to our approach.

Semantic map Pedestrian predictors have separately reasoned about spatially continuous trajectories and discretized world representations . These works either ignore the semantic map or integrate it at an intermediate stage. In vehicle prediction, input map rasterizations are more widely used. IntentNet renders a bird’s-eye view of the world to predict vehicle trajectories and high-level intention simultaneously, using a rasterized lane graph and a 2D convolutional architecture to improve over previous work . Similar map rasterizations are used in , and this work.

Related modeling techniques The convolutional long short-term memory (ConvLSTM) architecture has been applied to spatio-temporal weather forecasting . A ConvLSTM iteratively updates a hidden feature map, from which outputs are derived. In contrast, DRF-Net sequentially adapts the output space rather than a hidden state. Similarly, the adaptive instance normalization operator uses a shared feature to predict and apply scale/shift parameters to a fixed, discrete image. Normalizing flows apply a series of invertible mappings to samples from a simple prior, e.g. a Gaussian, constructing a random variable with a complex PDF. While normalizing flows transform individual samples, we directly transform a probability mass function (PMF) for computational efficiency.

Discrete Residual Flow Network

In this paper, we express beliefs over future pedestrian positions through categorical distributions that discretize space. Such distributions can be used for cost-based planning or constrained path optimization in self-driving vehicles. In this section, we explain how we represent historical observations as a multi-channel image encoding both the known map and detected actors, a process we call rasterization. We then introduce a backbone deep neural network which extracts features from the rasterized image, followed by the probabilistic framework for our DRF-Net. Finally, we introduce our DRF head which uses the extracted features for prediction.

Encoding Historical Information Future pedestrian actions are highly correlated with historical actions. However, actions are also influenced by factors such as road surface types, traffic signals, static objects, vehicles, and other pedestrians. We rasterize all semantic map information and agent observations into a 3D tensor, encoding both spatial and temporal information by automatic rendering. The first two dimensions correspond to the spatial domain and the third dimension forms channels. Each channel is an 576×416576\times 416 px image encoding specific local bird’s eye view (BEV) information at a resolution of 88 px per meter. Figure 3 shows an example rasterization from a real urban scene.

Dynamic agents are detected from LiDAR and camera with the object detector proposed in Liang et al. 2018, and are associated over time using a matching algorithm. Resulting trajectories are refined using an Unscented Kalman Filter . DRF-Net renders detected pedestrians in each timestep tt for the past 66 seconds in channel DtD_{t} and detected non-pedestrians (e.g. vehicles) in channel VtV_{t}. To discriminate the pedestrian of interest from other actors, a grayscale image RR masks their tracklet.

Backbone Network DRF-Net uses a deep residual network with 1818 convolutional layers (ResNet-18) to extract features F\mathcal{F} from the rasterization Ω\Omega. We extract 44 feature maps at 14\frac{1}{4}, 18\frac{1}{8}, 116\frac{1}{16} and 116\frac{1}{16} of the input resolution from ResNet-18. These multi-scale intermediate features are upscaled and aggregated into a 14\frac{1}{4} resolution global context with a feature pyramid network (FPN) .

Probabilistic Actor State Prediction We now introduce a probabilistic formulation of future actor state prediction. Given rasterization Ω\Omega, we are interested in inferring a predictive posterior distribution over possible spatial locations of the PoI for each timestep tt where t=1,⋯ ,Tft=1,\cdots,T_{f}. Instead of treating the state as a continuous random variable, we discretize space to permit a one-hot state encoding. Specifically, we divide space into a grid with KK bins. The state at time tt, xt{\mathbf{x}_{t}}, is a discrete random variable which takes one of the KK possible bins.

Consider the joint probability of the states in the future TfT_{f} timesteps, i.e., px1⋯ ,xTf(x1,⋯ ,xTf∣Ω)p_{{\mathbf{x}_{1}}\cdots,{\mathbf{x}_{T_{f}}}}(x_{1},\cdots,x_{T_{f}}\mid\Omega). This distribution can be modeled with several factorizations. The first and the most straightforward factorization assumes conditional independence of future timesteps,

We can use a neural network, e.g., a CNN, to directly model pxt(xt∣Ω)p_{{\mathbf{x}_{t}}}(x_{t}\mid\Omega). In Section 4.3, we show the performance of a mixture density network and fully-convolutional predictor that simultaneously predict these factors. Still, conditional independence is a strong assumption. The second factorization follows an autoregressive fashion, providing the foundation for many models in the literature,

For example, recurrent encoder-decoder architectures sample trajectories one state at a time and capture the conditional dependencies through a hidden state.

In contrast to the sample-based approach, often we desire access to compact representations of pxt(xt∣Ω)p_{{\mathbf{x}_{t}}}(x_{t}\mid\Omega) for a particular Ω\Omega, such as an analytic form or a discrete categorical distribution. As we always condition on Ω\Omega, we refer to pxt(xt∣Ω)p_{{\mathbf{x}_{t}}}(x_{t}\mid\Omega) as a marginal distribution. Access to the marginal provides interpretability, parallel sampling and ease of planning as the marginals can be used as occupancy grids. However, direct marginalization is expensive if not intractable as we typically have no simple analytic form of the joint distributions. Approximation is possible with Monte Carlo methods, though many samples are needed to characterize the marginal.

Instead, we propose a flow between marginal distributions that resembles an autoregressive model in its iterative nature, but avoids sampling at each step. In contrast to a normalizing flow , which approximates a posterior over a single random variable by iteratively transforming its distribution, discrete residual flow transforms between the marginal distributions of different, temporally correlated random variables by exploiting a shared domain.

Discrete Residual Flow Our model recursively constructs pxt(\penalty ⋅∣Ω)p_{{\mathbf{x}_{t}}}(\penalty\ \cdot\mid\Omega) from pxt−1(\penalty ⋅∣Ω)p_{{\mathbf{x}_{t-1}}}(\penalty\ \cdot\mid\Omega),

where we refer to the second term on the right hand side as the residual. ψt;θt\psi_{t;\theta_{t}} is a sub-network with parameter θt\theta_{t} called the residual predictor that takes the marginal distribution pxt−1(\penalty ⋅∣Ω)p_{{\mathbf{x}_{t-1}}}(\penalty\ \cdot\mid\Omega) and context Ω\Omega as input, and predicts an elementwise update that is used to construct the subsequent marginal distribution pxt(\penalty ⋅∣Ω)p_{{\mathbf{x}_{t}}}(\penalty\ \cdot\mid\Omega). ZtZ_{t} is the normalization constant to ensure pxt(\penalty ⋅∣Ω)p_{{\mathbf{x}_{t}}}(\penalty\ \cdot\mid\Omega) is a valid distribution. Note that the residual itself is not necessarily a valid probability distribution.

Eq. (3) can be viewed as a discrete probability flow which maps from the distribution of xt−1{\mathbf{x}_{t-1}} to the one of xt{\mathbf{x}_{t}}. We use deep neural networks to instantiate the probability distributions under this framework and provide a derivation of Eq. (3) in the appendix, Section 6.5.

Figure 2 illustrates the overall computation process. The embedding of the rasterization F(Ω)\mathcal{F}(\Omega) is shared at all timesteps, used by each residual predictor. Figure 4 further illustrates the architectural details of the DRF residual predictor for one timestep.

Learning We perform learning by minimizing the negative log likelihood (NLL) of the observed sequences of pedestrian movement. Specifically, we solve the following optimization,

Evaluation

There is not a standard dataset for probabilistic pedestrian prediction with real-world maps and dynamic objects. Thus, we construct a large-scale dataset of real world recordings, object annotations, and online detection-based tracks. We implement baseline pedestrian prediction networks inspired by prior literature and compare DRF-Net against these baselines on standard negative log likelihood and displacement error measures. We propose an evaluation metric for measuring prediction multimodality, which is one of the most characteristic properties of pedestrian behavior. We also analyze the calibration, entropy and semantic interpretation of predictions. Finally, we present qualitative results in complex urban scenarios.

Our dataset consists of 481,927 ground truth pedestrian trajectories gathered in several North-American cities. The dataset is split into 375,700 trajectories for training, 34,571 for validation, and 71,656 held-out trajectories for testing. Dynamic objects are manually annotated in a 360°360\degree, 120120 m range view from an on-vehicle LiDAR sensor. Annotations contain 66 s (3030 frames) of past observations and 1010 s (5050 frames) of the future. These 55 Hz, 1616 s sliding windows are extracted from longer logs.

We also fine-tune and evaluate DRF-Net with variable length trajectories from an object detector in the same scenarios. The detector is discussed in Section 3. This assesses real-world, on-vehicle prediction performance, reflecting the challenges inherent to real perception such as partial observability, occlusion and identity switches in tracking algorithms. While PoIs are annotated for a full 1616 seconds in our ground truth experiments, realistic tracks are of variable length. A self-driving vehicle must predict the behavior of other agents with a very limited set of observations. Thus, we evaluate DRF-Net by predicting 1010 seconds (5050 frames) into the future, given tracks with as few as 33 historical frames, sufficient for estimating acceleration. Relaxing the requirements about past history avoids skewing our dataset toward easily tracked pedestrians, such as stationary agents.

2 Baselines

In this section, we describe two baseline predictor families. These baselines are trained end-to-end to predict distributions given features F(Ω)\mathcal{F}(\Omega) produced by the same backbone as our proposed model.

Mixture Density Networks (MDNs) represent a conditional posterior over continuous targets given continuous inputs with a fully-connected neural network that predicts parameters of Gaussian mixture model . For a baseline, we implement a variant of this architecture that models pedestrian posteriors at multiple time horizons, conditioned on the past history and current location. Inspired by Rehder et al. 2018, we generate the ii-th mixture component from the neuron outputs {mx,my,sx,sy,r,p}i\left\{m_{x},m_{y},s_{x},s_{y},r,p\right\}_{i} which are then reparameterized as σx,i=exp⁡(sx,i)+ϵ,σy,i=exp⁡(sy,i)+ϵ, and ρi=tanh⁡(ri)\sigma_{x,i}=\exp\left(s_{x,i}\right)+\epsilon,\sigma_{y,i}=\exp\left(s_{y,i}\right)+\epsilon,\text{ and }\rho_{i}=\tanh\left(r_{i}\right) to obtain the mean μ⃗i\vec{\mu}_{i}, covariance matrix Σi\Sigma_{i} and the responsibility of the mixture πi\pi_{i}:

Training MDNs is challenging due to a high sensitivity to initialization and parameterization. To avoid numerical instabilities, the minimum standard deviation is ϵ\epsilon. Even with a careful initialization and parameterization, training can be unstable, which we mitigate by discarding abnormally large losses. Note that Rehder et al. 2018 stabilized training by minimizing only the minimum of the batchwise negative log likelihood. Minimizing this minimum loss leads to a good performance on easy examples, but catastrophic performance on hard ones. Lastly, conversions from a discretized spatial input to a continuous output can be challenging to learn , a problem that our proposed DRF-Net avoids via a discretized output that is spatially aligned with the input.

ConvLSTM In contrast to our DRF-Net that recursively updates output distributions in the log-probability space, one can also recurrently update hidden state using a Convolutional LSTM that observes the previous prediction. Output distributions are then predicted from the hidden state.

3 Results

We evaluate negative log likelihood (NLL) at short and long prediction horizons, where lower values indicate more accurate predictions, as well as the mean NLL across all 50 future timesteps. In Table 1 and 2, we present results on the held-out test set for ground truth annotated logs and tracked, real-world detections, respectively. Our proposed DRF-Net achieves a superior likelihood over the baselines by introducing a discrete state representation and a probability flow between timesteps.

Likelihood on ground truth tracks In order to evaluate our results under perfect perception, we benchmark on ground truth (annotated) pedestrian trajectories. Table 1 shows that our proposed model reduces the mean NLL by 0.640.64 when compared to the best performer among the MDNs and by 0.140.14 with respect to the ConvLSTM baseline. This corresponds to a 90%90\% increase in geometric mean likelihood compared to the best MDN and to a 15%15\% increase when compared to the ConvLSTM.

Likelihood on online tracks Under online, imperfect perception, DRF-Net achieves a reduction of 0.230.23 in mean NLL over the best MDN and 0.160.16 over ConvLSTM, i.e. a 26%26\% and a 17%17\% increase of the geometric mean likelihood of the future observed pedestrian positions, respectively (Table 2). DRF-Net’s sequential residual updates may regularize and smooth predictions despite perception noise. Adding more than 44 components to the density networks does not reduce NLL. Directly predicting occupancy probability over a grid delivers stronger performance than discretizing a continuous spatial density. Using an explicit memory with hidden state updates (ConvLSTM) also has inferior performance to our proposed flow between output distributions.

Displacement error We compute the expected root mean squared error, or expected displacement error, between the ground truth pedestrian position and model predictions. This is approximated by discretizing posteriors, computing the distance from each cell to the ground truth, and taking the average weighted by confidence at each cell. Table 1 reports the error in meters, averaged over 50 timesteps (ADE) and at specific horizons (FDE). DRF-Net significantly outperforms all baselines.

Model calibration To understand overconfidence of predictive models, we compute calibration curves and expected calibration error (ECE) on the ground truth test set according to Guo et al. 2017 by treating models as multi-way classifiers over space. ECE measures miscalibration by approximating the expected difference between model confidence and accuracy. DRF has the lowest calibration error, with accuracy closest to the model confidence on average, as shown in Fig. 5. While somewhat overconfident, these models could be recalibrated with isotonic regression or temperature scaling.

Multimodality and Entropy Analysis We propose a ModePool operator to estimate the number of modes of a discrete spatial distribution. ModePool approximates the number of local maxima in a discrete distribution pp as follows, where the max is taken over ∣δr∣,∣δc∣≤⌊k2⌋\left|\delta_{r}\right|,\left|\delta_{c}\right|\leq\lfloor\frac{k}{2}\rfloor, i.e. k×kk\times k windows:

Only local maxima with mass exceeding a threshold ϵ\epsilon are counted. ModePool is efficiently implemented on GPU by adapting the MaxPool filter commonly used in CNNs for downsampling. In Figure 6-b, modality is estimated with k=5k=5, ϵ=0.1\epsilon=0.1. Given our output resolution, at most one mode per 2.5×2.52.5\times 2.5 m2 area can be counted. While the baseline MDN-4 predicts multiple Gaussian distributions, we observe strong mode-collapse. In contrast, DRF produces predictive posteriors that have increasingly multimodal predictions over horizons. Though an MDN of 8 mixtures captures some multimodality as well, the mean number of modes is highly inconsistent over time (6-b, middle).

Fig. 6-c shows the mean entropy of the predicted distributions. Entropy for DRF-Net is the lowest. As DRF-Net also achieves lower NLL at all future horizons (6-a), DRF-Net predictions can be interpreted as low bias and low variance. We combine entropy and modality into a single metric in Fig. 6-d. For the discrete heads (DRF, ConvLSTM), the entropy per mode saturates. These models capture inherent future uncertainty by adding distributional modes e.g. high level actions rather than increasing per-mode entropy. This is not the case for baselines, where entropy per mode grows over time. Qualitatively, in Fig. 7, DRF-Net predictions remain the most concentrated over long horizons.

Semantic mass ratio Our semantic map can partition the world into three disjoint high-level classes, C={Crosswalk,Road,Off-Road}\mathcal{C}=\{\text{Crosswalk},\text{Road},\text{Off-Road}\}. To interpret how well models understand the map, we measure confidence-weighted semantic accuracy, the mean predicted mass that falls on the correct map class. We also measure safety-sensitive recall, the mean mass that falls into a drivable region when the PoI is in a drivable region—performance when a PoI is on-road is very important to a self-driving car. Let c(x)∈Cc(\textbf{x})\in\mathcal{C} be the class of location x, determined by the map, and ct∗c^{*}_{t} be the ground truth class of the PoI position at time tt. Then, we compute metrics as follows, reported in Table 1:

where SS={t:ct∗∈{CW, ROAD}}\text{SS}=\left\{t:c_{t}^{*}\in\{\text{CW, ROAD}\}{}\right\}, the safety-sensitive timesteps. DRF-Net significantly outperforms baselines on semantic mass ratio metrics, and most accurately predicts the type of surface the PoI will traverse. This suggests that DRF-Net better uses the map, and is qualitatively reflected by low-entropy, concentrated mass within map polygons in Figure 7.

Ablation Study We conduct an ablation study that evaluates the value of discrete predictions and our residual flow formulation. We study two variants of the DRF prediction head, a fully convolutional and a discrete residual refinement (DRR) head. MDNs predict continuous mixtures of Gaussians assuming conditional independence of future states, which can be discretized for cost-based planning. We can instead directly predict independent discrete distributions. The fully convolutional predictor projects the spatial feature F\mathcal{F} (Section 3) into a 50-channel space representing per-timestep logits with a 1x1 convolution on scene features. Spatial softmax produces valid distributions over the discrete spatial support. The DRR head takes as input the discrete probability distributions output by our fully convolutional predictor and sequentially predicts per-timestep residuals in log-space with per-timestep weights. DRR thereby refines independent predictions sequentially.

Table 3 shows that state space discretization and categorical prediction (fully convolutional head) has significantly better NLL than the best continuous mixture model in Table 1, a 0.560.56 reduction in NLL. Sequential refinement of independent predictions using DRR improves performance. However, predicting flow in the log probability space with DRF achieves the best likelihood.

Qualitative Results Figure 7-a shows predictions for a pedestrian in a challenging pre-crossing scenario. Predictive posteriors modeled by DRF-Net (4th row) express high multimodality and concentrated mass, with three visible high-level actions: stopping, crossing straight, or crossing while skirting around a car. DRF-Net also exhibits strong map interactions, avoiding parked vehicles. However, MDNs predict highly entropic, unimodal distributions, and the ConvLSTM places substantial spurious mass on parked vehicles. Across other test scenes, we observe that DRF-Net constructs low-entropy yet multimodal predictions with similarly strong map and actor interactions. In Figure 7-d, DRF-Net is the only model to correctly predict a crosswalk approach. Still, in failure cases, all models predict crossings too early, possibly due to unknown traffic light state. This could lead to more conservative self-driving vehicle plans if the pedestrians were nearby. Nonetheless, these pedestrians and lights are distant.

Conclusion

In this paper, we develop a probabilistic modeling technique applied to pedestrian behavior prediction, called Discrete Residual Flow. We encode multi-actor behaviors into a bird’s eye view rasterization aligned with a detailed semantic map. Based on deep convolutional neural networks, a probabilistic model is designed to sequentially update marginal distributions over future actor states from the rasterization. We empirically verify the effectiveness of our model on a large scale, real-world urban dataset. Extensive experiments show that our model outperforms several strong baselines, expressing high likelihoods, low error, low entropy and high multimodality. The strong performance of DRF-Net’s discrete predictions is very promising for cost-based and constrained robotic planning.

Acknowledgments

We would like to thank Abbas Sadat for useful discussions during the development of this research.

References

Appendix

In this appendix, we provide additional implementation (Section 6.1-6.2), training (Section 6.3) and evaluation (Section 6.4) details for our proposed DRF-Net and baseline architectures. We also provide a derivation of the DRF update equation (Section 6.5).

In Section 3 of the paper, we described a deep convolutional neural network architecture that represents our spatio-temporal scene rasterization Ω\Omega as a global feature F\mathcal{F}. This CNN architecture forms the initial layers of the proposed model and baselines, though each network is trained end-to-end (backbone parameters are not shared across models). The backbone architecture is detailed in Figure 8, below. The proposed DRF-Net further projects the N×256×144×104N\times 256\times 144\times 104 feature F\mathcal{F} into a 128128 channel space with a learned 1×11\times 1 convolutional filter for memory efficiency.

2 Rasterization

The input bird’s eye view (BEV) region is rotated for a fixed pedestrian of interest heading at the current time and spans 5252 meters perpendicularly and 7272 meters longitudinally, 5050 ahead and 2222 behind the last observed pose of the pedestrian. We set the input resolution to 0.1250.125 meters per pixel and the output resolution of our spatial distribution to 0.50.5 meters per pixel. At the input resolution, our BEV rasterization channels are each 576576 px by 416416 px.

Encoding observed actor behavior We use the object detector proposed in Liang et al. 2018, which exploits LiDAR point clouds as well as cameras in an end-to-end fashion in order to obtain reliable bounding boxes of dynamic agents. Further, we associate the object detections using a matching algorithm and refine the trajectories using an Unscented Kalman Filter . These detections are rasterized for Tp=30T_{p}=30 past timesteps, with 200200 ms elapsing between timesteps. At any past time tt, DRF-Net renders a binary image DtD_{t} for pedestrian occupancy where pixel Dt,i,j=1D_{t,i,j}=1 when pixel i,ji,j lies within a convex, bounding octagon of a pedestrian’s centroid. Other cells are encoded as 00. Bounding polygons of vehicles, bicycles, buses and other non-pedestrian actors are also rendered in a binary image VtV_{t}. In Figure 3-c and Figure 8, we show how temporal information is encoded in the channel dimension of tensors DD and VV.

To discriminate the pedestrian of interest (PoI) from other actors, a grayscale image RR masks the tracklet of the pedestrian to be predicted. As a convention, let the current timestep be t=0t=0. If a pixel i,ji,j is contained within the bounding polygon of the PoI at timestep t≤0t\leq 0, then Ri,j=1+γtR_{i,j}=1+\gamma t, γ∈(0,Tp−1)\gamma\in(0,T_{p}^{-1}). By doing so, the whole PoI tracklet is encoded in a single channel with decaying intensity for older detections. This encoding allows for variable track lengths. All rasterization channels are rotated for fixed PoI orientation at t=0t=0. We compute orientation with the difference of the last two observed locations.

To allow the network to localize objects in the rasterization, two additional positional encoding channels encode xx and yy coordinates as real values from −1-1 to 11, with value 00 at the last known PoI location. Similar channels are used in .

Encoding semantic map To represent the scene context of the pedestrian, DRF-Net renders map polygons into 1515 semantic map channels, collectively denoted as MM, where each channel corresponds to a finely differentiated urban surface label. Crosswalks and drivable surfaces (roadways and intersections) are rasterized into separate channels. While sidewalks are not explicitly encoded, non-drivable surfaces are implied by the road map. Three channels indicate traffic light state, classified from the on-vehicle camera with a known traffic light position: the green, red, and yellow light channels each fill the lanes passing through intersections controlled by the corresponding light state. Similarly, lanes leading to yield and stop signs are encoded into channels. Finally, we encode other detailed lanes, such as turn, bike, and bus lanes, and a combined channel for all lane markers. In detail, the 15 channels are as follows:

Aggregated road mask, masking all drivable surfaces

This information is annotated in a semi-automated fashion in cities where the self-driving vehicle may operate (Section 4.1), and only polygons and polylines are stored.

3 Training

Computing negative log likelihood For density visualization in Figure 7, and for computing discrete negative log likelihood metrics in Table 1, the MDN predicted mixture is numerically integrated by a centered approximation with 99 sampling points for each output grid cell of size 0.5×0.50.5\times 0.5 squared meters. Discretizing the MDN allows an NLL metric to be compared between continuous predictions and discrete predictions.

Optimization In our experiments with manually annotated trajectories, we train our models from scratch using the Adam optimizer with a learning rate of 10−510^{-5}. When using trajectories from a real perception system, we fine-tune the models learned using the ground truth data to better deal with missing pedestrians and detector/sensor noise. Each training batch includes 22 pedestrian trajectories. All experiments are performed with distributed training on 1616 GPUs.

4 Metrics

Measuring modality To compute the number of modes (local maxima) in a distribution, we proposed the ModePoolk,ϵ{}_{k},\epsilon operator. Our proposed operator in fact overestimates modality for MDNs, especially for the Density Network, at short timescales due to quantization error and the fixed window size. To compute modality of a continuous distribution, we discretize the distribution. When the distributions are very long and narrow, as in Density Network short term predictions, multiple modes can be registered. Despite this overestimation, models with the proposed discrete prediction space (ConvLSTM, DRF-Net) expressed higher multimodality than the MDNs.

5 Derivation of Discrete Residual Flow

We derive Equation (3), the discrete residual flow update equation, as an approximation for explicit marginalization of a joint state distribution. According to the law of total probability,

Equation (11) can be seen as a recursive update to the previous timestep’s state marginal. Recall that xt{\mathbf{x}_{t}} is a categorical random variable over KK bins. Instead of representing the pairwise conditional distribution p(xt∣xt−1,Ω)p(x_{t}\mid x_{t-1},\Omega) and conducting the summation once per output bin at O(K2)O(K^{2}) cost per timestep, we approximate (11) with a pointwise update,

where ZtZ_{t} is a normalization constant, and ψt;θt\psi_{t;\theta_{t}} is a parametric approximator for the summation that we refer to as the residual predictor. In principle, a sufficiently expressive residual predictor can model the summation exactly. While the residual is applied as a scaling factor in Equation (13), the residual becomes more natural to understand when the recursive definition is expressed in log domain, completing the derivation,

We construct log⁡ψt;θt\log\psi_{t;\theta_{t}} such that it can be computed in parallel across all locations xtx_{t}, and such that the update to log⁡pxt(\penalty ⋅∣Ω)\log p_{{\mathbf{x}_{t}}}(\penalty\ \cdot\mid\Omega) is an elementwise sum followed by normalization. In DRF-Net, log⁡ψt;θt\log\psi_{t;\theta_{t}} is instantiated with a neural network that outputs a 2D image indexable at these locations (Figure 4). Then, the update (14) incurs O(K)O(K) cost per timestep.

With this lens, the baseline fully convolutional predictor and the mixture density networks, which assume conditional independence xt⊥xt−1∣Ω{\mathbf{x}_{t}}\perp{\mathbf{x}_{t-1}}\mid\Omega, directly approximate the marginal:

The baseline ConvLSTM propagates a cell and hidden state between steps and shares parameters of the predictor, without sampling from intermediate marginals:

Discrete residual flow retains most of the benefits of the independence assumption, i.e. tractable marginal distribution estimation and parallelizability, with update more closely resembling a Markov chain. However, there is no sampling between timesteps. As we established in our ablation study (Table 3), applying DRF Eq. (14) outperforms the baseline fully convolutional predictor according to Eq. (15) and the ConvLSTM update, Eq. (16).