Xiaowei Shi

Logo

Software/Medical engineer | M.S. Physics and engineering @ UCL23'

View the Project on GitHub xiaowshi/Long-Term_Reprojection_Loss

Pipeline

Requirements

torchvision 0.12.0, CUDA 10.2, tensorboardX 1.4

If you’re using older version of torchvision, you need to:

Dataset

The dataset is available on the SCARED official website.

Date preprocess

ffmpeg -i /path/to/rgb.mp4 -filter:v "crop=1280:1024:0:0" /path/to/crop_rgb.mp4
ffmpeg -i /path/to/crop_rgb.mp4 %6d.jpg

Training

CUDA_VISIBLE_DEVICES=1 python train.py --data_path <path/to/SCARED/> --log_dir <path/to/save/weights>  --batch_size 20 --frames_ids 0 -1 1 -2 2

Validation

CUDA_VISIBLE_DEVICES=1 python evaluate_depth.py --load_weights_folder <weights_path> --eval_mono  --eval_split endovis --data_path </path/to/SCARED> --max_depth 150.0
CUDA_VISIBLE_DEVICES=1 python evaluate_pose.py --data_path <path/to/SCARED/> --eval_split endovis --load_weights_folder <weights_path>

Testing

| Model | Abs Rel | Sq Rel | RMSE | RMSE log | Link | | ———— | ———- | —— | ——— | —- | —- | | Results | 0.058 | 0.452 | 5.014 | 0.083 | google drive|

CUDA_VISIBLE_DEVICES=1 python test_simple.py --model_path <model_path> --image_path <image_path>

visualisation

visualize pose

python visualize_pose.py

visualize 3d reconstruction

python visualize_reconstruction.py --data_path <path/to/dataset> --load_weights_folder <path/to/weight/folder> --eval_mono

Colab Demos

Acknowledgement

Our code is built on top of the implementation of Monodepth2.