PolyGNN is an implementation of the paper PolyGNN: Polyhedron-based Graph Neural Network for 3D Building Reconstruction from Point Clouds.
Note
This repository is undergoing revisions and may differ from the state of the arXiv manuscript.
Create a conda environment with all dependencies installed:
git clone https://github.com/chenzhaiyu/polygnn && cd polygnn
conda env create -f environment.yml && conda activate polygnn
Create a conda environment and enter it:
conda create --name polygnn python=3.10 && conda activate polygnn
Install mamba for faster package parsing and installation:
conda install mamba -c conda-forge
Install the main dependencies:
mamba install pytorch torchvision sage=10.0 pytorch-cuda=11.7 pyg=2.3 pytorch-scatter pytorch-sparse pytorch-cluster torchmetrics rtree -c pyg -c pytorch -c nvidia -c conda-forge
pip install abspy hydra-core hydra-colorlog omegaconf trimesh tqdm wandb plyfile
Download data and weights:
python download.py dataset=munich
Train PolyGNN:
python train.py dataset=munich
Evaluate PolyGNN:
python test.py dataset=munich evaluate.save=true
Reconstruct meshes from predictions:
python reconstruct.py dataset=munich reconstruct.type=mesh
Remap meshes to original CRS:
python remap.py dataset=munich
Generate statistics:
python stats.py dataset=munich
- Host data and weights
- Short tutorial on getting started
- Scripts for data generation and manipulation
If you use PolyGNN in a scientific work, please consider citing the paper:
@article{chen2023polygnn,
title={PolyGNN: polyhedron-based graph neural network for 3D building reconstruction from point clouds},
author={Chen, Zhaiyu and Shi, Yilei and Nan, Liangliang and Xiong, Zhitong and Zhu, Xiao Xiang},
journal={arXiv preprint arXiv:2307.08636},
year={2023}
}