All Projects → agrimgupta92 → Sgan

agrimgupta92 / Sgan

Licence: mit
Code for "Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks", Gupta et al, CVPR 2018

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sgan

Igan
Interactive Image Generation via Generative Adversarial Networks
Stars: ✭ 3,845 (+658.38%)
Mutual labels:  generative-adversarial-network
Deep Learning Resources
由淺入深的深度學習資源 Collection of deep learning materials for everyone
Stars: ✭ 422 (-16.77%)
Mutual labels:  generative-adversarial-network
T2f
T2F: text to face generation using Deep Learning
Stars: ✭ 494 (-2.56%)
Mutual labels:  generative-adversarial-network
Simgan Captcha
Solve captcha without manually labeling a training set
Stars: ✭ 405 (-20.12%)
Mutual labels:  generative-adversarial-network
Tensorflow Tutorial
Tensorflow tutorial from basic to hard, 莫烦Python 中文AI教学
Stars: ✭ 4,122 (+713.02%)
Mutual labels:  generative-adversarial-network
Generative Models
Annotated, understandable, and visually interpretable PyTorch implementations of: VAE, BIRVAE, NSGAN, MMGAN, WGAN, WGANGP, LSGAN, DRAGAN, BEGAN, RaGAN, InfoGAN, fGAN, FisherGAN
Stars: ✭ 438 (-13.61%)
Mutual labels:  generative-adversarial-network
Stylegan pytorch
The implementation of StyleGAN on PyTorch 1.0.1
Stars: ✭ 381 (-24.85%)
Mutual labels:  generative-adversarial-network
Seqgan
A simplified PyTorch implementation of "SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient." (Yu, Lantao, et al.)
Stars: ✭ 502 (-0.99%)
Mutual labels:  generative-adversarial-network
Wassersteingan.tensorflow
Tensorflow implementation of Wasserstein GAN - arxiv: https://arxiv.org/abs/1701.07875
Stars: ✭ 419 (-17.36%)
Mutual labels:  generative-adversarial-network
Textgan Pytorch
TextGAN is a PyTorch framework for Generative Adversarial Networks (GANs) based text generation models.
Stars: ✭ 479 (-5.52%)
Mutual labels:  generative-adversarial-network
Simgan
Implementation of Apple's Learning from Simulated and Unsupervised Images through Adversarial Training
Stars: ✭ 406 (-19.92%)
Mutual labels:  generative-adversarial-network
Fast Srgan
A Fast Deep Learning Model to Upsample Low Resolution Videos to High Resolution at 30fps
Stars: ✭ 417 (-17.75%)
Mutual labels:  generative-adversarial-network
Generative Adversarial Network Tutorial
Tutorial on creating your own GAN in Tensorflow
Stars: ✭ 461 (-9.07%)
Mutual labels:  generative-adversarial-network
Pytorch Rl
This repository contains model-free deep reinforcement learning algorithms implemented in Pytorch
Stars: ✭ 394 (-22.29%)
Mutual labels:  generative-adversarial-network
Ssgan Tensorflow
A Tensorflow implementation of Semi-supervised Learning Generative Adversarial Networks (NIPS 2016: Improved Techniques for Training GANs).
Stars: ✭ 496 (-2.17%)
Mutual labels:  generative-adversarial-network
Chainer Gan Lib
Chainer implementation of recent GAN variants
Stars: ✭ 386 (-23.87%)
Mutual labels:  generative-adversarial-network
Generative Compression
TensorFlow Implementation of Generative Adversarial Networks for Extreme Learned Image Compression
Stars: ✭ 428 (-15.58%)
Mutual labels:  generative-adversarial-network
Generative Adversarial Networks
Introduction to generative adversarial networks, with code to accompany the O'Reilly tutorial on GANs
Stars: ✭ 505 (-0.39%)
Mutual labels:  generative-adversarial-network
Von
[NeurIPS 2018] Visual Object Networks: Image Generation with Disentangled 3D Representation.
Stars: ✭ 497 (-1.97%)
Mutual labels:  generative-adversarial-network
Cool Fashion Papers
👔👗🕶️🎩 Cool resources about Fashion + AI! (papers, datasets, workshops, companies, ...) (constantly updating)
Stars: ✭ 464 (-8.48%)
Mutual labels:  generative-adversarial-network

Social GAN

This is the code for the paper

Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks
Agrim Gupta, Justin Johnson, Fei-Fei Li, Silvio Savarese, Alexandre Alahi
Presented at CVPR 2018

Human motion is interpersonal, multimodal and follows social conventions. In this paper, we tackle this problem by combining tools from sequence prediction and generative adversarial networks: a recurrent sequence-to-sequence model observes motion histories and predicts future behavior, using a novel pooling mechanism to aggregate information across people.

Below we show an examples of socially acceptable predictions made by our model in complex scenarios. Each person is denoted by a different color. We denote observed trajectory by dots and predicted trajectory by stars.

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

@inproceedings{gupta2018social,
  title={Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks},
  author={Gupta, Agrim and Johnson, Justin and Fei-Fei, Li and Savarese, Silvio and Alahi, Alexandre},
  booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  number={CONF},
  year={2018}
}

Model

Our model consists of three key components: Generator (G), Pooling Module (PM) and Discriminator (D). G is based on encoder-decoder framework where we link the hidden states of encoder and decoder via PM. G takes as input trajectories of all people involved in a scene and outputs corresponding predicted trajectories. D inputs the entire sequence comprising both input trajectory and future prediction and classifies them as “real/fake”.

Setup

All code was developed and tested on Ubuntu 16.04 with Python 3.5 and PyTorch 0.4.

You can setup a virtual environment to run the code like this:

python3 -m venv env               # Create a virtual environment
source env/bin/activate           # Activate virtual environment
pip install -r requirements.txt   # Install dependencies
echo $PWD > env/lib/python3.5/site-packages/sgan.pth  # Add current directory to python path
# Work for a while ...
deactivate  # Exit virtual environment

Pretrained Models

You can download pretrained models by running the script bash scripts/download_models.sh. This will download the following models:

  • sgan-models/<dataset_name>_<pred_len>.pt: Contains 10 pretrained models for all five datasets. These models correspond to SGAN-20V-20 in Table 1.
  • sgan-p-models/<dataset_name>_<pred_len>.pt: Contains 10 pretrained models for all five datasets. These models correspond to SGAN-20VP-20 in Table 1.

Please refer to Model Zoo for results.

Running Models

You can use the script scripts/evaluate_model.py to easily run any of the pretrained models on any of the datsets. For example you can replicate the Table 1 results for all datasets for SGAN-20V-20 like this:

python scripts/evaluate_model.py \
  --model_path models/sgan-models

Training new models

Instructions for training new models can be found here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].