MiDaS icon indicating copy to clipboard operation
MiDaS copied to clipboard

how to estimate depth ? moderate,far away,close up etc

Open akashAD98 opened this issue 2 years ago • 7 comments

how to get the depth of images ? after getting the result i want to know whether my object is near,far, moderate,very far, what are the parameters we need to use

image

akashAD98 avatar Apr 18 '22 11:04 akashAD98

I believe that the fundamental nature of monocular depth means that you get relative depth maps not real depth maps in meters. To convert a relative depth map to a real depth map, you'd need the real depth of some part of the image.

younesr1 avatar Apr 23 '22 23:04 younesr1

understood, but we can use image disparity to understand the depth.if image disparity is very high & object bbox is very high we can say the object is near , same for faraway object, but I dont know how to find image disparity here

akashAD98 avatar Apr 26 '22 04:04 akashAD98

I believe that the fundamental nature of monocular depth means that you get relative depth maps not real depth maps in meters. To convert a relative depth map to a real depth map, you'd need the real depth of some part of the image.

Wouldn't it be even the least bit useful if there was a passing reference to this fact in either the documentation, or the paper?

Mr0cket avatar Jun 16 '22 15:06 Mr0cket

The way I see it, for a fixed known camera (or class of cameras), you could get some idea of what is near, far, or in between. This network works on all images from unknown sources with unknown post-processing, so only relative depth estimation is possible. In chapter 4, the authors discuss various data sources they used for training and their scale- and shift-invariant loss.

dfrumkin avatar Jun 16 '22 15:06 dfrumkin

@dfrumkin yes understood. i build a rule-based system which doing well for predicting its depth. example. bus,train is big size object .if we detect this in frame & its bbounding box area is very small comapired to total fame size. we can say that image is far away. same for close object -if bbox is very big which is equals to size of frame this are few examples.

image image

here i first detected object using yoo framwork & build rule based system, but i want to combine this semi supervised approch to build this depth estimation

akashAD98 avatar Jun 17 '22 03:06 akashAD98

@akashAD98 A simplistic approach would be to combine segmentation with depth, compute the average depth for the mask and thus decide how far it is. The result would still be relative, giving you a bunch of "cardboard" cutouts at various relative depths (may be a good assumption for a standing person, but not for one lying with his feet/head toward the camera). If you know the real-world size of the object and your camera parameters, you can get some idea of whether it's near or far.

dfrumkin avatar Jun 17 '22 08:06 dfrumkin

@akashAD98 A simplistic approach would be to combine segmentation with depth, compute the average depth for the mask and thus decide how far it is. The result would still be relative, giving you a bunch of "cardboard" cutouts at various relative depths (may be a good assumption for a standing person, but not for one lying with his feet/head toward the camera). If you know the real-world size of the object and your camera parameters, you can get some idea of whether it's near or far. Hello, I would like to ask a question. I obtained the relative depth through the program and knew the object size and camera internal parameters. Is there any formula for obtaining distance?

duhaitong avatar Sep 01 '23 08:09 duhaitong