fr py code
fr py code
import face_recognition
import numpy as np
# Load an image of the known person to compare (replace with your image path)
known_image = face_recognition.load_image_file("known_person.jpg")
known_face_encoding = face_recognition.face_encodings(known_image)[0]
while True:
# Capture frame-by-frame
ret, frame = cap.read()
# Find all face locations and face encodings in the current frame
face_locations = face_recognition.face_locations(rgb_frame)
face_encodings = face_recognition.face_encodings(rgb_frame, face_locations)
= "Unknown"