pose2sim 0.0.0__tar.gz → 0.1.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 (381) hide show
  1. {pose2sim-0.0.0 → Pose2Sim-0.1.0}/LICENSE +29 -29
  2. Pose2Sim-0.1.0/PKG-INFO +16 -0
  3. Pose2Sim-0.1.0/Pose2Sim/Pose2Sim.py +139 -0
  4. Pose2Sim-0.1.0/Pose2Sim/__init__.py +14 -0
  5. Pose2Sim-0.1.0/Pose2Sim/calibrate_cams.py +417 -0
  6. Pose2Sim-0.1.0/Pose2Sim/common.py +245 -0
  7. Pose2Sim-0.1.0/Pose2Sim/filter_3d.py +326 -0
  8. Pose2Sim-0.1.0/Pose2Sim/skeletons.py +170 -0
  9. Pose2Sim-0.1.0/Pose2Sim/track_2d.py +311 -0
  10. Pose2Sim-0.1.0/Pose2Sim/triangulate_3d.py +442 -0
  11. Pose2Sim-0.1.0/Pose2Sim.egg-info/PKG-INFO +16 -0
  12. Pose2Sim-0.1.0/Pose2Sim.egg-info/SOURCES.txt +33 -0
  13. Pose2Sim-0.1.0/Pose2Sim.egg-info/requires.txt +10 -0
  14. Pose2Sim-0.1.0/Pose2Sim.egg-info/top_level.txt +2 -0
  15. Pose2Sim-0.1.0/README.md +509 -0
  16. pose2sim-0.0.0/Pose2Sim/Utilities/DLC_to_OpenPose.py → Pose2Sim-0.1.0/Utilities/DLC_to_Openpose.py +97 -105
  17. Pose2Sim-0.1.0/Utilities/__init__.py +14 -0
  18. {pose2sim-0.0.0/Pose2Sim → Pose2Sim-0.1.0}/Utilities/c3d_to_trc.py +116 -136
  19. {pose2sim-0.0.0/Pose2Sim → Pose2Sim-0.1.0}/Utilities/calib_from_checkerboard.py +316 -323
  20. {pose2sim-0.0.0/Pose2Sim → Pose2Sim-0.1.0}/Utilities/calib_qca_to_toml.py +210 -242
  21. {pose2sim-0.0.0/Pose2Sim → Pose2Sim-0.1.0}/Utilities/calib_toml_to_qca.py +201 -206
  22. pose2sim-0.0.0/Pose2Sim/Utilities/calib_toml_to_easymocap.py → Pose2Sim-0.1.0/Utilities/calib_toml_to_yml.py +151 -157
  23. pose2sim-0.0.0/Pose2Sim/Utilities/calib_easymocap_to_toml.py → Pose2Sim-0.1.0/Utilities/calib_yml_to_toml.py +153 -163
  24. {pose2sim-0.0.0/Pose2Sim → Pose2Sim-0.1.0}/Utilities/json_display_with_img.py +114 -119
  25. Pose2Sim-0.1.0/Utilities/json_display_without_img.py +151 -0
  26. {pose2sim-0.0.0/Pose2Sim → Pose2Sim-0.1.0}/Utilities/trc_Zup_to_Yup.py +84 -93
  27. {pose2sim-0.0.0/Pose2Sim → Pose2Sim-0.1.0}/Utilities/trc_desample.py +87 -94
  28. {pose2sim-0.0.0/Pose2Sim → Pose2Sim-0.1.0}/Utilities/trc_filter.py +364 -368
  29. Pose2Sim-0.1.0/Utilities/trc_gaitevents.py +181 -0
  30. {pose2sim-0.0.0/Pose2Sim → Pose2Sim-0.1.0}/Utilities/trc_plot.py +166 -170
  31. Pose2Sim-0.1.0/pyproject.toml +3 -0
  32. Pose2Sim-0.1.0/setup.cfg +36 -0
  33. Pose2Sim-0.1.0/setup.py +7 -0
  34. pose2sim-0.0.0/PKG-INFO +0 -1115
  35. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Config.toml +0 -325
  36. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Trial_1/Config.toml +0 -326
  37. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Trial_1/videos/cam01.mp4 +0 -0
  38. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Trial_1/videos/cam02.mp4 +0 -0
  39. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Trial_1/videos/cam03.mp4 +0 -0
  40. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Trial_1/videos/cam04.mp4 +0 -0
  41. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Trial_2/Config.toml +0 -326
  42. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Trial_2/videos/cam01.mp4 +0 -0
  43. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Trial_2/videos/cam02.mp4 +0 -0
  44. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Trial_2/videos/cam03.mp4 +0 -0
  45. pose2sim-0.0.0/Pose2Sim/Demo_Batch/Trial_2/videos/cam04.mp4 +0 -0
  46. pose2sim-0.0.0/Pose2Sim/Demo_Batch/calibration/Calib.qca.txt +0 -38
  47. pose2sim-0.0.0/Pose2Sim/Demo_MultiPerson/Config.toml +0 -325
  48. pose2sim-0.0.0/Pose2Sim/Demo_MultiPerson/calibration/Calib.qca.txt +0 -38
  49. pose2sim-0.0.0/Pose2Sim/Demo_MultiPerson/videos/cam01.mp4 +0 -0
  50. pose2sim-0.0.0/Pose2Sim/Demo_MultiPerson/videos/cam02.mp4 +0 -0
  51. pose2sim-0.0.0/Pose2Sim/Demo_MultiPerson/videos/cam03.mp4 +0 -0
  52. pose2sim-0.0.0/Pose2Sim/Demo_MultiPerson/videos/cam04.mp4 +0 -0
  53. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/Config.toml +0 -326
  54. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/Calib.qca.txt +0 -38
  55. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/extrinsics/ext_cam01_img/.gitkeep +0 -0
  56. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/extrinsics/ext_cam01_img/cam01_ext.png +0 -0
  57. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/extrinsics/ext_cam02_img/.gitkeep +0 -0
  58. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/extrinsics/ext_cam02_img/cam02_ext.png +0 -0
  59. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/extrinsics/ext_cam03_img/.gitkeep +0 -0
  60. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/extrinsics/ext_cam03_img/cam03_ext.png +0 -0
  61. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/extrinsics/ext_cam04_img/.gitkeep +0 -0
  62. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/extrinsics/ext_cam04_img/cam04_ext.png +0 -0
  63. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam01_img/.gitkeep +0 -0
  64. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam01_img/cam01_01_int.jpg +0 -0
  65. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam01_img/cam01_02_int.jpg +0 -0
  66. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam01_img/cam01_03_int.jpg +0 -0
  67. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam01_img/cam01_04_int.jpg +0 -0
  68. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam01_img/cam01_05_int.jpg +0 -0
  69. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam01_img/cam01_06_int.jpg +0 -0
  70. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam01_img/cam01_07_int.jpg +0 -0
  71. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam02_img/.gitkeep +0 -0
  72. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam02_img/cam02_01_int.jpg +0 -0
  73. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam02_img/cam02_02_int.jpg +0 -0
  74. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam02_img/cam02_03_int.jpg +0 -0
  75. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam02_img/cam02_04_int.jpg +0 -0
  76. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam02_img/cam02_05_int.jpg +0 -0
  77. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam02_img/cam02_06_int.jpg +0 -0
  78. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam02_img/cam02_07_int.jpg +0 -0
  79. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam03_img/.gitkeep +0 -0
  80. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam03_img/cam03_01_int.jpg +0 -0
  81. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam03_img/cam03_02_int.jpg +0 -0
  82. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam03_img/cam03_03_int.jpg +0 -0
  83. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam03_img/cam03_04_int.jpg +0 -0
  84. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam03_img/cam03_05_int.jpg +0 -0
  85. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam03_img/cam03_06_int.jpg +0 -0
  86. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam03_img/cam03_07_int.jpg +0 -0
  87. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam04_img/.gitkeep +0 -0
  88. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam04_img/cam04_01_int.jpg +0 -0
  89. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam04_img/cam04_02_int.jpg +0 -0
  90. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam04_img/cam04_03_int.jpg +0 -0
  91. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam04_img/cam04_04_int.jpg +0 -0
  92. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam04_img/cam04_05_int.jpg +0 -0
  93. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam04_img/cam04_06_int.jpg +0 -0
  94. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/calibration/intrinsics/int_cam04_img/cam04_07_int.jpg +0 -0
  95. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/videos/cam01.mp4 +0 -0
  96. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/videos/cam02.mp4 +0 -0
  97. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/videos/cam03.mp4 +0 -0
  98. pose2sim-0.0.0/Pose2Sim/Demo_SinglePerson/videos/cam04.mp4 +0 -0
  99. pose2sim-0.0.0/Pose2Sim/MarkerAugmenter/LSTM/v0.3_lower/mean.npy +0 -0
  100. pose2sim-0.0.0/Pose2Sim/MarkerAugmenter/LSTM/v0.3_lower/model.onnx +0 -0
  101. pose2sim-0.0.0/Pose2Sim/MarkerAugmenter/LSTM/v0.3_lower/std.npy +0 -0
  102. pose2sim-0.0.0/Pose2Sim/MarkerAugmenter/LSTM/v0.3_upper/mean.npy +0 -0
  103. pose2sim-0.0.0/Pose2Sim/MarkerAugmenter/LSTM/v0.3_upper/model.onnx +0 -0
  104. pose2sim-0.0.0/Pose2Sim/MarkerAugmenter/LSTM/v0.3_upper/std.npy +0 -0
  105. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/block.stl +0 -86
  106. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/block.vtp +0 -70
  107. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/bofoot.stl +0 -12882
  108. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/bofoot.vtp +0 -3008
  109. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/capitate_lvs.stl +0 -1234
  110. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/capitate_lvs.vtp +0 -378
  111. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/capitate_rvs.stl +0 -1234
  112. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/capitate_rvs.vtp +0 -378
  113. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv1sm.stl +0 -4342
  114. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv1sm.vtp +0 -1002
  115. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv2sm.stl +0 -2018
  116. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv2sm.vtp +0 -522
  117. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv3sm.stl +0 -2018
  118. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv3sm.vtp +0 -522
  119. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv4sm.stl +0 -2018
  120. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv4sm.vtp +0 -522
  121. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv5sm.stl +0 -1990
  122. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv5sm.vtp +0 -522
  123. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv6sm.stl +0 -2018
  124. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv6sm.vtp +0 -522
  125. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv7.stl +0 -2970
  126. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/cerv7.vtp +0 -870
  127. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/femur_l.stl +0 -6358
  128. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/femur_l.vtp +0 -1842
  129. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/femur_r.stl +0 -6358
  130. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/femur_r.vtp +0 -1842
  131. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/fibula_l.stl +0 -1682
  132. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/fibula_l.vtp +0 -506
  133. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/fibula_r.stl +0 -1682
  134. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/fibula_r.vtp +0 -506
  135. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/foot.stl +0 -13687
  136. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/foot.vtp +0 -3477
  137. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/hamate_lvs.stl +0 -1038
  138. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/hamate_lvs.vtp +0 -322
  139. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/hamate_rvs.stl +0 -1038
  140. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/hamate_rvs.vtp +0 -322
  141. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/hat_jaw.stl +0 -20414
  142. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/hat_jaw.vtp +0 -4736
  143. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/hat_ribs_scap.stl +0 -67762
  144. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/hat_ribs_scap.vtp +0 -11387
  145. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/hat_skull.stl +0 -46146
  146. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/hat_skull.vtp +0 -10411
  147. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/humerus_lv.stl +0 -4734
  148. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/humerus_lv.vtp +0 -1378
  149. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/humerus_rv.stl +0 -4734
  150. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/humerus_rv.vtp +0 -1378
  151. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_distal_lvs.stl +0 -1752
  152. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_distal_lvs.vtp +0 -526
  153. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_distal_rvs.stl +0 -1752
  154. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_distal_rvs.vtp +0 -526
  155. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_medial_lvs.stl +0 -1850
  156. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_medial_lvs.vtp +0 -554
  157. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_medial_rvs.stl +0 -1850
  158. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_medial_rvs.vtp +0 -554
  159. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_proximal_lvs.stl +0 -1591
  160. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_proximal_lvs.vtp +0 -481
  161. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_proximal_rvs.stl +0 -1591
  162. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/index_proximal_rvs.vtp +0 -481
  163. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/l_bofoot.stl +0 -12882
  164. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/l_bofoot.vtp +0 -3008
  165. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/l_foot.stl +0 -13687
  166. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/l_foot.vtp +0 -3477
  167. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/l_patella.stl +0 -982
  168. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/l_patella.vtp +0 -246
  169. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/l_pelvis.stl +0 -1696
  170. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/l_pelvis.vtp +0 -514
  171. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_distal_lvs.stl +0 -2214
  172. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_distal_lvs.vtp +0 -656
  173. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_distal_rvs.stl +0 -2214
  174. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_distal_rvs.vtp +0 -656
  175. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_medial_lvs.stl +0 -1654
  176. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_medial_lvs.vtp +0 -498
  177. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_medial_rvs.stl +0 -1654
  178. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_medial_rvs.vtp +0 -498
  179. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_proximal_lvs.stl +0 -1892
  180. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_proximal_lvs.vtp +0 -566
  181. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_proximal_rvs.stl +0 -1892
  182. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/little_proximal_rvs.vtp +0 -566
  183. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lumbar1.stl +0 -2970
  184. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lumbar1.vtp +0 -870
  185. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lumbar2.stl +0 -2970
  186. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lumbar2.vtp +0 -870
  187. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lumbar3.stl +0 -2970
  188. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lumbar3.vtp +0 -870
  189. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lumbar4.stl +0 -2970
  190. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lumbar4.vtp +0 -870
  191. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lumbar5.stl +0 -2970
  192. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lumbar5.vtp +0 -870
  193. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lunate_lvs.stl +0 -926
  194. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lunate_lvs.vtp +0 -290
  195. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lunate_rvs.stl +0 -926
  196. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/lunate_rvs.vtp +0 -290
  197. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal1_lvs.stl +0 -4118
  198. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal1_lvs.vtp +0 -1202
  199. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal1_rvs.stl +0 -4118
  200. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal1_rvs.vtp +0 -1202
  201. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal2_lvs.stl +0 -3138
  202. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal2_lvs.vtp +0 -924
  203. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal2_rvs.stl +0 -3138
  204. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal2_rvs.vtp +0 -924
  205. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal3_lvs.stl +0 -4454
  206. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal3_lvs.vtp +0 -1298
  207. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal3_rvs.stl +0 -4454
  208. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal3_rvs.vtp +0 -1298
  209. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal4_lvs.stl +0 -4860
  210. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal4_lvs.vtp +0 -1410
  211. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal4_rvs.stl +0 -4860
  212. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal4_rvs.vtp +0 -1410
  213. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal5_lvs.stl +0 -5378
  214. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal5_lvs.vtp +0 -1558
  215. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal5_rvs.stl +0 -5378
  216. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/metacarpal5_rvs.vtp +0 -1558
  217. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_distal_lvs.stl +0 -1962
  218. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_distal_lvs.vtp +0 -586
  219. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_distal_rvs.stl +0 -1962
  220. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_distal_rvs.vtp +0 -586
  221. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_medial_lvs.stl +0 -2298
  222. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_medial_lvs.vtp +0 -682
  223. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_medial_rvs.stl +0 -2298
  224. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_medial_rvs.vtp +0 -682
  225. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_proximal_lvs.stl +0 -1836
  226. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_proximal_lvs.vtp +0 -550
  227. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_proximal_rvs.stl +0 -1836
  228. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/middle_proximal_rvs.vtp +0 -550
  229. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/pisiform_lvs.stl +0 -450
  230. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/pisiform_lvs.vtp +0 -154
  231. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/pisiform_rvs.stl +0 -450
  232. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/pisiform_rvs.vtp +0 -154
  233. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/r_patella.stl +0 -982
  234. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/r_patella.vtp +0 -246
  235. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/r_pelvis.stl +0 -1696
  236. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/r_pelvis.vtp +0 -514
  237. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/radius_lv.stl +0 -2690
  238. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/radius_lv.vtp +0 -794
  239. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/radius_rv.stl +0 -2690
  240. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/radius_rv.vtp +0 -794
  241. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_distal_lvs.stl +0 -1724
  242. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_distal_lvs.vtp +0 -518
  243. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_distal_rvs.stl +0 -1724
  244. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_distal_rvs.vtp +0 -518
  245. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_medial_lvs.stl +0 -2410
  246. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_medial_lvs.vtp +0 -714
  247. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_medial_rvs.stl +0 -2410
  248. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_medial_rvs.vtp +0 -714
  249. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_proximal_lvs.stl +0 -1822
  250. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_proximal_lvs.vtp +0 -546
  251. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_proximal_rvs.stl +0 -1822
  252. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ring_proximal_rvs.vtp +0 -546
  253. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/sacrum.stl +0 -2662
  254. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/sacrum.vtp +0 -606
  255. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/scaphoid_lvs.stl +0 -996
  256. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/scaphoid_lvs.vtp +0 -310
  257. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/scaphoid_rvs.stl +0 -996
  258. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/scaphoid_rvs.vtp +0 -310
  259. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/talus_lv.stl +0 -6414
  260. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/talus_lv.vtp +0 -1858
  261. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/talus_rv.stl +0 -6414
  262. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/talus_rv.vtp +0 -1858
  263. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic10_s.stl +0 -2970
  264. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic10_s.vtp +0 -870
  265. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic11_s.stl +0 -2970
  266. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic11_s.vtp +0 -870
  267. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic12_s.stl +0 -2970
  268. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic12_s.vtp +0 -870
  269. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic1_s.stl +0 -2970
  270. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic1_s.vtp +0 -870
  271. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic2_s.stl +0 -2970
  272. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic2_s.vtp +0 -870
  273. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic3_s.stl +0 -2970
  274. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic3_s.vtp +0 -870
  275. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic4_s.stl +0 -2970
  276. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic4_s.vtp +0 -870
  277. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic5_s.stl +0 -2970
  278. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic5_s.vtp +0 -870
  279. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic6_s.stl +0 -2970
  280. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic6_s.vtp +0 -870
  281. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic7_s.stl +0 -2970
  282. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic7_s.vtp +0 -870
  283. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic8_s.stl +0 -2970
  284. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic8_s.vtp +0 -870
  285. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic9_s.stl +0 -2970
  286. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thoracic9_s.vtp +0 -870
  287. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thumb_distal_lvs.stl +0 -2410
  288. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thumb_distal_lvs.vtp +0 -714
  289. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thumb_distal_rvs.stl +0 -2410
  290. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thumb_distal_rvs.vtp +0 -714
  291. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thumb_proximal_lvs.stl +0 -1976
  292. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thumb_proximal_lvs.vtp +0 -590
  293. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thumb_proximal_rvs.stl +0 -1976
  294. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/thumb_proximal_rvs.vtp +0 -590
  295. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/tibia_l.stl +0 -2004
  296. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/tibia_l.vtp +0 -598
  297. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/tibia_r.stl +0 -2004
  298. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/tibia_r.vtp +0 -598
  299. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/trapezium_lvs.stl +0 -1444
  300. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/trapezium_lvs.vtp +0 -438
  301. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/trapezium_rvs.stl +0 -1444
  302. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/trapezium_rvs.vtp +0 -438
  303. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/trapezoid_lvs.stl +0 -884
  304. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/trapezoid_lvs.vtp +0 -278
  305. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/trapezoid_rvs.stl +0 -884
  306. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/trapezoid_rvs.vtp +0 -278
  307. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/triquetrum_lvs.stl +0 -1136
  308. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/triquetrum_lvs.vtp +0 -350
  309. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/triquetrum_rvs.stl +0 -1136
  310. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/triquetrum_rvs.vtp +0 -350
  311. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ulna_lv.stl +0 -2746
  312. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ulna_lv.vtp +0 -810
  313. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ulna_rv.stl +0 -2746
  314. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Geometry/ulna_rv.vtp +0 -810
  315. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/IK_Setup_Pose2Sim_Blazepose.xml +0 -191
  316. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/IK_Setup_Pose2Sim_Body135.xml +0 -203
  317. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/IK_Setup_Pose2Sim_Body25.xml +0 -167
  318. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/IK_Setup_Pose2Sim_Body25b.xml +0 -167
  319. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/IK_Setup_Pose2Sim_Coco133.xml +0 -203
  320. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/IK_Setup_Pose2Sim_Coco17.xml +0 -125
  321. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/IK_Setup_Pose2Sim_Halpe26.xml +0 -173
  322. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/IK_Setup_Pose2Sim_Halpe68_136.xml +0 -209
  323. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/IK_Setup_Pose2Sim_withHands_LSTM.xml +0 -335
  324. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/IK_Setup_Pose2Sim_withoutHands_LSTM.xml +0 -299
  325. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Markers_BlazePose.xml +0 -197
  326. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Markers_Body135.xml +0 -215
  327. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Markers_Body25.xml +0 -177
  328. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Markers_Body25b.xml +0 -177
  329. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Markers_Coco133.xml +0 -215
  330. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Markers_Coco17.xml +0 -121
  331. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Markers_Halpe26.xml +0 -183
  332. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Markers_Halpe68_136.xml +0 -221
  333. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Markers_LSTM.xml +0 -415
  334. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Markers_SKEL.xml +0 -849
  335. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Model_Pose2Sim.osim +0 -6743
  336. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Model_Pose2Sim_contacts_muscles.osim +0 -31563
  337. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Scaling_Setup_Pose2Sim_Blazepose.xml +0 -468
  338. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Scaling_Setup_Pose2Sim_Body135.xml +0 -599
  339. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Scaling_Setup_Pose2Sim_Body25.xml +0 -594
  340. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Scaling_Setup_Pose2Sim_Body25b.xml +0 -599
  341. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Scaling_Setup_Pose2Sim_Coco133.xml +0 -607
  342. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Scaling_Setup_Pose2Sim_Coco17.xml +0 -504
  343. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Scaling_Setup_Pose2Sim_Halpe26.xml +0 -605
  344. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Scaling_Setup_Pose2Sim_Halpe68_136.xml +0 -605
  345. pose2sim-0.0.0/Pose2Sim/OpenSim_Setup/Scaling_Setup_Pose2Sim_LSTM.xml +0 -753
  346. pose2sim-0.0.0/Pose2Sim/Pose2Sim.py +0 -401
  347. pose2sim-0.0.0/Pose2Sim/Utilities/AlphaPose_to_OpenPose.py +0 -123
  348. pose2sim-0.0.0/Pose2Sim/Utilities/Blazepose_runsave.py +0 -246
  349. pose2sim-0.0.0/Pose2Sim/Utilities/MMPose_to_OpenPose.py +0 -67
  350. pose2sim-0.0.0/Pose2Sim/Utilities/__init__.py +0 -8
  351. pose2sim-0.0.0/Pose2Sim/Utilities/bodykin_from_mot_osim.py +0 -196
  352. pose2sim-0.0.0/Pose2Sim/Utilities/calib_toml_to_opencap.py +0 -187
  353. pose2sim-0.0.0/Pose2Sim/Utilities/face_blurring.py +0 -467
  354. pose2sim-0.0.0/Pose2Sim/Utilities/json_display_without_img.py +0 -185
  355. pose2sim-0.0.0/Pose2Sim/Utilities/reproj_from_trc_calib.py +0 -517
  356. pose2sim-0.0.0/Pose2Sim/Utilities/tests.py +0 -209
  357. pose2sim-0.0.0/Pose2Sim/Utilities/trc_combine.py +0 -174
  358. pose2sim-0.0.0/Pose2Sim/Utilities/trc_from_easymocap.py +0 -174
  359. pose2sim-0.0.0/Pose2Sim/Utilities/trc_from_mot_osim.py +0 -177
  360. pose2sim-0.0.0/Pose2Sim/Utilities/trc_gaitevents.py +0 -730
  361. pose2sim-0.0.0/Pose2Sim/Utilities/trc_to_c3d.py +0 -134
  362. pose2sim-0.0.0/Pose2Sim/__init__.py +0 -14
  363. pose2sim-0.0.0/Pose2Sim/calibration.py +0 -1360
  364. pose2sim-0.0.0/Pose2Sim/common.py +0 -1298
  365. pose2sim-0.0.0/Pose2Sim/filtering.py +0 -517
  366. pose2sim-0.0.0/Pose2Sim/kinematics.py +0 -687
  367. pose2sim-0.0.0/Pose2Sim/markerAugmentation.py +0 -327
  368. pose2sim-0.0.0/Pose2Sim/personAssociation.py +0 -777
  369. pose2sim-0.0.0/Pose2Sim/poseEstimation.py +0 -612
  370. pose2sim-0.0.0/Pose2Sim/skeletons.py +0 -1001
  371. pose2sim-0.0.0/Pose2Sim/synchronization.py +0 -1593
  372. pose2sim-0.0.0/Pose2Sim/triangulation.py +0 -873
  373. pose2sim-0.0.0/README.md +0 -1070
  374. pose2sim-0.0.0/pose2sim.egg-info/PKG-INFO +0 -1115
  375. pose2sim-0.0.0/pose2sim.egg-info/SOURCES.txt +0 -359
  376. pose2sim-0.0.0/pose2sim.egg-info/entry_points.txt +0 -27
  377. pose2sim-0.0.0/pose2sim.egg-info/requires.txt +0 -19
  378. pose2sim-0.0.0/pose2sim.egg-info/top_level.txt +0 -3
  379. pose2sim-0.0.0/pyproject.toml +0 -90
  380. pose2sim-0.0.0/setup.cfg +0 -4
  381. {pose2sim-0.0.0/pose2sim.egg-info → Pose2Sim-0.1.0/Pose2Sim.egg-info}/dependency_links.txt +0 -0
@@ -1,29 +1,29 @@
1
- BSD 3-Clause License
2
-
3
- Copyright (c) 2022, perfanalytics
4
- All rights reserved.
5
-
6
- Redistribution and use in source and binary forms, with or without
7
- modification, are permitted provided that the following conditions are met:
8
-
9
- 1. Redistributions of source code must retain the above copyright notice, this
10
- list of conditions and the following disclaimer.
11
-
12
- 2. Redistributions in binary form must reproduce the above copyright notice,
13
- this list of conditions and the following disclaimer in the documentation
14
- and/or other materials provided with the distribution.
15
-
16
- 3. Neither the name of the copyright holder nor the names of its
17
- contributors may be used to endorse or promote products derived from
18
- this software without specific prior written permission.
19
-
20
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2021, David PAGNON
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.1
2
+ Name: Pose2Sim
3
+ Version: 0.1.0
4
+ Summary: From OpenPose to OpenSim
5
+ Home-page: https://gitlab.inria.fr/perfanalytics/pose2sim
6
+ Author: David Pagnon
7
+ Author-email: contact@david-pagnon.com
8
+ License: BSD 3-Clause License
9
+ Keywords: markerless,kinematics,OpenPose,OpenSim,3D human pose,biomechanics
10
+ Platform: UNKNOWN
11
+ Classifier: Programming Language :: Python :: 3
12
+ Requires-Python: <4,>=3.8
13
+ License-File: LICENSE
14
+
15
+ Perform a markerless kinematic analysis from multiple calibrated views as a unified workflow from an OpenPose input to an OpenSim result.
16
+
@@ -0,0 +1,139 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+
5
+ '''
6
+ ###########################################################################
7
+ ## POSE2SIM ##
8
+ ###########################################################################
9
+
10
+ This repository offers a way to perform markerless kinematics, and gives an
11
+ example workflow from an Openpose input to an OpenSim result.
12
+
13
+ It offers tools for:
14
+ - 2D pose estimation,
15
+ - Cameras calibration,
16
+ - Tracking the person of interest,
17
+ - Robust triangulation,
18
+ - Filtration.
19
+
20
+ It has been tested on Windows 10 but should work similarly on Linux.
21
+ Please subscribe to this issue if you wish to be notified of the code release.
22
+ See https://github.com/davidpagnon/Openpose-to-Opensim
23
+
24
+ Installation:
25
+ # Open Anaconda prompt. Type:
26
+ # - conda create -n Pose2Sim python=3.7 tensorflow-gpu=1.13.1
27
+ # - conda activate Pose2Sim
28
+ # - conda install Pose2Sim
29
+
30
+ Usage:
31
+ from Pose2Sim import Pose2Sim
32
+ Pose2Sim.track2D()
33
+ Pose2Sim.triangulate3D()
34
+ Pose2Sim.filter3D()
35
+
36
+ '''
37
+
38
+
39
+ ## INIT
40
+ import toml
41
+ import os
42
+ import logging, logging.handlers
43
+
44
+ if not os.path.exists('User'): os.mkdir('User')
45
+ with open('User/logs.txt', 'a+') as log_f: pass
46
+ logging.basicConfig(format='%(message)s', level=logging.INFO,
47
+ handlers = [logging.handlers.TimedRotatingFileHandler('User/logs.txt', when='D', interval=7), logging.StreamHandler()])
48
+
49
+
50
+ ## AUTHORSHIP INFORMATION
51
+ __author__ = "David Pagnon"
52
+ __copyright__ = "Copyright 2021, Pose2Sim"
53
+ __credits__ = ["David Pagnon"]
54
+ __license__ = "BSD 3-Clause License"
55
+ __version__ = "0.1"
56
+ __maintainer__ = "David Pagnon"
57
+ __email__ = "contact@david-pagnon.com"
58
+ __status__ = "Development"
59
+
60
+
61
+ ## FUNCTIONS
62
+ def read_config_file(config):
63
+ '''
64
+ Read configation file.
65
+ '''
66
+
67
+ config_dict = toml.load(config)
68
+ return config_dict
69
+
70
+
71
+ def base_params(config_dict):
72
+ '''
73
+ Retrieve sequence name and frames to be analyzed.
74
+ '''
75
+
76
+ project_dir = config_dict.get('project').get('project_dir')
77
+ if project_dir == '': project_dir = os.getcwd()
78
+ frames_range = config_dict.get('project').get('frames_range')
79
+ seq_name = os.path.basename(project_dir)
80
+ frames = ["all frames" if frames_range == [] else f"frames {frames_range[0]} to {frames_range[1]}"][0]
81
+
82
+ return seq_name, frames
83
+
84
+
85
+ def calibrateCams(config='User/Config.toml'):
86
+ '''
87
+ Cameras calibration from checkerboards or from qualisys files.
88
+ '''
89
+
90
+ from Pose2Sim.calibrate_cams import calibrate_cams_all
91
+
92
+ config_dict = read_config_file(config)
93
+
94
+ logging.info("\nCalibrating cameras...")
95
+ calibrate_cams_all(config_dict)
96
+
97
+
98
+ def track2D(config='User/Config.toml'):
99
+ '''
100
+ Tracking of the person of interest in case of multiple persons detection.
101
+ Needs a calibration file.
102
+ '''
103
+
104
+ from Pose2Sim.track_2d import track_2d_all
105
+
106
+ config_dict = read_config_file(config)
107
+ seq_name, frames = base_params(config_dict)
108
+
109
+ logging.info(f"\nTracking the person of interest for {seq_name}, for {frames}.")
110
+ track_2d_all(config_dict)
111
+
112
+
113
+ def triangulate3D(config='User/Config.toml'):
114
+ '''
115
+ Robust triangulation of 2D points coordinates.
116
+ '''
117
+
118
+ from Pose2Sim.triangulate_3d import triangulate_all
119
+
120
+ config_dict = read_config_file(config)
121
+ seq_name, frames = base_params(config_dict)
122
+
123
+ logging.info(f"\nTriangulation of 2D points for {seq_name}, for {frames}.")
124
+ triangulate_all(config_dict)
125
+
126
+
127
+ def filter3D(config='User/Config.toml'):
128
+ '''
129
+ Filter trc 3D coordinates.
130
+ '''
131
+
132
+ from Pose2Sim.filter_3d import filter_all
133
+
134
+ config_dict = read_config_file(config)
135
+ seq_name, frames = base_params(config_dict)
136
+
137
+ logging.info(f"\nFiltering 3D coordinates for {seq_name}, for {frames}.")
138
+ filter_all(config_dict)
139
+
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import sys
5
+
6
+ name = 'Pose2Sim'
7
+
8
+ __version__ = '0.1.0'
9
+ __author__ = "David Pagnon"
10
+ __author_email__ = "contact@david-pagnon.com"
11
+ __description__ = """Perform a markerless kinematic analysis from multiple calibrated views as a unified workflow from an OpenPose input to an OpenSim result."""
12
+ __url__ = "https://gitlab.inria.fr/perfanalytics/pose2sim"
13
+
14
+ VERSION = __version__
@@ -0,0 +1,417 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+
5
+ '''
6
+ ###########################################################################
7
+ ## CAMERAS CALIBRATION ##
8
+ ###########################################################################
9
+
10
+ Use this module to calibrate your cameras and save results to a .toml file.
11
+
12
+ It either converts a Qualisys calibration .qca.txt file,
13
+ Or calibrates cameras from checkerboard images.
14
+
15
+ Checkerboard calibration is based on
16
+ https://docs.opencv.org/3.4.15/dc/dbb/tutorial_py_calibration.html.
17
+ /!\ Beware that corners must be detected on all frames, or else extrinsic
18
+ parameters may be wrong. Set show_corner_detection to 1 to verify.
19
+
20
+ INPUTS:
21
+ - a calibration file (.qca.txt extension)
22
+ - OR checkerboard images or videos for each camera
23
+ - a Config.toml file
24
+
25
+ OUTPUTS:
26
+ - a calibration file (.toml extension)
27
+
28
+ '''
29
+
30
+
31
+ ## INIT
32
+ import os
33
+ import logging
34
+ import numpy as np
35
+ import cv2
36
+ import glob
37
+ import toml
38
+ import re
39
+ from lxml import etree
40
+
41
+ from Pose2Sim.common import RT_qca2cv, rotate_cam, euclidean_distance
42
+
43
+
44
+ ## AUTHORSHIP INFORMATION
45
+ __author__ = "David Pagnon"
46
+ __copyright__ = "Copyright 2021, Pose2Sim"
47
+ __credits__ = ["David Pagnon"]
48
+ __license__ = "BSD 3-Clause License"
49
+ __version__ = "0.1"
50
+ __maintainer__ = "David Pagnon"
51
+ __email__ = "contact@david-pagnon.com"
52
+ __status__ = "Development"
53
+
54
+
55
+ ## FUNCTIONS
56
+ def calib_qca_fun(config):
57
+ '''
58
+ Convert a Qualisys .qca.txt calibration file
59
+ Converts from camera view to object view, Pi rotates cameras,
60
+ and converts rotation with Roodrigues formula
61
+
62
+ INPUTS:
63
+ - a Config.toml file
64
+
65
+ OUTPUTS:
66
+ - ret: residual reprojection error in _mm_: list of floats
67
+ - C: camera name: list of strings
68
+ - S: image size: list of list of floats
69
+ - D: distorsion: list of arrays of floats
70
+ - K: intrinsic parameters: list of 3x3 arrays of floats
71
+ - R: extrinsic rotation: list of arrays of floats
72
+ - T: extrinsic translation: list of arrays of floats
73
+
74
+ '''
75
+
76
+ project_dir = config.get('project').get('project_dir')
77
+ if project_dir == '': project_dir = os.getcwd()
78
+ calib_folder_name = config.get('project').get('calib_folder_name')
79
+ calib_dir = os.path.join(project_dir, calib_folder_name)
80
+ qca_path = glob.glob(os.path.join(calib_dir, '*.qca.txt'))[0]
81
+ binning_factor = config.get('calibration').get('qca').get('binning_factor')
82
+
83
+ ret, C, S, D, K, R, T = read_qca(qca_path, binning_factor)
84
+
85
+ RT = [RT_qca2cv(r,t) for r, t in zip(R, T)]
86
+ R = [rt[0] for rt in RT]
87
+ T = [rt[1] for rt in RT]
88
+
89
+ RT = [rotate_cam(r, t, ang_x=np.pi, ang_y=0, ang_z=0) for r, t in zip(R, T)]
90
+ R = [rt[0] for rt in RT]
91
+ T = [rt[1] for rt in RT]
92
+
93
+ R = [np.array(cv2.Rodrigues(r)[0]).flatten() for r in R]
94
+ T = np.array(T)
95
+
96
+ return ret, C, S, D, K, R, T
97
+
98
+
99
+ def read_qca(qca_path, binning_factor):
100
+ '''
101
+ Reads a Qualisys .qca.txt calibration file
102
+ Returns 6 lists of size N (N=number of cameras)
103
+
104
+ INPUTS:
105
+ - qca_path: path to .qca.txt calibration file: string
106
+ - binning_factor: usually 1: integer
107
+
108
+ OUTPUTS:
109
+ - ret: residual reprojection error in _mm_: list of floats
110
+ - C: camera name: list of strings
111
+ - S: image size: list of list of floats
112
+ - D: distorsion: list of arrays of floats
113
+ - K: intrinsic parameters: list of 3x3 arrays of floats
114
+ - R: extrinsic rotation: list of 3x3 arrays of floats
115
+ - T: extrinsic translation: list of arrays of floats
116
+ '''
117
+
118
+ root = etree.parse(qca_path).getroot()
119
+ ret, C, S, D, K, R, T = [], [], [], [], [], [], []
120
+
121
+ # Cameraa name
122
+ for tag in root.findall('cameras/camera'):
123
+ ret += [float(tag.attrib.get('avg-residual'))/1000]
124
+ C += [tag.attrib.get('serial')]
125
+
126
+ # Image size
127
+ for tag in root.findall('cameras/camera/fov_marker'):
128
+ w = float(tag.attrib.get('right'))/binning_factor
129
+ h = float(tag.attrib.get('bottom'))/binning_factor
130
+ S += [[w, h]]
131
+
132
+ # Intrinsic parameters: distorsion and intrinsic matrix
133
+ for tag in root.findall('cameras/camera/intrinsic'):
134
+ k1 = float(tag.get('radialDistortion1'))/64/binning_factor
135
+ k2 = float(tag.get('radialDistortion2'))/64/binning_factor
136
+ p1 = float(tag.get('tangentalDistortion1'))/64/binning_factor
137
+ p2 = float(tag.get('tangentalDistortion2'))/64/binning_factor
138
+ D+= [np.array([k1, k2, p1, p2])]
139
+
140
+ fu = float(tag.get('focalLengthU'))/64/binning_factor
141
+ fv = float(tag.get('focalLengthV'))/64/binning_factor
142
+ cu = float(tag.get('centerPointU'))/64/binning_factor
143
+ cv = float(tag.get('centerPointV'))/64/binning_factor
144
+ K += [np.array([fu, 0., cu, 0., fv, cv, 0., 0., 1.]).reshape(3,3)]
145
+
146
+ # Extrinsic parameters: rotation matrix and translation vector
147
+ for tag in root.findall('cameras/camera/transform'):
148
+ tx = float(tag.get('x'))/1000
149
+ ty = float(tag.get('y'))/1000
150
+ tz = float(tag.get('z'))/1000
151
+ r11 = float(tag.get('r11'))
152
+ r12 = float(tag.get('r12'))
153
+ r13 = float(tag.get('r13'))
154
+ r21 = float(tag.get('r21'))
155
+ r22 = float(tag.get('r22'))
156
+ r23 = float(tag.get('r23'))
157
+ r31 = float(tag.get('r31'))
158
+ r32 = float(tag.get('r32'))
159
+ r33 = float(tag.get('r33'))
160
+
161
+ # Rotation (by-column to by-line)
162
+ R += [np.array([r11, r21, r31, r12, r22, r32, r13, r23, r33]).reshape(3,3)]
163
+ T += [np.array([tx, ty, tz])]
164
+
165
+ return ret, C, S, D, K, R, T
166
+
167
+
168
+ def findCorners(img, corners_nb, criteria, show):
169
+ '''
170
+ Find corners _of internal squares_ in the checkerboard
171
+
172
+ INPUTS:
173
+ - img: image read by opencv
174
+ - corners_nb: [H, W] internal corners in checkerboard: list of two integers [9,6]
175
+ - criteria: when to stop optimizing corners localization
176
+ - show: choose whether to show corner detections
177
+
178
+ OUTPUTS
179
+ - imgp: 2d corner points in image plane
180
+ '''
181
+
182
+ # Find corners
183
+ gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
184
+ ret, corners = cv2.findChessboardCorners(gray, corners_nb, None)
185
+ # Refine corners
186
+ if ret == True:
187
+ imgp = cv2.cornerSubPix(gray, corners, (11,11), (-1,-1), criteria)
188
+ # Draw and display the corners
189
+ if show:
190
+ cv2.drawChessboardCorners(img, corners_nb, imgp, ret)
191
+ print('Corners found.')
192
+ cv2.imshow('img', img)
193
+ cv2.waitKey(0)
194
+ return imgp
195
+ else:
196
+ if show:
197
+ print('Corners not found.')
198
+ return
199
+
200
+ def calib_checkerboard_fun(config):
201
+ '''
202
+ Calibrates from images or videos of a checkerboard
203
+
204
+ INPUTS:
205
+ - a Config.toml file
206
+
207
+ OUTPUTS:
208
+ - ret: residual reprojection error in _px_: list of floats
209
+ - C: camera name: list of strings
210
+ - S: image size: list of list of floats
211
+ - D: distorsion: list of arrays of floats
212
+ - K: intrinsic parameters: list of 3x3 arrays of floats
213
+ - R: extrinsic rotation: list of arrays of floats (Rodrigues)
214
+ - T: extrinsic translation: list of arrays of floats
215
+ '''
216
+
217
+ project_dir = config.get('project').get('project_dir')
218
+ if project_dir == '': project_dir = os.getcwd()
219
+ calib_folder_name = config.get('project').get('calib_folder_name')
220
+ calib_dir = os.path.join(project_dir, calib_folder_name)
221
+ cam_listdirs_names = next(os.walk(calib_dir))[1]
222
+
223
+ corners_nb = config.get('calibration').get('checkerboard').get('corners_nb')
224
+ square_size = config.get('calibration').get('checkerboard').get('square_size')
225
+ square_size = [square_size, square_size] if isinstance(square_size, int)==True else square_size
226
+ criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001) # stop refining after 30 iterations or if error less than 0.001px
227
+
228
+ frame_for_origin = config.get('calibration').get('checkerboard').get('frame_for_origin')
229
+ show = config.get('calibration').get('checkerboard').get('show_corner_detection')
230
+ from_vid_or_img = config.get('calibration').get('checkerboard').get('from_vid_or_img')
231
+ vid_snapshot_every_N_frames = config.get('calibration').get('checkerboard').get('vid_snapshot_every_N_frames')
232
+ vid_extension = config.get('calibration').get('checkerboard').get('vid_extension')
233
+ img_extension = config.get('calibration').get('checkerboard').get('img_extension')
234
+
235
+ ret, C, S, D, K, R, T = [], [], [], [], [], [], []
236
+ for cam in cam_listdirs_names:
237
+ print(f'\nCamera {cam}:')
238
+ # Prepare object points
239
+ objp = np.zeros((corners_nb[0]*corners_nb[1],3), np.float32)
240
+ objp[:,:2] = np.mgrid[0:corners_nb[0],0:corners_nb[1]].T.reshape(-1,2)
241
+ objp = objp*np.array([square_size+[0]], np.float32)
242
+ objpoints = [] # 3d points in world space
243
+ imgpoints = [] # 2d points in image plane
244
+
245
+ # Find corners in vid
246
+ if from_vid_or_img=='vid':
247
+ video = glob.glob(os.path.join(calib_dir, cam, '*.'+ vid_extension))[0]
248
+ cap = cv2.VideoCapture(video)
249
+ ret_vid, img = cap.read()
250
+ while ret_vid:
251
+ count = int(round(cap.get(1)))
252
+ ret_vid, img_vid = cap.read()
253
+ if count % vid_snapshot_every_N_frames == 0:
254
+ img = img_vid
255
+ imgp = findCorners(img, corners_nb, criteria, show)
256
+ if isinstance(imgp, np.ndarray):
257
+ objpoints.append(objp)
258
+ imgpoints.append(imgp)
259
+ cap.release()
260
+
261
+ # Find corners in images
262
+ elif from_vid_or_img=='img':
263
+ images = glob.glob(os.path.join(calib_dir, cam, '*.'+ img_extension))
264
+ images_sorted = sorted(images, key=lambda c: [int(n) for n in re.findall(r'\d+', c)]) #sorting paths with numbers
265
+ for image_f in images_sorted:
266
+ img = cv2.imread(image_f)
267
+ imgp = findCorners(img, corners_nb, criteria, show)
268
+ if isinstance(imgp, np.ndarray):
269
+ objpoints.append(objp)
270
+ imgpoints.append(imgp)
271
+
272
+ # Calibration
273
+ r, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpoints, imgpoints, img.shape[1::-1],
274
+ None, None, flags=(cv2.CALIB_FIX_K3 + cv2.CALIB_FIX_PRINCIPAL_POINT))
275
+ h, w = [np.float(i) for i in img.shape[:-1]]
276
+
277
+ ret.append(r)
278
+ C.append(cam)
279
+ S.append([w, h])
280
+ D.append(dist[0])
281
+ K.append(mtx)
282
+ R.append(rvecs[frame_for_origin].squeeze())
283
+ T.append(tvecs[frame_for_origin].squeeze())
284
+
285
+ # Object view to camera view
286
+ RT = [rotate_cam(r, t, ang_x=np.pi, ang_y=0, ang_z=0) for r, t in zip(R, T)]
287
+ R = [rt[0] for rt in RT]
288
+ T = [rt[1] for rt in RT]
289
+ R = [np.array(cv2.Rodrigues(r)[0]).flatten() for r in R]
290
+ T = np.array(T)/1000
291
+
292
+
293
+ return ret, C, S, D, K, R, T
294
+
295
+
296
+ def toml_write(calib_path, C, S, D, K, R, T):
297
+ '''
298
+ Writes calibration parameters to a .toml file
299
+
300
+ INPUTS:
301
+ - calib_path: path to the output calibration file: string
302
+ - C: camera name: list of strings
303
+ - S: image size: list of list of floats
304
+ - D: distorsion: list of arrays of floats
305
+ - K: intrinsic parameters: list of 3x3 arrays of floats
306
+ - R: extrinsic rotation: list of arrays of floats (Rodrigues)
307
+ - T: extrinsic translation: list of arrays of floats
308
+
309
+ OUTPUTS:
310
+ - a .toml file cameras calibrations
311
+ '''
312
+
313
+ with open(os.path.join(calib_path), 'w+') as cal_f:
314
+ for c in range(len(C)):
315
+ cam=f'[cam_{c+1}]\n'
316
+ name = f'name = "{C[c]}"\n'
317
+ size = f'size = [ {S[c][0]}, {S[c][1]}]\n'
318
+ mat = f'matrix = [ [ {K[c][0,0]}, 0.0, {K[c][0,2]}], [ 0.0, {K[c][1,1]}, {K[c][1,2]}], [ 0.0, 0.0, 1.0]]\n'
319
+ dist = f'distortions = [ {D[c][0]}, {D[c][1]}, {D[c][2]}, {D[c][3]}]\n'
320
+ rot = f'rotation = [ {R[c][0]}, {R[c][1]}, {R[c][2]}]\n'
321
+ tran = f'translation = [ {T[c][0]}, {T[c][1]}, {T[c][2]}]\n'
322
+ fish = f'fisheye = false\n\n'
323
+ cal_f.write(cam + name + size + mat + dist + rot + tran + fish)
324
+ meta = '[metadata]\nadjusted = false\nerror = 0.0\n'
325
+ cal_f.write(meta)
326
+
327
+
328
+ def calibrate(config):
329
+ '''
330
+ Choose whether to use qca or checkerboard calibration functions
331
+
332
+ INPUT:
333
+ - a Config.toml file
334
+
335
+ OUTPUTS:
336
+ - ret: residual reprojection error in _px_ (checkerboard) or in _mm_ (qca): list of floats
337
+ - C: camera name: list of strings
338
+ - S: image size: list of list of floats
339
+ - D: distorsion: list of arrays of floats
340
+ - K: intrinsic parameters: list of 3x3 arrays of floats
341
+ - R: extrinsic rotation: list of arrays of floats (Rodrigues)
342
+ - T: extrinsic translation: list of arrays of floats
343
+ '''
344
+
345
+ # Map calib function
346
+ calib_type = config.get('calibration').get('type')
347
+ calib_mapping = {
348
+ 'qca': calib_qca_fun,
349
+ 'checkerboard': calib_checkerboard_fun
350
+ }
351
+ calib_fun = calib_mapping[calib_type]
352
+
353
+ # Calibrate
354
+ ret, C, S, D, K, R, T = calib_fun(config)
355
+ return ret, C, S, D, K, R, T
356
+
357
+
358
+ def recap_calibrate(ret, calib_path, calib_type):
359
+ '''
360
+ Print a log message giving calibration results. Also stored in User/logs.txt.
361
+
362
+ OUTPUT:
363
+ - Message in console
364
+ '''
365
+
366
+ calib = toml.load(calib_path)
367
+
368
+ ret_m, ret_px = [], []
369
+ for c, cam in enumerate(calib.keys()):
370
+ if cam != 'metadata':
371
+ fm = calib[cam]['matrix'][0][0]
372
+ Dm = euclidean_distance(calib[cam]['translation'], [0,0,0])
373
+ if calib_type=='qca':
374
+ ret_m.append( np.around(ret[c]*1000, decimals=3) )
375
+ ret_px.append( np.around(ret[c] / Dm * fm, decimals=3) )
376
+ elif calib_type=='checkerboard':
377
+ ret_px.append( np.around(ret[c], decimals=3) )
378
+ ret_m.append( np.around(ret[c]*1000 * Dm / fm, decimals=3) )
379
+
380
+ logging.info(f'--> Residual (RMS) calibration errors for each camera are respectively {ret_px} px, which corresponds to {ret_m} mm.')
381
+ logging.info(f'Calibration file is stored at {calib_path}.')
382
+
383
+
384
+ def calibrate_cams_all(config):
385
+ '''
386
+ Either converts qca.txt calibration file,
387
+ or calibrates from a checkerboard.
388
+ Stores it in a .toml file
389
+ Prints recap.
390
+
391
+ INPUTS:
392
+ - a Config.toml file
393
+
394
+ OUTPUT:
395
+ - a .toml cameras calibration file
396
+ '''
397
+
398
+ # Read config
399
+ project_dir = config.get('project').get('project_dir')
400
+ if project_dir == '': project_dir = os.getcwd()
401
+ calib_folder_name = config.get('project').get('calib_folder_name')
402
+ calib_dir = os.path.join(project_dir, calib_folder_name)
403
+ calib_type = config.get('calibration').get('type')
404
+ if calib_type=='qca':
405
+ qca_path = glob.glob(os.path.join(calib_dir, '*.qca.txt'))[0]
406
+ calib_path = qca_path.replace('.qca.txt', '_qca.toml')
407
+ elif calib_type=='checkerboard':
408
+ calib_path = os.path.join(calib_dir, 'Calib_checkerboard.toml')
409
+
410
+ # Calibrate
411
+ ret, C, S, D, K, R, T = calibrate(config)
412
+
413
+ # Write calibration file
414
+ toml_write(calib_path, C, S, D, K, R, T)
415
+
416
+ # Recap message
417
+ recap_calibrate(ret, calib_path, calib_type)