Giacomo Rosin
·
Muhammad Rameez Ur Rahman
·
Sebastiano Vascon
IJCNN 2025
Paper
ECAM (Environmental Collision Avoidance Module) is a contrastive learning-based module to enhance environmental collision avoidance ability of trajectory forecasting models. It can be integrated into existing models, improving their ability to generate collision-free trajectories, with zero overhead during inference.
git clone https://github.com/CVML-CFU/ECAM.git
cd ECAM
First create a virtual environment with Python 3.11, eg. with uv
:
uv venv --python 3.11
source .venv/bin/activate
Then install the required packages. We provide two different requirements files, one for CPU only and one for GPU (CUDA). Choose the one that fits your setup.
pip install -r requirements-cpu.txt
pip install -r requirements-cuda.txt
Download the additional data required for the experiments.
./SingularTrajectory/script/download_extra.sh
First, change into the SingularTrajectory
directory:
cd SingularTrajectory
To train the model, run the following command:
./script/train.sh -p CONFIG_PREFIX -t TAG -d {eth|hotel|univ|zara1|zara2|sdd|pfsd|thor} -v {orig|map|ecam} -g {cpu|gpu}"
Example:
./script/train.sh -p stochastic/singulartrajectory -t SingularTrajectory-stochastic -d "eth" -v ecam -g gpu
To test the model, run the following command:
./script/test.sh -p CONFIG_PREFIX -t TAG -d {eth|hotel|univ|zara1|zara2|sdd|pfsd|thor} -v {orig|map|ecam} -g {cpu|gpu}"
Example:
./script/test.sh -p stochastic/singulartrajectory -t SingularTrajectory-stochastic -d "eth" -v ecam -g gpu
This work builds upon code from the SingularTrajectory, EigenTrajectory, Social-NCE, and AgentFormer repositories. We sincerely thank the respective authors for making their implementations and models available.