sstzal / DFRF

[ECCV2022] The implementation for "Learning Dynamic Facial Radiance Fields for Few-Shot Talking Head Synthesis".
MIT License
335 stars 40 forks source link

indices_.reshape(indices_.shape[0], 1024, -1, indices_.shape[2]) error in run_nerf_deform.py #7

Open aishoot opened 2 years ago

aishoot commented 2 years ago

Nice work! Thanks your sharing code. When I rendering.sh one video, there is a problem in this line:

  try:
      indices_ = indices_.reshape(indices_.shape[0], 1024, -1, indices_.shape[2])
  except:
      pdb.set_trace()

I printed the shape of the tensor indices_:

indices_ shape: torch.Size([4, 28544, 2])

28544 cannot be divided by 1024. So what is the reason? And any suggestions?

yaleimeng commented 2 years ago

while running " sh run.sh 1" , I meet the same error。 what is wrong?
File "NeRFs/run_nerf_deform.py", line 290, in gatherindices indices = indices.reshape(indices.shape[0], args.Nrand, -1, indices.shape[2]) RuntimeError: shape '[4, 850, -1, 2]' is invalid for input of size 131072

sstzal commented 2 years ago

Is your input image size 512*512?

yaleimeng commented 2 years ago

yes, I use the 1.mp4 when running sh process_data.sh .
and the *.jpg files in dataset/1/0/xxx_imgs are 512×512 pixel 。

sstzal commented 2 years ago

You can try to debug. I'll check the relevant code when I'm free.

aishoot commented 2 years ago

Is your input image size 512*512?

yes

essen900718 commented 1 year ago

@aishoot Hi, may I ask have you solved the problem yet ?

FengAB2 commented 11 months ago

@aishoot Hi, have you solved the problem yet ?

FengAB2 commented 11 months ago

You can try to debug. I'll check the relevant code when I'm free.

I have encountered the same problem and would like to ask if you know how to solve it.