Giter Club home page Giter Club logo

Comments (12)

JoshMSmith44 avatar JoshMSmith44 commented on June 1, 2024 2

In order to get the true depth using the above method you need to know two true depth pixel values for each relative depth image you correct (realistically you want many more). This could come from a a sensor, sparse structure-from-motion point cloud, etc. if you don't have access to true depth and you need access to metric depth then you should look into Metric depth estimation methods like ZoeDepth, Depth-Anything,and ZeroDepth.

from midas.

JoshMSmith44 avatar JoshMSmith44 commented on June 1, 2024 1

According to #171 I believe the equation is:
(1.0 / true_depth) = A + (B * midas_output)
so then
true_depth = 1.0 / (A + (B * midas_output))

from midas.

heyoeyo avatar heyoeyo commented on June 1, 2024

The midas models output inverse depth maps (or images). So each pixel of the output corresponds to a value like: 1/depth

However, the mapping is also only relative, it doesn't tell you the exact (absolute) depth. Aside from noise/errors, the true depth value is shifted/scaled compared to the result you get from the midas output after inverting, so more like:

true depth = A + B * (1 / midas output)
(see post below)

Where A is some offset and B is some scaling factor, that generally aren't knowable using the midas models alone. You can try something like ZoeDepth to get actual depth values or otherwise try fitting the midas output to some other reference depth map, like in issue #171

from midas.

heyoeyo avatar heyoeyo commented on June 1, 2024

so then true_depth = 1.0 / (A + (B * midas_output))

Good point! I was thinking these are the same mathematically, but there is a difference, and having the shifting done before inverting makes more sense.

from midas.

Eyshika avatar Eyshika commented on June 1, 2024

How are A and B calculated for a video ? @JoshMSmith44

from midas.

JoshMSmith44 avatar JoshMSmith44 commented on June 1, 2024

How are A and B calculated for a video ? @JoshMSmith44

I believe MiDas is a single-image method and therefore there is a different A and B for each frame in the video sequence.

from midas.

Eyshika avatar Eyshika commented on June 1, 2024

How are A and B calculated for a video ? @JoshMSmith44

I believe MiDas is a single-image method and therefore there is a different A and B for each frame in the video sequence.

but in MIDAS it calculates using, true depth and calculated depth comparison. What if we have completely new images and want to find metric depth ?

from midas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.