Code Monkey home page Code Monkey logo

Comments (5)

tikitong avatar tikitong commented on May 30, 2024 1

@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')

from cvpr2022-dagan.

balumuriraj avatar balumuriraj commented on May 30, 2024 1

Thanks @tikitong . It is working now.

from cvpr2022-dagan.

harlanhong avatar harlanhong commented on May 30, 2024

The path is wrong, you could figure it out by yourself. Just put the .pth file in the right path.

from cvpr2022-dagan.

tikitong avatar tikitong commented on May 30, 2024

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?

from cvpr2022-dagan.

balumuriraj avatar balumuriraj commented on May 30, 2024

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
loaded_dict_enc = torch.load('depth/models/weights_19/encoder.pth')
File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/torch/serialization.py", line 771, in load
with _open_file_like(f, 'rb') as opened_file:
File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/torch/serialization.py", line 270, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/Users/user/opt/anaconda3/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: 'depth/models/weights_19/encoder.pth'

from cvpr2022-dagan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.