Spaces:
Runtime error
Runtime error
Shafeek Saleem
commited on
Commit
·
f36346b
1
Parent(s):
16b122a
added face encodings page dhk
Browse files
pages/3_Face Encodings.py
CHANGED
@@ -59,9 +59,8 @@ def step3_page():
|
|
59 |
if len(images) > 0:
|
60 |
for i, img in enumerate(images):
|
61 |
face_image = face_recognition.load_image_file(os.path.join(img_dir, img))
|
62 |
-
my_face_encoding = face_recognition.face_encodings(face_image)
|
63 |
my_bar.progress(int((i + 1) / len(images) * 100), text="Generating face encodings...")
|
64 |
-
face_encodings_dict[img.split("_")[1]] =
|
65 |
my_bar.progress(100, text="Successfully encoded all the known faces!")
|
66 |
st.success("Face encoding completed successfully!")
|
67 |
with open(os.path.join(".sessions", get_login()["username"], "face_encodings.json"), "w") as write_file:
|
|
|
59 |
if len(images) > 0:
|
60 |
for i, img in enumerate(images):
|
61 |
face_image = face_recognition.load_image_file(os.path.join(img_dir, img))
|
|
|
62 |
my_bar.progress(int((i + 1) / len(images) * 100), text="Generating face encodings...")
|
63 |
+
face_encodings_dict[img.split("_")[1]] = face_recognition.face_encodings(face_image).tolist()
|
64 |
my_bar.progress(100, text="Successfully encoded all the known faces!")
|
65 |
st.success("Face encoding completed successfully!")
|
66 |
with open(os.path.join(".sessions", get_login()["username"], "face_encodings.json"), "w") as write_file:
|