Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About focal_scale #21

Open
DongyangHuLi opened this issue Jul 24, 2023 · 1 comment
Open

About focal_scale #21

DongyangHuLi opened this issue Jul 24, 2023 · 1 comment

Comments

@DongyangHuLi
Copy link

Hi, thank you for nice work!
I'm confused about the 'focal_scale'. Why do we need to do this:

SurroundDepth/runer.py

Lines 382 to 383 in 22dfecf

if self.opt.focal:
pred_depth = pred_depth * data[("K", 0, 0)][i, 0, 0].item() / self.opt.focal_scale

@weiyithu
Copy link
Owner

Depth estimation results are related to focal length. Here we encode focal length information to the network by simply multiply a focal scale. For a more elegant method and the theoretical relation between focal length and depth, you may refer to this paper: Metric3D: Towards Zero-shot Metric 3D Prediction from A Single Image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants