This repository contains the core implementation of our paper:
SDF-StyleGAN: Implicit SDF-Based StyleGAN for 3D Shape Generation
Xin-Yang Zheng,
Yang Liu,
Peng-Shuai Wang,
Xin Tong.
Following is the suggested way to install the dependencies of our code:
conda create --name stylegan python=3.8
conda activate stylegan
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
pip install fire scikit-image==0.18.2 scikit-learn==0.24.2 trimesh kornia==0.5.8 pyglet pyrender pyrr
pip install pytorch-lightning==1.5.1
Our SDF field training data was generated by following the pipepline described in the paper DualOctreeGNN. Please ref to its script for generating the SDF field from ShapeNet data or your customized data.
Our training data is also available (total 165G+). Here is the link.
Please modify the data path in the scripts, then run
bash scripts/train_{DATA_CLASS}.sh
We provide the pretrained models in here. You can download them and modify the model path in the scripts, then run
bash scripts/generate_{DATA_CLASS}.sh
You can try the demo that generates images for FID calculation. Please refer to our paper for more technical details.
python generate_for_fid.py --model_path {YOU_MODEL_PATH}
We use the following third-party codes.
If you find our work useful in your research, please consider citing:
@inproceedings{zheng2022sdfstylegan,
title = {SDF-StyleGAN: Implicit SDF-Based StyleGAN for 3D Shape Generation},
author = {Zheng, Xin-Yang and Liu, Yang and Wang, Peng-Shuai and Tong, Xin},
booktitle = {Comput. Graph. Forum (SGP)},
year = {2022},
}