You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
face_recognition version: Latest Version
Python version: 3.8
Operating System: Windows
Description
LFW evaluation is essential for evaluating whether or not we are using the model correctly. Can you please provide an example of how to call the model for LFW evaluation (image loading to encoding comparison at least), and state what the LFW accuracy of the model is?
What I Did
This is how I run the model when calculating tp, fp, tn for LFW evaluation. I am getting an average over the 10 k_folds of about 96.6% accuracy.
# load the input image and convert it from BGR (OpenCV ordering)
# to dlib ordering (RGB)
rgb_a = cv2.cvtColor(cv2.imread(img_a), cv2.COLOR_BGR2RGB)
rgb_b = cv2.cvtColor(cv2.imread(img_b), cv2.COLOR_BGR2RGB)
# detect the (x, y)-coordinates of the bounding boxes
# corresponding to each face in the input image
boxes_a = face_recognition.face_locations(rgb_a, model=args["detection_method"])
boxes_b = face_recognition.face_locations(rgb_b, model=args["detection_method"])
# compute the facial embedding for the face
encodings_a = face_recognition.face_encodings(rgb_a, boxes_a)
encodings_b = face_recognition.face_encodings(rgb_b, boxes_b)
...
for encoding in encodings_b:
matches = face_recognition.compare_faces(encodings_a, encoding, tolerance=th) # check encodings_a for each encoding in encodings_b
is_match = True in matches
if is_match:
# stop early if a match is found
break
Thanks in advance, love the repo!
The text was updated successfully, but these errors were encountered:
face_recognition version: Latest Version
Python version: 3.8
Operating System: Windows
Description
LFW evaluation is essential for evaluating whether or not we are using the model correctly. Can you please provide an example of how to call the model for LFW evaluation (image loading to encoding comparison at least), and state what the LFW accuracy of the model is?
What I Did
This is how I run the model when calculating tp, fp, tn for LFW evaluation. I am getting an average over the 10 k_folds of about 96.6% accuracy.
Thanks in advance, love the repo!
The text was updated successfully, but these errors were encountered: