Closed tikitong closed 1 year ago
The path is wrong, you could figure it out by yourself. Just put the .pth file in the right path.
Yes I have changed the path, thanks. Just to know, where does the base path depth/models/weights_19/encoder.pth
come from? Did you use the same weight files as the ones provided in the one drive for the demo?
I am also having the same error. How to fix this issue?
CUDA_VISIBLE_DEVICES=0 python demo.py --config config/vox-adv-256.yaml --driving_video driving.mp4 --source_image input.jpeg --checkpoint Checkpoint/DaGAN_vox_adv_256.pth.tar --relative --adapt_scale --kp_num 15 --generator DepthAwareGenerator --cpu
/Users/user/opt/anaconda3/lib/python3.9/site-packages/torchvision/models/_utils.py:135: UserWarning: Using 'weights' as positional parameter(s) is deprecated since 0.13 and may be removed in the future. Please use keyword parameter(s) instead.
warnings.warn(
/Users/user/opt/anaconda3/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=None
.
warnings.warn(msg)
Traceback (most recent call last):
File "/Users/user/Workspace/Code/Apps/CVPR2022-DaGAN/demo.py", line 165, in
@balumuriraj you need to download the pre-trained checkpoints from the readme. And in the demo.py file:
Replace
loaded_dict_enc = torch.load('depth/models/weights_19/encoder.pth')
by loaded_dict_enc = torch.load('checkpoints/depth_face_model/encoder.pth')
loaded_dict_dec = torch.load('depth/models/weights_19/depth.pth')
with loaded_dict_enc = torch.load('checkpoints/depth_face_model/depth.pth')
Thanks @tikitong . It is working now.
I downloaded the pre-trained weights from the onedrive
DaGAN_vox_adv_256.pth.tar
and put it in a checkpoints directory. When I run the demo command with --cpu I get the following error:How can I solve it? Many thanks, great job and good luck for ICLR :) !