Git Product home page Git Product logo

latentfusion's Introduction

LatentFusion

Citing LatentFusion

If you find the LatentFusion code or data useful, please consider citing:

@inproceedings{park2019latentfusion,
  title={LatentFusion: End-to-End Differentiable Reconstruction and Rendering for Unseen Object Pose Estimation},
  author={Park, Keunhong and Mousavian, Arsalan and Xiang, Yu and Fox, Dieter},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  year={2020}
}

Setup

Please start by installing Miniconda3 with Python 3.7 or above.

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

Then create a Conda environment with our environment file:

conda env create -n latentfusion -f environment.yml
conda activate latentfusion

Please make sure the project root is added to the $PYTHONPATH. We provide a simple script for this:

# Activates the Conda environment and sets PYTHONPATH.
source env.sh

For training, we make use of Automatic Mixed Precision. Until PyTorch 1.6 is released, you must install the nightly version of PyTorch.

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch-nightly

We've exluded PyTorch from the environment.yml file for this reason.

Trained Model

We provide a trained model. You can download the weights from here. The weights are licensed under a Creative Commons license. Please see the weights license for details.

You can use the model like this:

import torch
from latentfusion.recon.inference import LatentFusionModel
checkpoint = torch.load('path-to-checkpoint')
model = LatentFusionModel.from_checkpoint(checkpoint)

Please see the example notebook for details.

Dataset Download

BOP/LINEMOD

We use the BOP version of LINEMOD and other datasets. You can get them at the BOP website.

MOPED

You can download the MOPED dataset at the project page.

Pose Estimation

We provide an example script for pose estimation in the examples directory in the form of a Jupyter notebook. Download the weights from here and open the notebook with Jupyter.

Training

To train LatentFusion, we recommend that you use at least 4 RTX 2080 Ti GPUs. First, modify tools/train/train.sh with the correct paths to ShapeNet and MS-COCO.

You must first pre-process ShapeNet with our preprocessing script in tools/dataset/preprocess_shapenet.py. This requires that you have Blender installed.

sudo apt install blender
blender -P tools/dataset/preprocess_shapenet.py -- "$SHAPENET_PATH" "$OUT_PATH" --strip-materials --out-name ShapeNetCore-nomat

Once you have all of the data in place simply call the training script:

bash tools/train/train.sh

Training will roughly take 2 weeks on 4x RTX 2080 Ti GPUs and 1 week on 4x Tesla V100 GPUs.

latentfusion's People

Contributors

keunhong 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.