nianticlabs / manydepth

[CVPR 2021] Self-supervised depth estimation from short sequences
Other
607 stars 84 forks source link

About cityscapes disparity to depth_gt #55

Open willemeng opened 1 year ago

willemeng commented 1 year ago

Hello, you mentioned in your README "We provide ground truth depth files HERE, which were converted from pixel disparities using intrinsics and the known baseline. Download this and unzip into splits/cityscapes.", how do you deal with the original disparity data and generate the .npy, I'm having some issues trying. If so, is it possible to make the code public?

willemeng commented 1 year ago

0_disp like this

JamieWatson683 commented 1 year ago

To convert a disparity map to a depth map you need the focal length in pixels (call this f, taken as the top left element of the intrinsics matrix, i.e. fx ) and the baseline between the 2 stereo cameras (call this b).

Given these you can obtain depth via depth = f * b / disparity

Hope this helps!