Spaces:
Runtime error
Runtime error
Shafeek Saleem
commited on
Commit
·
1029b86
1
Parent(s):
9b42807
face recog fixed
Browse files
pages/4_Face Recognition.py
CHANGED
|
@@ -66,11 +66,12 @@ def step4_page():
|
|
| 66 |
matches = face_recognition.compare_faces(known_face_encodings, face_encoding)
|
| 67 |
|
| 68 |
name = "Unknown"
|
| 69 |
-
|
| 70 |
# If a match was found in known_face_encodings, just use the first one.
|
| 71 |
face_distances = face_recognition.face_distance(known_face_encodings, face_encoding)
|
| 72 |
st.write(face_distances)
|
| 73 |
best_match_index = np.argmin(face_distances)
|
|
|
|
| 74 |
if matches[best_match_index]:
|
| 75 |
name = known_face_names[best_match_index]
|
| 76 |
|
|
|
|
| 66 |
matches = face_recognition.compare_faces(known_face_encodings, face_encoding)
|
| 67 |
|
| 68 |
name = "Unknown"
|
| 69 |
+
st.write(matches)
|
| 70 |
# If a match was found in known_face_encodings, just use the first one.
|
| 71 |
face_distances = face_recognition.face_distance(known_face_encodings, face_encoding)
|
| 72 |
st.write(face_distances)
|
| 73 |
best_match_index = np.argmin(face_distances)
|
| 74 |
+
st.write(best_match_index)
|
| 75 |
if matches[best_match_index]:
|
| 76 |
name = known_face_names[best_match_index]
|
| 77 |
|