GithubHelp home page GithubHelp logo

ago109 / vsl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lorenmt/vsl

1.0 1.0 0.0 269 KB

The implementation of "Learning a Hierarchical Latent-Variable Model of Voxelized 3D Shapes".

Python 100.00%

vsl's Introduction

Variational Shape Learner

This repository contains the source codes for the paper: Learning a Hierarchical Latent-Variable Model of Voxelized 3D Shapes, introduced by Shikun Liu, Alexander G. Ororbia II, C. Lee Giles.

Requirements

VSL was written in python 3.6. For running the code, please make sure the following packages have been installed.

  • h5py 2.7
  • matplotlib 1.5
  • mayavi 4.5
  • numpy 1.12
  • scikit-learn 0.18
  • tensorflow 1.0

Most of which can be directly installed using pip command. However, mayavi which is used for 3D voxel visualization is recommended to be installed using conda environment (for simplicity).

Dataset

We use both 3D shapes from ModelNet and PASCAL 3D+ v1.0 aligned with images in PASCAL VOC 2012 for training VSL. ModeNet is used for general 3D shape learning including shape generation, interpolation and classification. PASCAL 3D is only used for image reconstruction.

Please download the dataset here: [link].

The above dataset contains files ModelNet10_res30_raw.mat and ModelNet40_res30_raw.mat representing voxelized version of Modelnet10/40 and PASCAL3D.mat which represents voxelized PASCAL3D+ aligned with images.

Each ModelNet dataset contains train and test split with each entry has 270001 dimension representing [id|voxel] in [30x30x30] resolution.

PASCAL3D contains image_train, model_train, image_test, model_test which were defined in Kar, et al. Each entry of model again is in 270001 dimension which is similar defined in ModelNet and each entry of image is in [100,100,3] dimension representing [100x100] RGB images.

Parameters

We have also included the pre-trained model for parameters can be downloaded here.

Training VSL

Please download dataset and parameters (if using pre-trained parameters) from links in the previous sections and extract them in the same folder of this repository.

Please use vsl_main.py for general 3D shape learning experiments, and vsl_imrec.py for image reconstruction experiment. For correctly using the hyper-parameters in the pre-trained model and consistent with the other experiment settings in the paper, please define hyper-parameters as follows,

ModelNet40 ModelNet10 PASCAL3D (jointly) PASCAL3D (separately)
global_latent_dim 20 10 10 5
local_latent_dim 10 5 5 2
local_latent_num 5 5 5 3
batch_size 200 100 40 5

The source codes are fully commented. For any more details please look over the paper and source code.

Normally, training VSL from scratch requires 2 days on ModelNet in a fast computer, and requires 20-40 minutes on separately-trained image reconstruction experiment.

Citation

If you found this work is useful for your research, please considering cite:

@article{liu2017learning,
  title={Learning a Hierarchical Latent-Variable Model of Voxelized 3D Shapes},
  author={Liu, Shikun and Ororbia, II and Alexander, G and Giles, C Lee},
  journal={arXiv preprint arXiv:1705.05994},
  year={2017}
}

Contact

If you found any questions, please contact [email protected] for more details.

vsl's People

Contributors

lorenmt avatar

Stargazers

 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.