Home

Awesome

BTS

From Big to Small: Multi-Scale Local Planar Guidance for Monocular Depth Estimation
arXiv
Supplementary material

Video Demo 1

Screenshot

Video Demo 2

Screenshot

Note

This repository contains TensorFlow and PyTorch implementations of BTS.

Preparation for all implementations

$ cd ~
$ mkdir workspace
$ cd workspace
### Make a folder for datasets
$ mkdir dataset
### Clone this repo
$ git clone https://github.com/cleinc/bts

Prepare NYU Depth V2 test set

$ cd ~/workspace/bts/utils
### Get official NYU Depth V2 split file
$ wget http://horatio.cs.nyu.edu/mit/silberman/nyu_depth_v2/nyu_depth_v2_labeled.mat
### Convert mat file to image files
$ python extract_official_train_test_set_from_mat.py nyu_depth_v2_labeled.mat splits.mat ../../dataset/nyu_depth_v2/official_splits/

Prepare KITTI official ground truth depth maps

Download the ground truth depthmaps from this link KITTI.
Then,

$ cd ~/workspace/dataset
$ mkdir kitti_dataset && cd kitti_dataset
$ mv ~/Downloads/data_depth_annotated.zip .
$ unzip data_depth_annotated.zip

Follow instructions from one of the below implementations with your choice.

TensorFlow Implementation

[./tensorflow/]

PyTorch Implementation

[./pytorch/]

Model Zoo

KITTI Eigen Split

Base Networkcapd1d2d3AbsRelSqRelRMSERMSElogSILoglog10#ParamsModel Download
ResNet500-80m0.9540.9920.9980.0610.2502.8030.0989.0300.02749.5Mbts_eigen_v2_pytorch_resnet50
ResNet1010-80m0.9540.9920.9980.0610.2612.8340.0999.0750.02768.5Mbts_eigen_v2_pytorch_resnet101
ResNext500-80m0.9540.9930.9980.0610.2452.7740.0989.0140.02749.0Mbts_eigen_v2_pytorch_resnext50
ResNext1010-80m0.9560.9930.9980.0590.2412.7560.0968.7810.026112.8Mbts_eigen_v2_pytorch_resnext101
DenseNet1210-80m0.9510.9930.9980.0630.2562.8500.1009.2210.02821.2Mbts_eigen_v2_pytorch_densenet121
DenseNet1610-80m0.9550.9930.9980.0600.2492.7980.0968.9330.02747.0Mbts_eigen_v2_pytorch_densenet161

NYU Depth V2

Base Networkd1d2d3AbsRelSqRelRMSERMSElogSILoglog10#ParamsModel Download
ResNet500.8650.9750.9930.1190.0750.4190.15212.3680.05149.5Mbts_nyu_v2_pytorch_resnet50
ResNet1010.8710.9770.9950.1130.0680.4070.14811.8860.04968.5Mbts_nyu_v2_pytorch_resnet101
ResNext500.8670.9770.9950.1160.0700.4140.15012.1860.05049.0Mbts_nyu_v2_pytorch_resnext50
ResNext1010.8800.9770.9940.1110.0690.3990.14511.6800.048112.8Mbts_nyu_v2_pytorch_resnext101
DenseNet1210.8710.9770.9930.1180.0720.4100.14912.0280.05021.2Mbts_nyu_v2_pytorch_densenet121
DenseNet1610.8850.9780.9940.1100.0660.3920.14211.5330.04747.0Mbts_nyu_v2_pytorch_densenet161
MobileNetV2TBATBATBATBATBATBATBATBATBA16.3Mbts_nyu_v2_pytorch_mobilenetv2

Note: Modify arguments '--encoder', '--model_name', '--checkpoint_path' and '--pred_path' accordingly.

Live Demo

Finally, we attach live 3d demo implementations for both of TensorFlow and Pytorch.
For best performance, get correct intrinsic values for your webcam and put them in bts_live_3d.py.
Sample usage for PyTorch:

$ cd ~/workspace/bts/pytorch
$ python bts_live_3d.py --model_name bts_nyu_v2_pytorch_densenet161 \
--encoder densenet161_bts \
--checkpoint_path ./models/bts_nyu_v2_pytorch_densenet161/model \
--max_depth 10 \
--input_height 480 \
--input_width 640

Citation

If you find this work useful for your research, please consider citing our paper:

@article{lee2019big,
  title={From big to small: Multi-scale local planar guidance for monocular depth estimation},
  author={Lee, Jin Han and Han, Myung-Kyu and Ko, Dong Wook and Suh, Il Hong},
  journal={arXiv preprint arXiv:1907.10326},
  year={2019}
}

License

Copyright (C) 2019 Jin Han Lee, Myung-Kyu Han, Dong Wook Ko and Il Hong Suh
This Software is licensed under GPL-3.0-or-later.