GithubHelp home page GithubHelp logo

optas / shapegf Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 7.12 MB

ShapeGF slightly adapted for building ShapeTalk's SGF-AE

License: MIT License

Python 53.81% Makefile 0.73% C++ 18.24% Cuda 3.36% C 11.34% Mako 5.24% Cython 7.21% Shell 0.06%

shapegf's Introduction

ShapeGF adapted to work with ShapeTalk & ChangeIt3D

This codebase is adapted from ShapeGF's original repository

Please follow the following setup steps to enable the usage of our pre-trained ShapeGF (SFG) AE with ShapeTalk, within the ChangeIt3D codebase.

Below we assume that you have installed the changeit3d conda environment as instructed here.

The following dependencies of ShapeGF are not included in the changeit3d environment, by default, and you need to install them separately now:

  • pathos
  • tensorboardX

To install them in your changeit3d conda environment and use a ChangeIt3D network trained with ShapeFG. Do:

conda activate changeit3d

conda install tensorboardX
conda install -c conda-forge pathos

git clone https://github.com/optas/ShapeGF.git
cd ShapeGF

Now, (inside the ShapeGF) repo continue like this:

Download the pretrained checkpoint.

wget http://download.cs.stanford.edu/orion/changeit3d/shapeGF_ckpt.zip .
unzip shapeGF_ckpt.zip; rm -rf shapeGF_ckpt.zip

And run:

python latents_interface.py \
    configs/recon/shapenet/shapetalk_public_recon.yaml \
    --pretrained shapeGF_ckpt/epoch_1199_iters_386400.pt 

Running the above produces SGF-latent-interface-pub.pkl at the top-level directory. Now, given shape latents in an np.array (zs) you can decode them like this:

import dill as pickle
with open('SGF-latent-interface-pub.pkl', 'wb') as f: 
    sgf = pickle.load(f)

sgf.eval_z(zs, save_output=True, output_dir=OUTPUT_FOLDER)  # OPTION 1: save outputs
outputs = sgf.eval_z(zs) # OPTION 2: returns outputs

shapegf's People

Contributors

optas avatar

Stargazers

Jie Yang 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.