Git Product home page Git Product logo

predcnn's Introduction

PredCNN

This is a TensorFlow implementation of PredCNN, an entire convolutional model for video prediction as described in the following paper:

PredCNN: Predictive Learning with Cascade Convolutions, by Ziru Xu, Yunbo Wang, Mingsheng Long and Jianmin Wang.

Setup

Required python libraries: tensorflow (>=1.0) + opencv + numpy. Tested in ubuntu/centOS + nvidia titan X (Pascal) with cuda (>=8.0) and cudnn (>=5.0).

Datasets

We conduct experiments on one video dataset, Moving Mnist, and two crowd flow dataset, TaxiBJ and BikeNYC. For other video format datasets, please extract frames from original video clips and move them to the data/ folder.

Training

Use the scripts/train.sh script to train the model. To train the default model on Moving MNIST simply use:

cd scripts;sh train.sh;

You might want to change the --train_data_paths, --valid_data_paths and --save_dir which point to paths on your system to download the data to, and where to save the checkpoints.

To train on your own dataset, have a look at the InputHandle classes in the data_provider/ folder. You have to write an analogous iterator object for your own dataset.

At inference, the generated future frames will be saved in the --results folder.

Citation

If you use this code for your research, please consider citing:

@inproceedings{xu2018predcnn,
  title={PredCNN: Predictive Learning with Cascade Convolutions.},
  author={Xu, Ziru and Wang, Yunbo and Long, Mingsheng and Wang, Jianmin},
  booktitle={IJCAI},
  pages={2940--2947},
  year={2018}
}

Contact

If you have any problem about our code, feel free to contact [email protected] or describe your problem in Issues.

predcnn's People

Contributors

xzr12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

predcnn's Issues

scheduled sampling in PredCNN

Hi @xzr12, thanks for great work. I have a few questions:

  1. What is the scheduled sampling used in PredCNN codebase? Why use it?

  2. Why in the code you are trying to divide a single image into 16 blocks via the hparam called patch_size, which is set to 4 by default? Will that destroy global shape information?

Appreciate if you could provide some answers.

Unable to train

Hello,thank you for the implementation. I've tried to run the code and I'm receiving this error:
ValueError: slice index 0 of dimension 1 out of bounds. for 'predcnn/strided_slice_10' (op: 'StridedSlice') with input shapes: [32,0,16,16,16], [2], [2], [2] and with computed input tensors: input[1] = <0 0>, input[2] = <0 1>, input[3] = <1 1>.

Am I missing something?

the experiment environment

It is really an interesting work. could you list the experiment environment (e.g the operation system, graphics card...)? when I run the Moving MNIST experiment (follow the hyper-parameters setting in the paper) on a 2x 1080Ti, I found that the train time is so long (about 20 days). is it normal?

could you provide the full experiment settings for all the datasets?

Could you please provide the full hyper-parameters settings and the data processs for TaxiBJ and other datasets in your experiment? I want to reproduce your results but I am not very clear when I read the papers.

And another question is that, why the TaxiBJ experiment results are so different in this work and the other work of your team(Memory In Memory: A Predictive Neural Network for Learning Higher-Order Non-Stationarity from Spatiotemporal Dynamics). One of the metric is RMSE while the other is MSE, but the square of RMSE is also not equal to MSE.(see the PredRnn result of this two work)
image
image

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.