Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkinExtractionFaceParsing torch model issue #84

Open
aytekin827 opened this issue Aug 8, 2023 · 1 comment
Open

SkinExtractionFaceParsing torch model issue #84

aytekin827 opened this issue Aug 8, 2023 · 1 comment

Comments

@aytekin827
Copy link

hello,
first of all it's really great work for rPPG task.
thank you so much!

now I'm on following the pipeline which is pyVHR library

I got this error message from "skin_extraction_methods.py" when initializing SkinExtractionFaceParsing class object.


File "C:\Users\ok\anaconda3\envs\pyvhr\lib\site-packages\pyVHR\extraction\skin_extraction_methods.py", line 72, in init
self.net.load_state_dict(torch.load(save_pth, map_location=torch.device('cpu')))
File "C:\Users\ok\anaconda3\envs\pyvhr\lib\site-packages\torch\serialization.py", line 608, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "C:\Users\ok\anaconda3\envs\pyvhr\lib\site-packages\torch\serialization.py", line 777, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\x0a'.

what I tried for trouble shooting

  1. check path whether it is right
  2. re-downloaded "19999_iter.pth" file again

if anyone has same problem could you give some way to deal with this problem?

thank you so much

@mbpictures
Copy link

Hi! I had the same error. Check this line the URL to the pre-trained model is wrong and therefor it downloads the 404 error page of GitHub. I fixed the issue by manually downloading the model and placing it inside of the resources/faceparsing/ folder. Alternatively, you can replace the URL in the python script. The correct URL for the model is:
https://github.com/phuselab/pyVHR/raw/master/resources/faceparsing/79999_iter.pth

Hope this helps you! Maybe one of the maintainers can correct the URL of the package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants