SamYuen101234 / Masked_Face_Recognition

2020/2021 HKUST CSE FYP Masked Facial Recognition, developer: Sam Yuen, Alex Xie, Tony Cheng
https://github.com/SamYuen101234/maskedfacerecognition
MIT License
118 stars 32 forks source link

Gettting eror while running main_test.py. #4 #28

Open m22aie221 opened 1 year ago

m22aie221 commented 1 year ago

We are trying to recreate your execellent work.

We are using facenet = torch.load('../Model/InceptionResNetV1_ArcFace.pt') from the shared gDrive we are getting error in the line distance = torch.norm(eval_out - eval_pait_out, dim=1) can you please help in getting over this issue ?


(model-training) C:\Users\ranji\AML-ReferenceCode\Masked_Face_Recognition\Code>python ./main_test.py Device: cpu 0%| | 0/456 [00:22<?, ?it/s] Traceback (most recent call last): File "C:\Users\ranji\AML-ReferenceCode\Masked_Face_Recognition\Code\main_test.py", line 72, in dist_threshold = evalulate(facenet, eval_loader1, eval_loader2, device) File "C:\Users\ranji\AML-ReferenceCode\Masked_Face_Recognition\Code\test.py", line 56, in evalulate dist1 = result(model,eval_loader1, device) File "C:\Users\ranji\AML-ReferenceCode\Masked_Face_Recognition\Code\test.py", line 42, in result distance = torch.norm(eval_out - eval_pait_out, dim=1) TypeError: unsupported operand type(s) for -: 'dict' and 'dict'