- 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
We follow the instructions from AutoSDF to preprocess data.
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}
The whole training has two stages, which means the P-VQ-VAE and discrete diffusion generator are trained seperately.
- 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.
- Then extract the code:
./launchers/extract_pvqvae_snet.sh
- Train the diffusion models:
# Tarin the discrete diffusion generator for text-driven generation.
./launchers/train_textdf_shapeglot.sh