shubham-goel / ucmr

Code for the ECCV2020 paper "Shape and Viewpoint without Keypoints".
https://shubham-goel.github.io/ucmr/
148 stars 11 forks source link

demo.py - RuntimeError: The size of tensor a #20

Closed felixboevr closed 2 years ago

felixboevr commented 3 years ago

Hi @shubham-goel,

thanks again for your help with #19

I managed to create the .npy and .obj files with your code. But when running demo.py with my .npy-file I get the following error.

RuntimeError: The size of tensor a (565) must match the size of tensor b (1106) at non-singleton dimension 0

I didn't find a helpful solution with my research. Could you please give me a hint?

shubham-goel commented 3 years ago

Hi @felixboevr this is likely because of a mismatch between the number of mesh vertices somewhere. It's hard for me to debug the issue for you with the information provided.

felixboevr commented 3 years ago

Hi @shubham-goel , thanks for replying. To make no mistake with symmetry I tried the demo with a perfectly symmetric sphere object which I centered in the x-y-z intersection and exported from blender. Still I get the mentioned runtime error no matter if I do the demo with .obj or .npy file.

demo4.zip

shubham-goel commented 2 years ago

Hi @felixboevr. The error is expected because this assersion fails when you're trying to use a new template shape (with a different topology) in a pretrained network. To use UCMR with a different template shape, you should train from scratch following the instructions in docs/training.md.