isl-org / ZoeDepth

Metric depth estimation from a single image
MIT License
2.22k stars 207 forks source link

depth contour does not match the object #38

Open astro-fits opened 1 year ago

astro-fits commented 1 year ago

Thank you for your excellent work! And I have a question. As what is shown in the following images, it seems that depth contour does not match the RGB image, extending pixels beyond the outer edge of the objects (indicated by the green poly-line). I don't know why and how to restore the depth. Thank you for your attention. rgb output

jorismak commented 1 year ago

Just guessing here , but the models are working on something like 512x512 (and that is considered big). So whatever image you feed it, gets downscaled, you get a depth with matching resolution, and that's upscaled again to your original input size.

That's why the edges will never be perfect.

When you try splitting the image, you'll see that each image will have a different exposure/contrast. The depth scale isn't exactly the same (although Zoe's raw output can make it a lot closer ).

So upscale the output in a fancier way or split the input image , but there is some work involved.