Future prediction in traffic scenarios aims to foresee the future location of dynamic actors based on their current and previous locations and possibly other information about the environment. For an actor in interaction with others, reasoning about possible future locations of the other actors is necessary for path planning and to avoid collisions. Given enough data, some recent prediction methods [ewta, trajectron++, fln] also not just predict a single location of the actor in the future but a multimodal distribution over possible future locations.
The average prediction errors of such methods look promising, but they hide that the training and test data is dominated by simple scenarios, where the trajectory can be smoothly propagated into the future. Such scenarios can be handled with a simple Kalman filter or other autoregressive models. However, the most safety-critical scenarios are those that involve close-by dynamic obstacles and require an evasive maneuver. Such scenarios are rare in both the training and the test data. The more complex and safety-critical they are, the less frequent they are. Fatal cases with a collision are not part of the dataset at all.
As an example, the ETH-UCY dataset is often used to benchmark methods for future trajectory prediction. It is considered a challenging dataset, as it includes interacting pedestrians in crowded scenes. Figure 1 shows the histogram of samples in this dataset based on their difficulty approximated by the prediction error of a Kalman filter. The large majority of scenarios can be well modeled by linear extrapolation, whereas scenarios that require more complex modeling are rare. The depicted challenging scenario showcases a pedestrian (red box), who will turn right in the future to avoid a collision with the stationary pedestrians (black boxes) in front of them.
In this paper, we explicitly address the long-tailed data distribution in future prediction and focus on the rare but important cases rather than the average case. Straightforward ideas to re-distribute the dataset by undersampling the frequent scenarios [undersample1, undersample2] or by reweighting the loss for these samples [reweight4-inverse-effective] are not viable solutions, since it would reduce the (effective) data size dramatically. One can also oversample the challenging scenarios during training [oversample4, oversample6-m2m], yet this repetition of the same rare samples leads to overfitting and does not perform well, as we show in our experiments. Some works have tried to simulate rare cases [forking, simaug]. However, to-date, even the most realistic simulations suffer from the domain gap between the simulated and the real world. An interesting direction for dealing with imbalanced data has been presented by Cao et al., who proposed a loss that ensures larger margins for the minority [ldam-loss].
We pick up this general idea and propose to reshape the feature embedding of the predictor. We show in a detailed analysis of the feature space that, with the usual loss, the challenging examples get placed next to many normal cases. Consequently, the relevant information of these samples gets smoothed out. As we push the challenging scenarios to be in proximity in the embedding, more of these samples that share a similar scenario build a small cluster and are no longer ignored. With this approach we can predict the future trajectory of interacting pedestrians better; see blue trajectory in Figure 1.
Our contributions can be briefly summarized as follows. (1) We analyze the problem of long-tailed data distributions in future prediction for the first time. (2) We propose a novel joint optimization of the regular regression loss for predicting the future location and a loss that reshapes the feature embedding in favor of the long-tail samples. (3) We show that multi-headed networks outperform cVAEs in addressing the multimodal nature of the future.
The proposed approach is easy to integrate into existing approaches, since it is agnostic to the network architecture, viewpoint, and input modalities. We demonstrate this by evaluating on four diverse public datasets. On each of them, the method improves the prediction quality of the challenging cases, while maintaining the quality on simple cases. Our source code will be released upon publication.
2 Related Work
Future prediction.Deep learning methods dominate future prediction. LSTMs [socialLSTM, CIDNN, srlstm, ContextAware, SceneLSTM, CarNet, csp] were mostly used to model the states of the agents over time, while graph-based approaches [RSBG] were used to model the interactions between agents. However, these methods cannot handle the multimodal nature of the future. Meanwhile, several works addressed the multimodality in future prediction by cVAEs [desire, pecnet], GANs [SocialGAN, Sophie, AgentTensor, socialBiGAT, reciprocal], nonparametric approaches [forking, Relation] or a sampling-fitting framework [ewta]
. Recently, graph neural networks[stgcnn, trajectron++, evolvegraph, spagnn, lanegcn] and transformers [star] have become popular to model the agent interactions. All aforementioned works assume that the scene is static and is observed from a bird’s-eye view. Among these, Trajectron++ [trajectron++] currently performs the best.
In automotive settings, the observation is typically from an egocentric view (e.g, with camera(s) or LiDAR mounted on the vehicle). This introduces new challenges due to the large egomotion of the vehicle and the narrow field of view. Multiple works project the data to the bird’s-eye view using expensive 3D sensors [Kinematic, Uber, Surround, Infer, TrafficPredict, Precog, Drogon]. Some recent approaches work directly on the egocentric view. Deterministic approaches [Sted, Dtp] modeled the motion of the scene via optical flow. Yao et al. [Ego] proposed to use the planned egomotion to improve the predictions. TraPHic [Traphic] exploited the interaction between nearby heterogeneous objects via LSTMs. Some works also tackled the multimodality in future prediction by using Bayesian RNNs to sample multiple futures with uncertainties [Bayesian, Nemo]. Titan [titan] modeled the future as a bi-variate Gaussian and conditioned the learning process on a set of labelled prior actions to further improve the prediction. Makansi et al. [fln] proposed a three-staged framework FLN-RPN, which currently performs the best in the egocentric view.
None of the above approaches addressed the long tail of the data distribution. We base our method on Trajectron++ [trajectron++] in the bird’s-eye setting and FLN-RPN [fln] for the egocentric setting, and specifically address the challenging cases in the long tail of the dataset distribution for the first time.
Learning on imbalanced datasets. Issues with the long tail of a dataset have been well studied for classification tasks. Many works tackled the issue from the data side. A common approach is oversampling of rare classes [oversample0, oversample7, oversample2]. Another option is undersampling of the most frequent classes [undersample1, undersample2]. Several works follow the idea of generating more samples of the minority classes by simulation, which can be considered a more sophisticated version of oversampling [smote, oversample3, oversample5, oversample6-m2m]. Instead of changing the number of samples, samples can also be reweighted in the loss [reweight1-inverse-freq, reweight4-inverse-effective, reweight-by-hardness_0, reweight-by-hardness_1]. Some works proposed to learn these weights [reweight3, reweight5-meta-learning]. Recently, Li et al. [softmax-balanced]
group classes of similar sizes and learn group-wise classifiers.
Another idea is to design loss functions that affect the feature space by increasing the inter-class distance and reducing the intra-class distance[range-loss, reweight1-inverse-freq]. This concept of enlarging the margin between minority classes leads to a larger margin between classes and, thus, better generalization [crl-loss, ldam-loss, metric-learning-uncertainty, affinity-loss]. Similarly, contrastive learning has become very popular due to promising results on self-supervised feature learning with noise-contrastive learning [nce, simclr, infonce]. Noisy versions of a sample (positives) are forced to be separated from other samples (negatives) [exemplarCNN]. Recently, contrastive learning enabled learning stronger feature extractors for classifying long-tail datasets [Yang2020RethinkingTV].
All these methods were applied to classification tasks, where there is an explicit distinction between frequent and rare classes. Our approach also augments the loss to reshape the data distribution in the embedding space, yet we do not rely on predetermined clusters, since we have a regression task. Given the flexibility of contrastive learning in defining losses based on the definition of positive and negative samples, we adopt a novel way of embedding the samples based on their difficulty as measured by the performance of a Kalman filter and combine the reshaping of the embedding space with the regular regression loss. For sake of fair comparison, we also adapt previous methods tailored for classification and use them in conjunction with the regression loss as detailed in Section 6.5.
3 Future Prediction
Given current and past observations , where is the length of the history, future prediction aims to predict the true state of the actor of interest at times in the future. An observation at a single time step can consist of the 2D location , a map of the environment, a bounding box of the actor of interest, an RGB image , semantic segmentation , or future egomotion . For future trajectory prediction, the state is defined as the future trajectory at and for future localization prediction as the future bounding box at .
We address the issue with the long tails of the data distribution in both bird’s-eye view and egocentric settings. As backbone for these scenarios, we use the Trajectron++ [trajectron++] and FLN-RPN [fln], respectively.
3.1 Bird’s-Eye View - Trajectron++
Trajectron++ [trajectron++] is the state-of-the-art method for future trajectory prediction in bird’s-eye view. It takes the dynamic actors, the static environment, and heterogeneous input data into account. Given the past trajectories , and optionally a map of the scene, Trajectron++ builds a directed spatiotemporal graph for a scene based on its topology. It predicts future trajectories . The nodes of the graph represent the actors, and the edges represent their interactions. The actors’ histories are modeled by LSTMs, features of interacting actors are aggregated via point-wise summation, and GRUs are used to decode the future trajectories. The original architecture employs a cVAE to produce multiple future trajectories.
Since cVAEs require multiple runs of the decoder to obtain multiple predictions, we replace the cVAE by the multi-hypotheses networks trained with EWTA (Evolving Winner-Takes-All) [ewta]. The EWTA loss for every sample in the batch is defined as:
is the number of estimated hypotheses.is the indicator function that returns if the condition returns true and otherwise. and denote the th predicted future state and the ground truth at future time step (), respectively. The returns the hypotheses closest to the ground truth, where gradually decreases from to during training. While all hypotheses are penalized in the beginning of the training, only the best one would be penalized at the end of the training. The Trajectron++ augmented by EWTA (Figure 3 (top)) produces multiple future trajectories in a single network pass and outperforms the standard Trajectron++, as we show in Section 6.5.
3.2 Egocentric View - FLN-RPN
FLN-RPN [fln] is the state-of-the-art method for future localization prediction in the egocentric setting. FLN-RPN predicts the multimodal distribution of the future localization of an actor in three steps. First, it predicts where an actor is most likely to be in the current image (Reachability Prior). Second, it transfers the reachability prior from the current frame to the future frame using the future egomotion. Finally, past bounding boxes of the actor , images , semantic segmentations at time steps (), the future egomotion and the predicted future reachability prior are given to the network to predict the future localization of the actor of interest. The prediction has the form of set of bounding boxes at . The two key components of FLN-RPN are the reachability prior, which helps overcoming mode collapse, and the EWTA loss function (Eq. 1 with and is replaced by ) that can learn diverse multiple states of the future in a single forward pass. Figure 3 (bottom) illustrates the FLN-RPN framework.
3.3 Difficulty Ranking
Before we explore the effects of the distribution of the challenging scenarios in the feature space on the final prediction, we need to know how challenging each scenario is. Since manual labeling is not a viable option, we use a common and simple metric to measure the difficulty of cases: the displacement error made by the Kalman Filter [Ego, fln, Kalman1960] on this sample. Small errors indicate good approximation with linear extrapolation, whereas large errors indicate a challenging scenario that requires complex nonlinear prediction.
4 Why are Hard Cases Ignored by the Model?
To understand the cause of the problem with samples from the long tail of the data distribution, we visualized the feature embedding of the data from a network trained with a supervised future prediction objective and analyzed particular cases in detail. Figure 2 (left) shows the feature space for the UNIV scene in the ETH-UCY dataset projected to 2D with t-SNE [tsne]. Each dot is a sample from the scene mapped to the feature space by the network trained with EWTA loss (Eq. 1). Hard cases are sprinkled among the easy cases in the feature space without any structure. A closer look at a hard case (1) reveals that it shares some similarity with corresponding easy cases (2,3), which explains its position in the embedding, but the relevant cues, in which it is different from the easy cases, get ignored with normal training. The sample should rather be close to another challenging example (4) to capture the social interaction, where pedestrians walk in groups and follow other groups. We believe that challenging scenarios being alone in a manifold full of easy scenarios causes the network to ignore them and base its decisions on shortcuts learned from the dominant easy scenarios. The network does not get a chance to learn dedicated features to solve challenging cases by reusing some common cues among them (1,4), as long as they get mixed up with the easy cases. Indeed, the prediction for case (1) is quite wrong since it is similar to the prediction of cases (2,3), where social interaction is missing.
5 Reshaping the Embedding with Contrastive Learning
The analysis from the previous section triggers the idea to push hard samples away from the easy ones, such that the relevant cues of similar hard samples get the chance to be no longer ignored during training. We implement this idea with an additional contrastive loss. Contrastive learning enforces certain training samples (positives) to be closer in the embedding to a sample (anchor) than others (negatives). There are multiple ways to express this in a loss. The most popular is
is the learned feature vector at the bottleneck of the network (see Figure3), is the positive set of anchor . is the indicator function that returns if the condition returns true and otherwise. is the total number of samples in the batch. is the total number of positive samples for the anchor . is the temperature parameter. Positive samples are often defined as augmented versions of the same image [simclr] or samples belonging to the same class [sup-con]. Negative samples, on the other hand, are other samples in the batch that do not satisfy the positive criterion by some safe margin. Since our goal is to distribute the features based on the difficulty, we define the positive set as the set of samples in the batch which has a difficulty score satisfying , where is a hyper-parameter defining the positivity threshold. Similarly, the negatives samples are defined as all samples with a difficulty score satisfying . Note that we use different thresholds implying that many samples in the batch are neither positive nor negative. In order to minimize this loss, the network must maximize the nominator and minimize the denominator. Doing so, it learns to map the positive samples close in the feature space and the negative ones apart. The result of training with such a loss is shown in Figure 2 (right).
While having the hard cases being pushed together is good for them to share relevant cues and learn prediction models for less common scenarios, there is much diversity among hard cases, and not all of them should be pushed to the same space. In particular, we should not destroy cues shared with the easy examples, which are necessary for the network to solve the actual task. The contrastive loss alone can not predict the future state. To this end, we jointly optimize for the supervised future prediction loss and the self-supervised contrastive loss as:
where controls the importance of the contrastive loss, hence the strength of the attraction that pulls hard cases together.
Figure 2 (middle) shows the effect of this combination. Cases (1) and (4) fall into the same sub-space resulting in a much better prediction for (1). Other hard cases rather stay with similar easy samples as they have no other hard cases to share information with.
Due to its simplicity, this difficulty-based contrastive learning can be added to any existing method as long as the difficulty can be defined explicitly on the training set.
The ETH-UCY dataset is the combination of the ETH [eth] and the UCY [ucy] pedestrian datasets. Both include videos from bird’s-eye view of the pedestrians, where the trajectories are manually annotated. The challenges in these datasets are the frequent interactions between pedestrians, as the scenes are very crowded, and the lack of visual information due to the viewpoint, i.e, the actors are small and uninformative. We present 5-fold cross-validation results on the five scenes of the dataset.
nuScenes [nuscenes] is a large autonomous driving dataset with 1000 scenes, where each is 20 seconds long. It provides HD semantic maps with 11 different layers and accurate bounding box annotations in time. It provides scenarios from bird’s-eye view and egocentric view, and we experiment with each of them.
Waymo [waymo] is the most recent autonomous driving dataset with 1000 scenes, where each is 20 seconds long. We use the validation part of the dataset (202 scenes) to show zero-shot transfer of our approach in egocentric view (i.e, without retraining the model).
6.2 Evaluation Metrics
min-ADE is the minimum average displacement error. It computes the mean distance between all predicted trajectories and the ground truth and reports the error of the closest one. This is sometimes also referred to as oracle (or best-of-many), since the selection of the minimum error depends on the ground truth.
min-FDE is the minimum final displacement error. It computes the distance between the final locations of the predicted trajectories and the ground truth at the end of the predicted time horizon () and, like min-ADE, reports the minimum.
6.3 Training Details
In our experiments for bird’s-eye view, we followed the original training schedule for Trajectron++ [trajectron++]
. We trained the Trajectron++ (EWTA) with batch size 256 for 100 epochs in every EWTA stage () for ETH-UCY and for 5 epochs in every EWTA stage for nuScenes. For the experiments in egocentric view, we used ResNet34 [resnet] as the encoder of FLN-RPN [fln] and trained with batch size of 32. Following [trajectron++, fln], we set to 12, 6, 1 and to 0.4, 0.5, 3.0 for ETH-UCY, nuScenes (bird’s-eye view) and nuScenes/Waymo (egocentric view), respectively. The remaining design choices were kept as in the original papers [trajectron++, fln]. For our joint optimization, was chosen based on the validation set as 1, 50, 150 for nuScenes (bird’s-eye view), ETH-UCY, and nuScenes (egocentric view), respectively. We used the recommended value of for [simclr]. and were set such that the ratio of positives and negatives over the batch size are 10% and 40% for Trajectron++ and 33% and 33% for FLN-RPN, respectively. had the dimensions of 232 and 256 for Trajectron++ and FLN-RPN, respectively. A study about the effect of the hyper-parameter is presented in the supplemental material.
Bird’s-eye view (ETH-UCY). We selected a set of recent methods addressing the future trajectory prediction: Graph-based approaches: RSBG[RSBG], S-STGCNN[stgcnn], and Trajectron++[trajectron++] (referred as Traj++); transformer-based approach: STAR[star]; multi-stage networks: TPNet [tpnet] and PECNet [pecnet].
Bird’s-eye view (nuScenes). We compare against a set of baselines including deterministic LSTM-based approaches: S-LSTM [socialLSTM], CSP [csp], and CAR-Net [CarNet]; multimodal graph-based approaches: SpAGNN [spagnn] and Trajectron++ [trajectron++].
Egocentric view. We compare against the multimodal state-of-the-art FLN-RPN [fln].
Moreover, for all settings and datasets, we implemented the common approaches for imbalanced data: resampling [oversample0], reweighting using the inverse class frequency [reweight1-inverse-freq], and reweighting using the effective number of samples [reweight4-inverse-effective]. We also adapt sophisticated long-tail classification methods[ldam-loss, softmax-balanced] to the considered task by defining classes based on the discretization of Kalman filter scores. Then, the network is jointly trained on the regression loss and the considered classification loss (more details are provided in the supplementary). Notice that recent methods: cRT, -norm and LWS introduced by Kang et al. [sota-class-long-tailed] can not be adapted to regression tasks since they do not affect the feature extractor and fully rely on post-processing the classifier which is not needed at test time in our scenario.
6.5 Results & Discussion
To show the validity of the proposed approach, we selected strong baselines and state-of-the-art methods for comparison. Tables 1, 2 and 3 summarize our results on the four different datasets. Since we are interested in improving the quality of the predictions of the rare cases, we report min-ADE and min-FDE for all samples, as well as the top 1-3% challenging cases.
EWTA vs cVAE. Tables 1 and 2 show that our base method, where we use the Trajectron++ as the backbone with the EWTA objective, clearly outperforms the previous state-of-the-art Trajectron++. This shows that EWTA-based sampling for possible future trajectories works better than cVAE-based sampling.
|All||Top 3%||Top 2%||Top 1%|
|Traj++ EWTA (ours)||0.16/0.32||0.47/1.07||0.51/1.13||0.42/0.87|
|+ LDAM [ldam-loss]||0.17/0.33||0.47/1.04||0.50/1.08||0.42/0.83|
|+ LDAM-DRW [ldam-loss]||0.17/0.33||0.47/1.04||0.51/1.08||0.43/0.83|
|+ BAGS [softmax-balanced]||0.17/0.32||0.48/1.08||0.51/1.10||0.42/0.85|
|+ contrastive (ours)||0.16/0.32||0.46/1.03||0.48/1.03||0.38/0.71|
|All||Top 3%||Top 2%||Top 1%|
|Traj++ EWTA (ours)||0.19/0.32||0.48/0.88||0.50/0.88||0.59/1.02|
|+ LDAM [ldam-loss]||0.18/0.32||0.48/0.88||0.51/0.93||0.60/1.10|
|+ LDAM-DRW [ldam-loss]||0.18/0.32||0.50/0.93||0.52/0.96||0.63/1.14|
|+ BAGS [softmax-balanced]||0.18/0.31||0.48/0.88||0.51/0.94||0.61/1.11|
|+ contrastive (ours)||0.18/0.30||0.44/0.73||0.46/0.72||0.54/0.85|
|nuScenes Egocentric View||Waymo Egocentric View|
|All||Top 3%||Top 2%||Top 1%||All||Top 3%||Top 2%||Top 1%|
|+ LDAM [ldam-loss]||8.04||25.23||26.02||31.13||7.61||23.00||23.09||25.05|
|+ LDAM-DRW [ldam-loss]||8.01||26.63||27.85||34.58||8.05||25.23||25.98||29.32|
|+ BAGS [softmax-balanced]||7.28||29.54||30.38||35.74||6.67||24.45||24.88||26.66|
|+ contrastive (ours)||7.04||25.05||25.26||27.49||6.49||22.36||22.72||24.09|
Large improvements on the challenging cases. Results on all datasets show that our approach yields large improvements on the challenging cases (particularly for the top 1%) while maintaining the overall average error. In particular, on the most challenging cases (top 1%), our approach improves by 18%, 17%, 23% and 12% on the ETH-UCY, nuScenes (bird’s eye-view), nuScenes (egocentric view) and Waymo open dataset, respectively. The challenging training samples, as hypothesized, help each other when they are in proximity in the feature space. Notably, the studied datasets differ in their input modalities (additional semantic maps for nuScenes), viewpoint (bird’s-eye vs egocentric views), and prediction output (2D points in bird’s-eye view while bounding boxes for egocentric view). This indicates that the approach is agnostic to different input modalities and generalizes well.
Comparison to long-tail classification baselines. Tables 1, 2 and 3 show a comparison against recent methods addressing the long-tail problem in classification. Our method based on the contrastive loss outperforms all these techniques on all metrics.
Zero-shot transfer. Results on the Waymo dataset (Tab. 3) show promising zero-shot transfer to unseen dataset, where models were trained on the nuScenes dataset and tested on the validation split of the Waymo dataset.
Avoids bias. In Table 4 we compare our method against the common approaches for imbalanced data: resampling and reweighting. We report across all datasets the performance over all samples and over the most challenging samples (top 1%). As expected, these baselines tend to bias the challenging cases. Hence, the average performance drops significantly (66%, 16%, 44% and 64% for ETH-UCY, nuScenes bird’s, nuScenes egocentric and Waymo). Our method, on the other hand, maintains the average performance over all samples. Detailed results on all metrics and difficulties are provided in the supplementary.
|All/Top 1%||All/Top 1%||All/Top 1%||All/Top 1%|
|+ resample [oversample0]||0.53/1.22||0.37/1.33||10.20/21.62||10.48/19.69|
|+ reweight [reweight1-inverse-freq]||0.56/0.76||0.58/1.67||14.47/16.20||14.00/16.44|
|+ reweight [reweight4-inverse-effective]||0.56/0.78||0.60/1.71||16.54/15.46||17.43/18.79|
6.6 Qualitative Results
In Figure 4 (a), we show three challenging examples from ETH-UCY dataset. In all the cases, the future trajectory of the pedestrian (red) is not trivial, and the network must model the interaction between pedestrians to generate a plausible future trajectory. Our approach (blue) generates trajectories that are much closer to the ground truth than Trajectron++ EWTA (cyan). In Figure 4 (b), we show three challenging examples for vehicles from the nuScenes dataset (bird’s-eye view). In these examples, the vehicle changes direction, which requires interpretation of the maps. Our approach succeeds on these examples, whereas Trajectron++ EWTA misses these cues and predicts the simple continuation of the trajectory.
Figure 5 shows four different examples from the egocentric setting. Figure 5 (a) shows a child crossing the street in front of the vehicle. Figure 5 (b) shows a vehicle that will turn right to go down the street, which is rarely encountered. Figure 5 (c) shows an example that is difficult because of the uncommon egomotion of the car moving to the opposite lane to overtake the bus. Figure 5 (d) shows a vehicle that turns right to exit the round-about. In all these examples, our approach makes predictions close to the ground truth (both in scale and location), whereas the baseline fails.
Limitations and failure cases. We also analyzed the limits of our approach to identify room for further improvements. We found that some challenging cases continue to stay in a manifold for easy cases because of missing similarity to other hard cases Figure 6 (b), or easy cases moved wrongly to a manifold of challenging cases Figure 6 (c). Consequently, our approach yields wrong prediction. We also found that our method, like other methods, cannot model unexpected behavior, such as suddenly stopping and turning in the opposite direction Figure 6 (a). We also provide the feature embedding before and after application of our approach for all datasets in the supplementary.
We addressed the long-tailed data distributions by acting on the feature embedding. We showed that pulling the rare challenging samples together in the feature embedding via contrastive learning helps improve their final predictions while preserving the performance over the whole dataset. We validated our approach qualitatively and quantitatively on four different datasets, two different viewpoints and different combinations of input and output modalities. The proposed loss can be integrated easily into existing approaches to improve their performance on critical challenging cases. We hypothesize that the concept is generic and could be integrated into other regression tasks with an unbalanced sample distribution, as long as there is a way to identify the underrepresented samples during training.
Experiments were run on the Deep Learning Cluster funded by the German Research Foundation (INST 39/1108-1). Gefördert durch das Bundesministerium für Wirtschaft und Energie aufgrund eines Beschlusses des Deutschen Bundestages.
1 Visualization Plots
2 Feature Space Visualization
Figure 9 shows the projection of the feature space using tSNE [tsne] on three different datasets with different input modalities and views. For each dataset, we show the feature space embedding without our joint optimization (i.e, only the supervised loss) and with our joint optimization (i.e, additionally utilizing the contrastive loss). Note how our approach reshapes the feature space by pushing the challenging scenarios to be closer so that they can benefit each other as also shown in our quantitative results.
3 Effect of the Strength of the Contrastive Loss
In Table 5 we show a study for the importance of the contrastive loss () used in our approach (Eq. (4)). Using a small factor leads to small improvements on the challenging scenarios as the force of reshaping the feature space is rather weak. On the other hand, using a very large factor yields worse results as the network focuses more on reshaping the feature space and ignores the important cues for the actual task which are learned from the supervised loss. Note that this study is used only to show the effect of the weight of the contrastive loss. In our main results, we use the validation set to select the best value for .
4 More Qualitative Results
|All||Top 3%||Top 2%||Top 1%|
|Traj++ EWTA (ours)||0.16/0.32||0.47/1.07||0.51/1.13||0.42/0.87|
|+ contrastive ()||0.17/0.33||0.47/1.04||0.50/1.07||0.43/0.84|
|+ contrastive ()||0.16/0.32||0.46/1.03||0.48/1.03||0.38/0.71|
|+ contrastive ()||0.17/0.32||0.48/1.04||0.52/1.10||0.50/0.97|
5 Detailed Quantitative Results
Table 6 show a detailed comparison between our method and the resampling/reweighting baselines across all datasets on all metrics and difficulties. This support our findings that these baselines tend to bias the challenging cases (overfitting) while our approach maintain the average performance and improves largely on the challenging cases.
|ETH-UCY||nuScenes-Bird’s Eye View||nuScenes Egocentric View||Waymo Open Dataset|
|All||Top 3%||Top 2%||Top 1%||All||Top 3%||Top 2%||Top 1%||All||Top 3%||Top 2%||Top 1%||All||Top 3%||Top 2%||Top 1%|
|+ resample [oversample0]||0.25/0.53||0.56/1.16||0.61/1.24||0.61/1.22||0.21/0.37||0.55/0.98||0.61/1.07||0.78/1.33||10.20||18.90||19.37||21.62||10.48||19.46||18.91||19.69|
|+ reweight [reweight1-inverse-freq]||0.28/0.56||0.41/0.78||0.44/0.81||0.43/0.76||0.33/0.58||0.74/1.28||0.80/1.38||0.99/1.67||14.47||15.33||15.42||16.20||14.00||17.01||16.80||16.44|
|+ reweight [reweight4-inverse-effective]||0.28/0.56||0.43/0.83||0.45/0.86||0.44/0.78||0.34/0.60||0.75/1.33||0.80/1.42||0.99/1.71||16.54||15.29||15.34||15.46||17.43||20.34||19.40||18.79|
6 Baselines Implementation Details
In order to use state-of-the-art methods for long-tail classification, we map the regression task to a classification task by assigning classes to training samples based on the error of the Kalman filter. In particular, we group the errors into bins and assign the same class to all samples in each bin. To alleviate the issue of having classes with only one sample, we group all samples with a score greater than a specific threshold into the same bin. This yields 13, 36, 331 classes for ETH-UCY, nuScenes bird’s eye view and nuScenes egocentric view, respectively. For all baselines (including our method), we use the same joint training scheme where two heads (classification and regression) are trained on top of the feature embedding. For the LDAM baseline [ldam-loss], we experiment with different scaling factors and use the best setting . Following BAGS [softmax-balanced], we split the classes into 4 homogeneous groups to ensure that all classes from the same group have roughly the same number of items and use a sampling ration of 8 to ensure that all groups contribute to the mini-batch during training.