1

I recently saw the YouTube tutorial Getting Started with Face Recognition in Python and tried to follow it myself. Here is the code I tried:

import face_recognition
import numpy as np

image=face_recognition.load_image_file('IMG_1000.jpg')
unknown=face_recognition.load_image_file('img_0892.jpg')

actual_encoding=  face_recognition.face_encodings(image)[0]
unknown_encoding= face_recognition.face_encodings(unknown)[0]

results=face_recognition.compare_faces([actual_encoding],unknown_encoding)
print(results)

The two images referred to in the above code are: Image 1 and Image 2 which are, as you can see,the same person.

The output, however is:

`[False]`

Did I do something wrong? If not, what library would you recommend to get accurate predictions on similar pictures?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.