Spaces:
Runtime error
Runtime error
Shafeek Saleem
commited on
Commit
•
679ac1e
1
Parent(s):
1029b86
sdsad
Browse files- app.py → 0_Introduction.py +0 -0
- README.md +1 -1
- pages/4_Face Recognition.py +4 -1
app.py → 0_Introduction.py
RENAMED
File without changes
|
README.md
CHANGED
@@ -5,7 +5,7 @@ colorFrom: pink
|
|
5 |
colorTo: gray
|
6 |
sdk: streamlit
|
7 |
sdk_version: 1.21.0
|
8 |
-
app_file:
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
---
|
|
|
5 |
colorTo: gray
|
6 |
sdk: streamlit
|
7 |
sdk_version: 1.21.0
|
8 |
+
app_file: 0_Introduction.py
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
---
|
pages/4_Face Recognition.py
CHANGED
@@ -70,7 +70,10 @@ def step4_page():
|
|
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 |
-
|
|
|
|
|
|
|
74 |
st.write(best_match_index)
|
75 |
if matches[best_match_index]:
|
76 |
name = known_face_names[best_match_index]
|
|
|
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 |
+
st.write(face_distances.shape)
|
74 |
+
# Calculate the row sums
|
75 |
+
row_sums = np.sum(face_distances, axis=1)
|
76 |
+
best_match_index = np.argmin(row_sums)
|
77 |
st.write(best_match_index)
|
78 |
if matches[best_match_index]:
|
79 |
name = known_face_names[best_match_index]
|