Skip to content

liuzhengzhe/Towards-Implicit-Text-Guided-Shape-Generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Towards Implicit Text-Guided 3D Shape Generation

Towards Implicit Text-Guided 3D Shape Generation (CVPR2022)

Code for the paper [Towards Implicit Text-Guided 3D Shape Generation], CVPR 2022.

This code is based on IM-Net https://github.com/czq142857/IM-NET-pytorch

Authors: Zhengzhe Liu, Yi Wang, Xiaojuan Qi, Chi-Wing Fu

Installation

Requirements

  • Python 3.8.8
  • Pytorch 1.10.0
  • CUDA 11.3
  • h5py
  • scipy
  • mcubes
  • pytorch_lamb

Data Preparation

OR

  • Download the dataset.

  • unzip it to "generator" folder.

python 2_gather_256vox_16_32_64.py.py 

Pretrained Model

We provide pretrained models for each training step. Still download it here. Put them to "generation/checkpoint/color_all_ae_64/"

Inference

(1) Text-Guided Shape Generation

python main.py --res64 --sample_dir samples/im_ae_out --start 0 --end 7454 --high_resolution

You can generate coarse shapes fast by removing "--high_resolution"

(2) Diversified Generation

python main.py --div --sample_dir samples/im_ae_out --start 0 --end 7454 --high_resolution

Others:

(1) Auto-Encoder

python main.py --ae --sample_dir samples/im_ae_out --start 0 --end 7454

Training Generation Model

sh train.sh

Manipulation

Trained Model

We provide trained models here. Put them to "mainpulation/checkpoint/color_all_ae_64/"

Inference

python main.py --color_chair --sample_dir samples/im_ae_out --start 0 --end 10 --high_resolution
python main.py --color_table --sample_dir samples/im_ae_out --start 0 --end 10 --high_resolution
python main.py --shape_chair --sample_dir samples/im_ae_out --start 0 --end 10 --high_resolution
python main.py --shape_table --sample_dir samples/im_ae_out --start 0 --end 10 --high_resolution

You can generate coarse shapes fast by removing "--high_resolution"

Training Manipulation Model

Put the above "div.model64-199_raw.pth" in the generation-model set to "mainpulation/checkpoint/color_all_ae_64/" as the initialization model.

python main.py --color_chair --train --epoch 150 --sample_vox_size 64
python main.py --shape_chair --train --epoch 150 --sample_vox_size 64
python main.py --color_table --train --epoch 150 --sample_vox_size 64
python main.py --shape_table --train --epoch 150 --sample_vox_size 64

Evaluation

PS/FPD evaluation code

https://drive.google.com/file/d/1vniFpLFZwDfwMT3Ce2KXNQB8Bdv65iUG/view?usp=drive_link

Contact

If you have any questions or suggestions about this repo, please feel free to contact me (liuzhengzhelzz@gmail.com).

About

Towards-Implicit-Text-Guided-3D-Shape-Generation. CVPR 2022

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages