/Bts-PyTorch

PyTorch implementation of BTS Depth Estimator

Primary LanguageJupyter NotebookMIT LicenseMIT

BTS - PyTorch

This repository contains the unofficial PyTorch implementation of From Big to Small: Multi-Scale Local Planar Guidance for Monocular Depth Estimation

Paper
Official Tensorflow Implementation

This repository is tested on Windows and Ubuntu on PyTorch 1.2, 1.3 and 13.1, installed from pip and built from source.

Kitti Validation results:

Model Silog rmse rmse log abs relative sqrt relative
BTS - PyTorch 9.83 3.03 0.10 0.06 0.29
BTS - Official 9.08 2.82 0.09 0.05 0.26

As can be seen on table above, this implementation performs slightly worse than original implementation, which is very likely due some additional hyper-parameter tuning done by authors, due computational reasons I couldnt fine tune training parameters further.

Videos

Screenshot

Setup

pip install -r requirements.txt

Download pretrained model and put it under models directory

Prediction

Please refer to prediction_example.ipynb

Dataset Preperation

Kitti: Preperation process is same as the official tensorflow implementation. But use "kitti_archives_to_download.txt" provided in this reposity which contains more runs.

Evaluation

Change following lines at the start of the configs.py

model_path = "models/btspytorch"
dataset_path = "e://Code/Tez/bts_eren/kitti"

Run Test.py

Training

Change following lines at the start of the configs.py

experiment_name = "Balatkan"  # This determines folder names used for saving tensorboard logs and model files
dataset_path = "e://Code/Tez/bts_eren/kitti"

Takes around 100 hours to train on GTX 1080.