-1

import face_recognition

known_image = face_recognition.load_image_file("passport.png")

unknown_image = face_recognition.load_image_file("myphoto.png")

biden_encoding = face_recognition.face_encodings(known_image)[0]

unknown_encoding = face_recognition.face_encodings(unknown_image)[0]

results = face_recognition.compare_faces([biden_encoding], unknown_encoding)

print(results)

  • Generally its taking 10 seconds to give output. Do I need to run this script on high configured GPU? – sachin suryawanshi May 26 '21 at 12:27
  • 1
    Welcome to [Stack Overflow.](https://stackoverflow.com/ "Stack Overflow") Please be aware this is not a code-writing or tutoring service. We can help solve specific, technical problems, not open-ended requests for code or advice. Please edit your question to show what you have tried so far, and what specific problem you need help with. See the [How To Ask a Good Question](https://stackoverflow.com/help/how-to-ask "How To Ask a Good Question") page for details on how to best help us help you. – itprorh66 May 26 '21 at 12:42
  • I don't know this module at all, but if it was me, I would put some timing prints in there to see what was taking all the time as a first step. – JonSG May 26 '21 at 12:55

1 Answers1

0

I would recommend following Adrian at pyimagesearch. He's a Phd comp sci person that puts out ALOT of material for computer vision. I can gaurentee that the info you are looking for, he has a blog about it. Probably even different versions for how to put on a rasp pi too like this home security blog post. Good luck! His books are good too

bbartling
  • 3,288
  • 9
  • 43
  • 88