Predicting accurate future trajectories of pedestrians is essential for autonomous systems but remains a challenging task due to the need for adaptability in different environments and domains. A common approach involves collecting scenario-specific data and performing fine-tuning via backpropagation. However, the need to fine-tune for each new scenario is often impractical for deployment on edge devices. To address this challenge, we introduce \paper, an In-Context Learning (ICL) framework for pedestrian trajectory prediction that enables adaptation without fine-tuning on the scenario-specific data at inference time without requiring weight updates. We propose a spatio-temporal similarity-based example selection (STES) method that selects relevant examples from previously observed trajectories within the same scene by identifying similar motion patterns at corresponding locations. To further refine this selection, we introduce prediction-guided example selection (PG-ES), which selects examples based on both the past trajectory and the predicted future trajectory, rather than relying solely on the past trajectory. This approach allows the model to account for long-term dynamics when selecting examples. Finally, instead of relying on small real-world datasets with limited scenario diversity, we train our model on a large-scale synthetic dataset to enhance its prediction ability by leveraging in-context examples. Extensive experiments demonstrate that TrajICL achieves remarkable adaptation across both in-domain and cross-domain scenarios, outperforming even fine-tuned approaches across multiple public benchmarks. Project Page: https://fujiry0.github.io/TrajICL-project-page/.
翻译:准确预测行人未来轨迹对于自主系统至关重要,但由于需要适应不同环境和领域,这仍然是一项具有挑战性的任务。常见方法涉及收集特定场景数据并通过反向传播进行微调。然而,为每个新场景进行微调的需求在边缘设备部署中往往不切实际。为解决这一挑战,我们提出了TrajICL——一种用于行人轨迹预测的上下文学习框架,该框架能够在推理时无需权重更新的情况下,通过特定场景数据实现自适应而无需微调。我们提出了一种基于时空相似性的示例选择方法,该方法通过识别对应位置的相似运动模式,从同一场景中先前观测到的轨迹中选择相关示例。为进一步优化选择过程,我们引入了预测引导的示例选择方法,该方法基于过去轨迹和预测的未来轨迹(而非仅依赖过去轨迹)选择示例。这种策略使模型在选择示例时能够考虑长期动态特性。最后,我们通过在大型合成数据集上训练模型(而非依赖场景多样性有限的真实小数据集),利用上下文示例增强其预测能力。大量实验表明,TrajICL在领域内和跨领域场景中均实现了卓越的自适应性能,在多个公开基准测试中甚至超越了经过微调的方法。项目页面:https://fujiry0.github.io/TrajICL-project-page/。