kijai / ComfyUI-DepthAnythingV2

Simple DepthAnythingV2 inference node for monocular depth estimation
167 stars 12 forks source link

Metric version of depth anything also in 0-1 range ? #7

Open NicTanghe opened 2 months ago

NicTanghe commented 2 months ago

I was wondering if I am missing a node or something. Depth going from 1 to 0 in the total range of the image depth works.

However, I was expecting that when I save an EXR of the metric model i would get values starting from 0.

Am I doing something wrong, or is this normal behaviour ?

kijai commented 2 months ago

Not entirely sure what you mean, if you mean the direction, the metric models do indeed return 0 as closest to camera, I just inverted it as ControlNets etc. expect the opposite. You can simply invert it again if you want the other way around.

NicTanghe commented 2 months ago

Ok thanks for the reply.

Im a bit confused as to how an invert would set a point as 1 ? since something can be 3 or 7 meters away? Isn`t it more logical to just use the relative control net if you want to use ControlNet and leave the metric model untouched ?

(vfx uses floating point depth starting from 0 for lots of things like fog and defocus)

Op di 25 jun 2024 om 01:36 schreef Jukka Seppänen @.***

:

Not entirely sure what you mean, if you mean the direction, the metric models do indeed return 0 as closest to camera, I just inverted it as ControlNets etc. expect the opposite. You can simply invert it again if you want the other way around.

— Reply to this email directly, view it on GitHub https://github.com/kijai/ComfyUI-DepthAnythingV2/issues/7#issuecomment-2187614480, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADH6HSL5774FGZYI6MVYKJDZJCUP5AVCNFSM6AAAAABJ2UO3GKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBXGYYTINBYGA . You are receiving this because you authored the thread.Message ID: @.***>