Closed GregoryBetsey closed 4 years ago
Hello
I am using a custom depth map on an image. I set the parameters in the to the following:
img_format: '.jpg' depth_format: '.png' require_midas: False
When I run argument.yml I get the following error:
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 "C:\Users\gregb\Documents\Python\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 5
I don't know what this error means.
Hi I'm facing the exact same issue. Did you find a fix?
Try saving the custom depth maps in grayscale and see if it works.
It worked after processing the depth map into a grayscale with cv2.imread("depth.png", cv2.IMREAD_GRAYSCALE) before giving it to the program!
Hi, with custom depth map, was the output looking good? To read_Midas_depth
, what value of scale were you passing? I think I am having issues with this scale factor and my output is not aligned to the groundtruth frame.
Do you have any suggestions?
read_Midas_depth
Could you explain the solve with grayscale (i am solved with it). ^^
Try saving the custom depth maps in grayscale and see if it works.
how to do that
read_Midas_depth
Could you explain the solve with grayscale (i am solved with it). ^^
How to solve this
Hello
I am using a custom depth map on an image. I set the parameters in the to the following:
img_format: '.jpg' depth_format: '.png' require_midas: False
When I run argument.yml I get the following error:
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 "C:\Users\gregb\Documents\Python\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 5
I don't know what this error means.