Giter Club home page Giter Club logo

diffbp's Introduction

DNBP: Differentiable Nonparametric Belief Propagation

Dependencies

  • Linux (tested on Ubuntu 18.04)
  • Python 3.7
  • CUDA 10.2

Setup Instructions

Installation of dependencies is managed with anaconda. For reproducibility, the state of the development environment is captured in the environment.yml file. These dependencies can be installed into a dnbp-env conda environment using the following steps:

conda env create -f environment.yml
conda activate dnbp-env
pip install -e .

Once the environment is installed and activated, all dependencies for this repository will be satisfied. Once finished with experiments, you can simply close your terminal or run conda deactivate to exit the conda environment. To remove the environment, run conda remove --name dnbp-env --all.

Setup without Anaconda

Alternatively, minimal setup without Anaconda is also possible. For example, by using the venv python module to create a virtual environment containing project dependencies. To setup the project in this fashion, run the following:

python3.7 -m venv .venv/dnbp-env
source .venv/dnbp-env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .

When finished with experiments, run deactivate to exit environment. To remove the environment, remove the .venv/dnbp-env/ directory.

Pendulum Tracking

Setup
Training

Train DNBP Model:

  • python experiments/pendulum_tracking/dnbp_train.py ./experiments/pendulum_tracking/dnbp_config_file.json

Train LSTM Model:

  • python experiments/pendulum_tracking/lstm_train.py ./experiments/pendulum_tracking/lstm_config_file.json
Evaluation
  • Train new models or download pre-trained models from 'pendulum_models.zip' google drive

  • If using pre-trained models, extract compressed .zip files to ./experiments/pendulum_tracking/dnbp_models/ and ./experiments/pendulum_tracking/lstm_models/

  • To plot pre-computed evaluation results, run: python ./experiments/pendulum_tracking/helpers/plot_quantitative.py

  • To re-test models and plot results, run: ./experiments/pendulum_tracking/run_evaluations.sh

  • If using a newly trained model, you may need to adjust the hardcoded epoch values in the above evaluation files.

Spider Tracking

Setup
Training

Train DNBP Model:

  • python ./experiments/spider_tracking/dnbp_train.py ./experiments/spider_tracking/dnbp_config_file.json

Train LSTM Model:

  • python ./experiments/spider_tracking/lstm_train.py ./experiments/spider_tracking/lstm_config_file.json
Evaluation
  • Train new models or download pre-trained models from 'spider_models.zip' google drive

  • If using pre-trained models, extract compressed .zip files to ./experiments/spider_tracking/dnbp_models/ and ./experiments/spider_tracking/lstm_models/

  • To plot pre-computed evaluation results, run: python ./experiments/spider_tracking/helpers/plot_quantitative.py

  • To re-test models and plot results, run: ./experiments/spider_tracking/run_evaluations.sh

  • If using a newly trained model, you may need to adjust the hardcoded epoch values in the above evaluation files.

Hand Tracking

Setup
  • Download dataset from F-PHAB authors (Garcia-Hernando et al.)

  • Extract F-PHAB dataset to ./data/hand_tracking/F-PHAB

To preprocess dataset (image cropping)

cd ./data/hand_tracking
python preprocess_hands.py
python preprocess_rgb_crops.py
cd ../..
Training

Train DNBP Model:

  • python ./experiments/hand_tracking/dnbp_train.py ./experiments/hand_tracking/dnbp_config_file.json
Evaluation
  • If using pre-trained models, extract compressed .zip files to ./experiments/hand_tracking/dnbp_models/

  • To plot pre-computed evaluation results, run: python ./experiments/hand_tracking/helpers/plot_quantitative.py

  • To re-test models and plot results, run: ./experiments/hand_tracking/run_evaluations.sh

  • If using a newly trained model, you may need to adjust the hardcoded epoch values in the above evaluation files.

Citation

@article{opipari2021dnbp,
  author = {Opipari, Anthony and Chen, Chao and Wang, Shoutian and Pavlasek, Jana and Desingh, Karthik and Jenkins, Odest Chadwicke},
  title = {Differentiable Nonparametric Belief Propagation},
  year = {2021},
  journal={arXiv preprint arXiv:2101.05948}
}

diffbp's People

Contributors

tonyop avatar opipari 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.