paul-pias / Face-Recognition

Face Recognition using pre-trained model built-on Arcface was implemented on Pytorch.
86 stars 28 forks source link

Facing the following issue #1

Open intisarnaheen opened 3 years ago

intisarnaheen commented 3 years ago

I am facing the following error. I have tried to update the path of the facebank.pth in the utils.py file. Can you suggest any `solution??

arcface loaded {'data_path': PosixPath('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank'), 'work_path': PosixPath('work_space'), 'model_path': PosixPath('work_space/models'), 'log_path': PosixPath('work_space/log'), 'save_path': PosixPath('work_space/save'), 'input_size': [112, 112], 'embedding_size': 512, 'use_mobilfacenet': False, 'facebank_path': PosixPath('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank/facebank'), 'net_depth': 50, 'drop_ratio': 0.6, 'net_mode': 'ir_se', 'device': device(type='cuda', index=0), 'test_transform': Compose( ToTensor() Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) ), 'data_mode': 'emore', 'vgg_folder': PosixPath('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank/faces_vgg_112x112'), 'ms1m_folder': PosixPath('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank/faces_ms1m_112x112'), 'emore_folder': PosixPath('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank/faces_emore'), 'batch_size': 100, 'threshold': 1.5, 'face_limit': 10, 'min_face_size': 35} ir_se_50 model opened learner loaded Traceback (most recent call last): File "app.py", line 5, in from face_verify import faceRec File "/home/intisar/Documents/arcface/Face-Recognition-master/face_verify.py", line 39, in targets, names = load_facebank(conf) File "/home/intisar/Documents/arcface/Face-Recognition-master/utils.py", line 71, in load_facebank embeddings = torch.load('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank/facebank.pth') File "/home/intisar/miniconda3/envs/arcface/lib/python3.7/site-packages/torch/serialization.py", line 585, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "/home/intisar/miniconda3/envs/arcface/lib/python3.7/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'.

paul-pias commented 3 years ago

May I know your numpy version?

Deepak2405 commented 3 years ago

Is the issue solved?? I am facing the same issue

My numpy version is 1.19.1

I feel torch is not able to load model_final.pth from workspace/save folder.

I am not sure how to proceed. Can you suggest the solution?

zhangyuan1997 commented 2 years ago

I am facing the same issue.