MCPcopy Index your code
hub / github.com/InhwanBae/GPGraph

github.com/InhwanBae/GPGraph @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
70 symbols 154 edges 6 files 6 documented · 9%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Learning Pedestrian Group Representations for Multi-modal Trajectory Prediction

Inhwan Bae ·
Jin-Hwi Park · Hae-Gon Jeon

ECCV 2022

Project Page ECCV Paper Source Code Related Works

Summary: An unsupervised group estimation module compatible with any off-the-shelf trajectory predictor.

🧑‍🤝‍🧑 GP-Graph Architecture 🧑‍🤝‍🧑

  • Learns to assign each pedestrian into the most likely behavior group in an unsupervised manner.
  • Pedestrian group pooling&unpooling and group hierarchy graph for group behavior modeling.
  • Group-level latent vector sampling strategy to share the latent vector between group members.

Model Training

Setup

Environment

All models were trained and tested on Ubuntu 20.04 with Python 3.7 and PyTorch 1.9.0 with CUDA 11.1.

Dataset

Preprocessed ETH and UCY datasets are included in this repository, under ./dataset/. The train/validation/test splits are the same as those fond in Social-GAN.

Baseline models

This repository supports the SGCN baseline trajectory predictor. We have included model source codes from their official GitHub in model_baseline.py

Train GP-Graph

To train our GPGraph-SGCN on the ETH and UCY datasets at once, we provide a bash script train.sh for a simplified execution.

./train.sh

We provide additional arguments for experiments:

./train.sh -t <experiment_tag> -d <space_seperated_dataset_string> -i <space_seperated_gpu_id_string>

# Examples
./train.sh -d "hotel" -i "1"
./train.sh -t onescene -d "hotel" -i "1"
./train.sh -t allinonegpu -d "eth hotel univ zara1 zara2" -i "0 0 0 0 0"

If you want to train the model with custom hyper-parameters, use train.py instead of the script file.

Model Evaluation

Pretrained Models

We have included pretrained models in the ./checkpoints/ folder.

Evaluate GP-Graph

You can use test.py to evaluate our GPGraph-SGCN model.

python test.py

📖 Citation

If you find this code useful for your research, please cite our trajectory prediction papers :)

🏢🚶‍♂️ CrowdES (CVPR'25) 🏃‍♀️🏠 | 💭 VLMTrajectory (TPAMI) 💭 | 💬 LMTrajectory (CVPR'24) 🗨️ | 1️⃣ SingularTrajectory (CVPR'24) 1️⃣ | 🌌 EigenTrajectory (ICCV'23) 🌌 | 🚩 Graph‑TERN (AAAI'23) 🚩 | 🧑‍🤝‍🧑 GP‑Graph (ECCV'22) 🧑‍🤝‍🧑 | 🎲 NPSN (CVPR'22) 🎲 | 🧶 DMRGCN (AAAI'21) 🧶

@inproceedings{bae2022gpgraph,
  title={Learning Pedestrian Group Representations for Multi-modal Trajectory Prediction},
  author={Bae, Inhwan and Park, Jin-Hwi and Jeon, Hae-Gon},
  booktitle={Proceedings of the European Conference on Computer Vision},
  year={2022}
}

More Information (Click to expand)

@inproceedings{bae2025crowdes,
  title={Continuous Locomotive Crowd Behavior Generation},
  author={Bae, Inhwan and Lee, Junoh and Jeon, Hae-Gon},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year={2025}
}

@article{bae2025vlmtrajectory,
  title={Social Reasoning-Aware Trajectory Prediction via Multimodal Language Model},
  author={Bae, Inhwan and Lee, Junoh and Jeon, Hae-Gon},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year={2025}
}

@inproceedings{bae2024lmtrajectory,
  title={Can Language Beat Numerical Regression? Language-Based Multimodal Trajectory Prediction},
  author={Bae, Inhwan and Lee, Junoh and Jeon, Hae-Gon},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year={2024}
}

@inproceedings{bae2024singulartrajectory,
  title={SingularTrajectory: Universal Trajectory Predictor Using Diffusion Model},
  author={Bae, Inhwan and Park, Young-Jae and Jeon, Hae-Gon},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year={2024}
}

@inproceedings{bae2023eigentrajectory,
  title={EigenTrajectory: Low-Rank Descriptors for Multi-Modal Trajectory Forecasting},
  author={Bae, Inhwan and Oh, Jean and Jeon, Hae-Gon},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  year={2023}
}

@article{bae2023graphtern,
  title={A Set of Control Points Conditioned Pedestrian Trajectory Prediction},
  author={Bae, Inhwan and Jeon, Hae-Gon},
  journal={Proceedings of the AAAI Conference on Artificial Intelligence},
  year={2023}
}

@inproceedings{bae2022npsn,
  title={Non-Probability Sampling Network for Stochastic Human Trajectory Prediction},
  author={Bae, Inhwan and Park, Jin-Hwi and Jeon, Hae-Gon},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year={2022}
}

@article{bae2021dmrgcn,
  title={Disentangled Multi-Relational Graph Convolutional Network for Pedestrian Trajectory Prediction},
  author={Bae, Inhwan and Jeon, Hae-Gon},
  journal={Proceedings of the AAAI Conference on Artificial Intelligence},
  year={2021}
}

Acknowledgement

Part of our code is borrowed from SGCN. We thank the authors for releasing their code and models.

Core symbols most depended-on inside this repo

randn
called by 3
utils.py
generate_identity_matrix
called by 3
model_groupwrapper.py
graph_loss
called by 2
train.py
seq_to_graph
called by 2
utils.py
split_heads
called by 2
model_baseline.py
train
called by 1
train.py
valid
called by 1
train.py
main
called by 1
train.py

Shape

Method 36
Function 20
Class 14

Languages

Python100%

Modules by API surface

model_baseline.py28 symbols
model_groupwrapper.py17 symbols
utils.py14 symbols
metrics.py6 symbols
train.py4 symbols
test.py1 symbols

For agents

$ claude mcp add GPGraph \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact