xmrt commited on
Commit
4ccfac3
·
1 Parent(s): 4d440ec

3d visualization

Browse files
Files changed (1) hide show
  1. main.py +7 -3
main.py CHANGED
@@ -11,7 +11,8 @@ print("[INFO]: Imported modules!")
11
  # inferencer = MMPoseInferencer('hand') # 'hand', 'human , device='cuda'
12
  # inferencer = MMPoseInferencer('human')
13
 
14
- inferencer = MMPoseInferencer(pose3d='human3d', pose3d_weights="https://download.openmmlab.com/mmpose/body3d/simple_baseline/simple3Dbaseline_h36m-f0ad73a4_20210419.pth")
 
15
  # https://github.com/open-mmlab/mmpose/tree/dev-1.x/configs/body_3d_keypoint/pose_lift
16
  # motionbert_ft_h36m-d80af323_20230531.pth
17
  # simple3Dbaseline_h36m-f0ad73a4_20210419.pth
@@ -30,7 +31,9 @@ def poses(photo):
30
  result_generator = inferencer(photo,
31
  vis_out_dir =".",
32
  return_vis=True,
33
- thickness=2)
 
 
34
  result = next(result_generator)
35
  #for result in result_generator:
36
  # print("[INFO] Result: ", result)
@@ -58,7 +61,8 @@ def poses(photo):
58
  # out_writer.release()
59
  # cv2.destroyAllWindows() # Closing window
60
  output_file = glob.glob("*.mp4")
61
-
 
62
  return output_file[0]
63
 
64
 
 
11
  # inferencer = MMPoseInferencer('hand') # 'hand', 'human , device='cuda'
12
  # inferencer = MMPoseInferencer('human')
13
 
14
+ inferencer = MMPoseInferencer(pose3d="configs/body_3d_keypoint/pose_lift/h36m/pose-lift_videopose3d-243frm-supv-cpn-ft_8xb128-200e_h36m.py",
15
+ pose3d_weights="https://download.openmmlab.com/mmpose/body3d/simple_baseline/simple3Dbaseline_h36m-f0ad73a4_20210419.pth")
16
  # https://github.com/open-mmlab/mmpose/tree/dev-1.x/configs/body_3d_keypoint/pose_lift
17
  # motionbert_ft_h36m-d80af323_20230531.pth
18
  # simple3Dbaseline_h36m-f0ad73a4_20210419.pth
 
31
  result_generator = inferencer(photo,
32
  vis_out_dir =".",
33
  return_vis=True,
34
+ thickness=2,
35
+ rebase_keypoint_height=True)
36
+
37
  result = next(result_generator)
38
  #for result in result_generator:
39
  # print("[INFO] Result: ", result)
 
61
  # out_writer.release()
62
  # cv2.destroyAllWindows() # Closing window
63
  output_file = glob.glob("*.mp4")
64
+ print(output_file)
65
+
66
  return output_file[0]
67
 
68