prs-eth / Marigold

[CVPR 2024 - Oral, Best Paper Award Candidate] Marigold: Repurposing Diffusion-Based Image Generators for Monocular Depth Estimation
https://marigoldmonodepth.github.io
Apache License 2.0
2.26k stars 124 forks source link

How to calculate depth in Meters from the depth map in numpy #123

Open Luqman-Ansari opened 3 days ago

Luqman-Ansari commented 3 days ago

Hello, I have been working on a project of object detection and depth estimation. This model aligns to the my project requirements. I am using your pretrained model to test model accuracy on my own dataset. Can you please provide formula or method on how to calculate exact depth in meters from the depth map generated using your model. I cannot find any information in the research paper too related to this.

Please provide sufficient information so that I can contine to use this model for my project. Thanks!

markkua commented 1 day ago

Hi, our model predicts affine-invariant depth (up to scale and shift). To evaluate in meters, the predictions are aligned with ground truth via least square matching: https://github.com/prs-eth/Marigold/blob/62413d56099d36573b2de1eb8c429839734b7782/eval.py#L172