Jeff-sjtu / HybrIK

Official code of "HybrIK: A Hybrid Analytical-Neural Inverse Kinematics Solution for 3D Human Pose and Shape Estimation", CVPR 2021
MIT License
1.16k stars 142 forks source link

FileNotFoundError: [Errno 2] No such file or directory: './pretrained_models/hybrik_hrnet.pth' #185

Open AmoghTiwari opened 11 months ago

AmoghTiwari commented 11 months ago

After installing all packages, on running the demo video script by using `python scripts/demo_video.py --video-name examples/dance.mp4 --out-dir res_dance --save-pk --save-im```, I get the above error. The full error message is enclosed below.


  warnings.warn(
/home/cvit/miniconda3/envs/hybrik/lib/python3.9/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=FasterRCNN_ResNet50_FPN_Weights.COCO_V1`. You can also use `weights=FasterRCNN_ResNet50_FPN_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
Loading model from ./pretrained_models/hybrik_hrnet.pth...
Traceback (most recent call last):
  File "/data/amogh/projects/HybrIK/scripts/demo_video.py", line 144, in <module>
    save_dict = torch.load(CKPT, map_location='cpu')
  File "/home/cvit/miniconda3/envs/hybrik/lib/python3.9/site-packages/torch/serialization.py", line 771, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "/home/cvit/miniconda3/envs/hybrik/lib/python3.9/site-packages/torch/serialization.py", line 270, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "/home/cvit/miniconda3/envs/hybrik/lib/python3.9/site-packages/torch/serialization.py", line 251, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: './pretrained_models/hybrik_hrnet.pth'```
AmoghTiwari commented 11 months ago

I was able to solve the above issue by renaming hybrik_hrnet48_w3dpw.pth to hybrik_hrnet.pth. And my code works now. @Jeff-sjtu : please confirm if this is a correct method to solve the above issue and won't cause some other unexpected behaviour (my code is working now)