The official implementation of CSG-Stump: A Learning Friendly CSG-Like Representation for Interpretable Shape Parsing

Paper | Project page


If you find our work interesting and benifits your research, please consider citing:

  title={CSG-Stump: A Learning Friendly CSG-Like Representation for Interpretable Shape Parsing},
  author={Daxuan Ren, Jianmin Zheng, Jianfei Cai, Jiatong Li, Haiyong Jiang, Zhongang Cai, Junzhe Zhang, Liang Pan, Mingyuan Zhang, Haiyu Zhao, Shuai Yi},


Install envoriment:

We recommand using Anaconda to set the envoriment, once Anacodna in installed, run the following command.

conda create --name CSGStumpNet python=3.7
conda activate CSGStumpNet
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch
conda install -c open3d-admin open3d=0.9
conda install numpy
conda install pymcubes
conda install tensorboard
conda install scipy
pip install tqdm

Datasets and pre-trained weights


We use the pre-prepared dataset from OccNet(consider citing them), you can download the data by

mkdir data
cd data
wget https://s3.eu-central-1.amazonaws.com/avg-projects/occupancy_networks/data/dataset_small_v1.1.zip
unzip dataset_small_v1.1.zip

If you want to prepare data yourself (maybe you want to generate the watertight mesh etc.), please refer to this link.

Pre-Train Weights

The original trained weights are no longer compatiable with the the restructred code (this repo) ? re-training is in progress (This may take some time).

Evaluate using pre-trian weights

python eval.py --config_path ./configs/plane_256_256.json

Train from stratch

python train.py --config_path ./configs/plane_256_256.json


python metrics.py --config_path ./configs/plane_256_256.json


This project is licensed under the terms of the MIT license (see LICENSE for details).