added return in check extension
Browse files- main_noweb.py +7 -10
main_noweb.py
CHANGED
@@ -101,8 +101,6 @@ def pose3d(video, kpt_threshold):
|
|
101 |
print(device)
|
102 |
|
103 |
human3d = MMPoseInferencer(device=device, pose3d="human3d", scope="mmpose")#"pose-lift_videopose3d-243frm-supv-cpn-ft_8xb128-200e_h36m")
|
104 |
-
|
105 |
-
print("HUMAN 3d downloaded!!")
|
106 |
# Define new unique folder
|
107 |
add_dir = str(uuid.uuid4())
|
108 |
|
@@ -117,7 +115,6 @@ def pose3d(video, kpt_threshold):
|
|
117 |
kpt_thr=kpt_threshold,
|
118 |
pred_out_dir = add_dir
|
119 |
)
|
120 |
-
print("INFERENCE DONW")
|
121 |
result = [result for result in result_generator] #next(result_generator)
|
122 |
|
123 |
out_file = glob.glob(os.path.join(add_dir, "*.mp4")) #+ glob.glob(os.path.join(vis_out_dir, "*.webm"))
|
@@ -129,8 +126,8 @@ def pose3d(video, kpt_threshold):
|
|
129 |
|
130 |
|
131 |
def pose2d(video, kpt_threshold):
|
132 |
-
|
133 |
-
video = get_frames(video)
|
134 |
|
135 |
# Define new unique folder
|
136 |
add_dir = str(uuid.uuid4())
|
@@ -226,7 +223,7 @@ block = gr.Blocks()
|
|
226 |
|
227 |
with block:
|
228 |
with gr.Column():
|
229 |
-
with gr.Tab("
|
230 |
with gr.Column():
|
231 |
with gr.Row():
|
232 |
with gr.Column():
|
@@ -326,12 +323,12 @@ with block:
|
|
326 |
13: Left Knee
|
327 |
14: Right Knee
|
328 |
15: Left Ankle
|
329 |
-
16: Right Ankle
|
330 |
-
```
|
331 |
|
332 |
\n Below, you can see a visualization of the poses of the 2d, 3d and hand keypoint locations: """)
|
333 |
-
|
334 |
-
gr.Image("./
|
|
|
335 |
|
336 |
|
337 |
|
|
|
101 |
print(device)
|
102 |
|
103 |
human3d = MMPoseInferencer(device=device, pose3d="human3d", scope="mmpose")#"pose-lift_videopose3d-243frm-supv-cpn-ft_8xb128-200e_h36m")
|
|
|
|
|
104 |
# Define new unique folder
|
105 |
add_dir = str(uuid.uuid4())
|
106 |
|
|
|
115 |
kpt_thr=kpt_threshold,
|
116 |
pred_out_dir = add_dir
|
117 |
)
|
|
|
118 |
result = [result for result in result_generator] #next(result_generator)
|
119 |
|
120 |
out_file = glob.glob(os.path.join(add_dir, "*.mp4")) #+ glob.glob(os.path.join(vis_out_dir, "*.webm"))
|
|
|
126 |
|
127 |
|
128 |
def pose2d(video, kpt_threshold):
|
129 |
+
video = check_extension(video)
|
130 |
+
#video = get_frames(video)
|
131 |
|
132 |
# Define new unique folder
|
133 |
add_dir = str(uuid.uuid4())
|
|
|
223 |
|
224 |
with block:
|
225 |
with gr.Column():
|
226 |
+
with gr.Tab("Capture video with webcam"):
|
227 |
with gr.Column():
|
228 |
with gr.Row():
|
229 |
with gr.Column():
|
|
|
323 |
13: Left Knee
|
324 |
14: Right Knee
|
325 |
15: Left Ankle
|
326 |
+
16: Right Ankle ```
|
|
|
327 |
|
328 |
\n Below, you can see a visualization of the poses of the 2d, 3d and hand keypoint locations: """)
|
329 |
+
|
330 |
+
gr.Image("./cocoposes.png", width="160")
|
331 |
+
gr.Image("./cocohand.png", width="160")
|
332 |
|
333 |
|
334 |
|