yzhq97 / transmomo.pytorch

This is the official PyTorch implementation of the CVPR 2020 paper "TransMoMo: Invariance-Driven Unsupervised Video Motion Retargeting".
https://yzhq97.github.io/transmomo/
391 stars 54 forks source link

Error when running infer_pair.py #7

Closed RusticKey closed 3 years ago

RusticKey commented 3 years ago

Hello, I am interested in running your code. The test.py runs fine, however when I try to run the infer_pair.py file with the following command

python infer_pair.py --config configs/transmomo.yaml --checkpoint transmomo_mixamo_36_800_24/checkpoints/autoencoder_00200000.pt --source data/mixamo/36_800_24/test_random_rotate/SPORTY_GRANY/Pulling_A_Rope/Pulling_A_Rope.npy --target "data/mixamo/36_800_24/test_random_rotate/TY/Golf_Tee_Up_(1)/Golf_Tee_Up_(1).npy" --source_width 1280 --source_height 720 --target_height 1080 --target_width 1920

I get the following error

Traceback (most recent call last):
  File "infer_pair.py", line 87, in <module>
    main(config, args)
  File "infer_pair.py", line 77, in main
    x_cross = postprocess(x_cross, mean_pose, std_pose, unit=1.0, start=x_src_start)
  File "/home/rk/projects/transmomo.pytorch/lib/util/motion.py", line 27, in postprocess
    motion = globalize_motion(motion, start=start)
  File "/home/rk/projects/transmomo.pytorch/lib/util/motion.py", line 100, in globalize_motion
    centers += start.reshape([2, 1])
ValueError: cannot reshape array of size 3 into shape (2,1)

It's also the same error with other pairs of motion.

Is there something wrong? Thanks.

yzhq97 commented 3 years ago

Thanks for your interest. The input to infer_pair.py is supposed to be in 2D instead of 3D.

LiuXY3366 commented 12 months ago

Have you solved this problem?