Depth-Anything icon indicating copy to clipboard operation
Depth-Anything copied to clipboard

How to recover point cloud from depth map?

Open runnerhdh opened this issue 1 year ago • 2 comments

hi, thanks for your great work. I run the run.py on my custom images, and I'm having difficulty when using intrinsics and inferred depth map to recover point cloud. The pixel value of the 16-bit unit depth map does not seem to be relative depth, because I found that the pixel value in the far distance is smaller. Please tell me the correct meaning of the pixel value of the 16-bit depth map (inferred in run.py#L72 just as follows). https://github.com/LiheYoung/Depth-Anything/blob/c3390b83bbab28127113fec9a974bccdc139bccb/run.py#L72-L73

runnerhdh avatar Jan 24 '24 03:01 runnerhdh

use metric_depth as ZOE style to recover point cloud, refer https://github.com/sanmeow/a1111-sd-zoe-depth/blob/main/geometry.py

WooYongfeng avatar Jan 24 '24 07:01 WooYongfeng

Thank you for discussions. Besides, @1ssb provided an amazing depth to point cloud script here: https://github.com/LiheYoung/Depth-Anything/blob/main/metric_depth/depth_to_pointcloud.py

Please refer to discussions: https://github.com/LiheYoung/Depth-Anything/issues/36

LiheYoung avatar Feb 03 '24 03:02 LiheYoung