shariqfarooq123 / AdaBins

Official implementation of Adabins: Depth Estimation using adaptive bins
GNU General Public License v3.0
732 stars 157 forks source link

Actual distance value from Depth Maps #22

Closed ramanathan831 closed 3 years ago

ramanathan831 commented 3 years ago

Hi, We have the Depth map values like in scales of 10-10000 for each pixel in the image. How do we find the actual distance from camera taking the picture like 5000 value on depth map corresponds to 4.5m from camera kind of thing?

shariqfarooq123 commented 3 years ago

The output from the AdaBins model is actually the absolute depth in meters. However, depth maps are stored as 16-bit PNGs so we multiply with some factor first which results in the range you specified.

For NYU this factor = 1000 For KITTI this factor = 256

Therefore, you can obtain the absolute depth in meters from the PNG data by dividing by the corresponding factor.