Closed 1092366225 closed 3 years ago
What happens if you just run python run.py
?
Well I download the linknet.pth from the GoogleDrive then the error disappeared. But it seems too slow on cpu.
Thanks for sharing your project with the community.
It also worked for me once I downloaded the linknet.pth file from your google drive.
Since my computer does not have a CUDA gpu I had to make this small change self.model.load_state_dict(torch.load('linknet.pth',map_location='cpu'))
to this line https://github.com/nasir6/rPPG/blob/2e1855d923696e38aa3bda9d43bbc9e73d028c65/capture_frames.py#L20
Unfortunately it also ran too slow om my machine with the usb camera and python3 run.py
Unfortunately, face segmentation requires a GPU device for real-time performance. So it is expected to be slow on the CPU.
hi, there is an error when I run the code:
(py36) E:\github\rPPG-master\rPPG-master>python run.py --source=0 --frame-rate=25 init Traceback (most recent call last): File "run.py", line 66, in
runPOS(source)
File "run.py", line 39, in call
capture = CaptureFrames(self.batch_size, source, show_mask=True)
File "E:\github\rPPG-master\rPPG-master\capture_frames.py", line 20, in init
self.model.load_state_dict(torch.load('linknet.pth'))
File "D:\Anaconda\envs\py36\lib\site-packages\torch\serialization.py", line 585, in load
return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args)
File "D:\Anaconda\envs\py36\lib\site-packages\torch\serialization.py", line 755, in _legacy_load
magic_number = pickle_module.load(f, pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.