FloorplanGAN
Code and instruction for our Automation in Construction submission:"FloorplanGAN: Vector Residential Floorplan Adversarial Generation".
Install / Use
/learn @luozn15/FloorplanGANREADME
FloorplanGAN
Ziniu Luo, Weixin Huang*
School of Architecture, Tsinghua University, Beijing, China
Code and instruction for our Automation in Construction submission:"FloorplanGAN: Vector Residential Floorplan Adversarial Generation".
Introduction
FloorplanGAN is a domain specific GAN combines Vector Generator and Raster Discriminator. It aims to synthesis vector residential floorplans based on Adversiral Generation, Differentiable Rendering and Self-Attention, etc.
Vector Generator
Installation
- dependency
(base)$ conda create -n floorplangan python=3.8 -y
(base)$ conda activate floorplangan
(floorplangan)$ pip install -r requirements.txt
Dataset
we use a publicly available dataset RPlan (http://staff.ustc.edu.cn/~fuxm/projects/DeepLayout/index.html), which contains 80k+ well annotated real residential floorplans in PNG format.
After the filtering and vectorization (using Pyportace) described in our paper, we get a training set of 17154 samples and a test set of 2000 samples, all in vector format. The preprocessed data can be download from baiduyun or google drive.
Make directory data_FloorplanGAN in root directory of this project, and unzip the downloaded zipfile in this folder.
Directory structures should be like:
FloorplanGAN
|---data_FloorplanGAN
| |---names
| `---pkls
|---main.py
|---models.py
|---dataset.py
...
Configuration
modify config.yaml to meet your demand:
- NUM_GPUS: number of GPUs used in training.
- NUM_WORKERS: number of CPU cores used in data loading.
- BATCHSIZE: change the batchsize according to the GPU memory.
Others are supposed to remain unchanged.
Training from scratch

- Train with single GPU
(floorplangan)$ python main.py
- Or multi-GPUs (e.g. 4 GPUs)
(floorplangan)$ torchrun --nproc_per_node=4 main.py
- Visualize the training process
(floorplangan)$ tesorboard --logidr=runs_rplan
Testing with pretrained model
~~Follow the instruction in test.ipynb~~
Coming soon...
Evaluating with diverse metrics
Coming soon...
Contribution
- luozn15@qq.com (Z. Luo)
- wxhuang@mail.tsinghua.edu.cn (W. Huang*)
Acknowledgement
This work is supported by the grant No.52178019 of National Science Foundation of China.We would like to thank the architects and master students of architecture for participating in our user study.
Related Skills
node-connect
350.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
