ElenaRyumina
commited on
Commit
β’
8416b80
1
Parent(s):
e761828
Update app/app_utils.py
Browse files- app/app_utils.py +3 -3
app/app_utils.py
CHANGED
@@ -25,12 +25,12 @@ def preprocess_image_and_predict(inp):
|
|
25 |
inp = np.array(inp)
|
26 |
|
27 |
if inp is None:
|
28 |
-
return None, None
|
29 |
|
30 |
try:
|
31 |
h, w = inp.shape[:2]
|
32 |
except Exception:
|
33 |
-
return None, None
|
34 |
|
35 |
with mp_face_mesh.FaceMesh(
|
36 |
max_num_faces=1,
|
@@ -60,7 +60,7 @@ def preprocess_image_and_predict(inp):
|
|
60 |
return cur_face, heatmap, confidences
|
61 |
|
62 |
else:
|
63 |
-
return None, None
|
64 |
|
65 |
def preprocess_video_and_predict(video):
|
66 |
|
|
|
25 |
inp = np.array(inp)
|
26 |
|
27 |
if inp is None:
|
28 |
+
return None, None, None
|
29 |
|
30 |
try:
|
31 |
h, w = inp.shape[:2]
|
32 |
except Exception:
|
33 |
+
return None, None, None
|
34 |
|
35 |
with mp_face_mesh.FaceMesh(
|
36 |
max_num_faces=1,
|
|
|
60 |
return cur_face, heatmap, confidences
|
61 |
|
62 |
else:
|
63 |
+
return None, None, None
|
64 |
|
65 |
def preprocess_video_and_predict(video):
|
66 |
|