yxuhan / AdaMPI

[SIGGRAPH 2022] Single-View View Synthesis in the Wild with Learned Adaptive Multiplane Images
218 stars 24 forks source link

Error when generating 3D photo with my own image #9

Open m0o0scar opened 1 year ago

m0o0scar commented 1 year ago

Hi. Thanks for this great work!! I'm trying to generate 3D photo with my own images on Google Colab following Document for AdaMPI. I can successfully generate video output from your demo photos. But when I try to use my own photo, I get this error:

Traceback (most recent call last):
  File "/content/AdaMPI/gen_3dphoto.py", line 27, in <module>
    disp = F.interpolate(disp, size=(opt.height, opt.width), mode='bilinear', align_corners=True)
  File "/usr/local/lib/python3.9/dist-packages/torch/nn/functional.py", line 3854, in interpolate
    raise ValueError(
ValueError: Input and output must have the same number of spatial dimensions, but got input with with spatial dimensions of [1356, 2040, 3] and output size of (256, 384). Please provide input tensor in (N, C, d1, d2, ...,dK) format and output size in (o1, o2, ...,oK) format.

I tried to adjust the input photo to have the same dimension as your demo photo, but still not working. Do you know what might be the problem here? Thanks.

m0o0scar commented 1 year ago

This is the RGB photo and depth map I use. I can send you the original photos if you need them for debugging :)

image