nasir6 / rPPG

265 stars 88 forks source link

_pickle.UnpicklingError: invalid load key, 'v'. on Ubuntu 22.04 #27

Open snowuyl opened 1 year ago

snowuyl commented 1 year ago

Downloading: "https://download.pytorch.org/models/resnet34-b627a593.pth" to /home/snowuyl/.cache/torch/hub/checkpoints/resnet34-b627a593.pth 100.0% Traceback (most recent call last): File "/home/snowuyl/samba/workspace_Python/rPPG/run.py", line 65, in runPOS(source) File "/home/snowuyl/samba/workspace_Python/rPPG/run.py", line 39, in call capture = CaptureFrames(self.batch_size, source, show_mask=True) File "/home/snowuyl/samba/workspace_Python/rPPG/capture_frames.py", line 20, in init self.model.load_state_dict(torch.load('linknet.pth')) File "/home/snowuyl/.local/lib/python3.10/site-packages/torch/serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "/home/snowuyl/.local/lib/python3.10/site-packages/torch/serialization.py", line 920, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.

aljasser commented 1 year ago

I resolve this issue by downloading the file using git lfs, you can remove linknet.pth, and run: git lfs install, git lfs pull

Magicyp commented 1 year ago

What file is git lfs and where to download it

burn-gif commented 10 months ago

I resolve this issue by downloading the file using git lfs, you can remove linknet.pth, and run: git lfs install, git lfs pull

:git lfs pull

Git LFS: (0 of 1 files) 0 B / 83.27 MB
batch response: Post https://github.com/nasir6/rPPG.git/info/lfs/objects/batch: dial tcp 20.205.243.166:443: getsockopt: connection refused error: failed to fetch some objects from 'https://github.com/nasir6/rPPG.git/info/lfs'

Hello I also encountered this error, try your method, encountered the above error, it seems that the git lfs website is not connected