Skip to content

Latest commit

 

History

History

MonoDepth

Monocular Depth Estimation

RMS: 5.887 [Baseline: 6.081]

Try it on an image !

  1. Download and Unzip Pretrained Model
  2. Run on an Image !
    • WITHOUT Guided Filtering Layer
    python monodepth_simple.py --image_path [IMAGE_PATH] --checkpoint_path [MODEL_PATH]
    • WITH Guided Filter as PostProcessing
    python monodepth_simple.py --image_path [IMAGE_PATH] --checkpoint_path [MODEL_PATH] --guided_filter_eval
    • WITH Guided Filtering Layer
    python monodepth_simple.py --image_path [IMAGE_PATH] --checkpoint_path [MODEL_PATH] --guided_filter

Training on KITTI

  1. Download KITTI
    wget -i utils/kitti_archives_to_download.txt -P [SAVE_FOLDER]
  2. (Optional) Convert *.png to *.jpg to save space.
    find [SAVE_FOLDER] -name '*.png' | parallel 'convert {.}.png {.}.jpg && rm {}'
  3. Let's train the model !
    • WITHOUT Guided Filtering Layer
      python monodepth_main.py --mode train \
                               --model_name monodepth_kitti \
                               --data_path [SAVE_FOLDER] \
                               --filenames_file utils/filenames/kitti_train_files.txt \
                               --log_directory checkpoints
    • WITH Guided Filtering Layer
      python monodepth_main.py --mode train \
                               --model_name monodepth_kitti_dgf \
                               --data_path [SAVE_FOLDER] \
                               --filenames_file utils/filenames/kitti_train_files.txt \
                               --log_directory checkpoints \
                               --guided_filter
  4. Download Test Dataset
  5. Testing
    • WITHOUT Guided Filtering Layer
      python monodepth_main.py --mode test \
                               --data_path [SAVE_FOLDER] \
                               --filenames_file utils/filenames/kitti_stereo_2015_test_files.txt \
                               --checkpoint_path [MODEL_PATH]
    • WITH Guided Filter as PostProcessing
      python monodepth_main.py --mode test \
                               --data_path [SAVE_FOLDER] \
                               --filenames_file utils/filenames/kitti_stereo_2015_test_files.txt \
                               --checkpoint_path [MODEL_PATH] \
                               --guided_filter_eval
    • WITH Guided Filtering Layer
      python monodepth_main.py --mode test \
                               --data_path [SAVE_FOLDER] \
                               --filenames_file utils/filenames/kitti_stereo_2015_test_files.txt \
                               --checkpoint_path [MODEL_PATH] \
                               --guided_filter
  6. Evaluation on KITTI
    python utils/evaluate_kitti.py --split kitti --predicted_disp_path [disparities.npy] --gt_path [SAVE_FOLDER]

Acknowledgement

A part of the code has been borrowed from monodepth.