TreB1eN / InsightFace_Pytorch

Pytorch0.4.1 codes for InsightFace
MIT License
1.74k stars 423 forks source link

python face_verify.py error #140

Open bianxg opened 4 years ago

bianxg commented 4 years ago

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(savepath/'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')

venkata-srinivasan commented 4 years ago

Did you get it fixed?

charmere commented 4 years ago

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

prohil commented 3 years ago

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

You can use another pretrained model instead this one