Skip to content

yi-ming-qian/roofgan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roof-GAN: Learning to Generate Roof Geometry and Relations for Residential Houses

Code for the CVPR 2021 paper by Yiming Qian, Hao Zhang, and Yasutaka Furukawa. Supplementary document is here.

Getting Started

Clone the repository:

git clone https://github.com/yi-ming-qian/roofgan.git

We use Python 3.7 and PyTorch 1.2.0 in our implementation, please install dependencies:

conda create -n roofgan python=3.7
conda activate roofgan
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
conda install -c conda-forge opencv
pip install -r requirements.txt

Dataset

Please download our dataset from here. Then, change the option "data_root" in both "scripts/train_gan.sh" and "scripts/test_gan.sh" to the directory containing the dataset.

Training

Run the following command to train Roof-GAN:

sh ./scripts/train_gan.sh

Generation

Run the following command to generate roof models:

sh ./scripts/test_gan.sh

The generated models will be saved under "experiments/{proj_dir}/results/". We also provide our pre-trained models here. To use it, please place it under "experiments/{proj_dir}/model_gan/".

Evaluation

Run the following commands to evaluate with the RMMD and FID metrics:

cd evaluate
sh evaluate_RMMD.sh
cd fid
sh evaluate_fid.sh

Our generated results can be downloaded from here, which should be placed at "experiments/" after unzipping.

Contact

https://yi-ming-qian.github.io/

Acknowledgements

We thank the authors of PQ-Net and of House-GAN. Parts of our implementation are modified based on their codes. The FID metric implmentation is copied from mseitzer/pytorch-fid.

About

[CVPR 2021] Roof-GAN: Learning to Generate Roof Geometry and Relations for Residential Houses

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published