Skip to content

DrZiji/VecFloorSeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementation of VectorFloorSeg: Two-Stream Graph Attention Network for Vectorized Roughcast Floorplan Segmentation

Environment

conda install --yes --file requirements.txt
  • Install pyg following the instruction from official site, we recommend pyg==2.0.4

Data preparation

  • Download our processed data: here

Pretrained backbone downloaded

mkdir models
cd models

Download ResNet-101 from pytorch official site here, rename to resnet101-torch.pth and move to models.

Code preparation

  • Replace the graphgym and torch_geometric in pyg with corresponding dir in our repository

Train

python graphgym/train.py --cfg graphgym/configs/CUBI.yaml --seed 0

Eval

python graphgym/eval.py --cfg graphgym/configs/CUBI.yaml --eval train.epoch_resume 1 \
                          train.ckpt_prefix best val.extra_infos True seed 0

Optional: Processing svg format dataset from CubiCasa-5k source data

Notice: before running the code, please change the data dir within the code into your souce data dir

  • Source data downloaded: here

  • Download CubiCasa-5k source code and configure the environment: here

  • Put Replace_with_Cubicasa into CubiCasa-5k code repo

  • Process source model.svg into roughcast svg format floorplans:

    python Replace_with_CubiCasa/roughcast_data_generation.py

  • Render svg floorplan into image:

    python Replace_with_CubiCasa/ImgRasterization.py

  • Render image annotation of floorplans:

    python Replace_with_CubiCasa/svg_loader.py

  • Draw the wireframe of svg floorplan and turn the wireframe and image annotation into mmseg format:

    python DataPreparation/ImageProcessing_CubiCasa.py

  • Process svg floorplan as pickle file:

    python SvgProcessing_CubiCasa.py

About

Source code repo for VectorFloorSeg: Two-Stream Graph Attention Network for Vectorized Roughcast Floorplan Segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages