vt-vl-lab / 3d-photo-inpainting

[CVPR 2020] 3D Photography using Context-aware Layered Depth Inpainting
https://shihmengli.github.io/3D-Photo-Inpainting/
Other
6.91k stars 1.11k forks source link

Error when using custom depth map #88

Closed Shelkey closed 4 years ago

Shelkey commented 4 years ago

Using Google's Colab

Non-default Argument settings: depth_format: '.png' require_midas: False save_ply: False

I made the png in GIMP shinobu

running on device 0 0% 0/1 [00:00<?, ?it/s]Current Source ==> shinobu Running depth extraction at 1595553061.1740317 0% 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "main.py", line 72, in vis_photos, vis_depths = sparse_bilateral_filtering(depth.copy(), image.copy(), config, num_iter=config['sparse_iter'], spdb=False) File "/content/3d-photo-inpainting/bilateral_filtering.py", line 31, in sparse_bilateral_filtering vis_image[u_over > 0] = np.array([0, 0, 0]) IndexError: boolean index did not match indexed array along dimension 2; dimension is 3 but corresponding boolean dimension is 6

LemonATsu commented 4 years ago

Try saving your depth map in grayscale and see if it works.

Shelkey commented 4 years ago

Try saving your depth map in grayscale and see if it works.

That did the trick, thank you!