Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -90,15 +90,15 @@ def receive_image(image):
|
|
90 |
# csv_writer = csv.writer(csv_file)
|
91 |
small_frame = cv2.resize(image, (0, 0), fx=0.25, fy=0.25)
|
92 |
rgb_small_frame = small_frame[:, :, ::-1]
|
93 |
-
emit("result",{"name":"level " +str(cnt),"score":str(len(face_encodings))})
|
94 |
-
emit("result",{"name":"level1","score":"34"})
|
95 |
face_locations = face_recognition.face_locations(rgb_small_frame)
|
96 |
face_encodings = face_recognition.face_encodings(small_frame, face_locations)
|
97 |
face_names = []
|
98 |
-
emit("result",{"name":"level2 " +str(cnt),"score":str(len(face_encodings))})
|
99 |
cnt = cnt +1
|
100 |
for face_encoding in face_encodings:
|
101 |
-
emit("result",{"name":"in for ","score":"34"})
|
102 |
matches = face_recognition.compare_faces(known_face_encodings, face_encoding)
|
103 |
name = ""
|
104 |
face_distance = face_recognition.face_distance(known_face_encodings, face_encoding)
|
|
|
90 |
# csv_writer = csv.writer(csv_file)
|
91 |
small_frame = cv2.resize(image, (0, 0), fx=0.25, fy=0.25)
|
92 |
rgb_small_frame = small_frame[:, :, ::-1]
|
93 |
+
# emit("result",{"name":"level " +str(cnt),"score":str(len(face_encodings))})
|
94 |
+
# emit("result",{"name":"level1","score":"34"})
|
95 |
face_locations = face_recognition.face_locations(rgb_small_frame)
|
96 |
face_encodings = face_recognition.face_encodings(small_frame, face_locations)
|
97 |
face_names = []
|
98 |
+
# emit("result",{"name":"level2 " +str(cnt),"score":str(len(face_encodings))})
|
99 |
cnt = cnt +1
|
100 |
for face_encoding in face_encodings:
|
101 |
+
# emit("result",{"name":"in for ","score":"34"})
|
102 |
matches = face_recognition.compare_faces(known_face_encodings, face_encoding)
|
103 |
name = ""
|
104 |
face_distance = face_recognition.face_distance(known_face_encodings, face_encoding)
|