athn-nik / teach

Official PyTorch implementation of the paper "TEACH: Temporal Action Compositions for 3D Humans"
https://teach.is.tue.mpg.de
Other
383 stars 40 forks source link

problem in interact_teach.py #18

Closed zhuangzhuang000 closed 1 year ago

zhuangzhuang000 commented 1 year ago

Hello! I tested your code separately on two different machines, the test was successful on the first and the following error appeared on the second machine, but I did not make any modifications, just the machines are different. I don't know how to solve it, can you help me? Error message display ‘‘Path /data/zss/Virtual_patient/teach/data/zss/Virtual_patient/teach/data/smpl_models/smplh does not exist! ’’, but the path should be [ data/zss/Virtual_patient/teach/data/smpl_models/smplh ], I don't understand why it repeated the path once. The second machine is ubuntu20.04, two GPU 3090

===============================================================================================

(zss_teach) desc@xxx:/data/zss/Virtual_patient/teach$ python interact_teach.py folder=./checkpoints/teach output=./output4 texts='[walk, sit down, wave hands, drink water, stand up]' durs='[5,5,5,5,5]' Global seed set to 1234 [03/11/22 11:12:06][main][INFO] - Loading model [03/11/22 11:12:07][torch.distributed.nn.jit.instantiator][INFO] - Created a temporary directory at /tmp/tmpkmgjgrnl [03/11/22 11:12:07][torch.distributed.nn.jit.instantiator][INFO] - Writing /tmp/tmpkmgjgrnl/_remote_module_non_sriptable.py Error executing job with overrides: ['folder=./checkpoints/teach', 'output=./output4', 'texts=[walk, sit down, wave hands, drink water, stand up]', 'durs=[5,5,5,5,5]'] Traceback (most recent call last): File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target return target(*args, **kwargs) File "/data/zss/Virtual_patient/teach/teach/transforms/rots2joints/smplh.py", line 58, in init self.smplh = SMPLHLayer(path, ext="pkl", gender=gender).eval() File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/smplx/body_models.py", line 761, in init super(SMPLHLayer, self).init( File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/smplx/body_models.py", line 575, in init assert osp.exists(smplh_path), 'Path {} does not exist!'.format( AssertionError: Path /data/zss/Virtual_patient/teach/data/zss/Virtual_patient/teach/data/smpl_models/smplh does not exist!

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target return target(*args, kwargs) File "/data/zss/Virtual_patient/teach/teach/model/teach.py", line 55, in init self.transforms = instantiate(transforms) File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 180, in instantiate return instantiate_node(config, args, recursive=recursive, convert=convert) File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 245, in instantiate_node value = instantiate_node( File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 249, in instantiate_node return _call_target(target, args, kwargs) File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 64, in _call_target raise type(e)( File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target return target(*args, **kwargs) File "/data/zss/Virtual_patient/teach/teach/transforms/rots2joints/smplh.py", line 58, in init self.smplh = SMPLHLayer(path, ext="pkl", gender=gender).eval() File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/smplx/body_models.py", line 761, in init super(SMPLHLayer, self).init( File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/smplx/body_models.py", line 575, in init assert osp.exists(smplh_path), 'Path {} does not exist!'.format( AssertionError: Error instantiating 'teach.transforms.rots2joints.smplh.SMPLH' : Path /data/zss/Virtual_patient/teach/data/zss/Virtual_patient/teach/data/smpl_models/smplh does not exist!

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/data/zss/Virtual_patient/teach/interact_teach.py", line 35, in _interact return interact(cfg) File "/data/zss/Virtual_patient/teach/interact_teach.py", line 57, in interact model = instantiate(cfg.model, File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 180, in instantiate return instantiate_node(config, args, recursive=recursive, convert=convert) File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 249, in instantiate_node return _call_target(target, args, kwargs) File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 64, in _call_target raise type(e)( File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target return target(*args, kwargs) File "/data/zss/Virtual_patient/teach/teach/model/teach.py", line 55, in init self.transforms = instantiate(transforms) File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 180, in instantiate return instantiate_node(config, args, recursive=recursive, convert=convert) File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 245, in instantiate_node value = instantiate_node( File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 249, in instantiate_node return _call_target(target, args, kwargs) File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 64, in _call_target raise type(e)( File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target return target(*args, kwargs) File "/data/zss/Virtual_patient/teach/teach/transforms/rots2joints/smplh.py", line 58, in init self.smplh = SMPLHLayer(path, ext="pkl", gender=gender).eval() File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/smplx/body_models.py", line 761, in init super(SMPLHLayer, self).init( File "/data/miniconda3/envs/zss_teach/lib/python3.9/site-packages/smplx/body_models.py", line 575, in init assert osp.exists(smplh_path), 'Path {} does not exist!'.format( AssertionError: Error instantiating 'teach.model.teach.TEACH' : Error instantiating 'teach.transforms.rots2joints.smplh.SMPLH' : Path /data/zss/Virtual_patient/teach/data/zss/Virtual_patient/teach/data/smpl_models/smplh does not exist!

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

athn-nik commented 1 year ago

Try to use absolute and not relative paths in the input command. It is getting duplicated because the current directory is not what you actually think it is.

zhuangzhuang000 commented 1 year ago

Try to use absolute and not relative paths in the input command. It is getting duplicated because the current directory is not what you actually think it is.

I changed it to an absolute path, and I made the same mistake. But I found out why. In teach/transforms/rots2joints/smplh.py, there is a code that says relp = rel p [rel _ p.index ('data')]. I know you meant the data file in the teach project, but the hard disk name of my machine happens to be 'data', which leads to an error.

wang-zm18 commented 1 year ago

Hello, I just want to ask anmother problem about interact_teach.py:

ImportError: Encountered error: type' object is not subscriptable when loading module 'teach.model.teach.TEACH'