xmrt commited on
Commit
1581cde
1 Parent(s): bbdb0f2
Files changed (1) hide show
  1. main.py +21 -20
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("json")
209
 
210
- with gr.Tab("Record video with webcam"):
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
- inputs = [webcam_input, web_kpthr],
286
- outputs = webcam_output1,
287
- queue=False)
288
 
289
- submit_pose3d_web.click(fn=pose3d,
290
- inputs= webcam_input,
291
- outputs = webcam_output2,
292
- queue=False)
293
 
294
- submit_hand_web.click(fn=pose2dhand,
295
- inputs= [webcam_input, web_kpthr],
296
- outputs = webcam_output3,
297
- queue=False)
298
 
299
- submit_detect_web.click(fn=show_tracking,
300
- inputs= webcam_input,
301
- outputs = webcam_output4,
302
- queue=False)
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__":