Face Recognition from given pictures

Photo by Arno Senoner on Unsplash

Face Recognition from given two Input pictures.

import face_recognitionpicture_of_me = face_recognition.load_image_file("mine.jpeg")
my_face_encoding = face_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_recognition.load_image_file("unknown.jpeg")
unknown_face_encoding = face_recognition.face_encodings(unknown_picture)[0]
# Now we can see the two face encodings are of the same person with `compare_faces`!results = face_recognition.compare_faces([my_face_encoding], unknown_face_encoding)if results[0] == True:
print("It's a picture of me!")
else:
print("It's not a picture of me!")

If both Input Images will be same then Output will be It’s picture of me!

For any queries or project help contact

Mail : vatshayan007@gmail.com

--

--

Shivam Vatshayan

Blockchain Developer || Project Developer || Software Engineer