ZoeDepth icon indicating copy to clipboard operation
ZoeDepth copied to clipboard

Depth Map to Metric Depth Values

Open ConorHackett98 opened this issue 2 years ago • 2 comments

Hi,

I've recently started using a local version of ZoeDepth where I was able to input an image and get a greyscale depth map back of the image. Where object closer to the camera appear white while objects further away from the camera appear black. I just wanted to ask how I can convert these greyscale pixel values to metric units of depth (meters)?

Is the metric distance represented the by greyscale vales linear or does it have some other relation?

I was also wondering how the UI can convert an image into a 3D model (https://huggingface.co/spaces/shariqfarooq/ZoeDepth). To do this I assume it must find a way to convert the greyscale depth map to metric depth from an image, while also converting the x and y pixels to metric units too. How does it do this?

Thanks in advance for your help.

Kind Regards, Conor.

ConorHackett98 avatar Feb 20 '24 19:02 ConorHackett98

@ConorHackett98 did you find the solution to your issue?

elvistheyo avatar Aug 12 '24 09:08 elvistheyo

Hi elvistheyo,

Unfortunately, I did not find a solution to this issue. I ended up converting the images to 3D modes using: (https://huggingface.co/spaces/shariqfarooq/ZoeDepth). I imported these models into Blender to measure any distances. I roughly estimated distance using the camera specifications and it seemed to approximately line up with what Blender had stated.

Kind Regards, Conor.

ConorHackett98 avatar Aug 12 '24 11:08 ConorHackett98