Home

Awesome

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

<img src="image.PNG" width="900"/>

Installation

Requirements

Data Preparation

OR

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).