InsightFace_Pytorch icon indicating copy to clipboard operation
InsightFace_Pytorch copied to clipboard

python face_verify.py error

Open bianxg opened this issue 4 years ago • 3 comments

I don't train and just want to test. Where can I download model_final.pth? Thanks

Traceback (most recent call last): File "face_verify.py", line 32, in learner.load_state(conf, 'final.pth', False, True) File "D:\10working\30project\face\insideface\InsightFace_Pytorch\Learner.py", line 82, in load_state self.model.load_state_dict(torch.load(save_path/'model_{}'.format(fixed_str))) File "D:\program\pytorch_insightface\lib\site-packages\torch\serialization.py", line 584, in load with _open_file_like(f, 'rb') as opened_file: File "D:\program\pytorch_insightface\lib\site-packages\torch\serialization.py", line 234, in _open_file_like return _open_file(name_or_buffer, mode) File "D:\program\pytorch_insightface\lib\site-packages\torch\serialization.py", line 215, in init super(_open_file, self).init(open(name, mode)) TypeError: invalid file: WindowsPath('work_space/models/model_final.pth')

bianxg avatar May 19 '20 07:05 bianxg

Did you get it fixed?

venkata-srinivasan avatar Jul 16 '20 04:07 venkata-srinivasan

Just add the absolute path.it is ok for me.

charmere avatar Sep 27 '20 09:09 charmere

I used the file and renamed it with "model_final.pth"

You can use another pretrained model instead this one

prohil avatar Apr 14 '21 05:04 prohil