isl-org / DPT

Dense Prediction Transformers
MIT License
1.96k stars 254 forks source link

Interpret a depth #62

Closed dimasheva1 closed 2 years ago

dimasheva1 commented 2 years ago

How to convert a depth to real distance?

yassineAlouini commented 2 years ago

Unfortunately, it isn't possible unless you have also the ground truth for some images. Indeed, the predicted depth you get from the model is scale and shift invariant thus isn't linked to any real distance. Without re-scaling and re-shifting, you can only use the predicted depth as a relative indicator (for example a colored depth map).

More details can be found here.

Hope this helps a bit.

dimasheva1 commented 2 years ago

Thank you for the answer! Good luck)

fangli333 commented 7 months ago

Hi,

I have a question. You said that the predicted depth requires scale and shift to the real distance. so assume predicted depth is x, and i can use ax + b to model the real depth. And my question is does it mean, for each frame, it has its own a and b, or for all the frames of one processed video, they share the same a and b? a represent the scale, and b represent the shift.

Thank you.