APose and local

This commit is contained in:
Arkadiy Strelnikov
2021-12-03 19:17:49 +07:00
parent f653da2092
commit f5812f28bd
7 changed files with 730 additions and 362 deletions

View File

@@ -21,6 +21,394 @@ def makexyzrotvis(x,y,z,rotx,roty,rotz,visible):
ret["scale"] = scale ret["scale"] = scale
return ret return ret
def bodyaposeworld(data):
data["root"] = makexyzrotvis(375.760, -1.704, -304.722, 0., 0., 0., 1.0)
data["pelvis"] = makexyzrotvis(375.760, -2.760, -207.971, 89.790634, 89.998116, 89.998116, 1.0)
data["spine_02"] = makexyzrotvis(375.760, -1.869, -197.166, 82.637939, 90.000107, 90.000107, 1.0)
data["spine_04"] = makexyzrotvis(375.760, -3.220, -177.959, 83.298508, -89.999939, -89.999939, 1.0)
data["spine_05"] = makexyzrotvis(375.760, -5.202, -164.692, 80.519157, -90., -90., 1.0)
data["clavicle_l"] = makexyzrotvis(379.542, -4.465, -152.521, -9.742390, -26.536825, -0.000003, 1.0)
data["shoulder_l"] = makexyzrotvis(393.460, -11.416, -155.192, -49.541229, -6.413618, 3.295939, 1.0)
data["elbow_l"] = makexyzrotvis(413.024, -13.615, -178.277, -33.187275, 30.848158, -28.515471, 1.0)
data["hand_l"] = makexyzrotvis(432.406, -2.039, -193.042, -35.172615, 32.751072, -105.931961, 1.0)
data["index_02_l"] = makexyzrotvis(438.802, 5.063, -200.907, -60.632530, 39.185219, -95.108459, 1.0)
data["index_03_l"] = makexyzrotvis(440.432, 6.391, -204.643, -72.604263, 41.145889, -95.530258, 1.0)
data["index_04_l"] = makexyzrotvis(441.196, 7.059, -207.882, -63.056412, 41.326263, -94.477684, 1.0)
data["middle_02_l"] = makexyzrotvis(440.250, 2.776, -201.240, -58.987339, 31.396336, -101.577202, 1.0)
data["middle_03_l"] = makexyzrotvis(442.291, 4.021, -205.218, -70.486740, 42.113358, -113.470406, 1.0)
data["middle_04_l"] = makexyzrotvis(443.195, 4.839, -208.657, -56.627937, 23.489927, -96.457565, 1.0)
data["pinky_02_l"] = makexyzrotvis(439.785, -1.863, -201.704, -57.221210, 8.494291, -103.297714, 1.0)
data["pinky_03_l"] = makexyzrotvis(441.697, -1.577, -204.707, -68.397072, 11.974680, -105.215523, 1.0)
data["pinky_04_l"] = makexyzrotvis(442.772, -1.349, -207.483, -68.031853, 22.739058, -114.804611, 1.0)
data["ring_02_l"] = makexyzrotvis(440.335, 0.379, -201.683, -60.143337, 23.882196, -110.450768, 1.0)
data["ring_03_l"] = makexyzrotvis(442.352, 1.272, -205.525, -72.950729, 34.323620, -119.597374, 1.0)
data["ring_04_l"] = makexyzrotvis(443.194, 1.847, -208.849, -60.028549, 26.871693, -112.741859, 1.0)
data["thumb_02_l"] = makexyzrotvis(433.238, 2.173, -197.083, -34.138702, 87.683189, -52.981850, 1.0)
data["thumb_03_l"] = makexyzrotvis(433.367, 5.373, -199.254, -52.094620, 85.939804, -51.473255, 1.0)
data["thumb_04_l"] = makexyzrotvis(433.544, 7.862, -202.460, -42.125023, 96.831261, -57.027554, 1.0)
data["lowerarm_twist_01_l"] = makexyzrotvis(423.083, -7.607, -185.940, -33.187275, 30.848158, -28.515471, 1.0)
data["None"] = makexyzrotvis(432.406, -2.039, -193.042, -35.172630, 32.751068, -105.931976, 1.0)
data["upperarm_twist_01_l"] = makexyzrotvis(393.783, -11.452, -155.572, -49.541203, -6.413616, 3.295938, 1.0)
data["clavicle_r"] = makexyzrotvis(371.978, -4.465, -152.521, 9.742397, 26.536829, 180., 1.0)
data["shoulder_r"] = makexyzrotvis(358.060, -11.416, -155.192, 49.541229, 6.413619, -176.704056, 1.0)
data["elbow_r"] = makexyzrotvis(338.495, -13.615, -178.277, 33.187275, -30.848154, 151.484512, 1.0)
data["hand_r"] = makexyzrotvis(319.114, -2.039, -193.042, 35.172619, -32.751076, 74.068016, 1.0)
data["index_02_r"] = makexyzrotvis(312.718, 5.063, -200.907, 60.632515, -39.185219, 84.891525, 1.0)
data["index_03_r"] = makexyzrotvis(311.088, 6.391, -204.644, 72.604263, -41.145885, 84.469742, 1.0)
data["index_04_r"] = makexyzrotvis(310.324, 7.059, -207.882, 63.056419, -41.326252, 85.522316, 1.0)
data["middle_02_r"] = makexyzrotvis(311.270, 2.776, -201.240, 58.987339, -31.396345, 78.422768, 1.0)
data["middle_03_r"] = makexyzrotvis(309.229, 4.021, -205.218, 70.486748, -42.113411, 66.529549, 1.0)
data["middle_04_r"] = makexyzrotvis(308.325, 4.839, -208.657, 56.627953, -23.489948, 83.542404, 1.0)
data["pinky_02_r"] = makexyzrotvis(311.735, -1.863, -201.705, 57.221222, -8.494291, 76.702271, 1.0)
data["pinky_03_r"] = makexyzrotvis(309.823, -1.577, -204.707, 68.397110, -11.974666, 74.784508, 1.0)
data["pinky_04_r"] = makexyzrotvis(308.747, -1.349, -207.483, 68.031822, -22.739044, 65.195419, 1.0)
data["ring_02_r"] = makexyzrotvis(311.184, 0.379, -201.683, 60.143322, -23.882204, 69.549194, 1.0)
data["ring_03_r"] = makexyzrotvis(309.168, 1.272, -205.525, 72.950775, -34.323681, 60.402596, 1.0)
data["ring_04_r"] = makexyzrotvis(308.326, 1.847, -208.849, 60.028561, -26.871723, 67.258072, 1.0)
data["thumb_02_r"] = makexyzrotvis(318.282, 2.173, -197.083, 34.138699, -87.683189, 127.018127, 1.0)
data["thumb_03_r"] = makexyzrotvis(318.152, 5.373, -199.254, 52.094624, -85.939819, 128.526718, 1.0)
data["thumb_04_r"] = makexyzrotvis(317.976, 7.862, -202.460, 42.125004, -96.831261, 122.972427, 1.0)
data["lowerarm_twist_01_r"] = makexyzrotvis(328.436, -7.607, -185.940, 33.187271, -30.848154, 137.974152, 1.0)
data["upperarm_twist_01_r"] = makexyzrotvis(357.737, -11.452, -155.572, 49.541218, 6.413617, 163.344009, 1.0)
data["head"] = makexyzrotvis(375.760, -7.579, -148.301, 75.972702, 89.999969, 89.999969, 1.0)
data["head_0"] = makexyzrotvis(375.760, -5.683, -139.206, 88.678833, -90.000290, -90.000290, 1.0)
data["hip_l"] = makexyzrotvis(384.766, -2.234, -209.422, 82.760597, 166.295837, 174.753387, 1.0)
data["knee_l"] = makexyzrotvis(389.978, -3.505, -251.655, 80.127579, 114.503563, 117.834335, 1.0)
data["calf_twist_01_l"] = makexyzrotvis(391.434, -6.699, -271.828, 79.251228, 113.356789, 117.027946, 1.0)
data["ankle_l"] = makexyzrotvis(392.836, -9.776, -291.256, 88.877769, 139.206955, 141.820786, 1.0)
data["ball_l"] = makexyzrotvis(393.669, 6.653, -301.910, -2.576805, 87.342842, 90.887283, 1.0)
data["thigh_twist_01_l"] = makexyzrotvis(387.471, -2.893, -231.340, 82.754990, 165.851181, 168.873581, 1.0)
data["hip_r"] = makexyzrotvis(366.754, -2.234, -209.422, -82.760597, -166.295837, -5.246624, 1.0)
data["knee_r"] = makexyzrotvis(361.542, -3.505, -251.655, -80.127579, -114.503563, -62.165585, 1.0)
data["calf_twist_01_r"] = makexyzrotvis(360.086, -6.699, -271.828, -79.251190, -113.357056, -62.971889, 1.0)
data["ankle_r"] = makexyzrotvis(358.684, -9.776, -291.256, -88.878120, -139.207230, -38.179173, 1.0)
data["ball_r"] = makexyzrotvis(357.851, 6.653, -301.910, 2.576798, -87.342842, -89.112701, 1.0)
data["thigh_twist_01_r"] = makexyzrotvis(364.049, -2.893, -231.340, -82.755020, -165.851059, -11.126723, 1.0)
data["ik_foot_root"] = makexyzrotvis(375.760, -1.704, -304.722, 0., 0., 0., 1.0)
data["ik_foot_l"] = makexyzrotvis(392.836, -9.776, -291.256, 88.877769, 139.207169, 141.820999, 1.0)
data["ik_foot_r"] = makexyzrotvis(358.684, -9.776, -291.256, -88.877769, -139.207169, -38.178883, 1.0)
data["ik_hand_root"] = makexyzrotvis(375.760, -1.704, -304.722, 0., 0., 0., 1.0)
data["ik_hand_gun"] = makexyzrotvis(319.114, -2.039, -193.042, 35.172623, -32.751068, 74.068031, 1.0)
data["ik_hand_l"] = makexyzrotvis(432.406, -2.039, -193.042, -35.172630, 32.751068, -105.931976, 1.0)
def bodyaposelocal(data):
data["root"] = makexyzrotvis(0., 0., 0., 0., 0., 0., 1.0)
data["pelvis"] = makexyzrotvis(0., -1.056, 96.751, 89.787849, 89.995300, 89.995300, 1.0)
data["spine_02"] = makexyzrotvis(10.809, 0.851, 0., 0., -14.063557, 0., 1.0)
data["spine_04"] = makexyzrotvis(18.875, -3.801, 0., 0., -14.063557, 0., 1.0)
data["spine_05"] = makexyzrotvis(13.407, -0.420, 0., 0., -2.779418, 0., 1.0)
data["clavicle_l"] = makexyzrotvis(11.884, 2.732, -3.782, -61.853577, -101.540916, 108.719162, 1.0)
data["shoulder_l"] = makexyzrotvis(15.785, 0., 0., -40.300545, 17.021019, 7.673903, 1.0)
data["elbow_l"] = makexyzrotvis(30.340, 0., 0., 10.397350, 30.360876, -3.613283, 1.0)
data["hand_l"] = makexyzrotvis(26.975, 0., 0., -2.499808, 0.412571, -76.356194, 1.0)
data["index_02_l"] = makexyzrotvis(12.068, -1.763, -2.109, 3.763789, -25.536919, 14.866977, 1.0)
data["index_03_l"] = makexyzrotvis(4.288, 0., 0., 0.475286, -11.986160, 1.337821, 1.0)
data["index_04_l"] = makexyzrotvis(3.394, 0., 0., -0.997269, 9.496333, 1.137367, 1.0)
data["middle_02_l"] = makexyzrotvis(12.244, -1.294, 0.571, 7.040565, -22.825857, 1.917856, 1.0)
data["middle_03_l"] = makexyzrotvis(4.640, 0., 0., -1.136837, -12.280714, -2.024954, 1.0)
data["middle_04_l"] = makexyzrotvis(3.649, 0., 0., 4.389954, 15.399755, 0.781444, 1.0)
data["pinky_02_l"] = makexyzrotvis(10.141, -2.263, 4.643, 18.933966, -20.185858, -18.724598, 1.0)
data["pinky_03_l"] = makexyzrotvis(3.571, 0., 0., 1.315686, -11.208060, 1.063832, 1.0)
data["pinky_04_l"] = makexyzrotvis(2.986, 0., 0., -3.869664, -1.038998, 0.445698, 1.0)
data["ring_02_l"] = makexyzrotvis(11.498, -1.754, 2.847, 10.989255, -23.292091, -13.510273, 1.0)
data["ring_03_l"] = makexyzrotvis(4.430, 0., 0., 1.669749, -13.315456, 0.301359, 1.0)
data["ring_04_l"] = makexyzrotvis(3.477, 0., 0., -2.987661, 12.899673, -0.360762, 1.0)
data["thumb_02_l"] = makexyzrotvis(4.762, -2.375, -2.538, -36.918968, -27.056177, 95.069138, 1.0)
data["thumb_03_l"] = makexyzrotvis(3.870, 0., 0., -9.833239, -15.151319, 1.613141, 1.0)
data["thumb_04_l"] = makexyzrotvis(4.062, 0., 0., -0.479192, 12.385657, 2.414767, 1.0)
data["lowerarm_twist_01_l"] = makexyzrotvis(14., 0., 0., 0., 0., 0., 1.0)
data["None"] = makexyzrotvis(77.885, 69.602, 43.869, 32.168755, 93.709030, -145.800354, 1.0)
data["upperarm_twist_01_l"] = makexyzrotvis(0.5, 0., 0., 0., 0., 0., 1.0)
data["clavicle_r"] = makexyzrotvis(11.884, 2.732, 3.782, -61.853588, 78.459053, 108.719177, 1.0)
data["shoulder_r"] = makexyzrotvis(-15.785, 0., 0., -40.300556, 17.021015, 7.673907, 1.0)
data["elbow_r"] = makexyzrotvis(-30.340, 0., 0., 10.397350, 30.360876, -3.613281, 1.0)
data["hand_r"] = makexyzrotvis(-26.975, 0., 0., -2.499808, 0.412573, -76.356194, 1.0)
data["index_02_r"] = makexyzrotvis(-12.068, 1.764, 2.109, 3.763789, -25.536919, 14.866971, 1.0)
data["index_03_r"] = makexyzrotvis(-4.288, 0., 0., 0.475299, -11.986152, 1.337820, 1.0)
data["index_04_r"] = makexyzrotvis(-3.394, 0., 0., -0.997269, 9.496332, 1.137365, 1.0)
data["middle_02_r"] = makexyzrotvis(-12.244, 1.294, -0.571, 7.040559, -22.825850, 1.917846, 1.0)
data["middle_03_r"] = makexyzrotvis(-4.641, 0., 0., -1.136837, -12.280720, -2.024957, 1.0)
data["middle_04_r"] = makexyzrotvis(-3.649, 0., 0., 4.389954, 15.399755, 0.781455, 1.0)
data["pinky_02_r"] = makexyzrotvis(-10.141, 2.263, -4.643, 18.933966, -20.185869, -18.724598, 1.0)
data["pinky_03_r"] = makexyzrotvis(-3.571, 0., 0., 1.315692, -11.208064, 1.063835, 1.0)
data["pinky_04_r"] = makexyzrotvis(-2.985, 0., 0., -3.869664, -1.038998, 0.445703, 1.0)
data["ring_02_r"] = makexyzrotvis(-11.498, 1.754, -2.847, 10.989241, -1.038998, -23.292084, 1.0)
data["ring_03_r"] = makexyzrotvis(-4.430, 0., 0., 1.669749, -13.315456, 0.301358, 1.0)
data["ring_04_r"] = makexyzrotvis(-3.477, 0., 0., -2.987661, 12.899678, -0.360764, 1.0)
data["thumb_02_r"] = makexyzrotvis(-4.762, 2.375, 2.538, -36.918968, -27.056177, 95.069130, 1.0)
data["thumb_03_r"] = makexyzrotvis(-3.870, 0., 0., -9.833239, -15.151324, 1.613143, 1.0)
data["thumb_04_r"] = makexyzrotvis(-4.062, 0., 0., -0.479199, 12.385653, 2.414763, 1.0)
data["lowerarm_twist_01_r"] = makexyzrotvis(-14., 0., 0., 0., 0., -13.510374, 1.0)
data["upperarm_twist_01_r"] = makexyzrotvis(-0.5, 0., 0., 0., 0., -19.951906, 1.0)
data["head"] = makexyzrotvis(16.559, 0.355, 0., 0., 23.508049, 0., 1.0)
data["head_0"] = makexyzrotvis(9.284, -0.364, 0., 0., -15.348654, 0., 1.0)
data["hip_l"] = makexyzrotvis(-1.449, 0.531, -9.006, 7.032287, 1.515470, 8.563468, 1.0)
data["knee_l"] = makexyzrotvis(-42.572, 0., 0., -1.787276, 7.613586, -5.735975, 1.0)
data["calf_twist_01_l"] = makexyzrotvis(-20.477, 0., 0., 0.219085, 0.872982, 0.323560, 1.0)
data["ankle_l"] = makexyzrotvis(-40.197, 0., 0., -3.704933, -8.059578, -0.415387, 1.0)
data["ball_l"] = makexyzrotvis(-10.454, 16.578, 0., -0.008954, 91.883591, 0.003945, 1.0)
data["thigh_twist_01_l"] = makexyzrotvis(-22.094, 0., 0., 0.000212, 0.056331, -5.438678, 1.0)
data["hip_r"] = makexyzrotvis(-1.449, 0.531, 9.006, 7.032294, -178.484528, 8.563469, 1.0)
data["knee_r"] = makexyzrotvis(42.572, 0., 0., -1.787276, 7.613586, -5.735975, 1.0)
data["calf_twist_01_r"] = makexyzrotvis(20.477, 0., 0., 0.219126, 0.872964, 0.323369, 1.0)
data["ankle_r"] = makexyzrotvis(40.197, 0., 0., -3.704927, -8.059580, -0.415387, 1.0)
data["ball_r"] = makexyzrotvis(10.454, -16.578, -0.08, -0.008948, 91.883591, 0.003944, 1.0)
data["thigh_twist_01_r"] = makexyzrotvis(22.094, 0., 0., 0.000164, 0.056341, -5.438870, 1.0)
data["ik_foot_root"] = makexyzrotvis(0., 0., 0., 0., 0., 0., 1.0)
data["ik_foot_l"] = makexyzrotvis(17.076, -8.072, 13.466, 88.877769, 139.207169, 141.820999, 1.0)
data["ik_foot_r"] = makexyzrotvis(-17.076, -8.072, 13.466, -88.877769, -139.207169, -38.178883, 1.0)
data["ik_hand_root"] = makexyzrotvis(0., 0., 0., 0., 0., 0., 1.0)
data["ik_hand_gun"] = makexyzrotvis(-56.64, -0.335, 111.680, 35.172623, -32.751068, 74.068031, 1.0)
data["ik_hand_l"] = makexyzrotvis(77.885, 69.602, 43.869, 32.168755, 93.709030, -145.800354, 1.0)
data["Non"] = makexyzrotvis(0., 0., 0., 0., 0., 0., 1.0)
def bodyconvertlocal(poseslms, data, coef, maxy):
dataxyz = {}
rootx = poseslms[24].x * coef
rooty = -poseslms[24].z * coef
rootz = -poseslms[24].y * coef
rootv = poseslms[24].visibility
dataxyz["hip_r"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[23].x * coef
rooty = -poseslms[23].z * coef
rootz = -poseslms[23].y * coef
rootv = poseslms[23].visibility
dataxyz["hip_l"] = [rootx, rooty, rootz, rootv]
rootx = 0.5 * (dataxyz["hip_l"][0] + dataxyz["hip_r"][0])
rooty = 0.5 * (dataxyz["hip_l"][1] + dataxyz["hip_r"][1])
rootz = -maxy * coef
rootv = 1.0
dataxyz["root"] = [rootx, rooty, rootz, rootv]
rootx = 0.5 * (dataxyz["hip_l"][0] + dataxyz["hip_r"][0])
rooty = 0.5 * (dataxyz["hip_l"][1] + dataxyz["hip_r"][1])
rootz = 0.5 * (dataxyz["hip_l"][2] + dataxyz["hip_r"][2])
rootv = 0.5 * (dataxyz["hip_l"][3] + dataxyz["hip_r"][3])
dataxyz["pelvis"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[12].x * coef
rooty = -poseslms[12].z * coef
rootz = -poseslms[12].y * coef
rootv = poseslms[12].visibility
dataxyz["shoulder_r"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[11].x * coef
rooty = -poseslms[11].z * coef
rootz = -poseslms[11].y * coef
rootv = poseslms[11].visibility
dataxyz["shoulder_l"] = [rootx, rooty, rootz, rootv]
rootx = 0.5 * (dataxyz["shoulder_l"][0] + dataxyz["shoulder_r"][0])
rooty = 0.5 * (dataxyz["shoulder_l"][1] + dataxyz["shoulder_r"][1])
rootz = -poseslms[0].y * coef * 0.3 + 0.35 * (dataxyz["shoulder_l"][2] + dataxyz["shoulder_r"][2])
rootv = poseslms[0].visibility
dataxyz["head"] = [rootx, rooty, rootz, rootv]
rootx = (0.044113 * dataxyz["head"][0] + 0.955887 * dataxyz["pelvis"][0])
rooty = (0.044113 * dataxyz["head"][1] + 0.955887 * dataxyz["pelvis"][1])
rootz = (0.044113 * dataxyz["head"][2] + 0.955887 * dataxyz["pelvis"][2])
rootv = (0.044113 * dataxyz["head"][3] + 0.955887 * dataxyz["pelvis"][3])
data["spine_01"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["spine_01"] = [rootx, rooty, rootz, rootv]
rootx = (0.135799 * dataxyz["head"][0] + 0.864201 * dataxyz["pelvis"][0])
rooty = (0.135799 * dataxyz["head"][1] + 0.864201 * dataxyz["pelvis"][1])
rootz = (0.135799 * dataxyz["head"][2] + 0.864201 * dataxyz["pelvis"][2])
rootv = (0.135799 * dataxyz["head"][3] + 0.864201 * dataxyz["pelvis"][3])
dataxyz["spine_02"] = [rootx, rooty, rootz, rootv]
rootx = (0.282213 * dataxyz["head"][0] + 0.717787 * dataxyz["pelvis"][0])
rooty = (0.282213 * dataxyz["head"][1] + 0.717787 * dataxyz["pelvis"][1])
rootz = (0.282213 * dataxyz["head"][2] + 0.717787 * dataxyz["pelvis"][2])
rootv = (0.282213 * dataxyz["head"][3] + 0.717787 * dataxyz["pelvis"][3])
data["spine_03"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["spine_03"] = [rootx, rooty, rootz, rootv]
rootx = (0.451594 * dataxyz["head"][0] + 0.548406 * dataxyz["pelvis"][0])
rooty = (0.451594 * dataxyz["head"][1] + 0.548406 * dataxyz["pelvis"][1])
rootz = (0.451594 * dataxyz["head"][2] + 0.548406 * dataxyz["pelvis"][2])
rootv = (0.451594 * dataxyz["head"][3] + 0.548406 * dataxyz["pelvis"][3])
dataxyz["spine_04"] = [rootx, rooty, rootz, rootv]
rootx = (0.771025 * dataxyz["head"][0] + 0.228975 * dataxyz["pelvis"][0])
rooty = (0.771025 * dataxyz["head"][1] + 0.228975 * dataxyz["pelvis"][1])
rootz = (0.771025 * dataxyz["head"][2] + 0.228975 * dataxyz["pelvis"][2])
rootv = (0.771025 * dataxyz["head"][3] + 0.228975 * dataxyz["pelvis"][3])
dataxyz["spine_05"] = [rootx, rooty, rootz, rootv]
rootx = (0.635 * dataxyz["shoulder_r"][0] + 0.365 * dataxyz["shoulder_l"][0])
rooty = 0.5 * (
0.635 * dataxyz["shoulder_r"][1] + 0.365 * dataxyz["shoulder_l"][1] + 0.31 * dataxyz["head"][1] + 0.69 *
dataxyz["spine_05"][1])
rootz = (0.0635 * dataxyz["shoulder_r"][2] + 0.0365 * dataxyz["shoulder_l"][2] + 0.9 * dataxyz["spine_05"][2])
rootv = (0.635 * dataxyz["shoulder_r"][3] + 0.451594 * dataxyz["shoulder_l"][3])
dataxyz["clavicle_r"] = [rootx, rooty, rootz, rootv]
rootx = (0.635 * dataxyz["shoulder_l"][0] + 0.365 * dataxyz["shoulder_r"][0])
rooty = 0.5 * (
0.635 * dataxyz["shoulder_l"][1] + 0.365 * dataxyz["shoulder_r"][1] + 0.31 * dataxyz["head"][1] + 0.69 *
dataxyz["spine_05"][1])
rootz = (0.0635 * dataxyz["shoulder_l"][2] + 0.0365 * dataxyz["shoulder_r"][2] + 0.9 * dataxyz["spine_05"][2])
rootv = (0.635 * dataxyz["shoulder_l"][3] + 0.365 * dataxyz["shoulder_r"][3])
dataxyz["clavicle_l"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[14].x * coef
rooty = -poseslms[14].z * coef
rootz = -poseslms[14].y * coef
rootv = poseslms[14].visibility
dataxyz["elbow_r"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[13].x * coef
rooty = -poseslms[13].z * coef
rootz = -poseslms[13].y * coef
rootv = poseslms[13].visibility
dataxyz["elbow_l"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[26].x * coef
rooty = -poseslms[26].z * coef
rootz = -poseslms[26].y * coef
rootv = poseslms[26].visibility
dataxyz["knee_r"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[25].x * coef
rooty = -poseslms[25].z * coef
rootz = -poseslms[25].y * coef
rootv = poseslms[25].visibility
dataxyz["knee_l"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[28].x * coef
rooty = -poseslms[28].z * coef
rootz = -poseslms[28].y * coef
rootv = poseslms[28].visibility
dataxyz["ankle_r"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[27].x * coef
rooty = -poseslms[27].z * coef
rootz = -poseslms[27].y * coef
rootv = poseslms[27].visibility
dataxyz["ankle_l"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[32].x * coef
rooty = -poseslms[32].z * coef
rootz = -poseslms[32].y * coef
rootv = poseslms[32].visibility
dataxyz["ball_r"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[31].x * coef
rooty = -poseslms[31].z * coef
rootz = -poseslms[31].y * coef
rootv = poseslms[31].visibility
dataxyz["ball_l"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[30].x * coef
rooty = -poseslms[30].z * coef
rootz = -poseslms[30].y * coef
rootv = poseslms[30].visibility
data["heel_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["heel_r"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[29].x * coef
rooty = -poseslms[29].z * coef
rootz = -poseslms[29].y * coef
rootv = poseslms[29].visibility
data["heel_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["heel_l"] = [rootx, rooty, rootz, rootv]
data["elbow_r"]["translation"]["x"] = dataxyz["elbow_r"][0] - dataxyz["shoulder_r"][0]
data["elbow_r"]["translation"]["y"] = dataxyz["elbow_r"][1] - dataxyz["shoulder_r"][1]
data["elbow_r"]["translation"]["z"] = dataxyz["elbow_r"][2] - dataxyz["shoulder_r"][2]
data["elbow_l"]["translation"]["x"] = dataxyz["elbow_l"][0] - dataxyz["shoulder_l"][0]
data["elbow_l"]["translation"]["y"] = dataxyz["elbow_l"][1] - dataxyz["shoulder_l"][1]
data["elbow_l"]["translation"]["z"] = dataxyz["elbow_l"][2] - dataxyz["shoulder_l"][2]
data["shoulder_r"]["translation"]["x"] = dataxyz["shoulder_r"][0] - dataxyz["clavicle_r"][0]
data["shoulder_r"]["translation"]["y"] = dataxyz["shoulder_r"][1] - dataxyz["clavicle_r"][1]
data["shoulder_r"]["translation"]["z"] = dataxyz["shoulder_r"][2] - dataxyz["clavicle_r"][2]
data["shoulder_l"]["translation"]["x"] = dataxyz["shoulder_l"][0] - dataxyz["clavicle_l"][0]
data["shoulder_l"]["translation"]["y"] = dataxyz["shoulder_l"][1] - dataxyz["clavicle_l"][1]
data["shoulder_l"]["translation"]["z"] = dataxyz["shoulder_l"][2] - dataxyz["clavicle_l"][2]
data["clavicle_r"]["translation"]["x"] = dataxyz["clavicle_r"][0] - dataxyz["spine_05"][0]
data["clavicle_r"]["translation"]["y"] = dataxyz["clavicle_r"][1] - dataxyz["spine_05"][1]
data["clavicle_r"]["translation"]["z"] = dataxyz["clavicle_r"][2] - dataxyz["spine_05"][2]
data["clavicle_l"]["translation"]["x"] = dataxyz["clavicle_l"][0] - dataxyz["spine_05"][0]
data["clavicle_l"]["translation"]["y"] = dataxyz["clavicle_l"][1] - dataxyz["spine_05"][1]
data["clavicle_l"]["translation"]["z"] = dataxyz["clavicle_l"][2] - dataxyz["spine_05"][2]
data["head"]["translation"]["x"] = dataxyz["head"][0] - dataxyz["spine_05"][0]
data["head"]["translation"]["y"] = dataxyz["head"][1] - dataxyz["spine_05"][1]
data["head"]["translation"]["z"] = dataxyz["head"][2] - dataxyz["spine_05"][2]
data["spine_05"]["translation"]["x"] = dataxyz["spine_05"][0] - dataxyz["spine_04"][0]
data["spine_05"]["translation"]["y"] = dataxyz["spine_05"][1] - dataxyz["spine_04"][1]
data["spine_05"]["translation"]["z"] = dataxyz["spine_05"][2] - dataxyz["spine_04"][2]
data["spine_04"]["translation"]["x"] = dataxyz["spine_04"][0] - dataxyz["spine_03"][0]
data["spine_04"]["translation"]["y"] = dataxyz["spine_04"][1] - dataxyz["spine_03"][1]
data["spine_04"]["translation"]["z"] = dataxyz["spine_04"][2] - dataxyz["spine_03"][2]
data["spine_03"]["translation"]["x"] = dataxyz["spine_03"][0] - dataxyz["spine_02"][0]
data["spine_03"]["translation"]["y"] = dataxyz["spine_03"][1] - dataxyz["spine_02"][1]
data["spine_03"]["translation"]["z"] = dataxyz["spine_03"][2] - dataxyz["spine_02"][2]
data["spine_02"]["translation"]["x"] = dataxyz["spine_02"][0] - dataxyz["spine_01"][0]
data["spine_02"]["translation"]["y"] = dataxyz["spine_02"][1] - dataxyz["spine_01"][1]
data["spine_02"]["translation"]["z"] = dataxyz["spine_02"][2] - dataxyz["spine_01"][2]
data["spine_01"]["translation"]["x"] = dataxyz["spine_01"][0] - dataxyz["pelvis"][0]
data["spine_01"]["translation"]["y"] = dataxyz["spine_01"][1] - dataxyz["pelvis"][1]
data["spine_01"]["translation"]["z"] = dataxyz["spine_01"][2] - dataxyz["pelvis"][2]
data["ball_l"]["translation"]["x"] = dataxyz["ball_l"][0] - dataxyz["ankle_l"][0]
data["ball_l"]["translation"]["y"] = dataxyz["ball_l"][1] - dataxyz["ankle_l"][1]
data["ball_l"]["translation"]["z"] = dataxyz["ball_l"][2] - dataxyz["ankle_l"][2]
data["ball_r"]["translation"]["x"] = dataxyz["ball_r"][0] - dataxyz["ankle_r"][0]
data["ball_r"]["translation"]["y"] = dataxyz["ball_r"][1] - dataxyz["ankle_r"][1]
data["ball_r"]["translation"]["z"] = dataxyz["ball_r"][2] - dataxyz["ankle_r"][2]
data["heel_l"]["translation"]["x"] = dataxyz["heel_l"][0] - dataxyz["ankle_l"][0]
data["heel_l"]["translation"]["y"] = dataxyz["heel_l"][1] - dataxyz["ankle_l"][1]
data["heel_l"]["translation"]["z"] = dataxyz["heel_l"][2] - dataxyz["ankle_l"][2]
data["heel_r"]["translation"]["x"] = dataxyz["heel_r"][0] - dataxyz["ankle_r"][0]
data["heel_r"]["translation"]["y"] = dataxyz["heel_r"][1] - dataxyz["ankle_r"][1]
data["heel_r"]["translation"]["z"] = dataxyz["heel_r"][2] - dataxyz["ankle_r"][2]
data["ankle_l"]["translation"]["x"] = dataxyz["ankle_l"][0] - dataxyz["knee_l"][0]
data["ankle_l"]["translation"]["y"] = dataxyz["ankle_l"][1] - dataxyz["knee_l"][1]
data["ankle_l"]["translation"]["z"] = dataxyz["ankle_l"][2] - dataxyz["knee_l"][2]
data["ankle_r"]["translation"]["x"] = dataxyz["ankle_r"][0] - dataxyz["knee_r"][0]
data["ankle_r"]["translation"]["y"] = dataxyz["ankle_r"][1] - dataxyz["knee_r"][1]
data["ankle_r"]["translation"]["z"] = dataxyz["ankle_r"][2] - dataxyz["knee_r"][2]
data["knee_l"]["translation"]["x"] = dataxyz["knee_l"][0] - dataxyz["hip_l"][0]
data["knee_l"]["translation"]["y"] = dataxyz["knee_l"][1] - dataxyz["hip_l"][1]
data["knee_l"]["translation"]["z"] = dataxyz["knee_l"][2] - dataxyz["hip_l"][2]
data["knee_r"]["translation"]["x"] = dataxyz["knee_r"][0] - dataxyz["hip_r"][0]
data["knee_r"]["translation"]["y"] = dataxyz["knee_r"][1] - dataxyz["hip_r"][1]
data["knee_r"]["translation"]["z"] = dataxyz["knee_r"][2] - dataxyz["hip_r"][2]
data["hip_l"]["translation"]["x"] = dataxyz["hip_l"][0] - dataxyz["pelvis"][0]
data["hip_l"]["translation"]["y"] = dataxyz["hip_l"][1] - dataxyz["pelvis"][1]
data["hip_l"]["translation"]["z"] = dataxyz["hip_l"][2] - dataxyz["pelvis"][2]
data["hip_r"]["translation"]["x"] = dataxyz["hip_r"][0] - dataxyz["pelvis"][0]
data["hip_r"]["translation"]["y"] = dataxyz["hip_r"][1] - dataxyz["pelvis"][1]
data["hip_r"]["translation"]["z"] = dataxyz["hip_r"][2] - dataxyz["pelvis"][2]
data["pelvis"]["translation"]["x"] = 0.
data["pelvis"]["translation"]["y"] = 0.
data["pelvis"]["translation"]["z"] = dataxyz["pelvis"][2] - dataxyz["root"][2]
def bodyconvert(poseslms, data, coef, maxy): def bodyconvert(poseslms, data, coef, maxy):
dataxyz = {} dataxyz = {}
@@ -38,59 +426,73 @@ def bodyconvert(poseslms, data, coef, maxy):
data["hip_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["hip_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["hip_l"] = [rootx, rooty, rootz, rootv] dataxyz["hip_l"] = [rootx, rooty, rootz, rootv]
rootx = 0.5 * (dataxyz["hip_l"][0] + dataxyz["hip_r"][0]) * coef rootx = 0.5 * (dataxyz["hip_l"][0] + dataxyz["hip_r"][0])
rooty = -maxy * coef rooty = 0.5 * (dataxyz["hip_l"][1] + dataxyz["hip_r"][1])
rootz = -0.5 * (dataxyz["hip_l"][2] + dataxyz["hip_r"][2]) * coef rootz = -maxy * coef
rootv = 1.0 rootv = 1.0
data["root"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["root"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["root"] = [rootx, rooty, rootz, rootv] dataxyz["root"] = [rootx, rooty, rootz, rootv]
rootx = 0.5 * (dataxyz["hip_l"][0] + dataxyz["hip_r"][0]) * coef rootx = 0.5 * (dataxyz["hip_l"][0] + dataxyz["hip_r"][0])
rooty = -0.5 * (dataxyz["hip_l"][1] + dataxyz["hip_r"][1]) * coef rooty = 0.5 * (dataxyz["hip_l"][1] + dataxyz["hip_r"][1])
rootz = -0.5 * (dataxyz["hip_l"][2] + dataxyz["hip_r"][2]) * coef rootz = 0.5 * (dataxyz["hip_l"][2] + dataxyz["hip_r"][2])
rootv = 0.5 * (dataxyz["hip_l"][3] + dataxyz["hip_r"][3]) rootv = 0.5 * (dataxyz["hip_l"][3] + dataxyz["hip_r"][3])
data["pelvis"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["pelvis"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["pelvis"] = [rootx, rooty, rootz, rootv] dataxyz["pelvis"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[0].x * coef rootx = poseslms[12].x * coef
rooty = -poseslms[0].z * coef rooty = -poseslms[12].z * coef
rootz = -poseslms[0].y * coef rootz = -poseslms[12].y * coef
rootv = poseslms[12].visibility
data["shoulder_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["shoulder_r"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[11].x * coef
rooty = -poseslms[11].z * coef
rootz = -poseslms[11].y * coef
rootv = poseslms[11].visibility
data["shoulder_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["shoulder_l"] = [rootx, rooty, rootz, rootv]
rootx = 0.5 * (dataxyz["shoulder_l"][0] + dataxyz["shoulder_r"][0])
rooty = 0.5 * (dataxyz["shoulder_l"][1] + dataxyz["shoulder_r"][1])
rootz = -poseslms[0].y * coef * 0.3 + 0.35 * (dataxyz["shoulder_l"][2] + dataxyz["shoulder_r"][2])
rootv = poseslms[0].visibility rootv = poseslms[0].visibility
data["head"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["head"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["head"] = [rootx, rooty, rootz, rootv] dataxyz["head"] = [rootx, rooty, rootz, rootv]
rootx = (0.955887 * dataxyz["head"][0] + 0.044113 * dataxyz["pelvis"][0]) * coef rootx = (0.044113 * dataxyz["head"][0] + 0.955887 * dataxyz["pelvis"][0])
rooty = (0.955887 * dataxyz["head"][1] + 0.044113 * dataxyz["pelvis"][1]) * coef rooty = (0.044113 * dataxyz["head"][1] + 0.955887 * dataxyz["pelvis"][1])
rootz = (0.955887 * dataxyz["head"][2] + 0.044113 * dataxyz["pelvis"][2]) * coef rootz = (0.044113 * dataxyz["head"][2] + 0.955887 * dataxyz["pelvis"][2])
rootv = (0.955887 * dataxyz["head"][3] + 0.044113 * dataxyz["pelvis"][3]) rootv = (0.044113 * dataxyz["head"][3] + 0.955887 * dataxyz["pelvis"][3])
data["spine_01"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["spine_01"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["spine_01"] = [rootx, rooty, rootz, rootv] dataxyz["spine_01"] = [rootx, rooty, rootz, rootv]
rootx = (0.864201 * dataxyz["head"][0] + 0.135799 * dataxyz["pelvis"][0]) * coef rootx = (0.135799 * dataxyz["head"][0] + 0.864201 * dataxyz["pelvis"][0])
rooty = (0.864201 * dataxyz["head"][1] + 0.135799 * dataxyz["pelvis"][1]) * coef rooty = (0.135799 * dataxyz["head"][1] + 0.864201 * dataxyz["pelvis"][1])
rootz = (0.864201 * dataxyz["head"][2] + 0.135799 * dataxyz["pelvis"][2]) * coef rootz = (0.135799 * dataxyz["head"][2] + 0.864201 * dataxyz["pelvis"][2])
rootv = (0.864201 * dataxyz["head"][3] + 0.135799 * dataxyz["pelvis"][3]) rootv = (0.135799 * dataxyz["head"][3] + 0.864201 * dataxyz["pelvis"][3])
data["spine_02"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["spine_02"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["spine_02"] = [rootx, rooty, rootz, rootv] dataxyz["spine_02"] = [rootx, rooty, rootz, rootv]
rootx = (0.717787 * dataxyz["head"][0] + 0.282213 * dataxyz["pelvis"][0]) * coef rootx = (0.282213 * dataxyz["head"][0] + 0.717787 * dataxyz["pelvis"][0])
rooty = (0.717787 * dataxyz["head"][1] + 0.282213 * dataxyz["pelvis"][1]) * coef rooty = (0.282213 * dataxyz["head"][1] + 0.717787 * dataxyz["pelvis"][1])
rootz = (0.717787 * dataxyz["head"][2] + 0.282213 * dataxyz["pelvis"][2]) * coef rootz = (0.282213 * dataxyz["head"][2] + 0.717787 * dataxyz["pelvis"][2])
rootv = (0.717787 * dataxyz["head"][3] + 0.282213 * dataxyz["pelvis"][3]) rootv = (0.282213 * dataxyz["head"][3] + 0.717787 * dataxyz["pelvis"][3])
data["spine_03"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["spine_03"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["spine_03"] = [rootx, rooty, rootz, rootv] dataxyz["spine_03"] = [rootx, rooty, rootz, rootv]
rootx = (0.548406 * dataxyz["head"][0] + 0.451594 * dataxyz["pelvis"][0]) * coef rootx = (0.451594 * dataxyz["head"][0] + 0.548406 * dataxyz["pelvis"][0])
rooty = (0.548406 * dataxyz["head"][1] + 0.451594 * dataxyz["pelvis"][1]) * coef rooty = (0.451594 * dataxyz["head"][1] + 0.548406 * dataxyz["pelvis"][1])
rootz = (0.548406 * dataxyz["head"][2] + 0.451594 * dataxyz["pelvis"][2]) * coef rootz = (0.451594 * dataxyz["head"][2] + 0.548406 * dataxyz["pelvis"][2])
rootv = (0.548406 * dataxyz["head"][3] + 0.451594 * dataxyz["pelvis"][3]) rootv = (0.451594 * dataxyz["head"][3] + 0.548406 * dataxyz["pelvis"][3])
data["spine_04"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["spine_04"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["spine_04"] = [rootx, rooty, rootz, rootv] dataxyz["spine_04"] = [rootx, rooty, rootz, rootv]
rootx = (0.228975 * dataxyz["head"][0] + 0.771025 * dataxyz["pelvis"][0]) * coef rootx = (0.771025 * dataxyz["head"][0] + 0.228975 * dataxyz["pelvis"][0])
rooty = (0.228975 * dataxyz["head"][1] + 0.771025 * dataxyz["pelvis"][1]) * coef rooty = (0.771025 * dataxyz["head"][1] + 0.228975 * dataxyz["pelvis"][1])
rootz = (0.228975 * dataxyz["head"][2] + 0.771025 * dataxyz["pelvis"][2]) * coef rootz = (0.771025 * dataxyz["head"][2] + 0.228975 * dataxyz["pelvis"][2])
rootv = (0.228975 * dataxyz["head"][3] + 0.771025 * dataxyz["pelvis"][3]) rootv = (0.771025 * dataxyz["head"][3] + 0.228975 * dataxyz["pelvis"][3])
data["spine_05"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["spine_05"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["spine_05"] = [rootx, rooty, rootz, rootv] dataxyz["spine_05"] = [rootx, rooty, rootz, rootv]
@@ -150,31 +552,17 @@ def bodyconvert(poseslms, data, coef, maxy):
data["heel_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["heel_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["heel_l"] = [rootx, rooty, rootz, rootv] dataxyz["heel_l"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[12].x * coef rootx = (0.635 * dataxyz["shoulder_r"][0] + 0.365 * dataxyz["shoulder_l"][0])
rooty = -poseslms[12].z * coef rooty = 0.5 * (0.635 * dataxyz["shoulder_r"][1] + 0.365 * dataxyz["shoulder_l"][1] + 0.31 * dataxyz["head"][1] + 0.69 * dataxyz["spine_05"][1])
rootz = -poseslms[12].y * coef rootz = (0.0635 * dataxyz["shoulder_r"][2] + 0.0365 * dataxyz["shoulder_l"][2] + 0.9 * dataxyz["spine_05"][2])
rootv = poseslms[12].visibility rootv = (0.635 * dataxyz["shoulder_r"][3] + 0.451594 * dataxyz["shoulder_l"][3])
data["shoulder_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["shoulder_r"] = [rootx, rooty, rootz, rootv]
rootx = poseslms[11].x * coef
rooty = -poseslms[11].z * coef
rootz = -poseslms[11].y * coef
rootv = poseslms[11].visibility
data["shoulder_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["shoulder_l"] = [rootx, rooty, rootz, rootv]
rootx = (0.635 * dataxyz["shoulder_r"][0] + 0.365 * dataxyz["shoulder_l"][0]) * coef
rooty = 0.5 * (0.635 * dataxyz["shoulder_r"][1] + 0.365 * dataxyz["shoulder_l"][1] + 0.31 * dataxyz["head"][1] + 0.69 * dataxyz["spine_05"][1]) * coef
rootz = (0.0635 * dataxyz["shoulder_r"][1] + 0.0365 * dataxyz["shoulder_l"][1] + 0.9 * dataxyz["spine_05"][1]) * coef
rootv = (0.635 * dataxyz["shoulder_r"][0] + 0.451594 * dataxyz["shoulder_l"][0])
data["clavicle_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["clavicle_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["clavicle_r"] = [rootx, rooty, rootz, rootv] dataxyz["clavicle_r"] = [rootx, rooty, rootz, rootv]
rootx = (0.635 * dataxyz["shoulder_l"][0] + 0.365 * dataxyz["shoulder_r"][0]) * coef rootx = (0.635 * dataxyz["shoulder_l"][0] + 0.365 * dataxyz["shoulder_r"][0])
rooty = 0.5 * (0.635 * dataxyz["shoulder_l"][1] + 0.365 * dataxyz["shoulder_r"][1] + 0.31 * dataxyz["head"][1] + 0.69 * dataxyz["spine_05"][1]) * coef rooty = 0.5 * (0.635 * dataxyz["shoulder_l"][1] + 0.365 * dataxyz["shoulder_r"][1] + 0.31 * dataxyz["head"][1] + 0.69 * dataxyz["spine_05"][1])
rootz = (0.0635 * dataxyz["shoulder_l"][1] + 0.0365 * dataxyz["shoulder_r"][1] + 0.9 * dataxyz["spine_05"][1]) * coef rootz = (0.0635 * dataxyz["shoulder_l"][2] + 0.0365 * dataxyz["shoulder_r"][2] + 0.9 * dataxyz["spine_05"][2])
rootv = (0.635 * dataxyz["shoulder_l"][0] + 0.365 * dataxyz["shoulder_r"][0]) rootv = (0.635 * dataxyz["shoulder_l"][3] + 0.365 * dataxyz["shoulder_r"][3])
data["clavicle_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["clavicle_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["clavicle_l"] = [rootx, rooty, rootz, rootv] dataxyz["clavicle_l"] = [rootx, rooty, rootz, rootv]
@@ -209,9 +597,9 @@ def rhandconvert(rhandlms, data, coef):
data["index_2_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["index_2_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["index_2_r"] = [rootx, rooty, rootz, rootv] dataxyz["index_2_r"] = [rootx, rooty, rootz, rootv]
rootx = (0.75 * dataxyz["hand_r"][0] + 0.25 * dataxyz["index_2_r"][0]) * coef rootx = (0.75 * dataxyz["hand_r"][0] + 0.25 * dataxyz["index_2_r"][0])
rooty = (0.75 * dataxyz["hand_r"][1] + 0.25 * dataxyz["index_2_r"][1]) * coef rooty = (0.75 * dataxyz["hand_r"][1] + 0.25 * dataxyz["index_2_r"][1])
rootz = (0.75 * dataxyz["hand_r"][2] + 0.25 * dataxyz["index_2_r"][2]) * coef rootz = (0.75 * dataxyz["hand_r"][2] + 0.25 * dataxyz["index_2_r"][2])
rootv = 1.0 rootv = 1.0
data["index_1_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["index_1_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["index_1_r"] = [rootx, rooty, rootz, rootv] dataxyz["index_1_r"] = [rootx, rooty, rootz, rootv]
@@ -223,9 +611,9 @@ def rhandconvert(rhandlms, data, coef):
data["middle_2_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["middle_2_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["middle_2_r"] = [rootx, rooty, rootz, rootv] dataxyz["middle_2_r"] = [rootx, rooty, rootz, rootv]
rootx = (0.75 * dataxyz["hand_r"][0] + 0.25 * dataxyz["middle_2_r"][0]) * coef rootx = (0.75 * dataxyz["hand_r"][0] + 0.25 * dataxyz["middle_2_r"][0])
rooty = (0.75 * dataxyz["hand_r"][1] + 0.25 * dataxyz["middle_2_r"][1]) * coef rooty = (0.75 * dataxyz["hand_r"][1] + 0.25 * dataxyz["middle_2_r"][1])
rootz = (0.75 * dataxyz["hand_r"][2] + 0.25 * dataxyz["middle_2_r"][2]) * coef rootz = (0.75 * dataxyz["hand_r"][2] + 0.25 * dataxyz["middle_2_r"][2])
rootv = 1.0 rootv = 1.0
data["middle_1_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["middle_1_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["middle_1_r"] = [rootx, rooty, rootz, rootv] dataxyz["middle_1_r"] = [rootx, rooty, rootz, rootv]
@@ -237,9 +625,9 @@ def rhandconvert(rhandlms, data, coef):
data["ring_2_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["ring_2_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["ring_2_r"] = [rootx, rooty, rootz, rootv] dataxyz["ring_2_r"] = [rootx, rooty, rootz, rootv]
rootx = (0.75 * dataxyz["hand_r"][0] + 0.25 * dataxyz["ring_2_r"][0]) * coef rootx = (0.75 * dataxyz["hand_r"][0] + 0.25 * dataxyz["ring_2_r"][0])
rooty = (0.75 * dataxyz["hand_r"][1] + 0.25 * dataxyz["ring_2_r"][1]) * coef rooty = (0.75 * dataxyz["hand_r"][1] + 0.25 * dataxyz["ring_2_r"][1])
rootz = (0.75 * dataxyz["hand_r"][2] + 0.25 * dataxyz["ring_2_r"][2]) * coef rootz = (0.75 * dataxyz["hand_r"][2] + 0.25 * dataxyz["ring_2_r"][2])
rootv = 1.0 rootv = 1.0
data["ring_1_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["ring_1_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["ring_1_r"] = [rootx, rooty, rootz, rootv] dataxyz["ring_1_r"] = [rootx, rooty, rootz, rootv]
@@ -251,9 +639,9 @@ def rhandconvert(rhandlms, data, coef):
data["pinky_2_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["pinky_2_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["pinky_2_r"] = [rootx, rooty, rootz, rootv] dataxyz["pinky_2_r"] = [rootx, rooty, rootz, rootv]
rootx = (0.75 * dataxyz["hand_r"][0] + 0.25 * dataxyz["pinky_2_r"][0]) * coef rootx = (0.75 * dataxyz["hand_r"][0] + 0.25 * dataxyz["pinky_2_r"][0])
rooty = (0.75 * dataxyz["hand_r"][1] + 0.25 * dataxyz["pinky_2_r"][1]) * coef rooty = (0.75 * dataxyz["hand_r"][1] + 0.25 * dataxyz["pinky_2_r"][1])
rootz = (0.75 * dataxyz["hand_r"][2] + 0.25 * dataxyz["pinky_2_r"][2]) * coef rootz = (0.75 * dataxyz["hand_r"][2] + 0.25 * dataxyz["pinky_2_r"][2])
rootv = 1.0 rootv = 1.0
data["pinky_1_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["pinky_1_r"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["pinky_1_r"] = [rootx, rooty, rootz, rootv] dataxyz["pinky_1_r"] = [rootx, rooty, rootz, rootv]
@@ -352,9 +740,9 @@ def lhandconvert(lhandlms, data, coef):
data["index_2_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["index_2_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["index_2_l"] = [rootx, rooty, rootz, rootv] dataxyz["index_2_l"] = [rootx, rooty, rootz, rootv]
rootx = (0.75 * dataxyz["hand_l"][0] + 0.25 * dataxyz["index_2_l"][0]) * coef rootx = (0.75 * dataxyz["hand_l"][0] + 0.25 * dataxyz["index_2_l"][0])
rooty = (0.75 * dataxyz["hand_l"][1] + 0.25 * dataxyz["index_2_l"][1]) * coef rooty = (0.75 * dataxyz["hand_l"][1] + 0.25 * dataxyz["index_2_l"][1])
rootz = (0.75 * dataxyz["hand_l"][2] + 0.25 * dataxyz["index_2_l"][2]) * coef rootz = (0.75 * dataxyz["hand_l"][2] + 0.25 * dataxyz["index_2_l"][2])
rootv = 1.0 rootv = 1.0
data["index_1_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["index_1_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["index_1_l"] = [rootx, rooty, rootz, rootv] dataxyz["index_1_l"] = [rootx, rooty, rootz, rootv]
@@ -366,9 +754,9 @@ def lhandconvert(lhandlms, data, coef):
data["middle_2_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["middle_2_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["middle_2_l"] = [rootx, rooty, rootz, rootv] dataxyz["middle_2_l"] = [rootx, rooty, rootz, rootv]
rootx = (0.75 * dataxyz["hand_l"][0] + 0.25 * dataxyz["middle_2_l"][0]) * coef rootx = (0.75 * dataxyz["hand_l"][0] + 0.25 * dataxyz["middle_2_l"][0])
rooty = (0.75 * dataxyz["hand_l"][1] + 0.25 * dataxyz["middle_2_l"][1]) * coef rooty = (0.75 * dataxyz["hand_l"][1] + 0.25 * dataxyz["middle_2_l"][1])
rootz = (0.75 * dataxyz["hand_l"][2] + 0.25 * dataxyz["middle_2_l"][2]) * coef rootz = (0.75 * dataxyz["hand_l"][2] + 0.25 * dataxyz["middle_2_l"][2])
rootv = 1.0 rootv = 1.0
data["middle_1_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["middle_1_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["middle_1_l"] = [rootx, rooty, rootz, rootv] dataxyz["middle_1_l"] = [rootx, rooty, rootz, rootv]
@@ -380,9 +768,9 @@ def lhandconvert(lhandlms, data, coef):
data["ring_2_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["ring_2_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["ring_2_l"] = [rootx, rooty, rootz, rootv] dataxyz["ring_2_l"] = [rootx, rooty, rootz, rootv]
rootx = (0.75 * dataxyz["hand_l"][0] + 0.25 * dataxyz["ring_2_l"][0]) * coef rootx = (0.75 * dataxyz["hand_l"][0] + 0.25 * dataxyz["ring_2_l"][0])
rooty = (0.75 * dataxyz["hand_l"][1] + 0.25 * dataxyz["ring_2_l"][1]) * coef rooty = (0.75 * dataxyz["hand_l"][1] + 0.25 * dataxyz["ring_2_l"][1])
rootz = (0.75 * dataxyz["hand_l"][2] + 0.25 * dataxyz["ring_2_l"][2]) * coef rootz = (0.75 * dataxyz["hand_l"][2] + 0.25 * dataxyz["ring_2_l"][2])
rootv = 1.0 rootv = 1.0
data["ring_1_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["ring_1_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["ring_1_l"] = [rootx, rooty, rootz, rootv] dataxyz["ring_1_l"] = [rootx, rooty, rootz, rootv]
@@ -394,9 +782,9 @@ def lhandconvert(lhandlms, data, coef):
data["pinky_2_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["pinky_2_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["pinky_2_l"] = [rootx, rooty, rootz, rootv] dataxyz["pinky_2_l"] = [rootx, rooty, rootz, rootv]
rootx = (0.75 * dataxyz["hand_l"][0] + 0.25 * dataxyz["pinky_2_l"][0]) * coef rootx = (0.75 * dataxyz["hand_l"][0] + 0.25 * dataxyz["pinky_2_l"][0])
rooty = (0.75 * dataxyz["hand_l"][1] + 0.25 * dataxyz["pinky_2_l"][1]) * coef rooty = (0.75 * dataxyz["hand_l"][1] + 0.25 * dataxyz["pinky_2_l"][1])
rootz = (0.75 * dataxyz["hand_l"][2] + 0.25 * dataxyz["pinky_2_l"][2]) * coef rootz = (0.75 * dataxyz["hand_l"][2] + 0.25 * dataxyz["pinky_2_l"][2])
rootv = 1.0 rootv = 1.0
data["pinky_1_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv) data["pinky_1_l"] = makexyzrotvis(rootx, rooty, rootz, 0, 0, 0, rootv)
dataxyz["pinky_1_l"] = [rootx, rooty, rootz, rootv] dataxyz["pinky_1_l"] = [rootx, rooty, rootz, rootv]

View File

@@ -2,15 +2,19 @@
address_input: "0" # input video path or webcam index address_input: "0" # input video path or webcam index
# Image processing # Image processing
scale_pose: 0.42 # shoulder width scale_pose: 42.0 # shoulder width
crop_image: 1.0 # coefficient of image cropping crop_image: 1.0 # coefficient of image cropping
# OSC output # OSC output
osc_address: "0.0.0.0" # osc ip address osc_address: "localhost" # osc ip address
osc_port: 5005 # port osc_port: 8888 # port
osc_message_address: "/pose/0" # osc address for message in send_message function osc_message_address: "/pose/0" # osc address for message in send_message function
# Output # Output
output_method: 'file' # type os output data method output_method: 'osc' # type os output data method ['file', 'osc']
mirror_image: True # horizontal image mirroring just for show mirror_image: True # horizontal image mirroring just for show
show_image: True # show image in opencv interface show_image: True # show image in opencv interface
# Model UE4
apose: True # APose coordinates
world: True # True - world coordinates, False - local coordinates

View File

@@ -1,10 +1,10 @@
{ {
"hip_r": { "hip_r": {
"visible": 3.3100583095801994e-05, "visible": 1.3170118108973838e-05,
"translation": { "translation": {
"x": 0.19120925371787711, "x": 0.18146598118253365,
"y": 0.012880325989142518, "y": -0.06834274212591009,
"z": -1.2929239842510376 "z": -1.343179774656035
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -18,11 +18,11 @@
} }
}, },
"hip_l": { "hip_l": {
"visible": 3.3651816920610145e-05, "visible": 1.1512962373672053e-05,
"translation": { "translation": {
"x": 0.44584404101564734, "x": 0.41419056772477736,
"y": -0.01352180735545764, "y": 0.06770521592162329,
"z": -1.3006948606338735 "z": -1.3229037303228375
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -38,9 +38,9 @@
"root": { "root": {
"visible": 1.0, "visible": 1.0,
"translation": { "translation": {
"x": 0.2515628279636967, "x": 0.2788742640539463,
"y": -2.3222343162082186, "y": -2.3386429360897423,
"z": 1.024181330938888 "z": 1.2482059950843312
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -54,11 +54,11 @@
} }
}, },
"pelvis": { "pelvis": {
"visible": 3.337620000820607e-05, "visible": 1.2341540241322946e-05,
"translation": { "translation": {
"x": 0.2515628279636967, "x": 0.2788742640539463,
"y": 0.0002533114072720546, "y": 0.0002984767839147041,
"z": 1.024181330938888 "z": 1.2482059950843312
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -74,9 +74,9 @@
"head": { "head": {
"visible": 1.0, "visible": 1.0,
"translation": { "translation": {
"x": 0.36108411469132357, "x": 0.17874327973041004,
"y": 1.4519316551019659, "y": 0.9321737473985569,
"z": -0.5288823311319394 "z": -0.502837538921367
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -90,11 +90,11 @@
} }
}, },
"spine_01": { "spine_01": {
"visible": 0.955888472324311, "visible": 0.9558875444223647,
"translation": { "translation": {
"x": 0.2813578177045325, "x": 0.17150389797849225,
"y": 1.096117025560525, "y": 0.8343578423108636,
"z": -0.36358807558897704 "z": -0.3985086559372201
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -108,11 +108,11 @@
} }
}, },
"spine_02": { "spine_02": {
"visible": 0.8642055324545849, "visible": 0.8642026759688233,
"translation": { "translation": {
"x": 0.2734272868087156, "x": 0.18010024667200894,
"y": 0.9909997438024116, "y": 0.7543553853372558,
"z": -0.25112939542523893 "z": -0.24817975527242783
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -126,11 +126,11 @@
} }
}, },
"spine_03": { "spine_03": {
"visible": 0.7177964191975329, "visible": 0.7177904829430961,
"translation": { "translation": {
"x": 0.26076296782239117, "x": 0.19382781464980875,
"y": 0.8231372381708821, "y": 0.6265989150437125,
"z": -0.07154336050721924 "z": -0.008118506423804382
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -144,11 +144,11 @@
} }
}, },
"spine_04": { "spine_04": {
"visible": 0.5484210724916665, "visible": 0.5484115733655237,
"translation": { "translation": {
"x": 0.24611208051501207, "x": 0.20970873581614333,
"y": 0.6289432467057616, "y": 0.47880212856980525,
"z": 0.13621315308061457 "z": 0.26959956965654785
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -162,11 +162,11 @@
} }
}, },
"spine_05": { "spine_05": {
"visible": 0.22900073388461134, "visible": 0.2289845156360646,
"translation": { "translation": {
"x": 0.21848237243982405, "x": 0.23965813113842516,
"y": 0.2627181040528383, "y": 0.2000762071255663,
"z": 0.5280154856437433 "z": 0.7933405014046365
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -180,11 +180,11 @@
} }
}, },
"knee_r": { "knee_r": {
"visible": 0.013898183591663837, "visible": 0.0008665756904520094,
"translation": { "translation": {
"x": 0.18465588665818877, "x": 0.20375928531322457,
"y": 0.09801578488803149, "y": 0.0036456700677487694,
"z": -1.768014233852209 "z": -1.801355108827071
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -198,11 +198,11 @@
} }
}, },
"knee_l": { "knee_l": {
"visible": 0.014928212389349937, "visible": 9.614641749067232e-05,
"translation": { "translation": {
"x": 0.4274460282068141, "x": 0.4292902199154371,
"y": 0.05224144739339493, "y": 0.22014541728869436,
"z": -1.7756454888478737 "z": -1.778549693597468
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -216,11 +216,11 @@
} }
}, },
"ankle_r": { "ankle_r": {
"visible": 0.0026775619480758905, "visible": 0.0003017356211785227,
"translation": { "translation": {
"x": 0.17896696239800255, "x": 0.2337782771388608,
"y": -0.5335542811699052, "y": -0.5212753244457624,
"z": -2.1543303245629586 "z": -2.2026337739147674
}, },
"rotation": { "rotation": {
"rotx": 0, "rotx": 0,
@@ -234,201 +234,10 @@
} }
}, },
"ankle_l": { "ankle_l": {
"visible": 0.0034075980074703693, "visible": 0.00011461532267276198,
"translation": { "translation": {
"x": 0.41408530649657976, "x": 0.44957449642443376,
"y": -0.49391145737651565, "y": -0.25947212565811767,
"z": -2.169021733182351 "z": -2.1919686692515743
}, },
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
},
"ball_r": {
"visible": 0.0020394118037074804,
"translation": {
"x": 0.20595402067926516,
"y": -0.17559397141519834,
"z": -2.3155040569477063
},
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
},
"ball_l": {
"visible": 0.004800162278115749,
"translation": {
"x": 0.3851209297536031,
"y": -0.11210682978053091,
"z": -2.3222343162082186
},
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
},
"heel_r": {
"visible": 0.002590247429907322,
"translation": {
"x": 0.1730598856046068,
"y": -0.5702056955598608,
"z": -2.2201981026431357
},
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
},
"heel_l": {
"visible": 0.008067294023931026,
"translation": {
"x": 0.41600418262782407,
"y": -0.5288466490646851,
"z": -2.241292700597866
},
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
},
"shoulder_r": {
"visible": 0.9998279809951782,
"translation": {
"x": 0.13330336641156587,
"y": 0.740182636431514,
"z": -0.6801516537114732
},
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
},
"shoulder_l": {
"visible": 0.9999477863311768,
"translation": {
"x": 0.5445893135230234,
"y": 0.655885117688507,
"z": -0.6918903948025639
},
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
},
"clavicle_r": {
"visible": 0.33058090412246055,
"translation": {
"x": 0.2238388086062232,
"y": 0.5294572856816074,
"z": 0.24276561849161685
},
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
},
"clavicle_l": {
"visible": 0.39446994282734144,
"translation": {
"x": 0.31154057340157937,
"y": 0.5204695713996657,
"z": 0.24096807563522846
},
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
},
"elbow_r": {
"visible": 0.36677366495132446,
"translation": {
"x": 0.06503809352132009,
"y": 0.6750874833775152,
"z": -1.0384893789994394
},
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
},
"elbow_l": {
"visible": 0.30559301376342773,
"translation": {
"x": 0.5904584697564025,
"y": 0.4368189729206031,
"z": -1.0304522522572501
},
"rotation": {
"rotx": 0,
"roty": 0,
"rotz": 0
},
"scale": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
}
}

69
hpe_apose_parent.txt Normal file
View File

@@ -0,0 +1,69 @@
root ['Translation:', 'X=0.000', 'Y=0.000', 'Z=0.000', 'Rotation:', 'P=0.000000', 'Y=0.000000', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pelvis ['Translation:', 'X=0.000', 'Y=-1.056', 'Z=96.751', 'Rotation:', 'P=89.787849', 'Y=89.995300', 'R=89.995300', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
spine_02 ['Translation:', 'X=10.809', 'Y=0.851', 'Z=0.000', 'Rotation:', 'P=0.000000', 'Y=7.153858', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
spine_04 ['Translation:', 'X=18.875', 'Y=-3.801', 'Z=-0.000', 'Rotation:', 'P=0.000000', 'Y=-14.063557', 'R=-0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
spine_05 ['Translation:', 'X=13.407', 'Y=-0.420', 'Z=0.000', 'Rotation:', 'P=0.000000', 'Y=-2.779418', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
clavicle_l ['Translation:', 'X=11.884', 'Y=2.732', 'Z=-3.782', 'Rotation:', 'P=-61.853577', 'Y=-101.540916', 'R=108.719162', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
shoulder_l ['Translation:', 'X=15.785', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=-40.300545', 'Y=17.021019', 'R=7.673903', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
elbow_l ['Translation:', 'X=30.340', 'Y=0.000', 'Z=0.000', 'Rotation:', 'P=10.397350', 'Y=30.360876', 'R=-3.613283', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
hand_l ['Translation:', 'X=26.975', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=-2.499808', 'Y=0.412571', 'R=-76.356194', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_02_l ['Translation:', 'X=12.068', 'Y=-1.763', 'Z=-2.109', 'Rotation:', 'P=3.763789', 'Y=-25.536919', 'R=14.866977', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_03_l ['Translation:', 'X=4.288', 'Y=-0.000', 'Z=0.000', 'Rotation:', 'P=0.475286', 'Y=-11.986160', 'R=1.337821', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_04_l ['Translation:', 'X=3.394', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=-0.997269', 'Y=9.496333', 'R=1.137367', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_02_l ['Translation:', 'X=12.244', 'Y=-1.294', 'Z=0.571', 'Rotation:', 'P=7.040565', 'Y=-22.825857', 'R=1.917856', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_03_l ['Translation:', 'X=4.640', 'Y=0.000', 'Z=0.000', 'Rotation:', 'P=-1.136837', 'Y=-12.280714', 'R=-2.024954', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_04_l ['Translation:', 'X=3.649', 'Y=0.000', 'Z=0.000', 'Rotation:', 'P=4.389954', 'Y=15.399755', 'R=0.781444', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_02_l ['Translation:', 'X=10.141', 'Y=-2.263', 'Z=4.643', 'Rotation:', 'P=18.933966', 'Y=-20.185858', 'R=-18.724598', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_03_l ['Translation:', 'X=3.571', 'Y=-0.000', 'Z=0.000', 'Rotation:', 'P=1.315686', 'Y=-11.208060', 'R=1.063832', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_04_l ['Translation:', 'X=2.986', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=-3.869664', 'Y=-1.038998', 'R=0.445698', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_02_l ['Translation:', 'X=11.498', 'Y=-1.754', 'Z=2.847', 'Rotation:', 'P=10.989255', 'Y=-23.292091', 'R=-13.510273', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_03_l ['Translation:', 'X=4.430', 'Y=0.000', 'Z=0.000', 'Rotation:', 'P=1.669749', 'Y=-13.315456', 'R=0.301359', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_04_l ['Translation:', 'X=3.477', 'Y=-0.000', 'Z=0.000', 'Rotation:', 'P=-2.987661', 'Y=12.899673', 'R=-0.360762', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_02_l ['Translation:', 'X=4.762', 'Y=-2.375', 'Z=-2.538', 'Rotation:', 'P=-36.918968', 'Y=-27.056177', 'R=95.069138', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_03_l ['Translation:', 'X=3.870', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=-9.833239', 'Y=-15.151319', 'R=1.613141', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_04_l ['Translation:', 'X=4.062', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=-0.479192', 'Y=12.385657', 'R=2.414767', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
lowerarm_twist_01_l ['Translation:', 'X=14.000', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=0.000000', 'Y=0.000000', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
None ['Translation:', 'X=77.885', 'Y=69.602', 'Z=43.869', 'Rotation:', 'P=32.168755', 'Y=93.709030', 'R=-145.800354', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
upperarm_twist_01_l ['Translation:', 'X=0.500', 'Y=-0.000', 'Z=0.000', 'Rotation:', 'P=0.000000', 'Y=-0.000000', 'R=-0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
clavicle_r ['Translation:', 'X=11.884', 'Y=2.732', 'Z=3.782', 'Rotation:', 'P=-61.853588', 'Y=78.459053', 'R=108.719177', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
shoulder_r ['Translation:', 'X=-15.785', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=-40.300556', 'Y=17.021015', 'R=7.673907', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
elbow_r ['Translation:', 'X=-30.340', 'Y=0.000', 'Z=0.000', 'Rotation:', 'P=10.397350', 'Y=30.360876', 'R=-3.613281', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
hand_r ['Translation:', 'X=-26.975', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=-2.499808', 'Y=0.412573', 'R=-76.356194', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_02_r ['Translation:', 'X=-12.068', 'Y=1.764', 'Z=2.109', 'Rotation:', 'P=3.763789', 'Y=-25.536919', 'R=14.866971', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_03_r ['Translation:', 'X=-4.288', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=0.475299', 'Y=-11.986152', 'R=1.337820', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_04_r ['Translation:', 'X=-3.394', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=-0.997269', 'Y=9.496332', 'R=1.137365', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_02_ ['Translation:', 'X=-12.244', 'Y=1.294', 'Z=-0.571', 'Rotation:', 'P=7.040559', 'Y=-22.825850', 'R=1.917846', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_03_r ['Translation:', 'X=-4.641', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=-1.136837', 'Y=-12.280720', 'R=-2.024957', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_04_r ['Translation:', 'X=-3.649', 'Y=-0.000', 'Z=0.000', 'Rotation:', 'P=4.389954', 'Y=15.399755', 'R=0.781455', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_02_r ['Translation:', 'X=-10.141', 'Y=2.263', 'Z=-4.643', 'Rotation:', 'P=18.933966', 'Y=-20.185869', 'R=-18.724598', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_03_r ['Translation:', 'X=-3.571', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=1.315692', 'Y=-11.208064', 'R=1.063835', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_04_r ['Translation:', 'X=-2.985', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=-3.869664', 'Y=-1.038998', 'R=0.445703', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_02_r ['Translation:', 'X=-11.498', 'Y=1.754', 'Z=-2.847', 'Rotation:', 'P=10.989241', 'Y=-23.292084', 'R=-13.510281', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_03_r ['Translation:', 'X=-4.430', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=1.669749', 'Y=-13.315456', 'R=0.301358', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_04_r ['Translation:', 'X=-3.477', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=-2.987661', 'Y=12.899678', 'R=-0.360764', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_02_r ['Translation:', 'X=-4.762', 'Y=2.375', 'Z=2.538', 'Rotation:', 'P=-36.918968', 'Y=-27.056177', 'R=95.069130', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_03_r ['Translation:', 'X=-3.870', 'Y=-0.000', 'Z=0.000', 'Rotation:', 'P=-9.833239', 'Y=-15.151324', 'R=1.613143', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_04_r ['Translation:', 'X=-4.062', 'Y=-0.000', 'Z=0.000', 'Rotation:', 'P=-0.479199', 'Y=12.385653', 'R=2.414763', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
lowerarm_twist_01_r ['Translation:', 'X=-14.000', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=0.000000', 'Y=0.000002', 'R=-13.510374', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
upperarm_twist_01_r ['Translation:', 'X=-0.500', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=0.000000', 'Y=-0.000001', 'R=-19.951906', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
head ['Translation:', 'X=16.559', 'Y=0.355', 'Z=0.000', 'Rotation:', 'P=0.000000', 'Y=23.508049', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
head_0 ['Translation:', 'X=9.284', 'Y=-0.364', 'Z=0.000', 'Rotation:', 'P=0.000000', 'Y=-15.348654', 'R=-0.000001', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
hip_l ['Translation:', 'X=-1.449', 'Y=0.531', 'Z=-9.006', 'Rotation:', 'P=7.032287', 'Y=1.515470', 'R=8.563468', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
knee_l ['Translation:', 'X=-42.572', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=-1.787276', 'Y=7.613586', 'R=-5.735975', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
calf_twist_01_l ['Translation:', 'X=-20.477', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=0.219085', 'Y=0.872982', 'R=0.323560', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ankle_l ['Translation:', 'X=-40.197', 'Y=-0.000', 'Z=0.000', 'Rotation:', 'P=-3.704933', 'Y=-8.059578', 'R=-0.415387', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ball_l ['Translation:', 'X=-10.454', 'Y=16.578', 'Z=0.080', 'Rotation:', 'P=-0.008954', 'Y=91.883591', 'R=0.003945', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thigh_twist_01_l ['Translation:', 'X=-22.094', 'Y=0.000', 'Z=-0.000', 'Rotation:', 'P=0.000212', 'Y=0.056331', 'R=-5.438678', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
hip_r ['Translation:', 'X=-1.449', 'Y=0.531', 'Z=9.006', 'Rotation:', 'P=7.032294', 'Y=-178.484528', 'R=8.563469', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
knee_r ['Translation:', 'X=42.572', 'Y=0.000', 'Z=0.000', 'Rotation:', 'P=-1.787276', 'Y=7.613586', 'R=-5.735975', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
calf_twist_01_r ['Translation:', 'X=20.477', 'Y=-0.000', 'Z=0.000', 'Rotation:', 'P=0.219126', 'Y=0.872964', 'R=0.323369', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ankle_r ['Translation:', 'X=40.197', 'Y=-0.000', 'Z=-0.000', 'Rotation:', 'P=-3.704927', 'Y=-8.059580', 'R=-0.415387', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ball_r ['Translation:', 'X=10.454', 'Y=-16.578', 'Z=-0.080', 'Rotation:', 'P=-0.008948', 'Y=91.883591', 'R=0.003944', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thigh_twist_01_r ['Translation:', 'X=22.094', 'Y=-0.000', 'Z=0.000', 'Rotation:', 'P=0.000164', 'Y=0.056341', 'R=-5.438870', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_foot_root ['Translation:', 'X=0.000', 'Y=0.000', 'Z=0.000', 'Rotation:', 'P=0.000000', 'Y=0.000000', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_foot_l ['Translation:', 'X=17.076', 'Y=-8.072', 'Z=13.466', 'Rotation:', 'P=88.877769', 'Y=139.207169', 'R=141.820999', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_foot_r ['Translation:', 'X=-17.076', 'Y=-8.072', 'Z=13.466', 'Rotation:', 'P=-88.877769', 'Y=-139.207169', 'R=-38.178883', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_hand_root ['Translation:', 'X=0.000', 'Y=0.000', 'Z=0.000', 'Rotation:', 'P=0.000000', 'Y=0.000000', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_hand_gun ['Translation:', 'X=-56.646', 'Y=-0.335', 'Z=111.680', 'Rotation:', 'P=35.172623', 'Y=-32.751068', 'R=74.068031', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_hand_l ['Translation:', 'X=77.885', 'Y=69.602', 'Z=43.869', 'Rotation:', 'P=32.168755', 'Y=93.709030', 'R=-145.800354', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
Non ['Translation:', 'X=0.000', 'Y=0.000', 'Z=0.000', 'Rotation:', 'P=0.000000', 'Y=0.000000', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']

68
hpe_apose_world.txt Normal file
View File

@@ -0,0 +1,68 @@
root ['Translation:', 'X=375.760', 'Y=-1.704', 'Z=-304.722', 'Rotation:', 'P=0.000000', 'Y=0.000000', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pelvis ['Translation:', 'X=375.760', 'Y=-2.760', 'Z=-207.971', 'Rotation:', 'P=89.790634', 'Y=89.998116', 'R=89.998116', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
spine_02 ['Translation:', 'X=375.760', 'Y=-1.869', 'Z=-197.166', 'Rotation:', 'P=82.637939', 'Y=90.000107', 'R=90.000107', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
spine_04 ['Translation:', 'X=375.760', 'Y=-3.220', 'Z=-177.959', 'Rotation:', 'P=83.298508', 'Y=-89.999939', 'R=-89.999939', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
spine_05 ['Translation:', 'X=375.760', 'Y=-5.202', 'Z=-164.692', 'Rotation:', 'P=80.519157', 'Y=-90.000000', 'R=-90.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
clavicle_l ['Translation:', 'X=379.542', 'Y=-4.465', 'Z=-152.521', 'Rotation:', 'P=-9.742390', 'Y=-26.536825', 'R=-0.000003', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
shoulder_l ['Translation:', 'X=393.460', 'Y=-11.416', 'Z=-155.192', 'Rotation:', 'P=-49.541229', 'Y=-6.413618', 'R=3.295939', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
elbow_l ['Translation:', 'X=413.024', 'Y=-13.615', 'Z=-178.277', 'Rotation:', 'P=-33.187275', 'Y=30.848158', 'R=-28.515471', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
hand_l ['Translation:', 'X=432.406', 'Y=-2.039', 'Z=-193.042', 'Rotation:', 'P=-35.172615', 'Y=32.751072', 'R=-105.931961', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_02_l ['Translation:', 'X=438.802', 'Y=5.063', 'Z=-200.907', 'Rotation:', 'P=-60.632530', 'Y=39.185219', 'R=-95.108459', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_03_l ['Translation:', 'X=440.432', 'Y=6.391', 'Z=-204.643', 'Rotation:', 'P=-72.604263', 'Y=41.145889', 'R=-95.530258', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_04_l ['Translation:', 'X=441.196', 'Y=7.059', 'Z=-207.882', 'Rotation:', 'P=-63.056412', 'Y=41.326263', 'R=-94.477684', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_02_l ['Translation:', 'X=440.250', 'Y=2.776', 'Z=-201.240', 'Rotation:', 'P=-58.987339', 'Y=31.396336', 'R=-101.577202', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_03_l ['Translation:', 'X=442.291', 'Y=4.021', 'Z=-205.218', 'Rotation:', 'P=-70.486740', 'Y=42.113358', 'R=-113.470406', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_04_l ['Translation:', 'X=443.195', 'Y=4.839', 'Z=-208.657', 'Rotation:', 'P=-56.627937', 'Y=23.489927', 'R=-96.457565', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_02_l ['Translation:', 'X=439.785', 'Y=-1.863', 'Z=-201.704', 'Rotation:', 'P=-57.221210', 'Y=8.494291', 'R=-103.297714', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_03_l ['Translation:', 'X=441.697', 'Y=-1.577', 'Z=-204.707', 'Rotation:', 'P=-68.397072', 'Y=11.974680', 'R=-105.215523', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_04_l ['Translation:', 'X=442.772', 'Y=-1.349', 'Z=-207.483', 'Rotation:', 'P=-68.031853', 'Y=22.739058', 'R=-114.804611', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_02_l ['Translation:', 'X=440.335', 'Y=0.379', 'Z=-201.683', 'Rotation:', 'P=-60.143337', 'Y=23.882196', 'R=-110.450768', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_03_l ['Translation:', 'X=442.352', 'Y=1.272', 'Z=-205.525', 'Rotation:', 'P=-72.950729', 'Y=34.323620', 'R=-119.597374', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_04_l ['Translation:', 'X=443.194', 'Y=1.847', 'Z=-208.849', 'Rotation:', 'P=-60.028549', 'Y=26.871693', 'R=-112.741859', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_02_l ['Translation:', 'X=433.238', 'Y=2.173', 'Z=-197.083', 'Rotation:', 'P=-34.138702', 'Y=87.683189', 'R=-52.981850', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_03_l ['Translation:', 'X=433.367', 'Y=5.373', 'Z=-199.254', 'Rotation:', 'P=-52.094620', 'Y=85.939804', 'R=-51.473255', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_04_l ['Translation:', 'X=433.544', 'Y=7.862', 'Z=-202.460', 'Rotation:', 'P=-42.125023', 'Y=96.831261', 'R=-57.027554', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
lowerarm_twist_01_l ['Translation:', 'X=423.083', 'Y=-7.607', 'Z=-185.940', 'Rotation:', 'P=-33.187275', 'Y=30.848158', 'R=-28.515471', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
None ['Translation:', 'X=432.406', 'Y=-2.039', 'Z=-193.042', 'Rotation:', 'P=-35.172630', 'Y=32.751068', 'R=-105.931976', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
upperarm_twist_01_l ['Translation:', 'X=393.783', 'Y=-11.452', 'Z=-155.572', 'Rotation:', 'P=-49.541203', 'Y=-6.413616', 'R=3.295938', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
clavicle_r ['Translation:', 'X=371.978', 'Y=-4.465', 'Z=-152.521', 'Rotation:', 'P=9.742397', 'Y=26.536829', 'R=180.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
shoulder_r ['Translation:', 'X=358.060', 'Y=-11.416', 'Z=-155.192', 'Rotation:', 'P=49.541229', 'Y=6.413619', 'R=-176.704056', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
elbow_r ['Translation:', 'X=338.495', 'Y=-13.615', 'Z=-178.277', 'Rotation:', 'P=33.187275', 'Y=-30.848154', 'R=151.484512', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
hand_r ['Translation:', 'X=319.114', 'Y=-2.039', 'Z=-193.042', 'Rotation:', 'P=35.172619', 'Y=-32.751076', 'R=74.068016', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_02_r ['Translation:', 'X=312.718', 'Y=5.063', 'Z=-200.907', 'Rotation:', 'P=60.632515', 'Y=-39.185219', 'R=84.891525', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_03_r ['Translation:', 'X=311.088', 'Y=6.391', 'Z=-204.644', 'Rotation:', 'P=72.604263', 'Y=-41.145885', 'R=84.469742', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
index_04_r ['Translation:', 'X=310.324', 'Y=7.059', 'Z=-207.882', 'Rotation:', 'P=63.056419', 'Y=-41.326252', 'R=85.522316', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_02_ ['Translation:', 'X=311.270', 'Y=2.776', 'Z=-201.240', 'Rotation:', 'P=58.987339', 'Y=-31.396345', 'R=78.422768', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_03_r ['Translation:', 'X=309.229', 'Y=4.021', 'Z=-205.218', 'Rotation:', 'P=70.486748', 'Y=-42.113411', 'R=66.529549', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
middle_04_r ['Translation:', 'X=308.325', 'Y=4.839', 'Z=-208.657', 'Rotation:', 'P=56.627953', 'Y=-23.489948', 'R=83.542404', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_02_r ['Translation:', 'X=311.735', 'Y=-1.863', 'Z=-201.705', 'Rotation:', 'P=57.221222', 'Y=-8.494291', 'R=76.702271', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_03_r ['Translation:', 'X=309.823', 'Y=-1.577', 'Z=-204.707', 'Rotation:', 'P=68.397110', 'Y=-11.974666', 'R=74.784508', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
pinky_04_r ['Translation:', 'X=308.747', 'Y=-1.349', 'Z=-207.483', 'Rotation:', 'P=68.031822', 'Y=-22.739044', 'R=65.195419', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_02_r ['Translation:', 'X=311.184', 'Y=0.379', 'Z=-201.683', 'Rotation:', 'P=60.143322', 'Y=-23.882204', 'R=69.549194', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_03_r ['Translation:', 'X=309.168', 'Y=1.272', 'Z=-205.525', 'Rotation:', 'P=72.950775', 'Y=-34.323681', 'R=60.402596', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ring_04_r ['Translation:', 'X=308.326', 'Y=1.847', 'Z=-208.849', 'Rotation:', 'P=60.028561', 'Y=-26.871723', 'R=67.258072', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_02_r ['Translation:', 'X=318.282', 'Y=2.173', 'Z=-197.083', 'Rotation:', 'P=34.138699', 'Y=-87.683189', 'R=127.018127', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_03_r ['Translation:', 'X=318.152', 'Y=5.373', 'Z=-199.254', 'Rotation:', 'P=52.094624', 'Y=-85.939819', 'R=128.526718', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thumb_04_r ['Translation:', 'X=317.976', 'Y=7.862', 'Z=-202.460', 'Rotation:', 'P=42.125004', 'Y=-96.831261', 'R=122.972427', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
lowerarm_twist_01_r ['Translation:', 'X=328.436', 'Y=-7.607', 'Z=-185.940', 'Rotation:', 'P=33.187271', 'Y=-30.848154', 'R=137.974152', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
upperarm_twist_01_r ['Translation:', 'X=357.737', 'Y=-11.452', 'Z=-155.572', 'Rotation:', 'P=49.541218', 'Y=6.413617', 'R=163.344009', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
head ['Translation:', 'X=375.760', 'Y=-7.579', 'Z=-148.301', 'Rotation:', 'P=75.972702', 'Y=89.999969', 'R=89.999969', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
head_0 ['Translation:', 'X=375.760', 'Y=-5.683', 'Z=-139.206', 'Rotation:', 'P=88.678833', 'Y=-90.000290', 'R=-90.000290', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
hip_l ['Translation:', 'X=384.766', 'Y=-2.234', 'Z=-209.422', 'Rotation:', 'P=82.760597', 'Y=166.295837', 'R=174.753387', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
knee_l ['Translation:', 'X=389.978', 'Y=-3.505', 'Z=-251.655', 'Rotation:', 'P=80.127579', 'Y=114.503563', 'R=117.834335', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
calf_twist_01_l ['Translation:', 'X=391.434', 'Y=-6.699', 'Z=-271.828', 'Rotation:', 'P=79.251228', 'Y=113.356789', 'R=117.027946', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ankle_l ['Translation:', 'X=392.836', 'Y=-9.776', 'Z=-291.256', 'Rotation:', 'P=88.877769', 'Y=139.206955', 'R=141.820786', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ball_l ['Translation:', 'X=393.669', 'Y=6.653', 'Z=-301.910', 'Rotation:', 'P=-2.576805', 'Y=87.342842', 'R=90.887283', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thigh_twist_01_l ['Translation:', 'X=387.471', 'Y=-2.893', 'Z=-231.340', 'Rotation:', 'P=82.754990', 'Y=165.851181', 'R=168.873581', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
hip_r ['Translation:', 'X=366.754', 'Y=-2.234', 'Z=-209.422', 'Rotation:', 'P=-82.760597', 'Y=-166.295837', 'R=-5.246624', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
knee_r ['Translation:', 'X=361.542', 'Y=-3.505', 'Z=-251.655', 'Rotation:', 'P=-80.127579', 'Y=-114.503563', 'R=-62.165585', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
calf_twist_01_r ['Translation:', 'X=360.086', 'Y=-6.699', 'Z=-271.828', 'Rotation:', 'P=-79.251190', 'Y=-113.357056', 'R=-62.971889', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ankle_r ['Translation:', 'X=358.684', 'Y=-9.776', 'Z=-291.256', 'Rotation:', 'P=-88.878120', 'Y=-139.207230', 'R=-38.179173', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ball_r ['Translation:', 'X=357.851', 'Y=6.653', 'Z=-301.910', 'Rotation:', 'P=2.576798', 'Y=-87.342842', 'R=-89.112701', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
thigh_twist_01_r ['Translation:', 'X=364.049', 'Y=-2.893', 'Z=-231.340', 'Rotation:', 'P=-82.755020', 'Y=-165.851059', 'R=-11.126723', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_foot_root ['Translation:', 'X=375.760', 'Y=-1.704', 'Z=-304.722', 'Rotation:', 'P=0.000000', 'Y=0.000000', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_foot_l ['Translation:', 'X=392.836', 'Y=-9.776', 'Z=-291.256', 'Rotation:', 'P=88.877769', 'Y=139.207169', 'R=141.820999', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_foot_r ['Translation:', 'X=358.684', 'Y=-9.776', 'Z=-291.256', 'Rotation:', 'P=-88.877769', 'Y=-139.207169', 'R=-38.178883', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_hand_root ['Translation:', 'X=375.760', 'Y=-1.704', 'Z=-304.722', 'Rotation:', 'P=0.000000', 'Y=0.000000', 'R=0.000000', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_hand_gun ['Translation:', 'X=319.114', 'Y=-2.039', 'Z=-193.042', 'Rotation:', 'P=35.172623', 'Y=-32.751068', 'R=74.068031', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']
ik_hand_l ['Translation:', 'X=432.406', 'Y=-2.039', 'Z=-193.042', 'Rotation:', 'P=-35.172630', 'Y=32.751068', 'R=-105.931976', 'Scale', 'X=1.000', 'Y=1.000', 'Z=1.000\n']

View File

@@ -15,6 +15,9 @@ logger = logging.getLogger("hpe_mp_class_logger")
from ModelUE4 import bodyconvert from ModelUE4 import bodyconvert
from ModelUE4 import rhandconvert from ModelUE4 import rhandconvert
from ModelUE4 import lhandconvert from ModelUE4 import lhandconvert
from ModelUE4 import bodyaposeworld
from ModelUE4 import bodyaposelocal
from ModelUE4 import bodyconvertlocal
class hpe_mp_class(): class hpe_mp_class():
@@ -40,20 +43,12 @@ class hpe_mp_class():
self.coef = 1.0 self.coef = 1.0
try: try:
self.hands = mpHands.Hands(hands_static_image_mode, self.hands = mpHands.Hands(min_detection_confidence=hands_min_detection_confidence,
hands_max_num_hands, min_tracking_confidence=hands_min_tracking_confidence)
hands_min_detection_confidence, self.poses = mpPose.Pose(min_detection_confidence=pose_min_detection_confidence,
hands_min_tracking_confidence) min_tracking_confidence=pose_min_tracking_confidence)
self.poses = mpPose.Pose(pose_static_image_mode, self.hol = mpHolistic.Holistic(min_detection_confidence=hol_min_detection_confidence,
pose_upper_body_only, min_tracking_confidence=hol_min_tracking_confidence)
pose_smooth_landmarks,
pose_min_detection_confidence,
pose_min_tracking_confidence)
self.hol = mpHolistic.Holistic(hol_static_image_mode,
hol_upper_body_only,
hol_smooth_landmarks,
hol_min_detection_confidence,
hol_min_tracking_confidence)
logger.info("Success initialize hpe class") logger.info("Success initialize hpe class")
except Exception as err: except Exception as err:
logger.exception("Error initialize hpe class: " + str(err)) logger.exception("Error initialize hpe class: " + str(err))
@@ -171,33 +166,54 @@ class hpe_mp_class():
except Exception as err: except Exception as err:
logger.exception("Error scaling hpe class: " + str(err)) logger.exception("Error scaling hpe class: " + str(err))
def getJSON(self): def getJSON(self, apose=False, world=True):
data = {} data = {}
try: try:
if self.holistic_use: if apose:
poseslms = {} if world:
maxy = 0 bodyaposeworld(data)
if self.results_hol.pose_landmarks: else:
for id, lm in enumerate(self.results_hol.pose_landmarks.landmark): bodyaposelocal(data)
poseslms[id] = lm else:
if lm.y > maxy: if world:
maxy = lm.y if self.holistic_use:
poseslms = {}
maxy = 0
if self.results_hol.pose_landmarks:
for id, lm in enumerate(self.results_hol.pose_landmarks.landmark):
poseslms[id] = lm
if lm.y > maxy:
maxy = lm.y
bodyconvert(poseslms, data, self.coef, maxy) bodyconvert(poseslms, data, self.coef, maxy)
rhandlms = {} rhandlms = {}
if self.results_hol.right_hand_landmarks: if self.results_hol.right_hand_landmarks:
for id, lm in enumerate(self.results_hol.right_hand_landmarks.landmark): for id, lm in enumerate(self.results_hol.right_hand_landmarks.landmark):
rhandlms[id] = lm rhandlms[id] = lm
rhandconvert(rhandlms, data, self.coef) rhandconvert(rhandlms, data, self.coef)
lhandlms = {} lhandlms = {}
if self.results_hol.left_hand_landmarks: if self.results_hol.left_hand_landmarks:
for id, lm in enumerate(self.results_hol.left_hand_landmarks.landmark): for id, lm in enumerate(self.results_hol.left_hand_landmarks.landmark):
lhandlms[id] = lm lhandlms[id] = lm
lhandconvert(lhandlms, data, self.coef) lhandconvert(lhandlms, data, self.coef)
else:
bodyaposelocal(data)
if self.holistic_use:
poseslms = {}
maxy = 0
if self.results_hol.pose_landmarks:
for id, lm in enumerate(self.results_hol.pose_landmarks.landmark):
poseslms[id] = lm
if lm.y > maxy:
maxy = lm.y
bodyconvert(poseslms, data, self.coef, maxy)
bodyconvertlocal(poseslms, data, self.coef, maxy)
except Exception as err: except Exception as err:
logger.exception("Error json converting hpe class: " + str(err)) logger.exception("Error json converting hpe class: " + str(err))

View File

@@ -27,6 +27,8 @@ output_method = data_yaml["output_method"]
crop = data_yaml["crop_image"] crop = data_yaml["crop_image"]
mirror_image = data_yaml["mirror_image"] mirror_image = data_yaml["mirror_image"]
show_image = data_yaml["show_image"] show_image = data_yaml["show_image"]
apose = data_yaml["apose"]
world = data_yaml["world"]
# OSC client # OSC client
client = udp_client.SimpleUDPClient(osc_address, osc_port) client = udp_client.SimpleUDPClient(osc_address, osc_port)
@@ -73,13 +75,25 @@ while True:
# Output # Output
if output_method == 'file': if output_method == 'file':
# JSON # JSON
res = mp_cl.getJSON() res = mp_cl.getJSON(apose=apose, world=world)
with open('hierarchy_data.json', 'w', encoding='utf-8') as f: with open('hierarchy_data.json', 'w', encoding='utf-8') as f:
json.dump(res, f, ensure_ascii=False, indent=4) json.dump(res, f, ensure_ascii=False, indent=4)
else: else:
# OSC # OSC
res = mp_cl.getJSON() res = mp_cl.getJSON(apose=apose, world=world)
client.send_message(osc_message_address, res) res_list = []
for val in res.keys():
stroka = str(val)
for val2 in res[val]:
if val2 == 'visible':
stroka += " " + str(val2) + " " + str(res[val][val2])
# res_list.append(str(val) + " " + str(val2) + " " + str(res[val][val2]))
else:
for val3 in res[val][val2]:
stroka += " " + str(val2) + "_" + str(val3) + " " + str(res[val][val2][val3])
# res_list.append(str(val) + " " + str(val2) + " " + str(val3) + " " + str(res[val][val2][val3]))
res_list.append(stroka)
client.send_message(osc_message_address, res_list)
# Interface # Interface
key = cv2.waitKey(1) key = cv2.waitKey(1)