Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small mistake PyPi Doccumentation #1451

Open
AzlanCoding opened this issue Oct 21, 2022 · 0 comments
Open

Small mistake PyPi Doccumentation #1451

AzlanCoding opened this issue Oct 21, 2022 · 0 comments

Comments

@AzlanCoding
Copy link

AzlanCoding commented Oct 21, 2022

  • face_recognition version: NA
  • Python version: NA
  • Operating System:
    NA

Description

In https://pypi.org/project/face-biometric-recognition/
the last code example is as follows:

import face_biometric_recognition

picture_of_me = face_biometric_recognition.load_image_file("me.jpg")
my_face_encoding = face_biometric_recognition.face_encodings(picture_of_me)[0]

# my_face_encoding now contains a universal 'encoding' of my facial features
# that can be compared to any other picture of a face!

unknown_picture = face_biometric_recognition.load_image_file("unknown.jpg")
unknown_face_encoding = face_biometric_recognition.face_encodings(unknown_picture)[0]

# Now we can see the two face encodings
# are of the same person with `compare_faces`!

results = face_biometric_recognition.compare_faces(
    [my_face_encoding], unknown_face_encoding
)

if results[0] is True:
    print("It's a picture of me!")
else:
    print("It's not a picture of me!")

however it should be if results[0] == True: for the ease of beginners.
Describe what you were trying to get done:
NA
Tell us what happened, what went wrong, and what you expected to happen:
IMPORTANT: If your issue is related to a specific picture, include it so others can reproduce the issue.

What I Did

NA

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant