xmrt commited on
Commit
14fb99b
·
1 Parent(s): 66cf35e

gr state on human3d

Browse files
Files changed (1) hide show
  1. main_noweb.py +3 -3
main_noweb.py CHANGED
@@ -102,7 +102,7 @@ def pose3d(video, kpt_threshold, ):
102
  #human3d = MMPoseInferencer(device=device, pose3d="human3d", scope="mmpose")#"pose-lift_videopose3d-243frm-supv-cpn-ft_8xb128-200e_h36m")
103
 
104
  print("HUMAN 3d downloaded!!")
105
- #gr.State(value=)
106
 
107
  # Define new unique folder
108
  add_dir = str(uuid.uuid4())
@@ -111,14 +111,14 @@ def pose3d(video, kpt_threshold, ):
111
  os.makedirs(add_dir)
112
  print(check_fps(video))
113
  #video = human3d.preprocess(video, batch_size=8)
114
- result_generator = gr.State(human3d(video,
115
  vis_out_dir = add_dir,
116
  radius = 8,
117
  thickness = 5,
118
  rebase_keypoint_height=True,
119
  kpt_thr=kpt_threshold,
120
  pred_out_dir = add_dir
121
- ))
122
  print("INFERENCE DONW")
123
  result = [result for result in result_generator] #next(result_generator)
124
 
 
102
  #human3d = MMPoseInferencer(device=device, pose3d="human3d", scope="mmpose")#"pose-lift_videopose3d-243frm-supv-cpn-ft_8xb128-200e_h36m")
103
 
104
  print("HUMAN 3d downloaded!!")
105
+ human3dst = gr.State(value=human3d)
106
 
107
  # Define new unique folder
108
  add_dir = str(uuid.uuid4())
 
111
  os.makedirs(add_dir)
112
  print(check_fps(video))
113
  #video = human3d.preprocess(video, batch_size=8)
114
+ result_generator = human3dst(video,
115
  vis_out_dir = add_dir,
116
  radius = 8,
117
  thickness = 5,
118
  rebase_keypoint_height=True,
119
  kpt_thr=kpt_threshold,
120
  pred_out_dir = add_dir
121
+ )
122
  print("INFERENCE DONW")
123
  result = [result for result in result_generator] #next(result_generator)
124