[Project Webpage] [Paper]
- The code has been tested on Linux with python 3.8, torch 1.9.0, and cuda 11.1.
- We recommend an installation through conda:
- Create an environment:
conda create -n cage python=3.8 conda activate cage
- Install pytorch and other required packages:
# adjust the cuda version accordingly pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html pip install -r requirements.txt- Compile the deformable-attention modules (from deformable-DETR) and the differentiable rasterization module (from BoundaryFormer):
cd models/ops sh make.sh # unit test for deformable-attention modules (should see all checking is True) # python test.py cd ../../diff_ras python setup.py build develop
We follow the official data format provided by RoomFormer and directly use their processed data. All preprocessing steps are conducted as described in data_preprocess .
CAGE support two backbone architectures: ResNet-50 and Swin Transformer. Please set the backbone type and corresponding hyperparameters accordingly.
-
ResNet-50
Setbackbone=resnet50in the corresponding script under thetools/directory or in main.py.
No additional setup is required. -
Swin Transformer
- Set
backbone=swinv2_L_192_22kin the corresponding script under thetools/directory or in main.py. - Place the pretrained Swin Transformer weight in the
pretrained/folder.
- Set
Please download and extract the checkpoints of our model from this link.
We use the same evaluation scripts with MonteFloor. Please first download the ground truth data used by MonteFloor and HEAT with this link (required by the evaluation code) and extract it as ./s3d_floorplan_eval/montefloor_data. Then run following command to evaluate the model on Structured3D test set:
./tools/eval_stru3d.shWe adapt the evaluation scripts from MonteFloor to evaluate SceneCAD:
./tools/eval_scenecad.shThe command for training RoomFormer on Structured3D is as follows:
./tools/train_stru3d.shSimilarly, to train RoomFormer on SceneCAD, run the following command:
./tools/train_scenecad.shIf you find CAGE useful in your research, please cite our paper:
@inproceedings{liu2025cage,
title = {CAGE: Continuity-Aware edGE Network Unlocks Robust Floorplan Reconstruction},
author = {Liu, Yiyi and Liu, Chunyang and Jiao, Weiqin and Wu, Bojian and Li, Fashuai and Xiong, Biao},
booktitle = {Advances in Neural Information Processing Systems},
year = {2025}
}
We thank the authors of FRI-Net, PolyRoom, RoomFormer, HEAT and MonteFloor for providing results on Structured3D for better comparison. We also thank for the following excellent open source projects: