Git Product home page Git Product logo

neural_rbs's Introduction

CS224W Project: Can GNNs learn rigid body dynamics?

Chaitanya Patel, Preey Shah, Shreya Gupta

Run a demo inference

python run_eval.py --config configs/invarnet_movi.yaml --exp_path ./data/run_1 --model-ckpt_path last_ckpt --eval-viz True

Training

python run_pl_training.py --config configs/invarnet_movi.yaml --exp_path ./data/test

This will train on dummy dataset that comes with this repo. Edit config file to train according to your preferences.

Setup

  • Create a new python environment.
  • Install pytorch (any version that's not super old) with appropriate cuda version (A100 GPUs require some specific setup).
  • pip install torch-scatter (follow instruction on pyg installation site)
  • pip install torch_geometric (follow instruction on pyg installation site)
  • pip install pytorch_lightening pyyaml h5py matplotlib opencv-python tensorboardX termcolor pytorch3d pyrender

Basic Explanation of the Code

  • data directory has dummy kubric dataset with 2 train and 2 validation sequences. It also has a trained model in run_1 directory.
  • dataset module has dataset loading and graph creation utilities.
    • movi_dataset.py has code to download, post-process movi dataset. It also has a dataloader to load basic sequence data. data_utils.py has corresponding helper utilities.
    • particle_graph.py has a helper class to add particles and create nodes/edges with their features. paritcle_data_utils.py has helpful utility functions for it.
  • model directory has code for GNN message passing.
  • train/invarnet_module.py has PytorchLightening module for our model. It incapsulates all functionalities of our model. It implements trainig step, validation step, rollout and corresponding metric evaluation.

neural_rbs's People

Watchers

 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.