Learning Part Generation and Assembly for Sketching Man-Made Objects
Dong Du, Heming Zhu, Yinyu Nie, Xiaoguang Han, Shuguang Cui, Yizhou Yu, Ligang Liu
In COMPUTER GRAPHICS forum (CGF), 2021.
This implementation has been tested on Ubuntu 18.04, using CUDA 10.0 and Pythton 3.6.9.
PyTorch==1.2.0
pykdtree==1.3.4
pymcubes==0.1.2
numpy-stl==2.16.3
npm==3.5.2 (For the user interface)
libsimplify (Please refer to Occupancy Networks to make this library and put it in the folder of "utils". The source files can be found in this directory. )
cd PartSketcher
python train_gen.py
: train sketch-based part generator.python train_ass.py
: train sketch-based part assembler.python gen_sket2occ_dataset
: generate part shapes with the pre-trained generator.python train_ass_finetune.py
: finetune the part assembler.
cd PartSketcher
python test_gen.py
: test part generator.python test_ass.py
: test part assembler.python test_part2whole.py
: test complete shape generation with part assembly.
The user interface is designed with Vue Material Dashboard. It is created by Heming Zhu. You can quickly run it following the three steps:
0. Download the pre-trained checkpoints and put them in UI/part_sketch_server/checkpoint
. You can also use the models trained by yourself.
npm install
npm run dev
cd part_sketch_server
python sketch_server.py
More introduction about Vue can be found in the README.md.
The pre-processed dataset can be found in this link. You can also use PartNet dataset to obtain own training data. The scripts may help you to process the source data.
If you find our work helpful, please consider citing
@inproceedings{du2021learning,
title={Learning Part Generation and Assembly for Sketching Man-Made Objects},
author={Du, Dong and Zhu, Heming and Nie, Yinyu and Han, Xiaoguang and Cui, Shuguang and Yu, Yizhou and Liu, Ligang},
booktitle={Computer Graphics Forum},
volume={40},
number={1},
pages={222--233},
year={2021},
organization={Wiley Online Library}
}
PartSketcher is relased under the MIT License. See the LICENSE file for more details.