mrharicot / monodepth

Unsupervised single image depth prediction with CNNs
Other
2.22k stars 631 forks source link

Question on predicted depth map pixel value #207

Open ShiJiaying opened 5 years ago

ShiJiaying commented 5 years ago

Hi! Thank you for your wonderful work. I am confused that I test your pre-trained model and the eigen's too on KITTI. And when I see the testforpic.py 's predicted depth map in gray-level, the different is that, the pixel value is large where it is near to camera, but the eigen's output is totally opposite. Can you explain why ? Or It is just a visualization difference?

PS: the two predicted depth maps in color-level are followed to show the difference.

monodepth's output: 2011_09_26_drive_0046_sync_image_03_0000000005_disp

eigen's output: 2011_09_26_drive_0096_sync_image_03_0000000171

ahmed-18 commented 5 years ago

@ShiJiaying monodepth produces disparity maps not depth maps. Disparities are greater when the object is near the camera versus when it's far away. You can convert this disparity map to depth map using kitti's camera parameters (stereo base line and focal length). More info here

ShiJiaying commented 5 years ago

@ahmed-18 Thank you very much!! I will try it. :)