Git Product home page Git Product logo

social-implicit's Introduction

Social-Implicit: Rethinking Trajectory Prediction Evaluation and The Effectiveness of Implicit Maximum Likelihood Estimation, ECCV2022

Abduallah Mohamed, Deyao Zhu, Warren Vu

Mohamed Elhoseiny* , Christian Claudel*

** Equal advising

Read full paper here, Check the interactive demo here.

Social-Implicit


Best-of-N (BoN) Average Displacement Error (ADE)/ Final Displacement Error (FDE) is the most used metric for evaluating trajectory prediction models. Yet, the BoN does not quantify the whole generated samples, resulting in an incomplete view of the model’s prediction quality and performance. We propose a new metric, Average Mahalanobis Distance (AMD) to tackle this issue. AMD is a metric that quantifies how close the whole generated samples are to the ground truth. We also introduce the Average Maximum Eigenvalue (AMV) metric that quantifies the overall spread of the predictions. Our metrics are validated empirically by showing that the ADE/FDE is not sensitive to distribution shifts, giving a biased sense of accuracy, unlike the AMD/AMV metrics. We introduce the usage of Implicit Maximum Likelihood Estimation (IMLE) as a replacement for traditional generative models to train our model, Social-Implicit. IMLE training mechanism aligns with AMD/AMV objective of predicting trajectories that are close to the ground truth with a tight spread. Social-Implicit is a memory efficient deep model with only 5.8K parameters that runs in real time of about 580Hz and achieves competitive results.

Beside presenting the new metrics AMD/AMV which ensures a fair evaluation of the predictions quality, our method uses three key concepts: Social-Zones, Social-Cell and the Social-Loss .


The Social-Zones categorise observed agents based on their maximum observed speed. Each Social-Zone is processed by a Social-Cell.
Social-Cell is a lightweight modular component with two streams global and local that creates a powerful embedding for the observations illustrated below:


Finally, the Social-Loss forces geometric constraints on the intra-distance between agents and the angles between agents to be close to the ground-truth.


Code Intructions

  • On the first run of testing or training code, the code will save a pickled version of the processed data for faster production in the next time.

  • We used pipreqs to generate the minimum needed dependcies to run the code. The necessary packages are in requirements.txt, you can install it by running:

pip3 install -r requirements.txt

Code Structure

  • train.py for training the code
  • test_amd_amv_kde.py to test the models and report the AMD/AMV/KDE metrics
  • test_ade_fde.py to test the models and report the ADE/FDE metrics
  • CFG.py contains model configratuin parameters
  • metrics.py contains ADE/FDE implementation
  • amd_amv_kde.py contains the AMD/AMV/KDE implementation
  • trajectory_augmenter.py contains the augmentations techniques for trajectories
  • utils.py general utils used by the code
  • pkls folder: stores the data pickles
  • datasets folder: contains the ETH/UCY raw data and SDD data from DAG net
  • checkpoint folder: contains the trained models

Testing using pretarined models

To report the AMD/AMV/KDE

python3 test_amd_amv_kde.py

Note that the code will take a while to run becuase the GMM fit version we use is not vecotrized version.

To report the ADE/FDE

python3 test_ade_fde.py

Training from scratch

Simply, run:

train.sh

Visualization

The visualization script compares our model with prior models. The visualization data is precomputed and can be downloaded using

Visualization/downloadVisualData.sh

Then you will need to run the notebook

Align.ipynb

In order to generate a suitable visualization pkls aligning the raw outputs of the models. Aftewards, you can visualize everything using either the zoomed or the aspect ratio constarined visualization notebooks.

Visualize.ipynb
VisualizeZoomed.ipynb

social-implicit's People

Contributors

abduallahmohamed avatar tsutikgiau avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.