mattpoggi / mono-uncertainty

CVPR 2020 - On the uncertainty of self-supervised monocular depth estimation
233 stars 24 forks source link

A question about inconsistency in the generate_maps.py related to bayesian uncertainty #11

Closed kishore-greddy closed 3 years ago

kishore-greddy commented 3 years ago

Hey @mattpoggi ,

I understand that the bayesian uncertainty is calculated by adding the uncertainty from a predictive method and an empirical method, for example snap+log. However, I seem to be missing something.

image In line 183, you are adding the variance from the empirical method and adding up the uncertainties from the predicitive method(log).

image

However in line 216, you are taking the exponential for the log method, I believe this is because the uncertainties are in fact the \log of uncertainities.

Why do you not use the same torch.exp on the uncertainties while calculating it in the bayesian way, in line 183 above. What am I missing here?.

Thanks in advance

mattpoggi commented 3 years ago

Hi @kishore-greddy , good call, the torch.exp should be there as well. I'll fix the uploaded code asap. Anyway, I've double checked the results and the numbers obtained without torch.exp are almost identical to the correct implementation (the predictive uncertainty seems dominant w.r.t. empirical one). Thanks for pointing it out :+1:

kishore-greddy commented 3 years ago

No problem :) , Thank you for fixing it.