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 257 forks source link

demo cannot find pytorch while pip shows is installed #26

Closed kabukunz closed 4 years ago

kabukunz commented 4 years ago

Hello there First of all kudos for this interesting project. I have tons of animation and from time to time I bang my head on how to port them gracefully...

I'm try to run the demo but it fails.

user:retargeting source demo.sh 
Traceback (most recent call last):
  File "eval_single_pair.py", line 2, in <module>
    import torch
ImportError: No module named torch
Traceback (most recent call last):
  File "demo.py", line 49, in <module>
    example('Aj', 'BigVegas', 'Dancing Running Man.bvh', 'intra', './examples/intra_structure')
  File "demo.py", line 45, in example
    height)
  File "/Users/max/Developer/Library/Graphics/moremocap/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'

Seems it cannot find pytorch, but my pip shows is installed:

user:retargeting pip list
Package          Version
---------------- --------
appnope          0.1.0
backcall         0.1.0
certifi          2019.3.9
decorator        4.4.2
future           0.18.2
ipython          7.13.0
ipython-genutils 0.2.0
jedi             0.17.0
macpack          1.0.3
numpy            1.16.2
parso            0.7.0
pexpect          4.8.0
pickleshare      0.7.5
pip              20.1.1
prompt-toolkit   3.0.5
ptyprocess       0.6.0
Pygments         2.6.1
scipy            1.4.1
setuptools       39.0.1
six              1.14.0
torch            1.5.0
tqdm             4.46.1
traitlets        4.3.3
wcwidth          0.1.9
wheel            0.34.2

Anyway, if I run eval_single_pair.py directly it works:

user:retargeting python eval_single_pair.py
usage: eval_single_pair.py [-h] [--save_dir SAVE_DIR]
                           [--cuda_device CUDA_DEVICE]
                           [--num_layers NUM_LAYERS]
                           [--learning_rate LEARNING_RATE] [--alpha ALPHA]
                           [--batch_size BATCH_SIZE] [--upsampling UPSAMPLING]
                           [--downsampling DOWNSAMPLING]
                           [--batch_normalization BATCH_NORMALIZATION]
                           [--activation ACTIVATION] [--rotation ROTATION]
                           [--data_augment DATA_AUGMENT]
                           [--epoch_num EPOCH_NUM] [--window_size WINDOW_SIZE]
                           [--kernel_size KERNEL_SIZE]
                           [--base_channel_num BASE_CHANNEL_NUM]
                           [--normalization NORMALIZATION] [--verbose VERBOSE]
                           [--skeleton_dist SKELETON_DIST]
                           [--skeleton_pool SKELETON_POOL]
                           [--extra_conv EXTRA_CONV]
                           [--padding_mode PADDING_MODE] [--dataset DATASET]
                           [--fk_world FK_WORLD] [--patch_gan PATCH_GAN]
                           [--debug DEBUG] [--skeleton_info SKELETON_INFO]
                           [--ee_loss_fact EE_LOSS_FACT] [--pos_repr POS_REPR]
                           [--D_global_velo D_GLOBAL_VELO]
                           [--gan_mode GAN_MODE] [--pool_size POOL_SIZE]
                           [--is_train IS_TRAIN] [--model MODEL]
                           [--epoch_begin EPOCH_BEGIN]
                           [--lambda_rec LAMBDA_REC]
                           [--lambda_cycle LAMBDA_CYCLE]
                           [--lambda_ee LAMBDA_EE]
                           [--lambda_global_pose LAMBDA_GLOBAL_POSE]
                           [--lambda_position LAMBDA_POSITION]
                           [--ee_velo EE_VELO] [--ee_from_root EE_FROM_ROOT]
                           [--scheduler SCHEDULER]
                           [--rec_loss_mode REC_LOSS_MODE]
                           [--adaptive_ee ADAPTIVE_EE]
                           [--simple_operator SIMPLE_OPERATOR]
                           [--use_sep_ee USE_SEP_EE] [--eval_seq EVAL_SEQ]
                           --input_bvh INPUT_BVH --target_bvh TARGET_BVH
                           --test_type TEST_TYPE --output_filename
                           OUTPUT_FILENAME
eval_single_pair.py: error: the following arguments are required: --input_bvh, --target_bvh, --test_type, --output_filename

That means a python scripts run directly finds pytorch ok. Maybe could be something related to os.system calls? My setup:

Mac Os X 10.14.3 Mojave default python.org Python 3.7.0, no envs

Thank you

ANYMS-A commented 4 years ago

It is because that in line #34 of the demo.py, try to replace the "python eval_single_pair..." by "python3 eval_single_pair.."

kabukunz commented 4 years ago

Yes, thank you. It worked. I should've known...