Kebii / R2ET

(CVPR 2023) Skinned Motion Retargeting with Residual Perception of Motion Semantics & Geometry
MIT License
168 stars 11 forks source link

Describe inference_bvh_cfg.yaml #10

Open RaviTej310 opened 1 year ago

RaviTej310 commented 1 year ago

Hi, can you please describe the inference config file.

phase: test
num_joint: 22
weights: ./pretrain/shape_aware.pt
device: [0]
save_path: ./save/inference/
k: 0.8

load_inp_data:
  inp_shape_path: ./datasets/mixamo/test_shape/Ortiz.npz
  tgt_shape_path: ./datasets/mixamo/test_shape/Sporty_Granny.npz
  stats_path: ./datasets/mixamo/stats
  inp_bvh_path: ./datasets/mixamo/demo/Ortiz/Gangnam Style.bvh
  tgt_bvh_path: ./datasets/mixamo/demo/Sporty_Granny/Gangnam Style.bvh

ret_model_args:
  num_joint: 22
  token_channels: 64
  hidden_channels_p: 256
  embed_channels_p: 128
  kp: 1.0

What are the load_inp_data arguments? Suppose I have a zombie 3d asset and I animated it using Mixamo to do the Hip Hop Dance sequence. Then I trained the skeleton and shape networks using the bvh file for the zombie animation. How can I do inference to make the same zombie do Gangnam style dance? How do I get the Gangnam style bvh file for my zombie that I assume I should feed into inp_bvh_path?

If I use this:

load_inp_data:
  inp_shape_path: ./datasets/mixamo/csm_test_shape/zombie.npz
  tgt_shape_path: ./datasets/mixamo/test_shape/Sporty_Granny.npz
  stats_path: ./datasets/mixamo/stats
  inp_bvh_path: ./datasets/mixamo/csm_train_char/zombie/Hip Hop Dancing on zombie.bvh
  tgt_bvh_path: ./datasets/mixamo/demo/Sporty_Granny/Gangnam Style.bvh

it leads to errors like this:

Load Success. ./datasets/mixamo/csm_train_char/csm_1/Hip Hop Dancing on SESSION_1691283445_2118653.bvh
Load Success. ./datasets/mixamo/demo/Sporty_Granny/Gangnam Style.bvh
Sequence length: 414
Traceback (most recent call last):
  File "/home/ravi/R2ET/inference_bvh.py", line 590, in <module>
    main(arg)
  File "/home/ravi/R2ET/inference_bvh.py", line 571, in main
    inference(retarget_net, parents, arg)
  File "/home/ravi/R2ET/inference_bvh.py", line 540, in inference
    tjoints[:, 0, :] = wjs[0, :, 0].copy()
ValueError: could not broadcast input array from shape (414,3) into shape (742,3)

which seems to indicate that both the input and target bvh files should be of the same animation sequence. But I don't have the sequence of the zombie doing the Gangnam style dance

Abinton commented 7 months ago

I met the same problem, how do you solve it ?