Giter Site home page Giter Site logo

shubhampachori12110095 / volumetricprimitives Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shubhtuls/volumetricprimitives

0.0 1.0 0.0 7.23 MB

Code release for "Learning Shape Abstractions by Assembling Volumetric Primitives " (CVPR 2017)

Lua 73.12% MATLAB 22.63% M 0.03% C 3.93% Shell 0.10% Python 0.19%

volumetricprimitives's Introduction

Learning Shape Abstractions by Assembling Volumetric Primitives

Shubham Tulsiani, Hao Su, Leonidas J. Guibas, Alexei A. Efros, Jitendra Malik. In CVPR, 2017. Project Page

Teaser Image

1) Demo

Please check out the interactive notebook which shows how to compute the primitive based representation for an input shape. You'll need to -

  • Install a working implementation of torch and itorch.
  • Edit the path to the blender executable in the demo script.

2) Training

We provide code to train the abstraction models on ShapeNet categories.

a) Preprocessing

We'll first need to preprocess the ShapeNet models to compute voxelizations required as inputs as well as data required to implement the loss functions.

  • Install gptoolbox in external/gptoolbox. You'll need to compile the mex file for point_mesh_sqaured_distance. You can first try this precompiled version. If that does not work, you will have to compile it yourself - some helpful steps as required on my machine are pointed out here.
  • Modify the path to ShapeNet dataset (v1) in the startup file
  • Specify the synsets of interest in the preprocessing script and then run it.

b) Learning

The training takes place in two stages. In the first we use all cuboids while biasing them to be small and then allow the network to choose to use fewer cuboids. Sample scripts for the synset corresponding to chairs are below.

# Stage 1
cd experiments;
disp=0 gpu=1 nParts=20 nullReward=0 probLrDecay=0.0001 shapeLrDecay=0.01 synset=3001627 usePretrain=0 numTrainIter=20000 name=chairChamferSurf_null_small_init_prob0pt0001_shape0pt01 th cadAutoEncCuboids/primSelTsdfChamfer.lua

After the first network is trained, we allow the learning of primitive existence probabilities.

# Stage 2
cd experiments;
pretrainNet=chairChamferSurf_null_small_init_prob0pt0001_shape0pt01 pretrainIter=20000 disp=0 gpu=1 nParts=20 nullReward=8e-5 shapeLrDecay=0.5   synset=3001627 probLrDecay=0.2 usePretrain=1  numTrainIter=30000 name=chairChamferSurf_null_small_ft_prob0pt2_shape0pt5_null8em5 th cadAutoEncCuboids/primSelTsdfChamfer.lua

Citation

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

@inProceedings{abstractionTulsiani17,
  title={Learning Shape Abstractions by Assembling Volumetric Primitives},
  author = {Shubham Tulsiani
  and Hao Su
  and Leonidas J. Guibas
  and Alexei A. Efros
  and Jitendra Malik},
  booktitle={Computer Vision and Pattern Regognition (CVPR)},
  year={2017}
}

volumetricprimitives's People

Contributors

shubhtuls avatar

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.