{"id":37637576,"url":"https://github.com/vita-epfl/trajnetplusplusbaselines","last_synced_at":"2026-01-16T11:11:18.597Z","repository":{"id":40608411,"uuid":"218013163","full_name":"vita-epfl/trajnetplusplusbaselines","owner":"vita-epfl","description":"[ITS'21] Human Trajectory Forecasting in Crowds: A Deep Learning Perspective","archived":false,"fork":false,"pushed_at":"2023-04-04T15:30:41.000Z","size":43259,"stargazers_count":216,"open_issues_count":7,"forks_count":79,"subscribers_count":14,"default_branch":"master","last_synced_at":"2023-11-07T16:56:49.249Z","etag":null,"topics":["benchmark","crowd-dynamics","datasets","human-trajectory","human-trajectory-prediction","kalman-filter","orca","social-force-model","social-gan","social-lstm","trajectory-prediction-benchmark"],"latest_commit_sha":null,"homepage":"https://ieeexplore.ieee.org/document/9408398","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vita-epfl.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-28T09:42:36.000Z","updated_at":"2023-11-05T17:30:33.000Z","dependencies_parsed_at":"2023-01-19T18:01:08.751Z","dependency_job_id":null,"html_url":"https://github.com/vita-epfl/trajnetplusplusbaselines","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/vita-epfl/trajnetplusplusbaselines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vita-epfl%2Ftrajnetplusplusbaselines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vita-epfl%2Ftrajnetplusplusbaselines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vita-epfl%2Ftrajnetplusplusbaselines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vita-epfl%2Ftrajnetplusplusbaselines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vita-epfl","download_url":"https://codeload.github.com/vita-epfl/trajnetplusplusbaselines/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vita-epfl%2Ftrajnetplusplusbaselines/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","crowd-dynamics","datasets","human-trajectory","human-trajectory-prediction","kalman-filter","orca","social-force-model","social-gan","social-lstm","trajectory-prediction-benchmark"],"created_at":"2026-01-16T11:11:18.531Z","updated_at":"2026-01-16T11:11:18.580Z","avatar_url":"https://github.com/vita-epfl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"TrajNet++ : The Trajectory Forecasting Framework\n================================================\n\nPyTorch implementation of `Human Trajectory Forecasting in Crowds: A Deep Learning Perspective \u003chttps://arxiv.org/pdf/2007.03639.pdf\u003e`_ \n\n.. figure:: docs/train/cover.png\n\nTrajNet++ is a large scale interaction-centric trajectory forecasting benchmark comprising explicit agent-agent scenarios. Our framework provides proper indexing of trajectories by defining a hierarchy of trajectory categorization. In addition, we provide an extensive evaluation system to test the gathered methods for a fair comparison. In our evaluation, we go beyond the standard distance-based metrics and introduce novel metrics that measure the capability of a model to emulate pedestrian behavior in crowds. Finally, we provide code implementations of \u003e 15 popular human trajectory forecasting baselines.\n\nWe host the `Trajnet++ Challenge \u003chttps://www.aicrowd.com/challenges/trajnet-a-trajectory-forecasting-challenge\u003e`_ on AICrowd allowing researchers to objectively evaluate and benchmark trajectory forecasting models on interaction-centric data. We rely on the spirit of crowdsourcing and the challenge has \u003e 1800 submissions. We encourage researchers to submit their sequences to TrajNet++, so the quality of trajectory forecasting models can keep increasing in tackling more challenging scenarios.  \n\n\nData Setup\n==========\n\nThe detailed step-by-step procedure for setting up the TrajNet++ framework can be found `here \u003chttps://thedebugger811.github.io/posts/2020/03/intro_trajnetpp/\u003e`_\n\nConverting External Datasets\n----------------------------\n\nTo convert external datasets into the TrajNet++ framework, refer to this `guide \u003chttps://thedebugger811.github.io/posts/2020/10/data_conversion/\u003e`_ \n\nTraining Models\n===============\n\nLSTM\n----\n\nThe training script and its help menu:\n``python -m trajnetbaselines.lstm.trainer --help``\n\n**Run Example**\n\n.. code-block::\n\n   ## Our Proposed D-LSTM\n   python -m trajnetbaselines.lstm.trainer --type directional --augment\n\n   ## Social LSTM \n   python -m trajnetbaselines.lstm.trainer --type social --augment --n 16 --embedding_arch two_layer --layer_dims 1024\n\n\n\nGAN\n---\n\nThe training script and its help menu:\n``python -m trajnetbaselines.sgan.trainer --help``\n\n**Run Example**\n\n.. code-block::\n\n   ## Social GAN (L2 Loss + Adversarial Loss)\n   python -m trajnetbaselines.sgan.trainer --type directional --augment\n   \n   ## Social GAN (Variety Loss only)\n   python -m trajnetbaselines.sgan.trainer --type directional --augment --d_steps 0 --k 3\n\n\nEvaluation\n==========\n\nThe evaluation script and its help menu: ``python -m evaluator.lstm.trajnet_evaluator --help``\n\n**Run Example**\n\n.. code-block::\n   \n   ## LSTM (saves model predictions. Useful for submission to TrajNet++ benchmark)\n   python -m evaluator.lstm.trajnet_evaluator --output OUTPUT_BLOCK/trajdata/lstm_directional_None.pkl --path \u003cpath_to_test_file\u003e\n\n   ## SGAN (saves model predictions. Useful for submission to TrajNet++ benchmark)\n   python -m evaluator.sgan.trajnet_evaluator --output OUTPUT_BLOCK/trajdata/sgan_directional_None.pkl --path \u003cpath_to_test_file\u003e\n\nMore details regarding TrajNet++ evaluator are provided `here \u003chttps://github.com/vita-epfl/trajnetplusplusbaselines/blob/master/evaluator/README.rst\u003e`_\n\nEvaluation on datasplits is based on the following `categorization \u003chttps://github.com/vita-epfl/trajnetplusplusbaselines/blob/master/docs/train/Categorize.png\u003e`_\n\n\nResults\n-------\n\nUnimodal Comparison of interaction encoder designs on interacting trajectories of TrajNet++ real world dataset. Errors reported are ADE / FDE in meters, collisions in mean % (std. dev. %) across 5 independent runs. Our goal is to reduce collisions in model predictions without compromising distance-based metrics.\n\n+----------------+------------+-------------------+ \n| Method         |   ADE/FDE  | Collisions        | \n+----------------+------------+-------------------+ \n| LSTM           |  0.60/1.30 | 13.6 (0.2)        | \n+----------------+------------+-------------------+ \n| S-LSTM         |  0.53/1.14 |  6.7 (0.2)        |  \n+----------------+------------+-------------------+ \n| S-Attn         |  0.56/1.21 |  9.0 (0.3)        |  \n+----------------+------------+-------------------+ \n| S-GAN          |  0.64/1.40 |  6.9 (0.5)        |   \n+----------------+------------+-------------------+ \n| D-LSTM (ours)  |  0.56/1.22 |  **5.4** **(0.3)**| \n+----------------+------------+-------------------+ \n\n\nInterpreting Forecasting Models\n===============================\n\n+-------------------------------------------------------------------------+\n|  .. figure:: docs/train/LRP.gif                                         |\n|                                                                         |\n|     Visualizations of the decision-making of social interaction modules |\n|     using layer-wise relevance propagation (LRP). The darker the yellow |\n|     circles, the more is the weight provided by the primary pedestrian  |\n|     (blue) to the corresponding neighbour (yellow).                     |\n+-------------------------------------------------------------------------+\n\nCode implementation for explaining trajectory forecasting models using LRP can be found `here \u003chttps://github.com/vita-epfl/trajnetplusplusbaselines/tree/LRP\u003e`_\n\nBenchmarking Models\n===================\n\nWe host the `Trajnet++ Challenge \u003chttps://www.aicrowd.com/challenges/trajnet-a-trajectory-forecasting-challenge\u003e`_ on AICrowd allowing researchers to objectively evaluate and benchmark trajectory forecasting models on interaction-centric data. We rely on the spirit of crowdsourcing, and encourage researchers to submit their sequences to our benchmark, so the quality of trajectory forecasting models can keep increasing in tackling more challenging scenarios.\n\nCitation\n========\n\nIf you find this code useful in your research then please cite\n\n.. code-block::\n    \n    @article{Kothari2020HumanTF,\n      author={Kothari, Parth and Kreiss, Sven and Alahi, Alexandre},\n      journal={IEEE Transactions on Intelligent Transportation Systems}, \n      title={Human Trajectory Forecasting in Crowds: A Deep Learning Perspective}, \n      year={2021},\n      volume={},\n      number={},\n      pages={1-15},\n      doi={10.1109/TITS.2021.3069362}\n     }\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvita-epfl%2Ftrajnetplusplusbaselines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvita-epfl%2Ftrajnetplusplusbaselines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvita-epfl%2Ftrajnetplusplusbaselines/lists"}