zhyever/PatchFusion

Need gray scale depth map, not heat map

Closed this issue · 8 comments

I've got the demo working locally, I cannot see how to get the grayscale depth map instead of using the heatmap.

Thanks for your interest in our work and I'm also grateful to see your effort helping people use PatchFusion.

I have add the support for saving grayscale depth map as well as the 16-bit depth map. Please check out the latest version.

Please use --show/--show_path for grayscale depth map, and use --save/--save_path for the 16-bit png depth map. The overall process is following ZoeDepth.

Thanks, I am about to give this a try. Any chance of making this a radio button option in the demo on huggingface?

Thanks for your interest in our work and I'm also grateful to see your effort helping people use PatchFusion.

I have add the support for saving grayscale depth map as well as the 16-bit depth map. Please check out the latest version.

Please use --show/--show_path for grayscale depth map, and use --save/--save_path for the 16-bit png depth map. The overall process is following ZoeDepth.

Maybe I did something wrong but I got this error:

Traceback (most recent call last):
  File "D:\AI\newPF\PatchFusion\infer_user.py", line 1052, in <module>
    config = get_config_user(args.model, **overwrite_kwargs)
  File "D:\AI\newPF\PatchFusion\zoedepth\utils\config.py", line 574, in get_config_user
    version_name = overwrite_kwargs.get("version_name", config["version_name"])
KeyError: 'version_name'

I ran again locally and the code works well. Could you please share your running command? The config path would be like PatchFusion/zoedepth/models/zoedepth_custom/configs/config_zoedepth_patchfusion.json.

Ok, I'm working on adding this to hugging face demo

OK, done. One additional button is added in huggingface demo

Thanks for your interest in our work and I'm also grateful to see your effort helping people use PatchFusion.

I have add the support for saving grayscale depth map as well as the 16-bit depth map. Please check out the latest version.

Please use --show/--show_path for grayscale depth map, and use --save/--save_path for the 16-bit png depth map. The overall process is following ZoeDepth.

Thank you so much for this. I was doing the command wrong ealier and also thanks for updating the demo, got that downloaded and working also. One thing I'm experience however is that when I run it from the command line, instead of using the demo, it creates BOTH grayscale AND heatmap depth maps in the "show" folder. Here is the command I'm running, maybe I'm missing something??

python infer_user.py --model zoedepth_custom --ckp_path nfs/patchfusion_u4k.pt --model_cfg_path zoedepth/models/zoedepth_custom/configs/config_zoedepth_patchfusion.json --rgb_dir rgb --show --show_path show --mode r128 --boundary 0 --blur_mask

Is there a way I can just have it output the grayscale depthmap? Thanks.

Hi, you didn't miss anything. To achieve this, you can simply comment this line of code (or delete it):

cv2.imwrite(os.path.join(show_path, '{}.png'.format(images.name)), color_map_1)

I was lazy and didn't add an additional flag. :D

Hi, you didn't miss anything. To achieve this, you can simply comment this line of code (or delete it):

cv2.imwrite(os.path.join(show_path, '{}.png'.format(images.name)), color_map_1)

I was lazy and didn't add an additional flag. :D

AWESOME!!! TYSM!!