Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,12 +36,11 @@ while True:
|
|
36 |
if not ret:
|
37 |
continue
|
38 |
|
39 |
-
|
40 |
-
rgb_small_frame = small_frame[:, :, ::-1]
|
41 |
|
42 |
if s:
|
43 |
-
face_locations = face_recognition.face_locations(
|
44 |
-
face_encodings = face_recognition.face_encodings(
|
45 |
face_names = []
|
46 |
|
47 |
for face_encoding in face_encodings:
|
|
|
36 |
if not ret:
|
37 |
continue
|
38 |
|
39 |
+
rgb_frame = frame[:, :, ::-1]
|
|
|
40 |
|
41 |
if s:
|
42 |
+
face_locations = face_recognition.face_locations(rgb_frame)
|
43 |
+
face_encodings = face_recognition.face_encodings(frame, face_locations)
|
44 |
face_names = []
|
45 |
|
46 |
for face_encoding in face_encodings:
|