GithubHelp home page GithubHelp logo

nulledge / dpi-net Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yunzhuli/dpi-net

0.0 1.0 0.0 64.11 MB

[ICLR 2019] Learning Particle Dynamics for Manipulating Rigid Bodies, Deformable Objects, and Fluids

Home Page: http://dpi.csail.mit.edu/

Python 99.79% Shell 0.21%

dpi-net's Introduction

Learning Particle Dynamics for Manipulating Rigid Bodies, Deformable Objects, and Fluids

Yunzhu Li, Jiajun Wu, Russ Tedrake, Joshua B. Tenenbaum, Antonio Torralba

ICLR 2019 [website] [paper] [video]

Demo

Simulation

Rollout from our learned model

Installation

This codebase is tested with Ubuntu 16.04 LTS, Python 3.6.8, PyTorch 1.0.0, and CUDA 9.1. Other versions might work but are not guaranteed.

Clone this repo:

https://github.com/YunzhuLi/DPI-Net.git
cd DPI-Net

Install PyFleX

Add and compile PyFleX submodule

git submodule update --init --recursive
export PYFLEXROOT=${PWD}/PyFleX
export PYTHONPATH=${PYFLEXROOT}/bindings/build:$PYTHONPATH
export LD_LIBRARY_PATH=${PYFLEXROOT}/external/SDL2-2.0.4/lib/x64:$LD_LIBRARY_PATH
cd PyFleX/bindings; mkdir build; cd build; cmake ..; make -j

Test PyFleX examples

cd ${PYFLEXROOT}/bindings/examples
python test_FluidFall.py

Install Dependencies

For Conda users, we provide an installation script:

bash ./scripts/conda_deps.sh

Evaluation

Go to the root folder of DPI-Net. You can direct run the following command to use the pretrained checkpoint.

bash scripts/eval_FluidFall.sh
bash scripts/eval_BoxBath.sh
bash scripts/eval_FluidShake.sh
bash scripts/eval_RiceGrip.sh

It will first show the grount truth followed by the model rollout. The resulting rollouts will be stored in dump_[env]/eval_[env]/rollout_*, where the ground truth is stored in gt_*.tga and the rollout from the model is pred_*.tga.

Training

You can use the following command to train from scratch. Note that if you are running the script for the first time, it will start by generating training and validation data in parallel using num_workers threads. You will need to change --gen_data to 0 if the data has already been generated.

bash scripts/train_FluidFall.sh
bash scripts/train_BoxBath.sh
bash scripts/train_FluidShake.sh
bash scripts/train_RiceGrip.sh

Citing DPI-Net

If you find this codebase useful in your research, please consider citing:

@inproceedings{li2019learning,
    Title={Learning Particle Dynamics for Manipulating Rigid Bodies, Deformable Objects, and Fluids},
    Author={Li, Yunzhu and Wu, Jiajun and Tedrake, Russ and Tenenbaum, Joshua B and Torralba, Antonio},
    Booktitle = {ICLR},
    Year = {2019}
}

dpi-net's People

Contributors

nulledge avatar yunzhuli avatar yenchenlin avatar

Watchers

James Cloos 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.