Home

Awesome

AtlantaNet

Pytorch implementation of the ECCV 2020 paper: AtlantaNet: Inferring the 3D Indoor Layout from a Single 360 Image beyond the Manhattan World Assumption

Images obtained with resnet101_atlantalayout.pth (see below).

This repo is a python implementation where you can try:

3D viewer and evaluation metrics are based on the code provided by HorizonNet(https://github.com/sunset1995/HorizonNet).

News, 2020-09-15 - Original MatterportLayout annotations, data splitting and pre-trained models provided. Fixed some bugs on reliability check

Method Pipeline overview:

Updates

Requirements

Download Pretrained Models

To be copied in your local ./ckpt directory.

It should be noted that results are obtained converting PanoAnnotator (https://github.com/SunDaDenny/PanoAnnotator) annotations, which are general Manhattan World scenes, to Indoor World model scenes (assumption adopted by LayoutNet, DulaNet and HorizonNet - see https://onlinelibrary.wiley.com/doi/abs/10.1111/cgf.14021 for details about such priors). Converter script is available in the misc folder (misc/json2txt.py). Due to this conversion and opencv polygonal approximation, numerical performances can slighly differ from those presented in the paper or obtained using a different annotation format.

Dataset preparation

We follow the same notation (.png image with .txt associated) proposed by HorizonNet (https://github.com/sunset1995/HorizonNet). Instruction to download and prepare PanoContext/Stanford2D3D, MatterportLayout, Structured3D datasets are provided by HorizonNet (https://github.com/sunset1995/HorizonNet) and MatterportLayout(https://github.com/ericsujw/Matterport3DLayoutAnnotation).

Inference on equirectagular images

Here an example of inferring using the pre-trained model on MatterportLayout finetuned on AtlantaLayout:

python inference_atlanta_net.py --pth ckpt/resnet50_atlantalayout.pth --img data/atlantalayout/test/img/2t7WUuJeko7_c2e11b94c07a4d6c85cc60286f586a02_equi.png
- `--pth` path to the trained model.
- `--img` path to the input equirectangular image.
- `--output_dir` path to the directory to dump .json results (Optional: default = results/).
- `--visualize` optional for visualizing textured 3D model (Optional: default = True).

NB. Since the network output is an image mask and probabilities are not necessary, the final Sigmoid operation is replaced in this script by a simpler threshold operation.

Acknowledgement

Citation

Please cite our paper for any purpose of usage.

@InProceedings{Pintore:2020:AI3,
    author = {Giovanni Pintore and Marco Agus and Enrico Gobbetti},
    title = {{AtlantaNet}: Inferring the {3D} Indoor Layout from a Single 360 Image beyond the {Manhattan} World Assumption},
    booktitle = {Proc. ECCV},
    month = {August},
    year = {2020},
    url = {http://vic.crs4.it/vic/cgi-bin/bib-page.cgi?id='Pintore:2020:AI3'},
}