Website
| Paper
| Video
| Social NCE + Trajectron
| Social NCE + STGCNN
This is an official implementation for
Social NCE: Contrastive Learning of Socially-aware Motion Representations
Yuejiang Liu,
Qi Yan,
Alexandre Alahi, ICCV 2021
TL;DR: Contrastive Representation Learning + Negative Data Augmentations 🡲 Robust Neural Motion Models
- Rank in 1st place on the Trajnet++ challenge since November 2020 to present
- Significantly reduce the collision rate of SOTA human trajectroy forecasting models
- SOTA on imitation / reinforcement learning for autonomous navigation in crowds
Setup environments follwoing the SETUP.md
- Behavioral Cloning (Vanilla)
python imitate.py --contrast_weight=0.0 --gpu python test.py --policy='sail' --circle --model_file=data/output/imitate-baseline-data-0.50/policy_net.pth
- Social-NCE + Conventional Negative Sampling (Local)
python imitate.py --contrast_weight=2.0 --contrast_sampling='local' --gpu python test.py --policy='sail' --circle --model_file=data/output/imitate-local-data-0.50-weight-2.0-horizon-4-temperature-0.20-nboundary-0-range-2.00/policy_net.pth
- Social-NCE + Safety-driven Negative Sampling (Ours)
python imitate.py --contrast_weight=2.0 --contrast_sampling='event' --gpu python test.py --policy='sail' --circle --model_file=data/output/imitate-event-data-0.50-weight-2.0-horizon-4-temperature-0.20-nboundary-0/policy_net.pth
- Method Comparison
bash script/run_vanilla.sh && bash script/run_local.sh && bash script/run_snce.sh python utils/compare.py
Results of behavioral cloning with different methods.
Averaged results from the 150th to 200th epochs.
collision | reward | |
---|---|---|
Vanilla | 12.7% ± 3.8% | 0.274 ± 0.019 |
Local | 19.3% ± 4.2% | 0.240 ± 0.021 |
Ours | 2.0% ± 0.6% | 0.331 ± 0.003 |
If you find this code useful for your research, please cite our papers:
@article{liu2020snce,
title = {Social NCE: Contrastive Learning of Socially-aware Motion Representations},
author = {Yuejiang Liu and Qi Yan and Alexandre Alahi},
journal = {arXiv preprint arXiv:2012.11717},
year = {2020}
}
@inproceedings{chen2019crowdnav,
title={Crowd-Robot Interaction: Crowd-aware Robot Navigation with Attention-based Deep Reinforcement Learning},
author={Changan Chen and Yuejiang Liu and Sven Kreiss and Alexandre Alahi},
year={2019},
booktitle={ICRA}
}