web codde
Browse files
main.py
CHANGED
@@ -127,7 +127,8 @@ def pose3d(video):
|
|
127 |
result = [result for result in result_generator] #next(result_generator)
|
128 |
|
129 |
out_file = glob.glob(os.path.join(vis_out_dir, "*.mp4")) #+ glob.glob(os.path.join(vis_out_dir, "*.webm"))
|
130 |
-
|
|
|
131 |
return "".join(out_file)
|
132 |
|
133 |
|
@@ -205,9 +206,9 @@ with block:
|
|
205 |
video_output2 = gr.PlayableVideo(height=512, label = "Estimate human 3d poses", show_label=True)
|
206 |
video_output3 = gr.PlayableVideo(height=512, label = "Estimate human hand poses", show_label=True)
|
207 |
video_output4 = gr.Video(height=512, label = "Detection and tracking", show_label=True, format="mp4")
|
208 |
-
jsonoutput = gr.Code(
|
209 |
|
210 |
-
|
211 |
|
212 |
with gr.Column():
|
213 |
with gr.Row():
|
@@ -280,26 +281,26 @@ with block:
|
|
280 |
outputs = video_output4,
|
281 |
queue=False)
|
282 |
|
283 |
-
# Web
|
284 |
-
submit_pose_web.click(fn=pose2d,
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
|
289 |
-
submit_pose3d_web.click(fn=pose3d,
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
|
294 |
-
submit_hand_web.click(fn=pose2dhand,
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
|
299 |
-
submit_detect_web.click(fn=show_tracking,
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
|
304 |
|
305 |
if __name__ == "__main__":
|
|
|
127 |
result = [result for result in result_generator] #next(result_generator)
|
128 |
|
129 |
out_file = glob.glob(os.path.join(vis_out_dir, "*.mp4")) #+ glob.glob(os.path.join(vis_out_dir, "*.webm"))
|
130 |
+
|
131 |
+
human3d.init()
|
132 |
return "".join(out_file)
|
133 |
|
134 |
|
|
|
206 |
video_output2 = gr.PlayableVideo(height=512, label = "Estimate human 3d poses", show_label=True)
|
207 |
video_output3 = gr.PlayableVideo(height=512, label = "Estimate human hand poses", show_label=True)
|
208 |
video_output4 = gr.Video(height=512, label = "Detection and tracking", show_label=True, format="mp4")
|
209 |
+
jsonoutput = gr.Code()
|
210 |
|
211 |
+
# with gr.Tab("Record video with webcam"):
|
212 |
|
213 |
with gr.Column():
|
214 |
with gr.Row():
|
|
|
281 |
outputs = video_output4,
|
282 |
queue=False)
|
283 |
|
284 |
+
# # Web
|
285 |
+
# submit_pose_web.click(fn=pose2d,
|
286 |
+
# inputs = [webcam_input, web_kpthr],
|
287 |
+
# outputs = webcam_output1,
|
288 |
+
# queue=False)
|
289 |
|
290 |
+
# submit_pose3d_web.click(fn=pose3d,
|
291 |
+
# inputs= webcam_input,
|
292 |
+
# outputs = webcam_output2,
|
293 |
+
# queue=False)
|
294 |
|
295 |
+
# submit_hand_web.click(fn=pose2dhand,
|
296 |
+
# inputs= [webcam_input, web_kpthr],
|
297 |
+
# outputs = webcam_output3,
|
298 |
+
# queue=False)
|
299 |
|
300 |
+
# submit_detect_web.click(fn=show_tracking,
|
301 |
+
# inputs= webcam_input,
|
302 |
+
# outputs = webcam_output4,
|
303 |
+
# queue=False)
|
304 |
|
305 |
|
306 |
if __name__ == "__main__":
|