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

Scaling and shifting in depth prediction #31

Open
norlcorxilea opened this issue Jul 29, 2024 · 0 comments
Open

Scaling and shifting in depth prediction #31

norlcorxilea opened this issue Jul 29, 2024 · 0 comments

Comments

@norlcorxilea
Copy link

I am trying to understand the code. For depth prediction part, scaling and shifting are added when using Depth Anything v1 and MiDaS. For Depth Anything v1, the constants are

scale = 0.0305
shift = 0.15
depth = scale * prediction + shift
depth[depth < 1e-8] = 1e-8
depth = 1.0 / depth

And for MiDaS, the constants are

scale = 0.000305
shift = 0.1378
depth = scale * prediction + shift
depth[depth < 1e-8] = 1e-8
depth = 1.0 / depth

I wonder how the constants are determined.

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

1 participant