Skip to content

leVirve/lsun-room

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Indoor Scene Layout Estimation from a Single Image

one_lsun_result_banner

Paper

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].

Citation

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}
}

Prerequisite

  • Python 3.6+
  • PyTorch 1.0+
  • OneGAN newest is okay.
  • pip install -e requirements.txt

Dataset

Checkpoint

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.

Usage

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 scene
      • layout_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

    # 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;"

More Results

one_lsun_result_more