Wentao Hu* · Jia Zheng* · Zixin Zhang* · Xiaojun Yuan · Jian Yin · Zihan Zhou
![](/manycore-research/PlankAssembly/raw/polygen/assets/teaser.gif)
Note
This branch contains the implementation of comparison method, PolyGen. Similar to our method, PolyGen adopts a Transformer-based architecture and proceeds by generating a set of 3D vertices, which are then connected to form 3D faces.
Our code has been tested with Python 3.8, PyTorch 1.10.0, CUDA 11.3 and PyTorch Lightning 1.7.6.
Please follow the instructions in the main branch to set up your environment and download the dataset.
To train PolyGen, we first parse our shape program into vertex sequence and face sequence:
python dataset/preprocess.py
Use the following command to train vertex model and face model from scratch:
# train vertex model
python vertex_trainer.py fit --config configs/vertex.yaml
# train face model
python face_trainer.py fit --config configs/face.yaml
Use the following command to test with our pretrained model (vertex model weight, face model weight) or your own checkpoint:
# please first modify the checkpoint path in configs/test.yaml
python tester.py test --config configs/test.yaml
To visualize the results, we build 3D mesh models from predictions:
python postprocess.py --exp_path path/to/lightning_log/dir
PlankAssembly is licensed under the AGPL-3.0 license. The code snippets in the third_party are available under Apache-2.0 License.