Spaces:
Build error
Build error
fix(app): fix mediapipe
Browse files
app.py
CHANGED
|
@@ -75,13 +75,6 @@ else:
|
|
| 75 |
model_input_height = image_processor.size['height']
|
| 76 |
model_input_width = image_processor.size['width']
|
| 77 |
|
| 78 |
-
keypoints_detector = holistic.Holistic(
|
| 79 |
-
static_image_mode=False,
|
| 80 |
-
model_complexity=1,
|
| 81 |
-
enable_segmentation=True,
|
| 82 |
-
refine_face_landmarks=True,
|
| 83 |
-
)
|
| 84 |
-
|
| 85 |
transform = Compose(
|
| 86 |
[
|
| 87 |
Lambda(lambda x: x / 255.0),
|
|
@@ -95,6 +88,13 @@ def inference(
|
|
| 95 |
progress: gr.Progress = gr.Progress(),
|
| 96 |
) -> tuple:
|
| 97 |
progress(0, desc='Preprocessing video')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
inputs = preprocess(
|
| 99 |
model_num_frames=model.config.num_frames,
|
| 100 |
keypoints_detector=keypoints_detector,
|
|
|
|
| 75 |
model_input_height = image_processor.size['height']
|
| 76 |
model_input_width = image_processor.size['width']
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
transform = Compose(
|
| 79 |
[
|
| 80 |
Lambda(lambda x: x / 255.0),
|
|
|
|
| 88 |
progress: gr.Progress = gr.Progress(),
|
| 89 |
) -> tuple:
|
| 90 |
progress(0, desc='Preprocessing video')
|
| 91 |
+
keypoints_detector = holistic.Holistic(
|
| 92 |
+
static_image_mode=False,
|
| 93 |
+
model_complexity=2,
|
| 94 |
+
enable_segmentation=True,
|
| 95 |
+
refine_face_landmarks=True,
|
| 96 |
+
)
|
| 97 |
+
|
| 98 |
inputs = preprocess(
|
| 99 |
model_num_frames=model.config.num_frames,
|
| 100 |
keypoints_detector=keypoints_detector,
|