Giter Club home page Giter Club logo

adversarialloss-sgan's Introduction

Social GAN: Analyzing Adversarial Architecture

This is the code for the paper

Adversarial Loss for Human Trajectory Prediction
Parth Kothari, Alexandre Alahi
Presented at hEART 2019

Autonomous vehicles need to accurately forecast future human trajectories in order to navigate safely and gain human trust. The current best performing approach Social GAN (SGAN) is based on Generative Adversarial Network (GAN) taking advantage of the success of Recurrent Neural Network (RNN) models in sequence prediction tasks. A crucial architectural difference of SGAN in comparison to Social LSTM is the incorporation of the GAN framework. We highlight an unexpected pitfall in this adversarial architecture via controlled experiments. Furthermore, we prove the efficacy of our proposed modification on synthetic data and real world datasets, thereby indicating room for improvement on state-of-the-art.

Below we show the example of predictions made by SGAN (left) and our model (right) in a simple controlled experiment.

If you find this code useful in your research then please cite

@inproceedings{KothariAdversarialLF,
  title={Adversarial Loss for Human Trajectory Prediction},
  author={Parth Kothari and Alexandre Alahi},
  booktitle={hEART 2019: 8th Symposium of the European Association for Research in Transportation},
  number={CONF},
  year={2019}
}

Model

Social GAN consists of three key components: Generator (G), Pooling Module (PM) and Discriminator (D). G and PM are responsible for outputting predicted future trajectories based on the input observed trajectories. D inputs the entire sequence comprising both input trajectory and future prediction and classifies them as “real/fake”. We show that the proposed D is unable to provide gradients to G for effective learning, thereby indicating room for improvement on state-of-the-art. We propose a possible architectural change wherein a feedforward D is able to provide effective gradients for learning.

General Setup

Please refer to Social GAN

Controlled Setup

python controlled_setup/controlled_data.py       # Create data
sh controlled_setup/copy.sh single_traj          # Transfer data

Running Models

For Social GAN, the default parameters are obtained using the following command

python  python scripts/print_args.py --checkpoint models/sgan-models/eth_12_model.pt

Training new models

python -m scripts.train --plot 1 --disc_type 'rnn' --plot 1 --min_ped 0 ## Default Social GAN
python -m scripts.train --plot 1 --disc_type 'ff' --encoder_h_dim_g 16 --decoder_h_dim_g 16 --plot 1 --min_ped 0 ## Feedfoward Discriminator

adversarialloss-sgan's People

Contributors

agrimgupta92 avatar dependabot[bot] avatar thedebugger811 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

curioustauseef

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.