check webcam
Browse files
main.py
CHANGED
@@ -96,7 +96,7 @@ def poses(inferencer, video, vis_out_dir, kpt_thr):
|
|
96 |
|
97 |
return out_file
|
98 |
|
99 |
-
def infer(video, check, kpt_thr, webcam=
|
100 |
print("[INFO] VIDEO INPUT: ", video)
|
101 |
|
102 |
# Selecting the specific inferencer
|
@@ -138,7 +138,7 @@ def run():
|
|
138 |
|
139 |
webcam = gr.Interface(
|
140 |
fn=infer,
|
141 |
-
inputs= [gr.Video(source="webcam", height=512), check_web, web_kpthr
|
142 |
outputs = [gr.Video(format='mp4', height=512, label="Detect and track", show_label=True), gr.PlayableVideo(height=512, label = "Estimate human 2d poses", show_label=True), gr.PlayableVideo(height=512, label = "Estimate human 2d hand poses", show_label=True), gr.PlayableVideo(height=512, label = "Estimate human 3d poses", show_label=True)],
|
143 |
title = 'Tracking and pose estimation',
|
144 |
description = description,
|
|
|
96 |
|
97 |
return out_file
|
98 |
|
99 |
+
def infer(video, check, kpt_thr, webcam=True):
|
100 |
print("[INFO] VIDEO INPUT: ", video)
|
101 |
|
102 |
# Selecting the specific inferencer
|
|
|
138 |
|
139 |
webcam = gr.Interface(
|
140 |
fn=infer,
|
141 |
+
inputs= [gr.Video(source="webcam", height=512), check_web, web_kpthr], # /tmp/gradio/927601b660ec45919366ce37df1ed004a1fcffab/sample_flip.webm
|
142 |
outputs = [gr.Video(format='mp4', height=512, label="Detect and track", show_label=True), gr.PlayableVideo(height=512, label = "Estimate human 2d poses", show_label=True), gr.PlayableVideo(height=512, label = "Estimate human 2d hand poses", show_label=True), gr.PlayableVideo(height=512, label = "Estimate human 3d poses", show_label=True)],
|
143 |
title = 'Tracking and pose estimation',
|
144 |
description = description,
|