arunmandal53 / facematch

Face match in python using Facenet and their pretrained model
99 stars 51 forks source link

What does the distance=-1 means? #9

Closed vba34520 closed 5 years ago

vba34520 commented 5 years ago

I matched a close picture and a far picture of me. The match result is distance = -1. I guess the far one can't not detect the face. Looking forward to your reply ! Thanks.

arunmandal53 commented 5 years ago

face is not detected so returned -1.

vba34520 commented 5 years ago

Thank you very much. So I think it's more reasonable that the print of face_match_demo.py change into print("Result = " + ("same person" if (distance <= threshold and distance != -1) else "different person"))