DigiHeir_DigitalLegacyManager / biometric_auth.py
shaheerawan3's picture
Create biometric_auth.py
e84eb90 verified
raw
history blame contribute delete
368 Bytes
# New biometric_auth.py
import cv2
import face_recognition
class BiometricAuth:
def verify_face(self, image_path, stored_encoding):
current_image = face_recognition.load_image_file(image_path)
current_encoding = face_recognition.face_encodings(current_image)[0]
return face_recognition.compare_faces([stored_encoding], current_encoding)[0]