mattpoggi / mono-uncertainty

CVPR 2020 - On the uncertainty of self-supervised monocular depth estimation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reproducing uncertainty results

surajiitd opened this issue · comments

When I am reproducing the results, I got v. wrong results, as shown below:
terminal_output

So when I checked plotting the depths and uncertainties saved in raw/disp and raw/uncert then they are like this (see image below, which is clearly wrong):
notebook_output

The thing is I am not getting proper raw pred_depths and uncertainties in raw directory, however my qualitative pred_depths and uncertainties are saved correctly in qual directory as shown below some examples:
image
image

So the main issue is when we are scaling the raw pred_depths and uncertainties before saving.

  1. Could you please tell why we are multiplying by gt_depth's width in this line 270 of generate_maps.py: when you are saving the depths, why are you scaling it like this:

pred_disps[i]*(dataset.K[0][0]*gt_depths[i].shape[1])*256./ratio/10.

(I know depth = (baseline*focal_length)/disparity) but why by ratio, 256, 10 and gt_depth[i].shape[1] which is the width of the image.

  1. And when saving uncertainties in line 279, why scaling like this: pred_uncerts[i]*(256*256-1)

  2. So when using these saved maps in evaluate.py you are again scaling pred_depths like this before comparing with gt_depth: I can't understand line no. 167.
    where you are dividing pred_disp like this: src = pred_disp / 256. / (0.58*gt_depth.shape[1]) * 10

Please help for this issue. @mattpoggi @FilippoAleotti @fabiotosi92