Indoor Scene Layout Estimation from a Single Image.
Hung Jin Lin, Sheng-Wei Huang, Shang-Hong Lai, Chen-Kuo Chiang National Tsing Hua University.
International Conference on Pattern Recognition (ICPR), 2018.
Read in public [PDF].
If you find the work is useful, please use the following BibTeX entry.
@inproceedings{lin2018layoutestimation,
Author = {Hung Jin Lin and Sheng-Wei Huang and Shang-Hong Lai and Chen-Kuo Chiang},
Title = {Indoor Scene Layout Estimation from a Single Image},
Booktitle = {2018 24th International Conference on Pattern Recognition (ICPR)},
Year = {2018}
}
- Python 3.6+
- PyTorch 1.0+
- OneGAN newest is okay.
pip install -e requirements.txt
- LSUN Layout Challenge
- Unfortunately, the website of LSUN Layout Challenge is down.
- However, we can find them from below links.
- Full images and labels dataset: LSUN2016_surface_relabel.zip from @yuzhuoren.
Recommend to use this, the original ground truth of LSUN Room challenge are not perfect.
- Data splits for training.mat, validation.mat and testing.mat from the web archive.
- Full images and labels dataset: LSUN2016_surface_relabel.zip from @yuzhuoren.
Pre-trained weight at Google Drive.
Cannot provide original checkpoint in paper due to the agreement, so this is a re-trained checkpoint for fast evaluation.
Updated Jan 2021.
Thanks @shuuchen for an all-in-one project, you may also refer to https://github.com/shuuchen/lsun-room-dsc!
-
Training
-
Dataset LSUN Room Layout Dataset into the folders of
./data/lsun_room
.images/
: RGB image*.jpg
of indoor room scenelayout_seg/
: layout ground truth*.mat
planar segmentation
-
Trained model will be saved to folder
./ckpts
python main.py --phase train --edge_factor 0.2 --l2_factor 0.2 --name baseline
-
-
Validation
- Validate on LSUN-Room / Hedau datasets.
python main.py --phase eval --dataset hedau --folder ./data/hedau --pretrain_path {checkpoint_path}
-
Testing
- On your photo or image sequence
# single image python demo.py image --weight {checkpoint_path} --path {image_filepath} # images in folder python demo.py image --weight {checkpoint_path} --path {image_folder}
- On video or webcam
# video python demo.py video --weight {checkpoint_path} --path {test_video} # webcam python demo.py video --weight {checkpoint_path} --device 0
-
Toolkit
- Official
LSUN Room Layout Dataset
toolkit in folder./lib/lsun_toolkit
# this is my modified script for usage demonstration, # you may need to modify the official Matlab code to evaluate your results. matlab -nojvm -nodisplay -nosplash -r "demo('$EXPERIMENT_OUTPUT_FOLDER'); exit;"
- Official