dongdu3 / PartSketcher

The implementation of "Learning Part Generation and Assembly for Sketching Man-Made Objects".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PartSketcher [Paper][Video]

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.

teaser


Setup and Running

This implementation has been tested on Ubuntu 18.04, using CUDA 10.0 and Pythton 3.6.9.

Dependencies

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

Training

cd PartSketcher

  1. python train_gen.py: train sketch-based part generator.
  2. python train_ass.py: train sketch-based part assembler.
  3. python gen_sket2occ_dataset: generate part shapes with the pre-trained generator.
  4. python train_ass_finetune.py: finetune the part assembler.

Testing

cd PartSketcher

  1. python test_gen.py: test part generator.
  2. python test_ass.py: test part assembler.
  3. python test_part2whole.py: test complete shape generation with part assembly.

User Interface

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.

  1. npm install
  2. npm run dev
  3. cd part_sketch_server
  4. python sketch_server.py

More introduction about Vue can be found in the README.md.

Dataset

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.


Citation

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}
}

License

PartSketcher is relased under the MIT License. See the LICENSE file for more details.

About

The implementation of "Learning Part Generation and Assembly for Sketching Man-Made Objects".

License:MIT License


Languages

Language:Python 43.2%Language:SCSS 27.2%Language:Vue 19.3%Language:C++ 7.7%Language:JavaScript 1.6%Language:Cython 0.8%Language:HTML 0.2%