raahii / 3dgan-chainer

:package: A Chainer implementation of 3D Generative Adversarial Network.
MIT License
26 stars 2 forks source link
3d arxiv chainer deep-learning gan generative-adversarial-network

3dgan-chainer

license arXiv Tag

Chainer implementation of 3D Generative Adversarial Network.

Result

Some good samples generated chairs. (50epoch)

python generate_samples.py result/trained_models/Generator_50epoch.npz <save direcotry> <num to be generated>

Requirements

pip install scipy scikit-image h5py

Optional

Dataset

I used ShapeNet-v2 dataset. Training script support .binbox or .h5 extension.

Describe your dataset path to DATASET_PATH in train.py.

.binvox

Just use .binvox files in ShapeNet-v2.

.h5

Assuming that .h5 has { 'data': <np.array, shape (64, 64, 64)> }. If you want to convert .binvox into .h5, use binvox_to_h5.py script.

Usage

Training

python train.py

Generation

python generate_samples.py <model_file> <save_dir> <num samples>

Visualization

If you have .binvox file, using simple-voxel-viewer is easy way.

Or visualize with matplotlib,

python visualize.py <binvox file or directory>