DeepMotionEditing / deep-motion-editing

An end-to-end library for editing and rendering motion of 3D characters with deep learning [SIGGRAPH 2020]
BSD 2-Clause "Simplified" License
1.58k stars 256 forks source link

I use my own data for retargeting, but the program will give an exception #42

Closed wuxiaolianggit closed 4 years ago

wuxiaolianggit commented 4 years ago

Traceback (most recent call last): File "eval_single_pair.py", line 104, in main() File "eval_single_pair.py", line 92, in main new_motion = (new_motion - dataset.mean[i][j]) / dataset.var[i][j] RuntimeError: The size of tensor a (99) must match the size of tensor b (91) at non-singleton dimension 1 Traceback (most recent call last): File "demo.py", line 46, in example('Aj', 'BigVegas', '01.bvh', 'intra', './examples/intra_structure') File "demo.py", line 42, in example height) File "/home/wuxiaoliang/docker/newAPP/deep-motion-editing/retargeting/models/IK.py", line 57, in fix_foot_contact anim, name, ftime = BVH.load(input_file) File "../utils/BVH.py", line 58, in load f = open(filename, "r") FileNotFoundError: [Errno 2] No such file or directory: './examples/intra_structure/result.bvh'

Hello, how can I solve this problem?@ @kfiraberman

ANYMS-A commented 4 years ago

Traceback (most recent call last): File "eval_single_pair.py", line 104, in main() File "eval_single_pair.py", line 92, in main new_motion = (new_motion - dataset.mean[i][j]) / dataset.var[i][j] RuntimeError: The size of tensor a (99) must match the size of tensor b (91) at non-singleton dimension 1 Traceback (most recent call last): File "demo.py", line 46, in example('Aj', 'BigVegas', '01.bvh', 'intra', './examples/intra_structure') File "demo.py", line 42, in example height) File "/home/wuxiaoliang/docker/newAPP/deep-motion-editing/retargeting/models/IK.py", line 57, in fix_foot_contact anim, name, ftime = BVH.load(input_file) File "../utils/BVH.py", line 58, in load f = open(filename, "r") FileNotFoundError: [Errno 2] No such file or directory: './examples/intra_structure/result.bvh'

Hello, how can I solve this problem?@ @kfiraberman

create the directories "./examples/intra_structure/" by yourself before you run the program.

wuxiaolianggit commented 4 years ago

I've created the directory your way, but the same error still occurs @crissallan

wuxiaolianggit commented 4 years ago

RuntimeError: The size of tensor a (99) must match the size of tensor b (91) at non-singleton dimension 1,

This is the first exception

ANYMS-A commented 4 years ago

RuntimeError: The size of tensor a (99) must match the size of tensor b (91) at non-singleton dimension 1,

This is the first exception

Ah~ Since the tensor's shape doesn't match, I think you should check whether "01.bvh" is the mocap data of “Aj” or "BigVegas". Because the shape of the motion tensor depends on the number of joints of the character. e.g. 91 = (23-1) * 4 + 3 because "Aj" and "BigVegas" both has 23 joints as its simplified skeleton.

So if tensor a's shape is 99, I would reckon that this bvh file might belongs to a character which has 25 joints, since 99 = (25-1)*4 +3

wuxiaolianggit commented 4 years ago

OK, thank you very much for your reply,

"Our approach is also quantitatively evaluated on a synthetic dataset that contains pairs of motions applied to different skeletons. To the best of our knowledge, our method is the first to perform retargeting between skeletons with differently sampled kinematic chains, without any paired examples. " , it is from "Skeleton-Aware Networks for Deep Motion Retargeting",

Is it required that the number of key points must be consistent?

PeizhuoLi commented 4 years ago

Our architecture requires a consistent topology between training character and test character. Thus, if you want to test with a new topology you will need to retrain the model with your own dataset.

wuxiaolianggit commented 4 years ago

thank you very much for your reply @PeizhuoLi

fryegg commented 4 years ago

Hi, I convert example.bvh file to csv file, and I found the number of joint was 31: Hips Lhipjoint leftupleg leftleg leftfoot lefttoebase rhipjoint rightupleg rightleg rightfoot righttoebase lowerback spine spine1 neck neck1 head leftshoulder leftarm leftforearm lefthand leftfingerbase lefthandindex1 lthumb rightshoulder rightarm rightforearm righthand rightfingerbase righthandindex1 rthumb As I understand, the number of joints was 23. What difference between those?