gvhmr 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. gvhmr-1.0.0/.gitignore +202 -0
  2. gvhmr-1.0.0/LICENSE +16 -0
  3. gvhmr-1.0.0/PKG-INFO +326 -0
  4. gvhmr-1.0.0/README.md +216 -0
  5. gvhmr-1.0.0/bin/gvhmr +11 -0
  6. gvhmr-1.0.0/docs/ACCURACY.md +187 -0
  7. gvhmr-1.0.0/docs/ARCHITECTURE.md +68 -0
  8. gvhmr-1.0.0/docs/BEHAVIOR.md +75 -0
  9. gvhmr-1.0.0/docs/CONFIGURATION.md +164 -0
  10. gvhmr-1.0.0/docs/DEBUGGING.md +56 -0
  11. gvhmr-1.0.0/docs/EVAL.md +158 -0
  12. gvhmr-1.0.0/docs/EXTENSIBILITY.md +265 -0
  13. gvhmr-1.0.0/docs/INSTALL.md +249 -0
  14. gvhmr-1.0.0/docs/LIBRARY.md +253 -0
  15. gvhmr-1.0.0/docs/PERFORMANCE.md +85 -0
  16. gvhmr-1.0.0/docs/PROVENANCE.md +59 -0
  17. gvhmr-1.0.0/docs/TRAINING.md +110 -0
  18. gvhmr-1.0.0/docs/example_video/project_teaser.gif +0 -0
  19. gvhmr-1.0.0/docs/example_video/tennis.mp4 +0 -0
  20. gvhmr-1.0.0/docs/upstream_sync.yaml +60 -0
  21. gvhmr-1.0.0/gvhmr/__init__.py +41 -0
  22. gvhmr-1.0.0/gvhmr/build_gvhmr.py +12 -0
  23. gvhmr-1.0.0/gvhmr/cli/__init__.py +367 -0
  24. gvhmr-1.0.0/gvhmr/cli/bench.py +69 -0
  25. gvhmr-1.0.0/gvhmr/cli/config.py +353 -0
  26. gvhmr-1.0.0/gvhmr/cli/demo.py +720 -0
  27. gvhmr-1.0.0/gvhmr/cli/demo_folder.py +38 -0
  28. gvhmr-1.0.0/gvhmr/cli/download.py +73 -0
  29. gvhmr-1.0.0/gvhmr/cli/envcmd.py +246 -0
  30. gvhmr-1.0.0/gvhmr/cli/evalcmd.py +339 -0
  31. gvhmr-1.0.0/gvhmr/cli/extract_features.py +114 -0
  32. gvhmr-1.0.0/gvhmr/cli/hubcmd.py +115 -0
  33. gvhmr-1.0.0/gvhmr/cli/info.py +131 -0
  34. gvhmr-1.0.0/gvhmr/cli/sweepcmd.py +407 -0
  35. gvhmr-1.0.0/gvhmr/cli/train.py +137 -0
  36. gvhmr-1.0.0/gvhmr/configs/__init__.py +49 -0
  37. gvhmr-1.0.0/gvhmr/configs/backbone/dinov2.yaml +6 -0
  38. gvhmr-1.0.0/gvhmr/configs/backbone/hmr2.yaml +7 -0
  39. gvhmr-1.0.0/gvhmr/configs/camera/dpvo.yaml +6 -0
  40. gvhmr-1.0.0/gvhmr/configs/camera/dust3r.yaml +6 -0
  41. gvhmr-1.0.0/gvhmr/configs/camera/simplevo.yaml +7 -0
  42. gvhmr-1.0.0/gvhmr/configs/camera/vggt.yaml +7 -0
  43. gvhmr-1.0.0/gvhmr/configs/data/mocap/testY.yaml +10 -0
  44. gvhmr-1.0.0/gvhmr/configs/data/mocap/trainX_testY.yaml +16 -0
  45. gvhmr-1.0.0/gvhmr/configs/demo.yaml +54 -0
  46. gvhmr-1.0.0/gvhmr/configs/detector/yolo.yaml +6 -0
  47. gvhmr-1.0.0/gvhmr/configs/detector/yolo11l.yaml +4 -0
  48. gvhmr-1.0.0/gvhmr/configs/detector/yolo11m.yaml +4 -0
  49. gvhmr-1.0.0/gvhmr/configs/detector/yolo11n.yaml +4 -0
  50. gvhmr-1.0.0/gvhmr/configs/detector/yolo11s.yaml +4 -0
  51. gvhmr-1.0.0/gvhmr/configs/detector/yolo11x.yaml +4 -0
  52. gvhmr-1.0.0/gvhmr/configs/detector/yolo12l.yaml +4 -0
  53. gvhmr-1.0.0/gvhmr/configs/detector/yolo12m.yaml +4 -0
  54. gvhmr-1.0.0/gvhmr/configs/detector/yolo12n.yaml +4 -0
  55. gvhmr-1.0.0/gvhmr/configs/detector/yolo12s.yaml +4 -0
  56. gvhmr-1.0.0/gvhmr/configs/detector/yolo12x.yaml +4 -0
  57. gvhmr-1.0.0/gvhmr/configs/detector/yolo26l.yaml +4 -0
  58. gvhmr-1.0.0/gvhmr/configs/detector/yolo26m.yaml +4 -0
  59. gvhmr-1.0.0/gvhmr/configs/detector/yolo26n.yaml +4 -0
  60. gvhmr-1.0.0/gvhmr/configs/detector/yolo26s.yaml +4 -0
  61. gvhmr-1.0.0/gvhmr/configs/detector/yolo26x.yaml +4 -0
  62. gvhmr-1.0.0/gvhmr/configs/detector/yolov10b.yaml +4 -0
  63. gvhmr-1.0.0/gvhmr/configs/detector/yolov10l.yaml +4 -0
  64. gvhmr-1.0.0/gvhmr/configs/detector/yolov10m.yaml +4 -0
  65. gvhmr-1.0.0/gvhmr/configs/detector/yolov10n.yaml +4 -0
  66. gvhmr-1.0.0/gvhmr/configs/detector/yolov10s.yaml +4 -0
  67. gvhmr-1.0.0/gvhmr/configs/detector/yolov10x.yaml +4 -0
  68. gvhmr-1.0.0/gvhmr/configs/detector/yolov8l.yaml +4 -0
  69. gvhmr-1.0.0/gvhmr/configs/detector/yolov8m.yaml +4 -0
  70. gvhmr-1.0.0/gvhmr/configs/detector/yolov8n.yaml +4 -0
  71. gvhmr-1.0.0/gvhmr/configs/detector/yolov8s.yaml +4 -0
  72. gvhmr-1.0.0/gvhmr/configs/detector/yolov8x.yaml +4 -0
  73. gvhmr-1.0.0/gvhmr/configs/detector/yolov9c.yaml +4 -0
  74. gvhmr-1.0.0/gvhmr/configs/detector/yolov9e.yaml +4 -0
  75. gvhmr-1.0.0/gvhmr/configs/detector/yolov9m.yaml +4 -0
  76. gvhmr-1.0.0/gvhmr/configs/detector/yolov9s.yaml +4 -0
  77. gvhmr-1.0.0/gvhmr/configs/detector/yolov9t.yaml +4 -0
  78. gvhmr-1.0.0/gvhmr/configs/exp/gvhmr/mixed/mixed.yaml +66 -0
  79. gvhmr-1.0.0/gvhmr/configs/exp/gvhmr/mixed/smoke_3dpw.yaml +63 -0
  80. gvhmr-1.0.0/gvhmr/configs/exp/gvhmr/mixed/smoke_3dpw_dinov2.yaml +72 -0
  81. gvhmr-1.0.0/gvhmr/configs/global/debug/debug_train.yaml +24 -0
  82. gvhmr-1.0.0/gvhmr/configs/global/debug/debug_train_limit_data.yaml +23 -0
  83. gvhmr-1.0.0/gvhmr/configs/global/task/gvhmr/test_3dpw.yaml +17 -0
  84. gvhmr-1.0.0/gvhmr/configs/global/task/gvhmr/test_3dpw_emdb_rich.yaml +23 -0
  85. gvhmr-1.0.0/gvhmr/configs/global/task/gvhmr/test_emdb.yaml +19 -0
  86. gvhmr-1.0.0/gvhmr/configs/global/task/gvhmr/test_rich.yaml +17 -0
  87. gvhmr-1.0.0/gvhmr/configs/hydra/default.yaml +19 -0
  88. gvhmr-1.0.0/gvhmr/configs/logger/none.yaml +4 -0
  89. gvhmr-1.0.0/gvhmr/configs/logger/tensorboard.yaml +8 -0
  90. gvhmr-1.0.0/gvhmr/configs/logger/wandb.yaml +10 -0
  91. gvhmr-1.0.0/gvhmr/configs/pose2d/rtmpose.yaml +10 -0
  92. gvhmr-1.0.0/gvhmr/configs/pose2d/vitpose.yaml +6 -0
  93. gvhmr-1.0.0/gvhmr/configs/recipe/accurate.yaml +6 -0
  94. gvhmr-1.0.0/gvhmr/configs/recipe/hq.yaml +6 -0
  95. gvhmr-1.0.0/gvhmr/configs/recipe/scene.yaml +6 -0
  96. gvhmr-1.0.0/gvhmr/configs/siga24_release.yaml +35 -0
  97. gvhmr-1.0.0/gvhmr/configs/store_gvhmr.py +29 -0
  98. gvhmr-1.0.0/gvhmr/configs/train.yaml +54 -0
  99. gvhmr-1.0.0/gvhmr/datamodule/mocap_trainX_testY.py +129 -0
  100. gvhmr-1.0.0/gvhmr/dataset/bedlam/bedlam.py +250 -0
  101. gvhmr-1.0.0/gvhmr/dataset/bedlam/resource/vname2lwh.pt +0 -0
  102. gvhmr-1.0.0/gvhmr/dataset/bedlam/utils.py +39 -0
  103. gvhmr-1.0.0/gvhmr/dataset/emdb/emdb_motion_test.py +196 -0
  104. gvhmr-1.0.0/gvhmr/dataset/emdb/utils.py +122 -0
  105. gvhmr-1.0.0/gvhmr/dataset/h36m/camera-parameters.json +1452 -0
  106. gvhmr-1.0.0/gvhmr/dataset/h36m/h36m.py +199 -0
  107. gvhmr-1.0.0/gvhmr/dataset/h36m/utils.py +82 -0
  108. gvhmr-1.0.0/gvhmr/dataset/imgfeat_motion/base_dataset.py +28 -0
  109. gvhmr-1.0.0/gvhmr/dataset/pure_motion/amass.py +116 -0
  110. gvhmr-1.0.0/gvhmr/dataset/pure_motion/base_dataset.py +183 -0
  111. gvhmr-1.0.0/gvhmr/dataset/pure_motion/cam_traj_utils.py +425 -0
  112. gvhmr-1.0.0/gvhmr/dataset/pure_motion/utils.py +67 -0
  113. gvhmr-1.0.0/gvhmr/dataset/rich/resource/cam2params.pt +0 -0
  114. gvhmr-1.0.0/gvhmr/dataset/rich/resource/seqname2imgrange.json +1 -0
  115. gvhmr-1.0.0/gvhmr/dataset/rich/resource/test.txt +54 -0
  116. gvhmr-1.0.0/gvhmr/dataset/rich/resource/train.txt +65 -0
  117. gvhmr-1.0.0/gvhmr/dataset/rich/resource/val.txt +29 -0
  118. gvhmr-1.0.0/gvhmr/dataset/rich/resource/w2az_sahmr.json +1 -0
  119. gvhmr-1.0.0/gvhmr/dataset/rich/rich_motion_test.py +182 -0
  120. gvhmr-1.0.0/gvhmr/dataset/rich/rich_utils.py +371 -0
  121. gvhmr-1.0.0/gvhmr/dataset/sloper4d/__init__.py +0 -0
  122. gvhmr-1.0.0/gvhmr/dataset/sloper4d/sloper4d_eval.py +129 -0
  123. gvhmr-1.0.0/gvhmr/dataset/threedpw/threedpw_motion_test.py +175 -0
  124. gvhmr-1.0.0/gvhmr/dataset/threedpw/threedpw_motion_train.py +170 -0
  125. gvhmr-1.0.0/gvhmr/dataset/threedpw/utils.py +79 -0
  126. gvhmr-1.0.0/gvhmr/dataset/whac/__init__.py +0 -0
  127. gvhmr-1.0.0/gvhmr/dataset/whac/whac_eval.py +189 -0
  128. gvhmr-1.0.0/gvhmr/inference/__init__.py +22 -0
  129. gvhmr-1.0.0/gvhmr/inference/_smpl.py +56 -0
  130. gvhmr-1.0.0/gvhmr/inference/hub.py +220 -0
  131. gvhmr-1.0.0/gvhmr/inference/model.py +108 -0
  132. gvhmr-1.0.0/gvhmr/inference/pipelines.py +261 -0
  133. gvhmr-1.0.0/gvhmr/inference/result.py +196 -0
  134. gvhmr-1.0.0/gvhmr/model/common_utils/optimizer.py +17 -0
  135. gvhmr-1.0.0/gvhmr/model/common_utils/scheduler.py +40 -0
  136. gvhmr-1.0.0/gvhmr/model/common_utils/scheduler_cfg.py +48 -0
  137. gvhmr-1.0.0/gvhmr/model/gvhmr/callbacks/metric_3dpw.py +195 -0
  138. gvhmr-1.0.0/gvhmr/model/gvhmr/callbacks/metric_emdb.py +328 -0
  139. gvhmr-1.0.0/gvhmr/model/gvhmr/callbacks/metric_rich.py +390 -0
  140. gvhmr-1.0.0/gvhmr/model/gvhmr/gvhmr_pl.py +319 -0
  141. gvhmr-1.0.0/gvhmr/model/gvhmr/gvhmr_pl_demo.py +133 -0
  142. gvhmr-1.0.0/gvhmr/model/gvhmr/pipeline/gvhmr_pipeline.py +385 -0
  143. gvhmr-1.0.0/gvhmr/model/gvhmr/utils/endecoder.py +208 -0
  144. gvhmr-1.0.0/gvhmr/model/gvhmr/utils/postprocess.py +173 -0
  145. gvhmr-1.0.0/gvhmr/model/gvhmr/utils/stats_compose.py +222 -0
  146. gvhmr-1.0.0/gvhmr/network/base_arch/embeddings/rotary_embedding.py +82 -0
  147. gvhmr-1.0.0/gvhmr/network/base_arch/transformer/encoder_rope.py +107 -0
  148. gvhmr-1.0.0/gvhmr/network/base_arch/transformer/layer.py +7 -0
  149. gvhmr-1.0.0/gvhmr/network/gvhmr/relative_transformer.py +206 -0
  150. gvhmr-1.0.0/gvhmr/network/hmr2/__init__.py +32 -0
  151. gvhmr-1.0.0/gvhmr/network/hmr2/components/__init__.py +0 -0
  152. gvhmr-1.0.0/gvhmr/network/hmr2/components/pose_transformer.py +358 -0
  153. gvhmr-1.0.0/gvhmr/network/hmr2/components/t_cond_mlp.py +199 -0
  154. gvhmr-1.0.0/gvhmr/network/hmr2/configs/__init__.py +119 -0
  155. gvhmr-1.0.0/gvhmr/network/hmr2/configs/model_config.yaml +131 -0
  156. gvhmr-1.0.0/gvhmr/network/hmr2/configs/smpl_mean_params.npz +0 -0
  157. gvhmr-1.0.0/gvhmr/network/hmr2/hmr2.py +57 -0
  158. gvhmr-1.0.0/gvhmr/network/hmr2/smpl_head.py +109 -0
  159. gvhmr-1.0.0/gvhmr/network/hmr2/utils/geometry.py +118 -0
  160. gvhmr-1.0.0/gvhmr/network/hmr2/utils/preproc.py +52 -0
  161. gvhmr-1.0.0/gvhmr/network/hmr2/utils/smpl_wrapper.py +45 -0
  162. gvhmr-1.0.0/gvhmr/network/hmr2/vit.py +348 -0
  163. gvhmr-1.0.0/gvhmr/utils/_optional.py +25 -0
  164. gvhmr-1.0.0/gvhmr/utils/_smpl_compat.py +43 -0
  165. gvhmr-1.0.0/gvhmr/utils/_vendor/__init__.py +6 -0
  166. gvhmr-1.0.0/gvhmr/utils/_vendor/pytorch3d/LICENSE +30 -0
  167. gvhmr-1.0.0/gvhmr/utils/_vendor/pytorch3d/README.md +42 -0
  168. gvhmr-1.0.0/gvhmr/utils/_vendor/pytorch3d/__init__.py +52 -0
  169. gvhmr-1.0.0/gvhmr/utils/_vendor/pytorch3d/math.py +83 -0
  170. gvhmr-1.0.0/gvhmr/utils/_vendor/pytorch3d/rotation_conversions.py +566 -0
  171. gvhmr-1.0.0/gvhmr/utils/_vendor/pytorch3d/so3.py +267 -0
  172. gvhmr-1.0.0/gvhmr/utils/assets.py +221 -0
  173. gvhmr-1.0.0/gvhmr/utils/body_model/README.md +3 -0
  174. gvhmr-1.0.0/gvhmr/utils/body_model/__init__.py +3 -0
  175. gvhmr-1.0.0/gvhmr/utils/body_model/body_model.py +133 -0
  176. gvhmr-1.0.0/gvhmr/utils/body_model/body_model_smplh.py +98 -0
  177. gvhmr-1.0.0/gvhmr/utils/body_model/body_model_smplx.py +132 -0
  178. gvhmr-1.0.0/gvhmr/utils/body_model/coco_aug_dict.pth +0 -0
  179. gvhmr-1.0.0/gvhmr/utils/body_model/min_lbs.py +116 -0
  180. gvhmr-1.0.0/gvhmr/utils/body_model/seg_part_info.npy +0 -0
  181. gvhmr-1.0.0/gvhmr/utils/body_model/smpl_3dpw14_J_regressor_sparse.pt +0 -0
  182. gvhmr-1.0.0/gvhmr/utils/body_model/smpl_coco17_J_regressor.pt +0 -0
  183. gvhmr-1.0.0/gvhmr/utils/body_model/smpl_lite.py +142 -0
  184. gvhmr-1.0.0/gvhmr/utils/body_model/smpl_neutral_J_regressor.pt +0 -0
  185. gvhmr-1.0.0/gvhmr/utils/body_model/smpl_vert_segmentation.json +7440 -0
  186. gvhmr-1.0.0/gvhmr/utils/body_model/smplx2smpl_sparse.pt +0 -0
  187. gvhmr-1.0.0/gvhmr/utils/body_model/smplx_lite.py +308 -0
  188. gvhmr-1.0.0/gvhmr/utils/body_model/smplx_verts437.pt +0 -0
  189. gvhmr-1.0.0/gvhmr/utils/body_model/utils.py +286 -0
  190. gvhmr-1.0.0/gvhmr/utils/callbacks/lr_monitor.py +5 -0
  191. gvhmr-1.0.0/gvhmr/utils/callbacks/prog_bar.py +434 -0
  192. gvhmr-1.0.0/gvhmr/utils/callbacks/simple_ckpt_saver.py +94 -0
  193. gvhmr-1.0.0/gvhmr/utils/callbacks/train_speed_timer.py +72 -0
  194. gvhmr-1.0.0/gvhmr/utils/comm/gather.py +256 -0
  195. gvhmr-1.0.0/gvhmr/utils/console.py +111 -0
  196. gvhmr-1.0.0/gvhmr/utils/debug.py +131 -0
  197. gvhmr-1.0.0/gvhmr/utils/device.py +65 -0
  198. gvhmr-1.0.0/gvhmr/utils/eval/eval_utils.py +478 -0
  199. gvhmr-1.0.0/gvhmr/utils/eval/preproc_variants.py +537 -0
  200. gvhmr-1.0.0/gvhmr/utils/eval/world_eval.py +111 -0
  201. gvhmr-1.0.0/gvhmr/utils/geo/augment_noisy_pose.py +214 -0
  202. gvhmr-1.0.0/gvhmr/utils/geo/flip_utils.py +90 -0
  203. gvhmr-1.0.0/gvhmr/utils/geo/hmr_cam.py +408 -0
  204. gvhmr-1.0.0/gvhmr/utils/geo/hmr_global.py +377 -0
  205. gvhmr-1.0.0/gvhmr/utils/geo/quaternion.py +445 -0
  206. gvhmr-1.0.0/gvhmr/utils/geo/rotations.py +55 -0
  207. gvhmr-1.0.0/gvhmr/utils/geo/transforms.py +27 -0
  208. gvhmr-1.0.0/gvhmr/utils/geo_transform.py +707 -0
  209. gvhmr-1.0.0/gvhmr/utils/ik/ccd_ik.py +141 -0
  210. gvhmr-1.0.0/gvhmr/utils/kpts/kp2d_utils.py +371 -0
  211. gvhmr-1.0.0/gvhmr/utils/localconfig.py +160 -0
  212. gvhmr-1.0.0/gvhmr/utils/matrix.py +1616 -0
  213. gvhmr-1.0.0/gvhmr/utils/mpi_download.py +154 -0
  214. gvhmr-1.0.0/gvhmr/utils/net.py +44 -0
  215. gvhmr-1.0.0/gvhmr/utils/net_utils.py +189 -0
  216. gvhmr-1.0.0/gvhmr/utils/postproc_world.py +47 -0
  217. gvhmr-1.0.0/gvhmr/utils/preproc/__init__.py +20 -0
  218. gvhmr-1.0.0/gvhmr/utils/preproc/base.py +125 -0
  219. gvhmr-1.0.0/gvhmr/utils/preproc/dinov2_backbone.py +58 -0
  220. gvhmr-1.0.0/gvhmr/utils/preproc/dpvo_default.yaml +21 -0
  221. gvhmr-1.0.0/gvhmr/utils/preproc/dust3r_slam.py +146 -0
  222. gvhmr-1.0.0/gvhmr/utils/preproc/relpose/README.md +11 -0
  223. gvhmr-1.0.0/gvhmr/utils/preproc/relpose/matcher_wrapper.py +28 -0
  224. gvhmr-1.0.0/gvhmr/utils/preproc/relpose/model/base_matcher.py +6 -0
  225. gvhmr-1.0.0/gvhmr/utils/preproc/relpose/model/cv2_matcher.py +79 -0
  226. gvhmr-1.0.0/gvhmr/utils/preproc/relpose/simple_vo.py +121 -0
  227. gvhmr-1.0.0/gvhmr/utils/preproc/relpose/solver_two_view.py +204 -0
  228. gvhmr-1.0.0/gvhmr/utils/preproc/relpose/transformation_np.py +140 -0
  229. gvhmr-1.0.0/gvhmr/utils/preproc/relpose/utils.py +185 -0
  230. gvhmr-1.0.0/gvhmr/utils/preproc/relpose/viz2d.py +178 -0
  231. gvhmr-1.0.0/gvhmr/utils/preproc/rtmpose.py +72 -0
  232. gvhmr-1.0.0/gvhmr/utils/preproc/slam.py +111 -0
  233. gvhmr-1.0.0/gvhmr/utils/preproc/tracker.py +105 -0
  234. gvhmr-1.0.0/gvhmr/utils/preproc/vggt_slam.py +133 -0
  235. gvhmr-1.0.0/gvhmr/utils/preproc/vitfeat_extractor.py +93 -0
  236. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose.py +153 -0
  237. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/__init__.py +1 -0
  238. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/__init__.py +0 -0
  239. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/__init__.py +0 -0
  240. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/__init__.py +35 -0
  241. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/alexnet.py +56 -0
  242. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/cpm.py +186 -0
  243. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/hourglass.py +212 -0
  244. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/hourglass_ae.py +212 -0
  245. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/hrformer.py +746 -0
  246. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/litehrnet.py +984 -0
  247. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/mobilenet_v2.py +275 -0
  248. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/mobilenet_v3.py +188 -0
  249. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/mspn.py +513 -0
  250. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/regnet.py +317 -0
  251. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/resnest.py +338 -0
  252. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/resnext.py +162 -0
  253. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/rsn.py +616 -0
  254. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/scnet.py +248 -0
  255. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/seresnet.py +125 -0
  256. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/seresnext.py +168 -0
  257. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/shufflenet_v1.py +329 -0
  258. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/shufflenet_v2.py +302 -0
  259. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/tcn.py +267 -0
  260. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/test_torch.py +60 -0
  261. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/utils/__init__.py +11 -0
  262. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/utils/channel_shuffle.py +29 -0
  263. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/utils/inverted_residual.py +128 -0
  264. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/utils/make_divisible.py +25 -0
  265. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/utils/se_layer.py +54 -0
  266. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/utils/utils.py +87 -0
  267. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/vgg.py +193 -0
  268. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/vipnas_mbv3.py +179 -0
  269. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/vipnas_resnet.py +589 -0
  270. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/backbones/vit.py +308 -0
  271. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/configs/coco/ViTPose_base_coco_256x192.py +168 -0
  272. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/configs/coco/ViTPose_base_simple_coco_256x192.py +171 -0
  273. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/configs/coco/ViTPose_huge_coco_256x192.py +170 -0
  274. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/configs/coco/ViTPose_huge_simple_coco_256x192.py +171 -0
  275. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/configs/coco/ViTPose_large_coco_256x192.py +170 -0
  276. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/configs/coco/ViTPose_large_simple_coco_256x192.py +171 -0
  277. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/configs/coco/__init__.py +0 -0
  278. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/__init__.py +24 -0
  279. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/deconv_head.py +295 -0
  280. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/deeppose_regression_head.py +176 -0
  281. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/hmr_head.py +94 -0
  282. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/interhand_3d_head.py +521 -0
  283. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/temporal_regression_head.py +319 -0
  284. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/topdown_heatmap_base_head.py +120 -0
  285. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/topdown_heatmap_multi_stage_head.py +572 -0
  286. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/topdown_heatmap_simple_head.py +392 -0
  287. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/vipnas_heatmap_simple_head.py +349 -0
  288. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/heads/voxelpose_head.py +167 -0
  289. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/builder/model_builder.py +67 -0
  290. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/model_builder.py +167 -0
  291. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/pose_utils/ViTPose_trt.py +102 -0
  292. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/pose_utils/__init__.py +0 -0
  293. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/pose_utils/convert_to_trt.py +9 -0
  294. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/pose_utils/general_utils.py +111 -0
  295. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/pose_utils/inference_test.py +29 -0
  296. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/pose_utils/logger_helper.py +23 -0
  297. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/pose_utils/pose_utils.py +183 -0
  298. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/pose_utils/pose_viz.py +293 -0
  299. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/pose_utils/timerr.py +37 -0
  300. gvhmr-1.0.0/gvhmr/utils/preproc/vitpose_pytorch/src/vitpose_infer/pose_utils/visualizer.py +162 -0
  301. gvhmr-1.0.0/gvhmr/utils/pylogger.py +86 -0
  302. gvhmr-1.0.0/gvhmr/utils/seq_utils.py +186 -0
  303. gvhmr-1.0.0/gvhmr/utils/smplx_utils.py +448 -0
  304. gvhmr-1.0.0/gvhmr/utils/video_io_utils.py +177 -0
  305. gvhmr-1.0.0/gvhmr/utils/vis/README.md +20 -0
  306. gvhmr-1.0.0/gvhmr/utils/vis/cv2_utils.py +144 -0
  307. gvhmr-1.0.0/gvhmr/utils/vis/renderer.py +385 -0
  308. gvhmr-1.0.0/gvhmr/utils/vis/renderer_gl.py +240 -0
  309. gvhmr-1.0.0/gvhmr/utils/vis/renderer_tools.py +805 -0
  310. gvhmr-1.0.0/gvhmr/utils/vis/renderer_utils.py +39 -0
  311. gvhmr-1.0.0/gvhmr/utils/vis/rich_logger.py +37 -0
  312. gvhmr-1.0.0/gvhmr/utils/vis/skeleton.py +190 -0
  313. gvhmr-1.0.0/gvhmr/utils/wis3d_utils.py +407 -0
  314. gvhmr-1.0.0/pyproject.toml +251 -0
  315. gvhmr-1.0.0/space/README.md +31 -0
  316. gvhmr-1.0.0/space/app.py +176 -0
  317. gvhmr-1.0.0/space/requirements.txt +4 -0
  318. gvhmr-1.0.0/tests/__init__.py +0 -0
  319. gvhmr-1.0.0/tests/conftest.py +65 -0
  320. gvhmr-1.0.0/tests/test_asset_roots.py +53 -0
  321. gvhmr-1.0.0/tests/test_augment_rng.py +51 -0
  322. gvhmr-1.0.0/tests/test_cli_import.py +33 -0
  323. gvhmr-1.0.0/tests/test_config_smoke.py +120 -0
  324. gvhmr-1.0.0/tests/test_debug.py +78 -0
  325. gvhmr-1.0.0/tests/test_device.py +85 -0
  326. gvhmr-1.0.0/tests/test_envcmd.py +90 -0
  327. gvhmr-1.0.0/tests/test_eval_world.py +97 -0
  328. gvhmr-1.0.0/tests/test_evalcmd.py +58 -0
  329. gvhmr-1.0.0/tests/test_extract_features.py +66 -0
  330. gvhmr-1.0.0/tests/test_geo_transforms.py +145 -0
  331. gvhmr-1.0.0/tests/test_golden_inference.py +134 -0
  332. gvhmr-1.0.0/tests/test_hmr2_geometry.py +250 -0
  333. gvhmr-1.0.0/tests/test_hmr_cam.py +292 -0
  334. gvhmr-1.0.0/tests/test_inference_api.py +192 -0
  335. gvhmr-1.0.0/tests/test_localconfig.py +122 -0
  336. gvhmr-1.0.0/tests/test_net.py +76 -0
  337. gvhmr-1.0.0/tests/test_net_utils.py +266 -0
  338. gvhmr-1.0.0/tests/test_preproc_pluggable.py +98 -0
  339. gvhmr-1.0.0/tests/test_preproc_variants.py +103 -0
  340. gvhmr-1.0.0/tests/test_quaternion.py +137 -0
  341. gvhmr-1.0.0/tests/test_renderer_headless.py +67 -0
  342. gvhmr-1.0.0/tests/test_rotary_embedding.py +250 -0
  343. gvhmr-1.0.0/tests/test_scheduler.py +164 -0
  344. gvhmr-1.0.0/tests/test_seq_utils.py +255 -0
  345. gvhmr-1.0.0/tests/test_skeleton.py +60 -0
  346. gvhmr-1.0.0/tests/test_stats_compose.py +142 -0
  347. gvhmr-1.0.0/tests/test_sweepcmd.py +67 -0
  348. gvhmr-1.0.0/tests/test_train_resume.py +39 -0
  349. gvhmr-1.0.0/tests/test_transformation_np.py +243 -0
  350. gvhmr-1.0.0/tests/test_video_merge.py +52 -0
  351. gvhmr-1.0.0/tools/bench/bench_inference.py +77 -0
  352. gvhmr-1.0.0/tools/bench/bench_simple_vo_parallel.py +164 -0
  353. gvhmr-1.0.0/tools/bench/test_simple_vo_parallel.py +234 -0
  354. gvhmr-1.0.0/tools/demo/colab_demo.ipynb +541 -0
  355. gvhmr-1.0.0/tools/demo/demo.py +43 -0
  356. gvhmr-1.0.0/tools/demo/demo_folder.py +24 -0
  357. gvhmr-1.0.0/tools/eval/eval_3dpw.py +97 -0
  358. gvhmr-1.0.0/tools/eval/eval_world.py +176 -0
  359. gvhmr-1.0.0/tools/train.py +13 -0
  360. gvhmr-1.0.0/tools/unitest/make_hydra_cfg.py +7 -0
  361. gvhmr-1.0.0/tools/unitest/run_dataset.py +41 -0
  362. gvhmr-1.0.0/tools/video/merge_folder.py +42 -0
  363. gvhmr-1.0.0/tools/video/merge_horizontal.py +16 -0
  364. gvhmr-1.0.0/tools/video/merge_vertical.py +16 -0
gvhmr-1.0.0/.gitignore ADDED
@@ -0,0 +1,202 @@
1
+ .vscode
2
+ .hydra
3
+ inputs
4
+ outputs
5
+
6
+ # machine-local GVHMR config (written by `gvhmr config init` / scripts/install.sh)
7
+ /gvhmr.toml
8
+
9
+ # ultralytics auto-downloads detector weights into the CWD (= repo root) — never commit them
10
+ # (committed model-data assets live under gvhmr/**, which this root-anchored pattern doesn't touch)
11
+ /*.pt
12
+
13
+ # W&B run/sweep logs (gvhmr sweep agents run from the repo root; training logs live under outputs/)
14
+ /wandb/
15
+
16
+ # All file or folders start with tmp will be ignored
17
+ tmp*
18
+
19
+ # Byte-compiled / optimized / DLL files
20
+ __pycache__/
21
+ *.py[cod]
22
+ *$py.class
23
+
24
+ # C extensions
25
+ *.so
26
+
27
+ # Distribution / packaging
28
+ .Python
29
+ build/
30
+ develop-eggs/
31
+ dist/
32
+ downloads/
33
+ eggs/
34
+ .eggs/
35
+ lib64/
36
+ parts/
37
+ sdist/
38
+ var/
39
+ wheels/
40
+ share/python-wheels/
41
+ *.egg-info/
42
+ .installed.cfg
43
+ *.egg
44
+ MANIFEST
45
+
46
+ # PyInstaller
47
+ # Usually these files are written by a python script from a template
48
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
49
+ *.manifest
50
+ *.spec
51
+
52
+ # Installer logs
53
+ pip-log.txt
54
+ pip-delete-this-directory.txt
55
+
56
+ # Unit test / coverage reports
57
+ htmlcov/
58
+ .tox/
59
+ .nox/
60
+ .coverage
61
+ .coverage.*
62
+ .cache
63
+ nosetests.xml
64
+ coverage.xml
65
+ *.cover
66
+ *.py,cover
67
+ .hypothesis/
68
+ .pytest_cache/
69
+ cover/
70
+
71
+ # Translations
72
+ *.mo
73
+ *.pot
74
+
75
+ # Django stuff:
76
+ *.log
77
+ local_settings.py
78
+ db.sqlite3
79
+ db.sqlite3-journal
80
+
81
+ # Flask stuff:
82
+ instance/
83
+ .webassets-cache
84
+
85
+ # Scrapy stuff:
86
+ .scrapy
87
+
88
+ # Sphinx documentation
89
+ docs/_build/
90
+
91
+ # PyBuilder
92
+ .pybuilder/
93
+ target/
94
+
95
+ # Jupyter Notebook
96
+ .ipynb_checkpoints
97
+
98
+ # IPython
99
+ profile_default/
100
+ ipython_config.py
101
+
102
+ # pyenv
103
+ # For a library or package, you might want to ignore these files since the code is
104
+ # intended to run in multiple environments; otherwise, check them in:
105
+ # .python-version
106
+
107
+ # pipenv
108
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
109
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
110
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
111
+ # install all needed dependencies.
112
+ #Pipfile.lock
113
+
114
+ # poetry
115
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
116
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
117
+ # commonly ignored for libraries.
118
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
119
+ #poetry.lock
120
+
121
+ # pdm
122
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
123
+ #pdm.lock
124
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
125
+ # in version control.
126
+ # https://pdm.fming.dev/#use-with-ide
127
+ .pdm.toml
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule
134
+ celerybeat.pid
135
+
136
+ # SageMath parsed files
137
+ *.sage.py
138
+
139
+ # Environments
140
+ .env
141
+ .venv
142
+ env/
143
+ venv/
144
+ ENV/
145
+ env.bak/
146
+ venv.bak/
147
+
148
+ # Spyder project settings
149
+ .spyderproject
150
+ .spyproject
151
+
152
+ # Rope project settings
153
+ .ropeproject
154
+
155
+ # mkdocs documentation
156
+ /site
157
+
158
+ # mypy
159
+ .mypy_cache/
160
+ .dmypy.json
161
+ dmypy.json
162
+
163
+ # Pyre type checker
164
+ .pyre/
165
+
166
+ # pytype static type analyzer
167
+ .pytype/
168
+
169
+ # Cython debug symbols
170
+ cython_debug/
171
+
172
+ #
173
+ .DS_Store/
174
+
175
+ # PyCharm
176
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
177
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
178
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
179
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
180
+ #.idea/
181
+
182
+ # torchsparse
183
+ torchsparse
184
+
185
+ # tensorboard
186
+ tensorboard
187
+
188
+ # glove
189
+ glove
190
+
191
+ # videos
192
+ videos/*
193
+
194
+ # scene-aware camera backend: vendored model clones (set up via scripts/setup_scene_aware.sh)
195
+ third-party/
196
+
197
+ # local tooling / OS cruft
198
+ .claude/
199
+ .DS_Store
200
+ *.bak
201
+ # Local machine config (asset paths + model defaults; machine-specific)
202
+ gvhmr.toml
gvhmr-1.0.0/LICENSE ADDED
@@ -0,0 +1,16 @@
1
+ Copyright 2022-2023 3D Vision Group at the State Key Lab of CAD&CG,
2
+ Zhejiang University. All Rights Reserved.
3
+
4
+ For more information see <https://github.com/zju3dv/GVHMR>
5
+ If you use this software, please cite the corresponding publications
6
+ listed on the above website.
7
+
8
+ Permission to use, copy, modify and distribute this software and its
9
+ documentation for educational, research and non-profit purposes only.
10
+ Any modification based on this work must be open-source and prohibited
11
+ for commercial use.
12
+ You must retain, in the source form of any derivative works that you
13
+ distribute, all copyright, patent, trademark, and attribution notices
14
+ from the source form of this work.
15
+
16
+ For commercial uses of this software, please send email to xwzhou@zju.edu.cn
gvhmr-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,326 @@
1
+ Metadata-Version: 2.4
2
+ Name: gvhmr
3
+ Version: 1.0.0
4
+ Summary: GVHMR: World-Grounded Human Motion Recovery via Gravity-View Coordinates (training & inference)
5
+ Project-URL: Homepage, https://zju3dv.github.io/gvhmr
6
+ Project-URL: Repository, https://github.com/ryanrudes/gvhmr
7
+ Project-URL: Upstream, https://github.com/zju3dv/GVHMR
8
+ Project-URL: Paper, https://arxiv.org/abs/2409.06662
9
+ Author: Zehong Shen
10
+ Maintainer: Ryan Rudes
11
+ License: Copyright 2022-2023 3D Vision Group at the State Key Lab of CAD&CG,
12
+ Zhejiang University. All Rights Reserved.
13
+
14
+ For more information see <https://github.com/zju3dv/GVHMR>
15
+ If you use this software, please cite the corresponding publications
16
+ listed on the above website.
17
+
18
+ Permission to use, copy, modify and distribute this software and its
19
+ documentation for educational, research and non-profit purposes only.
20
+ Any modification based on this work must be open-source and prohibited
21
+ for commercial use.
22
+ You must retain, in the source form of any derivative works that you
23
+ distribute, all copyright, patent, trademark, and attribution notices
24
+ from the source form of this work.
25
+
26
+ For commercial uses of this software, please send email to xwzhou@zju.edu.cn
27
+ License-File: LICENSE
28
+ Keywords: human-motion-recovery,pose-estimation,pytorch,siggraph,smpl
29
+ Classifier: License :: OSI Approved :: MIT License
30
+ Classifier: Programming Language :: Python :: 3.11
31
+ Classifier: Programming Language :: Python :: 3.12
32
+ Classifier: Programming Language :: Python :: 3.13
33
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
34
+ Requires-Python: >=3.11
35
+ Requires-Dist: av>=12
36
+ Requires-Dist: chumpy
37
+ Requires-Dist: einops>=0.8
38
+ Requires-Dist: ffmpeg-python
39
+ Requires-Dist: huggingface-hub>=0.23
40
+ Requires-Dist: hydra-colorlog>=1.2
41
+ Requires-Dist: hydra-core>=1.3
42
+ Requires-Dist: hydra-zen>=0.13
43
+ Requires-Dist: imageio>=2.34
44
+ Requires-Dist: joblib
45
+ Requires-Dist: matplotlib
46
+ Requires-Dist: moderngl>=5.10
47
+ Requires-Dist: numpy>=1.26
48
+ Requires-Dist: omegaconf>=2.3
49
+ Requires-Dist: opencv-python>=4.9
50
+ Requires-Dist: pytorch-lightning>=2.3
51
+ Requires-Dist: requests>=2.28
52
+ Requires-Dist: rich>=13
53
+ Requires-Dist: scikit-image
54
+ Requires-Dist: scipy>=1.11
55
+ Requires-Dist: smplx>=0.1.28
56
+ Requires-Dist: termcolor
57
+ Requires-Dist: timm>=1.0.9
58
+ Requires-Dist: torch>=2.4
59
+ Requires-Dist: torchvision>=0.19
60
+ Requires-Dist: tqdm
61
+ Requires-Dist: trimesh
62
+ Requires-Dist: typer>=0.12
63
+ Provides-Extra: app
64
+ Requires-Dist: gradio>=4; extra == 'app'
65
+ Provides-Extra: cpu
66
+ Requires-Dist: torch; extra == 'cpu'
67
+ Requires-Dist: torchvision; extra == 'cpu'
68
+ Provides-Extra: cu124
69
+ Requires-Dist: torch<2.8,>=2.4; extra == 'cu124'
70
+ Requires-Dist: torchvision<0.23,>=0.19; extra == 'cu124'
71
+ Provides-Extra: cu126
72
+ Requires-Dist: torch<2.8,>=2.4; extra == 'cu126'
73
+ Requires-Dist: torchvision<0.23,>=0.19; extra == 'cu126'
74
+ Provides-Extra: cu128
75
+ Requires-Dist: torch<2.8,>=2.4; extra == 'cu128'
76
+ Requires-Dist: torchvision<0.23,>=0.19; extra == 'cu128'
77
+ Provides-Extra: dev
78
+ Requires-Dist: ipdb; extra == 'dev'
79
+ Requires-Dist: pre-commit; extra == 'dev'
80
+ Requires-Dist: pyright>=1.1.380; extra == 'dev'
81
+ Requires-Dist: pytest-cov; extra == 'dev'
82
+ Requires-Dist: pytest>=8; extra == 'dev'
83
+ Requires-Dist: ruff>=0.6; extra == 'dev'
84
+ Provides-Extra: dpvo
85
+ Requires-Dist: numba; extra == 'dpvo'
86
+ Requires-Dist: pypose; extra == 'dpvo'
87
+ Provides-Extra: notebook
88
+ Requires-Dist: ipdb; extra == 'notebook'
89
+ Requires-Dist: ipython; extra == 'notebook'
90
+ Requires-Dist: jupyter; extra == 'notebook'
91
+ Provides-Extra: preproc
92
+ Requires-Dist: cython-bbox; extra == 'preproc'
93
+ Requires-Dist: lapx; extra == 'preproc'
94
+ Requires-Dist: pycolmap>=0.6; extra == 'preproc'
95
+ Requires-Dist: ultralytics>=8.2; extra == 'preproc'
96
+ Requires-Dist: yacs; extra == 'preproc'
97
+ Provides-Extra: render
98
+ Requires-Dist: pytorch3d; extra == 'render'
99
+ Provides-Extra: rtmpose
100
+ Requires-Dist: onnxruntime; extra == 'rtmpose'
101
+ Requires-Dist: rtmlib; extra == 'rtmpose'
102
+ Provides-Extra: train
103
+ Requires-Dist: tensorboard; extra == 'train'
104
+ Requires-Dist: wandb-workspaces; extra == 'train'
105
+ Requires-Dist: wandb>=0.17; extra == 'train'
106
+ Provides-Extra: vis
107
+ Requires-Dist: viser; extra == 'vis'
108
+ Requires-Dist: wis3d; extra == 'vis'
109
+ Description-Content-Type: text/markdown
110
+
111
+ # GVHMR: World-Grounded Human Motion Recovery via Gravity-View Coordinates
112
+
113
+ ### [Project Page](https://zju3dv.github.io/gvhmr) | [Paper](https://arxiv.org/abs/2409.06662)
114
+
115
+ > World-Grounded Human Motion Recovery via Gravity-View Coordinates
116
+ > [Zehong Shen](https://zehongs.github.io/)<sup>\*</sup>,
117
+ [Huaijin Pi](https://phj128.github.io/)<sup>\*</sup>,
118
+ [Yan Xia](https://isshikihugh.github.io/scholar),
119
+ [Zhi Cen](https://scholar.google.com/citations?user=Xyy-uFMAAAAJ),
120
+ [Sida Peng](https://pengsida.net/)<sup>†</sup>,
121
+ [Zechen Hu](https://zju3dv.github.io/gvhmr),
122
+ [Hujun Bao](http://www.cad.zju.edu.cn/home/bao/),
123
+ [Ruizhen Hu](https://csse.szu.edu.cn/staff/ruizhenhu/),
124
+ [Xiaowei Zhou](https://xzhou.me/)
125
+ > SIGGRAPH Asia 2024
126
+
127
+ <p align="center">
128
+ <img src=docs/example_video/project_teaser.gif alt="animated" />
129
+ </p>
130
+
131
+ Feed it a video, get back **SMPL/SMPL-X human motion in both the camera frame and the world frame** —
132
+ plus rendered overlay videos to see the result.
133
+
134
+ > [!NOTE]
135
+ > This is a **modernized fork** of [`zju3dv/GVHMR`](https://github.com/zju3dv/GVHMR) by
136
+ > [@ryanrudes](https://github.com/ryanrudes): one-command install (`uv` + a Typer/Rich `gvhmr` CLI),
137
+ > **Apple-Silicon (MPS) support** end-to-end (including a real-time moderngl mesh renderer), automatic
138
+ > checkpoint fetching, swappable preprocessing models, scene-aware **metric** cameras
139
+ > (`--camera dust3r|vggt` — Mac-friendly alternatives to CUDA-only DPVO), skeleton-overlay exports, a
140
+ > CPU test suite, and re-training tooling. **The released model's behaviour is preserved** — the default
141
+ > inference path is golden-guarded byte-identical to upstream.
142
+
143
+ ## Quick start
144
+
145
+ ```bash
146
+ git clone https://github.com/ryanrudes/gvhmr && cd gvhmr
147
+ scripts/install.sh # detects your platform/GPU, installs, fetches checkpoints
148
+ bin/gvhmr demo docs/example_video/tennis.mp4 -s # recover motion from the bundled example video
149
+ ```
150
+
151
+ The installer detects macOS vs Linux+NVIDIA vs CPU, picks the matching torch build, records the
152
+ choices, and hands off to the **wizard**, which walks you through every optional component (RTMPose,
153
+ DPVO, the DUSt3R/VGGT scene cameras, 3D visualization, …), asset locations, and the checkpoint fetch.
154
+ From then on you interact only with the `gvhmr` CLI (via `bin/gvhmr`, or `gvhmr` after
155
+ `source .venv/bin/activate`), never with uv: `bin/gvhmr config init` re-runs the wizard;
156
+ `bin/gvhmr env sync` re-applies the recorded environment if it ever drifts. Two notes, and everything
157
+ else just works:
158
+
159
+ - **Body models are registration-gated** (their license forbids redistribution): sign up at
160
+ [SMPL](https://smpl.is.tue.mpg.de/) and [SMPL-X](https://smpl-x.is.tue.mpg.de/), then
161
+ `bin/gvhmr download` prints exactly where to put the files.
162
+ - On **Linux + NVIDIA**, torch must match your CUDA driver — `scripts/install.sh` picks the right build
163
+ for you; if you sync manually, see [docs/INSTALL.md](docs/INSTALL.md#cuda--gpu-linux). macOS needs
164
+ nothing special.
165
+
166
+ Run `bin/gvhmr info` anytime for a full diagnostic (device, installed features, checkpoint status, and
167
+ the exact fix for anything missing). Full install guide: [docs/INSTALL.md](docs/INSTALL.md).
168
+
169
+ Prefer not to install? Try the upstream-hosted
170
+ [Colab](https://colab.research.google.com/drive/1N9WSchizHv2bfQqkE9Wuiegw_OT7mtGj?usp=sharing) or
171
+ [HuggingFace Space](https://huggingface.co/spaces/LittleFrog/GVHMR).
172
+
173
+ ## Python library
174
+
175
+ GVHMR ships a HuggingFace-style Python API (in `gvhmr/inference/`) over the exact same pipeline as the
176
+ CLI — same code paths, byte-identical results, but a clean object you can loop over videos with.
177
+
178
+ ```bash
179
+ pip install "gvhmr[preproc]" # base + preprocessing (add cu124/cu126/cu128 on Linux+CUDA; macOS = MPS)
180
+ gvhmr auth smpl # one-time: your MPI login, to fetch the gated SMPL/SMPL-X body models
181
+ ```
182
+
183
+ ```python
184
+ import gvhmr
185
+
186
+ # one-liner (caches a default pipeline; a loop of videos loads weights once)
187
+ result = gvhmr.recover("dance.mp4")
188
+
189
+ # or load once, reuse across videos
190
+ pipe = gvhmr.pipeline("human-motion-recovery", device="cuda")
191
+ result = pipe("dance.mp4", static_camera=True, flip_test=True)
192
+
193
+ result.smpl_params_world # world-frame SMPL params (global_orient/body_pose/betas/transl)
194
+ result.joints_world # (L, 24, 3) world-frame joints
195
+ result.render("overlay.mp4") # in-cam ∥ world overlay video
196
+ result.save_npz("dance.npz") # portable SMPL params + intrinsics
197
+ ```
198
+
199
+ Body models are registration-gated by MPI and **never redistributed** — `gvhmr auth smpl` (or
200
+ `$SMPLX_USER`/`$SMPLX_PW`) fetches them from the official source with *your* account. There's also a
201
+ tensor-level "power path" (`gvhmr.GVHMR.from_pretrained(...).predict(...)`) for your own preprocessing,
202
+ and `save_pretrained` / `push_to_hub` for sharing. Full guide: [docs/LIBRARY.md](docs/LIBRARY.md).
203
+
204
+ ## Usage
205
+
206
+ The `gvhmr` command (Typer + Rich) is the main entry point — `gvhmr --help` for the full menu. (Below,
207
+ `gvhmr` means `bin/gvhmr` from the repo root, or plain `gvhmr` in an activated venv.)
208
+
209
+ ```bash
210
+ gvhmr demo VIDEO.mp4 -s # single video, static camera (fastest)
211
+ gvhmr demo VIDEO.mp4 # moving camera (SimpleVO, rotation only)
212
+ gvhmr demo VIDEO.mp4 --camera vggt # moving camera with world translation (any device)
213
+ gvhmr demo-folder DIR -o outputs/batch -s # every video in a folder
214
+ gvhmr info # environment & asset diagnostic
215
+ gvhmr config init # wizard: asset locations, models, managed environment
216
+ gvhmr env sync # re-apply the recorded environment (fixes any drift)
217
+ gvhmr bench # inference latency benchmark
218
+ ```
219
+
220
+ Each run writes to `outputs/demo/<video>/`: the recovered motion (`hmr4d_results.pt` — SMPL-X
221
+ parameters in camera and world frames), the camera-view render (`1_incam.mp4`), the world-view render
222
+ (`2_global.mp4`), and a side-by-side of the two. `--no-render` skips the videos (motion only);
223
+ `--render-scale 1` renders full-resolution overlays (default 0.5 for speed); `--verbose` saves
224
+ intermediate overlays (detection boxes, 2D keypoints).
225
+
226
+ **Cameras.** `-s/--static-cam` skips visual odometry entirely. For moving cameras the default is
227
+ SimpleVO (rotation only); to recover the camera's **translation** too — e.g. a following/tracking
228
+ shot — use a scene-aware **metric** camera: `--camera vggt` or `--camera dust3r` (run
229
+ `scripts/setup_scene_aware.sh` once; works on Apple Silicon / CPU / CUDA), or classic
230
+ `--camera dpvo` (CUDA only; `scripts/setup_dpvo.sh`).
231
+
232
+ **Accuracy.** Add `--flip-test` (mirror-averaging TTA — the benchmark-time setting) and pass the true
233
+ focal length `--f_mm` if you know it (phone metadata is read automatically when present). Evidence and
234
+ measurement methodology: [docs/ACCURACY.md](docs/ACCURACY.md).
235
+
236
+ **Skeleton exports.** `--skeleton` writes a world-frame skeleton-only video, `--skeleton-overlay` draws
237
+ the 24-joint skeleton on top of the mesh videos, `--skeleton-joints legs,left_arm` restricts to a
238
+ subset (groups or joint names/indices).
239
+
240
+ **Device.** Auto-selected (CUDA → MPS → CPU); override with `GVHMR_DEVICE=cpu|mps|cuda`. Everything
241
+ except CUDA-only DPVO runs on Apple Silicon, including rendering.
242
+
243
+ ### Swapping models
244
+
245
+ The detector, 2D-pose estimator, feature backbone, and camera are each a **Hydra config group** — pick
246
+ implementations by name, bundle choices into a committable *recipe*, or tweak any knob:
247
+
248
+ ```bash
249
+ gvhmr demo clip.mp4 --detector yolo26x --pose2d rtmpose --camera dust3r # pick implementations
250
+ gvhmr demo clip.mp4 --recipe accurate # a committable bundle
251
+ gvhmr demo clip.mp4 --set detector.conf=0.4 # tweak a knob
252
+ ```
253
+
254
+ Every YOLO family×size is a preset; RTMPose (`gvhmr config set extras preproc,rtmpose && gvhmr env
255
+ sync`) is a verified alternative 2D-pose backend; the feature backbone is learned conditioning, so
256
+ swapping it needs a retrain (the tooling for that exists — `gvhmr extract-features` + `gvhmr train`).
257
+ Machine-local defaults (asset locations + model versions + the managed environment) live in one
258
+ readable config file managed by **`gvhmr config init`**. Full guide:
259
+ [docs/CONFIGURATION.md](docs/CONFIGURATION.md); roadmap: [docs/EXTENSIBILITY.md](docs/EXTENSIBILITY.md).
260
+
261
+ ## Reproduce the paper
262
+
263
+ ```bash
264
+ gvhmr eval # 3DPW + EMDB + RICH: auto-fetches the eval packs, runs the paper
265
+ # protocol, prints your numbers next to the paper's (verified to match)
266
+ gvhmr eval 3dpw --json m.json # one dataset; optionally dump metrics for tracking
267
+ gvhmr eval all --ckpt outputs/my_run/checkpoints/last.ckpt # evaluate your own training run
268
+ gvhmr eval 3dpw --detector yolo26x # benchmark a PREPROCESSING swap (auto-fetches raw 3DPW,
269
+ # regenerates boxes/keypoints/features; see docs/EVAL.md)
270
+ gvhmr sweep run 3dpw --detectors all # W&B sweep comparing every detector preset on the benchmark
271
+
272
+ # Train (the released ckpt used 2×4090 for 420 epochs)
273
+ gvhmr train exp=gvhmr/mixed/mixed
274
+ ```
275
+
276
+ `gvhmr eval` wraps the canonical Lightning test tasks (`gvhmr train global/task=gvhmr/test_* …` still
277
+ works) — the only manual step is the registration-gated body models, and the command tells you exactly
278
+ which files it needs. Details: [docs/EVAL.md](docs/EVAL.md); training: [docs/TRAINING.md](docs/TRAINING.md)
279
+ (training doesn't apply the test-time postprocessing, so its global metrics differ from the benchmark).
280
+
281
+ ## Development
282
+
283
+ ```bash
284
+ uv sync --extra dev # test/lint/type tooling (or scripts/install.sh --dev)
285
+ uv run pre-commit install # once — auto-formats staged files on commit
286
+ make check # the required CI gates locally: ruff format --check + pytest
287
+ make fmt # format the whole tree
288
+ ```
289
+
290
+ The test suite is a CPU/MPS characterization net — no GPU, checkpoints, or datasets needed. Start with
291
+ [`AGENTS.md`](AGENTS.md) for architecture, conventions, and the behaviour-preservation landmines.
292
+
293
+ ## Documentation
294
+
295
+ | Doc | What's in it |
296
+ |---|---|
297
+ | [docs/INSTALL.md](docs/INSTALL.md) | full install guide: CUDA matrix, extras, weights, troubleshooting |
298
+ | [docs/CONFIGURATION.md](docs/CONFIGURATION.md) | the config file + swapping/configuring every pipeline stage |
299
+ | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | code map: data flow, packages, the 151-dim latent |
300
+ | [docs/TRAINING.md](docs/TRAINING.md) | training/eval on any device, dataset packs, backbone retrains |
301
+ | [docs/ACCURACY.md](docs/ACCURACY.md) | test-time accuracy levers + how they're measured |
302
+ | [docs/PERFORMANCE.md](docs/PERFORMANCE.md) | profiling & latency notes (CPU vs MPS, render scale) |
303
+ | [docs/EXTENSIBILITY.md](docs/EXTENSIBILITY.md) | the swappable-everything roadmap & rationale |
304
+ | [docs/BEHAVIOR.md](docs/BEHAVIOR.md) / [docs/PROVENANCE.md](docs/PROVENANCE.md) | behaviour-preservation contract; what was vendored/renamed vs upstream |
305
+
306
+ # Citation
307
+
308
+ If you find this code useful for your research, please use the following BibTeX entry.
309
+
310
+ ```bibtex
311
+ @inproceedings{shen2024gvhmr,
312
+ title={World-Grounded Human Motion Recovery via Gravity-View Coordinates},
313
+ author={Shen, Zehong and Pi, Huaijin and Xia, Yan and Cen, Zhi and Peng, Sida and Hu, Zechen and Bao, Hujun and Hu, Ruizhen and Zhou, Xiaowei},
314
+ booktitle={SIGGRAPH Asia Conference Proceedings},
315
+ year={2024}
316
+ }
317
+ ```
318
+
319
+ # Acknowledgement
320
+
321
+ We thank the authors of
322
+ [WHAM](https://github.com/yohanshin/WHAM),
323
+ [4D-Humans](https://github.com/shubham-goel/4D-Humans),
324
+ and [ViTPose-Pytorch](https://github.com/gpastal24/ViTPose-Pytorch) for their great works, without which our project/code would not be possible.
325
+
326
+ Upstream repository: [zju3dv/GVHMR](https://github.com/zju3dv/GVHMR).