root@ljzxb-To-be-filled-by-O-E-M:/InsightFace_Pytorch# python face_verify.py
mtcnn loaded
{'embedding_size': 512, 'facebank_path': PosixPath('data/facebank'), 'log_path': PosixPath('work_space/log'), 'data_path': PosixPath('data'), 'data_mode': 'emore', 'min_face_size': 30, 'threshold': 1.5, 'use_mobilfacenet': True, 'drop_ratio': 0.6, 'save_path': PosixPath('work_space/save'), 'input_size': [112, 112], 'vgg_folder': PosixPath('data/faces_vgg_112x112'), 'batch_size': 100, 'emore_folder': PosixPath('data/faces_emore'), 'ms1m_folder': PosixPath('data/faces_ms1m_112x112'), 'device': device(type='cpu'), 'face_limit': 10, 'net_mode': 'ir_se', 'work_path': PosixPath('work_space'), 'net_depth': 50, 'test_transform': Compose(
ToTensor()
Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
), 'model_path': PosixPath('work_space/models')}
MobileFaceNet model generated
Traceback (most recent call last):
File "face_verify.py", line 29, in
learner.load_state(conf, 'cpu_final.pth', False, True)
File "/home/ljzxb/Face/work/InsightFace_Pytorch/Learner.py", line 82, in load_state
self.model.load_state_dict(torch.load(savepath/'model{}'.format(fixed_str)))
File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 387, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 549, in _load
_check_seekable(f)
File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 194, in _check_seekable
raise_err_msg(["seek", "tell"], e)
File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 187, in raise_err_msg
raise type(e)(msg)
AttributeError: 'PosixPath' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead.
root@ljzxb-To-be-filled-by-O-E-M:/InsightFace_Pytorch# python face_verify.py mtcnn loaded {'embedding_size': 512, 'facebank_path': PosixPath('data/facebank'), 'log_path': PosixPath('work_space/log'), 'data_path': PosixPath('data'), 'data_mode': 'emore', 'min_face_size': 30, 'threshold': 1.5, 'use_mobilfacenet': True, 'drop_ratio': 0.6, 'save_path': PosixPath('work_space/save'), 'input_size': [112, 112], 'vgg_folder': PosixPath('data/faces_vgg_112x112'), 'batch_size': 100, 'emore_folder': PosixPath('data/faces_emore'), 'ms1m_folder': PosixPath('data/faces_ms1m_112x112'), 'device': device(type='cpu'), 'face_limit': 10, 'net_mode': 'ir_se', 'work_path': PosixPath('work_space'), 'net_depth': 50, 'test_transform': Compose( ToTensor() Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) ), 'model_path': PosixPath('work_space/models')} MobileFaceNet model generated Traceback (most recent call last): File "face_verify.py", line 29, in
learner.load_state(conf, 'cpu_final.pth', False, True)
File "/home/ljzxb/Face/work/InsightFace_Pytorch/Learner.py", line 82, in load_state
self.model.load_state_dict(torch.load(savepath/'model{}'.format(fixed_str)))
File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 387, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 549, in _load
_check_seekable(f)
File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 194, in _check_seekable
raise_err_msg(["seek", "tell"], e)
File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 187, in raise_err_msg
raise type(e)(msg)
AttributeError: 'PosixPath' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead.