Spaces:
Runtime error
Runtime error
Mohammed Innat
commited on
Commit
•
dce10e2
1
Parent(s):
00cde0b
Update holistic.py
Browse files- holistic.py +3 -2
holistic.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import mediapipe as mp
|
2 |
from utils import read_n_resize
|
3 |
|
4 |
-
def mp_holistic_fn(image):
|
5 |
mp_drawing = mp.solutions.drawing_utils
|
6 |
mp_drawing_styles = mp.solutions.drawing_styles
|
7 |
mp_holistic = mp.solutions.holistic
|
@@ -10,7 +10,8 @@ def mp_holistic_fn(image):
|
|
10 |
static_image_mode=True,
|
11 |
model_complexity=2,
|
12 |
enable_segmentation=True,
|
13 |
-
refine_face_landmarks=True
|
|
|
14 |
) as holistic:
|
15 |
image = read_n_resize(image, read=False)
|
16 |
results = holistic.process(image)
|
|
|
1 |
import mediapipe as mp
|
2 |
from utils import read_n_resize
|
3 |
|
4 |
+
def mp_holistic_fn(image, min_detect_conf=0.5):
|
5 |
mp_drawing = mp.solutions.drawing_utils
|
6 |
mp_drawing_styles = mp.solutions.drawing_styles
|
7 |
mp_holistic = mp.solutions.holistic
|
|
|
10 |
static_image_mode=True,
|
11 |
model_complexity=2,
|
12 |
enable_segmentation=True,
|
13 |
+
refine_face_landmarks=True,
|
14 |
+
min_detection_confidence=min_detect_conf
|
15 |
) as holistic:
|
16 |
image = read_n_resize(image, read=False)
|
17 |
results = holistic.process(image)
|