xmrt commited on
Commit
0b371b1
·
1 Parent(s): 8473ca8

gr state on human3d

Browse files
Files changed (1) hide show
  1. main_noweb.py +4 -4
main_noweb.py CHANGED
@@ -32,9 +32,9 @@ print("[INFO]: Imported modules!")
32
  human = MMPoseInferencer("simcc_mobilenetv2_wo-deconv-8xb64-210e_coco-256x192") # simcc_mobilenetv2_wo-deconv-8xb64-210e_coco-256x192 dekr_hrnet-w32_8xb10-140e_coco-512x512
33
  hand = MMPoseInferencer("hand")
34
  #model3d = gr.State()
35
- human3d = gr.State(MMPoseInferencer(device=device,
36
  pose3d="human3d",
37
- scope="mmpose"))
38
 
39
 
40
  #"https://github.com/open-mmlab/mmpose/blob/main/configs/body_3d_keypoint/pose_lift/h36m/pose-lift_simplebaseline3d_8xb64-200e_h36m.py",
@@ -109,14 +109,14 @@ def pose3d(video, kpt_threshold, model):
109
  os.makedirs(add_dir)
110
  print(check_fps(video))
111
  #video = human3d.preprocess(video, batch_size=8)
112
- result_generator = model(video,
113
  vis_out_dir = add_dir,
114
  radius = 8,
115
  thickness = 5,
116
  rebase_keypoint_height=True,
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
 
 
32
  human = MMPoseInferencer("simcc_mobilenetv2_wo-deconv-8xb64-210e_coco-256x192") # simcc_mobilenetv2_wo-deconv-8xb64-210e_coco-256x192 dekr_hrnet-w32_8xb10-140e_coco-512x512
33
  hand = MMPoseInferencer("hand")
34
  #model3d = gr.State()
35
+ human3d = MMPoseInferencer(device=device,
36
  pose3d="human3d",
37
+ scope="mmpose")
38
 
39
 
40
  #"https://github.com/open-mmlab/mmpose/blob/main/configs/body_3d_keypoint/pose_lift/h36m/pose-lift_simplebaseline3d_8xb64-200e_h36m.py",
 
109
  os.makedirs(add_dir)
110
  print(check_fps(video))
111
  #video = human3d.preprocess(video, batch_size=8)
112
+ result_generator = gr.State(model(video,
113
  vis_out_dir = add_dir,
114
  radius = 8,
115
  thickness = 5,
116
  rebase_keypoint_height=True,
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