Skip to content

linlianjiang/hiert2s

Repository files navigation

HierT2S: Enhancing Part-Level Text-to-Shape Generation through Hierarchical Structure Modeling

[openreview]

Installation

  • Python >= 3.8
  • CUDA 11.1
  • Pytorch >= 1.9
  • Pytorch3D
  • trimesh
  • tqdm
  • scipy
  • tensorboard
  • PyMCubes

Or you can setup the environment using conda:

conda env create -f environment.yaml
conda activate hiert2s
cd metrics/pvd_metrics/ChamferDistancePytorch/chamfer3D
python setup.py install
  • PyTorchEMD
cd metrics/pvd_metrics/PyTorchEMD
python setup.py install
cp build/**/emd_cuda.cpython-38-x86_64-linux-gnu.so .
  • pointnet2-ops
pip install git+https://gitee.com/Fukexue/Pointnet2_PyTorch.git@acda965224f35854bc331cd5fe140393216b0a71#subdirectory=pointnet2_ops_lib

Preparing the Data

We follow the instructions from AutoSDF to preprocess data.

Evaluating

Every script will produce a logger log.txt to record your hyperparameter settings and metrics during evaluating.

# To evaluating models for text-driven generation.
python evaluation_scripts/eval_textdf.py --ckpt {MODEL_PATH}

Training

The whole training has two stages, which means the P-VQ-VAE and discrete diffusion generator are trained seperately.

  1. First train the P-VQ-VAE:
./launchers/train_pvqvae_snet.sh

After training, copy the trained P-VQ-VAE checkpoint (pretrained-vqvae-snet.ckpt) to the ./saved_ckpt folder. Based on this quantized feature representation of shape, diffusion models on various tasks can be trained.

  1. Then extract the code:
./launchers/extract_pvqvae_snet.sh
  1. Train the diffusion models:
# Tarin the discrete diffusion generator for text-driven generation.
./launchers/train_textdf_shapeglot.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors