1、a = self.anno[self.train[index]]
print(a)
输出结果:
{u'isValidation': 0.0, u'scale_provided': 0.811, u'joint_self': [[29.148, 153.26, 1.0], [61.831, 147.878, 1.0], [111.133, 168.375, 1.0], [105.277, 143.5, 1.0], [86.232, 124.929, 1.0], [51.597, 121.025, 1.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [126.749, 120.075, 1.0], [115.512, 104.459, 1.0], [121.368, 170.327, 1.0], [-44.052, 0.0, 0.0], [114.536, 124.454, 1.0], [132.605, 125.931, 1.0], [139.437, 159.116, 1.0], [146.269, 184.492, 1.0]], u'people_index': 1.0, u'img_width': 176.0, u'dataset': u'LEEDS', u'annolist_index': 6762.0, u'numOtherPeople': 0.0, u'img_height': 264.0, u'img_paths': u'lspet_dataset/images/im06762.jpg', u'objpos': [87.709, 144.476]}
2、img_path = os.path.join(self.img_folder, a['img_paths'])
输出结果:
# print(img_path)#/media/z/CC/zxl/pytorch-pose-master/data/lsp/images/lspet_dataset/images/a.jpg
# print(a['img_paths'])#lspet_dataset/images/a.jpg
a = self.anno[self.valid[index]]
print(a)
print(index)
输出结果:
{u'isValidation': 1.0, u'scale_provided': 2.299, u'joint_self': [[174.986, 584.322, 1.0], [289.574, 493.693, 1.0], [218.738, 402.023, 1.0], [193.737, 400.981, 1.0], [180.195, 518.694, 1.0], [89.566, 618.698, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [214.571, 202.015, 1.0], [215.613, 133.262, 1.0], [242.697, 360.355, 1.0], [176.028, 309.311, 1.0], [210.404, 231.183, 1.0], [251.031, 309.311, 1.0], [156.236, 300.977, 1.0], [189.57, 214.515, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11001.0, u'numOtherPeople': 0.0, u'img_height': 702.0, u'img_paths': u'lsp_dataset/images/im1001.jpg', u'objpos': [512.0, 351.0]}
0
{u'isValidation': 1.0, u'scale_provided': 2.669, u'joint_self': [[241.985, 914.314, 1.0], [282.892, 823.263, 1.0], [296.088, 696.582, 1.0], [358.108, 691.304, 1.0], [343.593, 844.376, 1.0], [300.046, 943.345, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [294.768, 484.129, 1.0], [272.335, 419.469, 1.0], [112.665, 662.273, 1.0], [178.644, 601.572, 1.0], [247.263, 544.83, 1.0], [336.995, 468.294, 1.0], [364.706, 368.005, 1.0], [348.871, 270.356, 1.0]], u'people_index': 1.0, u'img_width': 768.0, u'dataset': u'LEEDS', u'annolist_index': 11007.0, u'numOtherPeople': 0.0, u'img_height': 1024.0, u'img_paths': u'lsp_dataset/images/im1007.jpg', u'objpos': [384.0, 512.0]}
6
{u'isValidation': 1.0, u'scale_provided': 1.764, u'joint_self': [[383.254, 580.597, 1.0], [425.58, 523.91, 1.0], [384.009, 449.083, 1.0], [438.429, 449.839, 1.0], [406.684, 537.515, 0.0], [374.184, 617.633, 0.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [428.603, 297.162, 1.0], [424.068, 237.452, 1.0], [327.322, 343.267, 1.0], [347.73, 354.605, 1.0], [386.277, 313.79, 1.0], [474.709, 318.325, 1.0], [509.477, 383.326, 1.0], [490.581, 396.931, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11013.0, u'numOtherPeople': 0.0, u'img_height': 681.0, u'img_paths': u'lsp_dataset/images/im1013.jpg', u'objpos': [512.0, 340.5]}
12
{u'isValidation': 1.0, u'scale_provided': 1.313, u'joint_self': [[317.042, 441.966, 1.0], [300.514, 355.734, 1.0], [256.68, 261.598, 1.0], [220.031, 257.286, 1.0], [237.996, 331.302, 1.0], [199.192, 357.89, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [287.579, 196.206, 1.0], [306.263, 177.522, 1.0], [274.645, 263.754, 0.0], [299.077, 252.256, 0.0], [299.077, 221.356, 1.0], [255.242, 186.145, 1.0], [226.499, 160.276, 1.0], [227.936, 146.622, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11019.0, u'numOtherPeople': 0.0, u'img_height': 561.0, u'img_paths': u'lsp_dataset/images/im1019.jpg', u'objpos': [512.0, 280.5]}
18
{u'isValidation': 1.0, u'scale_provided': 1.575, u'joint_self': [[1014.555, 525.144, 1.0], [982.165, 444.167, 1.0], [971.936, 375.124, 1.0], [943.807, 375.976, 1.0], [919.088, 459.51, 1.0], [920.793, 537.93, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [945.512, 246.413, 1.0], [940.398, 202.942, 1.0], [960.855, 348.7, 0.0], [998.36, 327.39, 1.0], [978.755, 263.461, 1.0], [926.76, 272.837, 1.0], [926.76, 324.833, 1.0], [912.269, 378.533, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11014.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1014.jpg', u'objpos': [512.0, 384.0]}
13
{u'isValidation': 1.0, u'scale_provided': 0.719, u'joint_self': [[685.534, 475.705, 1.0], [689.796, 439.905, 1.0], [692.353, 411.776, 1.0], [671.896, 410.072, 1.0], [668.487, 449.281, 1.0], [674.453, 485.934, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [685.534, 347.847, 1.0], [688.092, 325.685, 1.0], [717.073, 405.81, 1.0], [708.549, 372.567, 1.0], [697.468, 357.224, 1.0], [664.225, 360.633, 1.0], [656.553, 387.91, 1.0], [675.306, 375.124, 0.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11015.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1015.jpg', u'objpos': [512.0, 384.0]}
14
{u'isValidation': 1.0, u'scale_provided': 2.214, u'joint_self': [[279.799, 444.765, 1.0], [253.639, 356.363, 1.0], [306.861, 285.101, 1.0], [330.314, 289.611, 1.0], [234.696, 375.307, 1.0], [159.825, 473.631, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [311.371, 128.142, 1.0], [301.448, 63.193, 1.0], [370.907, 306.75, 1.0], [364.593, 224.662, 0.0], [343.845, 143.477, 0.0], [302.351, 156.106, 1.0], [248.227, 215.642, 1.0], [195.005, 259.843, 1.0]], u'people_index': 1.0, u'img_width': 472.0, u'dataset': u'LEEDS', u'annolist_index': 11020.0, u'numOtherPeople': 0.0, u'img_height': 700.0, u'img_paths': u'lsp_dataset/images/im1020.jpg', u'objpos': [236.0, 350.0]}
19
{u'isValidation': 1.0, u'scale_provided': 3.486, u'joint_self': [[451.526, 852.294, 1.0], [419.856, 686.026, 1.0], [400.062, 519.758, 1.0], [310.33, 517.119, 1.0], [301.093, 683.387, 1.0], [310.33, 891.881, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [327.485, 180.624, 1.0], [307.691, 89.572, 1.0], [450.206, 271.675, 0.0], [522.784, 266.397, 1.0], [418.536, 220.211, 1.0], [231.155, 254.521, 1.0], [171.773, 336.335, 1.0], [179.691, 371.964, 1.0]], u'people_index': 1.0, u'img_width': 683.0, u'dataset': u'LEEDS', u'annolist_index': 11008.0, u'numOtherPeople': 0.0, u'img_height': 1024.0, u'img_paths': u'lsp_dataset/images/im1008.jpg', u'objpos': [341.5, 512.0]}
7
{u'isValidation': 1.0, u'scale_provided': 2.301, u'joint_self': [[579.169, 614.197, 1.0], [526.042, 486.067, 1.0], [497.916, 375.645, 1.0], [440.622, 374.604, 1.0], [402.079, 492.317, 1.0], [407.287, 615.239, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [463.54, 182.929, 1.0], [468.748, 119.385, 1.0], [644.797, 310.018, 1.0], [598.962, 275.641, 1.0], [527.084, 232.931, 1.0], [412.496, 211.055, 1.0], [334.368, 246.474, 1.0], [326.034, 230.848, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11016.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1016.jpg', u'objpos': [512.0, 384.0]}
15
{u'isValidation': 1.0, u'scale_provided': 1.315, u'joint_self': [[237.925, 277.792, 1.0], [269.357, 252.753, 1.0], [311.443, 224.518, 1.0], [350.334, 242.631, 1.0], [299.19, 299.102, 1.0], [284.806, 285.783, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [360.988, 156.327, 1.0], [369.512, 123.297, 1.0], [319.435, 195.217, 1.0], [298.658, 199.479, 1.0], [324.229, 162.72, 1.0], [384.962, 167.514, 1.0], [410.001, 216.527, 1.0], [382.298, 210.134, 1.0]], u'people_index': 1.0, u'img_width': 640.0, u'dataset': u'LEEDS', u'annolist_index': 11002.0, u'numOtherPeople': 0.0, u'img_height': 480.0, u'img_paths': u'lsp_dataset/images/im1002.jpg', u'objpos': [320.0, 240.0]}
1
{u'isValidation': 1.0, u'scale_provided': 1.978, u'joint_self': [[66.407, 561.84, 1.0], [194.242, 522.665, 1.0], [205.582, 426.789, 1.0], [230.325, 469.057, 1.0], [296.304, 529.881, 1.0], [232.387, 644.314, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [316.923, 303.077, 1.0], [342.696, 248.438, 1.0], [310.737, 308.232, 1.0], [236.51, 326.789, 1.0], [270.531, 296.892, 1.0], [341.665, 359.778, 1.0], [325.17, 432.974, 1.0], [264.345, 419.572, 1.0]], u'people_index': 1.0, u'img_width': 538.0, u'dataset': u'LEEDS', u'annolist_index': 11021.0, u'numOtherPeople': 0.0, u'img_height': 800.0, u'img_paths': u'lsp_dataset/images/im1021.jpg', u'objpos': [269.0, 400.0]}
20
{u'isValidation': 1.0, u'scale_provided': 1.336, u'joint_self': [[884.39, 632.948, 1.0], [868.764, 570.445, 1.0], [833.346, 549.611, 1.0], [792.72, 544.402, 1.0], [716.675, 556.903, 1.0], [711.466, 639.198, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [778.136, 446.482, 1.0], [779.178, 414.189, 1.0], [863.556, 533.985, 1.0], [872.931, 503.776, 1.0], [833.346, 463.149, 1.0], [764.594, 465.232, 1.0], [729.175, 496.484, 1.0], [754.177, 530.86, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11003.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1003.jpg', u'objpos': [512.0, 384.0]}
2
{u'isValidation': 1.0, u'scale_provided': 1.572, u'joint_self': [[195.599, 184.304, 1.0], [265.303, 243.228, 1.0], [324.228, 330.897, 1.0], [371.655, 328.741, 1.0], [404.711, 242.51, 1.0], [396.806, 265.505, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [377.404, 259.038, 1.0], [377.404, 238.198, 1.0], [393.213, 165.62, 1.0], [370.936, 205.861, 1.0], [353.69, 258.319, 1.0], [410.459, 295.686, 0.0], [439.922, 244.666, 1.0], [444.952, 207.299, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11017.0, u'numOtherPeople': 0.0, u'img_height': 576.0, u'img_paths': u'lsp_dataset/images/im1017.jpg', u'objpos': [512.0, 288.0]}
16
{u'isValidation': 1.0, u'scale_provided': 4.242, u'joint_self': [[224.871, 829.51, 1.0], [353.985, 600.686, 1.0], [371.881, 467.737, 1.0], [470.314, 492.026, 1.0], [671.015, 609.634, 1.0], [738.768, 828.232, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [598.149, 329.675, 1.0], [627.552, 181.387, 1.0], [463.923, 566.17, 1.0], [393.613, 431.943, 1.0], [484.376, 327.119, 1.0], [655.675, 357.799, 1.0], [548.294, 440.892, 0.0], [492.046, 552.108, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11022.0, u'numOtherPeople': 0.0, u'img_height': 992.0, u'img_paths': u'lsp_dataset/images/im1022.jpg', u'objpos': [512.0, 496.0]}
21
{u'isValidation': 1.0, u'scale_provided': 0.824, u'joint_self': [[410.413, 377.356, 1.0], [410.413, 324.228, 1.0], [386.453, 277.351, 1.0], [407.287, 283.602, 1.0], [432.288, 321.103, 1.0], [436.455, 369.022, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [413.538, 214.849, 1.0], [414.579, 195.056, 1.0], [420.83, 264.851, 1.0], [404.162, 254.434, 1.0], [397.912, 227.349, 1.0], [431.247, 229.433, 1.0], [427.08, 252.35, 1.0], [430.205, 264.851, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11018.0, u'numOtherPeople': 0.0, u'img_height': 686.0, u'img_paths': u'lsp_dataset/images/im1018.jpg', u'objpos': [512.0, 343.0]}
17
{u'isValidation': 1.0, u'scale_provided': 1.128, u'joint_self': [[453.685, 467.181, 1.0], [477.552, 426.267, 1.0], [464.766, 365.748, 1.0], [494.6, 356.371, 1.0], [520.171, 414.334, 1.0], [492.043, 447.577, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [503.124, 275.395, 1.0], [507.386, 237.037, 1.0], [505.681, 327.39, 1.0], [459.652, 324.833, 1.0], [475.847, 279.656, 1.0], [517.614, 281.361, 1.0], [512.5, 324.833, 1.0], [521.024, 318.866, 0.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11004.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1004.jpg', u'objpos': [512.0, 384.0]}
3
{u'isValidation': 1.0, u'scale_provided': 1.81, u'joint_self': [[639.589, 614.197, 1.0], [636.463, 501.692, 1.0], [641.672, 410.022, 1.0], [589.586, 412.105, 1.0], [581.253, 504.817, 1.0], [576.044, 598.571, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [608.337, 265.224, 1.0], [608.337, 220.431, 1.0], [657.298, 411.064, 0.0], [666.673, 361.062, 1.0], [656.256, 298.559, 1.0], [581.253, 292.309, 1.0], [564.585, 357.936, 1.0], [584.378, 357.936, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11009.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1009.jpg', u'objpos': [512.0, 384.0]}
8
{u'isValidation': 1.0, u'scale_provided': 2.008, u'joint_self': [[226.03, 544.402, 1.0], [220.821, 432.939, 1.0], [146.86, 329.81, 1.0], [106.233, 329.81, 1.0], [110.4, 399.605, 1.0], [64.565, 511.068, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [199.987, 168.345, 1.0], [244.781, 114.177, 1.0], [254.156, 243.348, 1.0], [201.029, 256.891, 1.0], [197.904, 191.263, 1.0], [170.819, 172.512, 0.0], [189.57, 241.265, 0.0], [259.365, 251.682, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11025.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1025.jpg', u'objpos': [512.0, 384.0]}
24
{u'isValidation': 1.0, u'scale_provided': 1.571, u'joint_self': [[665.077, 644.478, 1.0], [681.272, 561.796, 1.0], [723.039, 488.491, 1.0], [751.168, 491.048, 1.0], [737.53, 581.401, 1.0], [741.792, 663.23, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [775.887, 366.6, 1.0], [800.607, 342.733, 1.0], [750.316, 391.319, 1.0], [729.006, 381.943, 1.0], [747.759, 362.338, 1.0], [798.049, 398.991, 1.0], [806.573, 454.396, 1.0], [768.216, 437.348, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11005.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1005.jpg', u'objpos': [512.0, 384.0]}
{u'isValidation': 1.0, u'scale_provided': 1.727, u'joint_self': [[250.817, 569.468, 1.0], [246.555, 478.262, 1.0], [249.113, 381.943, 1.0], [294.289, 387.057, 1.0], [297.699, 472.296, 1.0], [301.961, 565.206, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [268.718, 248.971, 1.0], [260.194, 196.975, 1.0], [262.751, 365.748, 1.0], [219.279, 336.766, 1.0], [224.393, 274.542, 1.0], [306.223, 254.085, 1.0], [324.123, 323.981, 1.0], [307.075, 370.862, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11023.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1023.jpg', u'objpos': [512.0, 384.0]}
22
{u'isValidation': 1.0, u'scale_provided': 1.428, u'joint_self': [[156.236, 488.402, 1.0], [205.196, 416.524, 1.0], [257.281, 371.73, 1.0], [277.074, 370.689, 1.0], [302.075, 437.358, 1.0], [348.952, 496.736, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [256.24, 256.101, 1.0], [238.531, 215.474, 1.0], [238.531, 373.814, 0.0], [264.573, 327.979, 0.0], [249.989, 267.56, 0.0], [265.615, 272.768, 1.0], [282.282, 323.812, 1.0], [254.156, 371.73, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11010.0, u'numOtherPeople': 0.0, u'img_height': 681.0, u'img_paths': u'lsp_dataset/images/im1010.jpg', u'objpos': [512.0, 340.5]}
9
{u'isValidation': 1.0, u'scale_provided': 1.591, u'joint_self': [[194.062, 665.787, 1.0], [196.619, 570.32, 1.0], [205.995, 481.672, 1.0], [239.238, 483.377, 1.0], [235.829, 572.025, 1.0], [205.143, 621.463, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [231.567, 346.995, 1.0], [214.519, 320.571, 1.0], [158.261, 322.276, 1.0], [130.985, 359.781, 1.0], [182.981, 374.271, 1.0], [260.548, 371.714, 1.0], [317.658, 371.714, 1.0], [315.953, 318.866, 1.0]], u'people_index': 1.0, u'img_width': 486.0, u'dataset': u'LEEDS', u'annolist_index': 11026.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1026.jpg', u'objpos': [243.0, 384.0]}
25
4
{u'isValidation': 1.0, u'scale_provided': 0.874, u'joint_self': [[412.913, 411.066, 1.0], [400.411, 364.469, 1.0], [403.252, 322.986, 1.0], [389.614, 324.691, 1.0], [386.773, 369.015, 1.0], [397.002, 415.612, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [379.954, 261.614, 1.0], [375.976, 236.043, 1.0], [415.186, 325.827, 1.0], [418.027, 297.983, 1.0], [410.64, 273.548, 1.0], [367.452, 276.957, 1.0], [362.338, 311.621, 1.0], [359.497, 338.897, 1.0]], u'people_index': 1.0, u'img_width': 768.0, u'dataset': u'LEEDS', u'annolist_index': 11011.0, u'numOtherPeople': 0.0, u'img_height': 512.0, u'img_paths': u'lsp_dataset/images/im1011.jpg', u'objpos': [384.0, 256.0]}
10
{u'isValidation': 1.0, u'scale_provided': 1.285, u'joint_self': [[496.874, 427.731, 1.0], [485.416, 385.021, 1.0], [459.373, 320.435, 1.0], [433.33, 323.56, 1.0], [408.329, 393.355, 1.0], [427.08, 437.106, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [397.912, 232.931, 1.0], [386.453, 214.181, 1.0], [518.75, 243.348, 1.0], [471.873, 242.307, 1.0], [433.33, 238.14, 1.0], [381.245, 250.64, 1.0], [361.452, 295.434, 1.0], [332.284, 340.227, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11027.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1027.jpg', u'objpos': [512.0, 384.0]}
26
{u'isValidation': 1.0, u'scale_provided': 3.036, u'joint_self': [[335.34, 641.222, 1.0], [219.876, 525.758, 1.0], [299.258, 407.201, 1.0], [380.701, 411.325, 1.0], [469.361, 553.593, 1.0], [530.186, 683.49, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [312.66, 160.809, 1.0], [294.103, 61.84, 1.0], [227.093, 380.397, 1.0], [224.0, 279.366, 1.0], [238.433, 180.397, 1.0], [412.66, 170.088, 1.0], [499.258, 261.84, 1.0], [510.598, 375.242, 1.0]], u'people_index': 1.0, u'img_width': 647.0, u'dataset': u'LEEDS', u'annolist_index': 11012.0, u'numOtherPeople': 0.0, u'img_height': 800.0, u'img_paths': u'lsp_dataset/images/im1012.jpg', u'objpos': [323.5, 400.0]}
11
{u'isValidation': 1.0, u'scale_provided': 2.329, u'joint_self': [[706.258, 682.95, 1.0], [700.008, 549.611, 1.0], [696.883, 436.065, 1.0], [662.506, 436.065, 1.0], [627.088, 551.694, 1.0], [676.048, 640.24, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [698.966, 250.64, 1.0], [705.216, 181.888, 1.0], [752.093, 473.566, 1.0], [741.676, 386.063, 1.0], [740.634, 292.309, 1.0], [640.63, 269.391, 1.0], [615.629, 356.895, 1.0], [600.004, 437.106, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11024.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1024.jpg', u'objpos': [512.0, 384.0]}
23
{u'isValidation': 1.0, u'scale_provided': 3.163, u'joint_self': [[544.474, 975.015, 1.0], [535.237, 807.428, 1.0], [543.155, 633.242, 1.0], [615.732, 637.201, 1.0], [589.34, 812.706, 1.0], [576.144, 956.541, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [594.619, 383.84, 1.0], [615.732, 335.015, 1.0], [441.546, 154.232, 1.0], [489.052, 258.479, 1.0], [532.598, 381.201, 1.0], [647.402, 443.222, 1.0], [714.701, 540.871, 1.0], [775.402, 624.005, 1.0]], u'people_index': 1.0, u'img_width': 795.0, u'dataset': u'LEEDS', u'annolist_index': 11006.0, u'numOtherPeople': 0.0, u'img_height': 1024.0, u'img_paths': u'lsp_dataset/images/im1006.jpg', u'objpos': [397.5, 512.0]}
5
{u'isValidation': 1.0, u'scale_provided': 1.309, u'joint_self': [[847.488, 472.296, 1.0], [813.392, 395.581, 1.0], [789.526, 337.619, 1.0], [823.621, 324.833, 1.0], [835.554, 392.171, 1.0], [870.502, 467.181, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [752.021, 218.285, 1.0], [734.12, 187.599, 1.0], [757.987, 323.128, 1.0], [742.644, 289.885, 1.0], [734.12, 244.709, 1.0], [792.083, 218.285, 1.0], [825.326, 253.233, 1.0], [805.721, 283.066, 1.0]], u'people_index': 1.0, u'img_width': 1024.0, u'dataset': u'LEEDS', u'annolist_index': 11028.0, u'numOtherPeople': 0.0, u'img_height': 768.0, u'img_paths': u'lsp_dataset/images/im1028.jpg', u'objpos': [512.0, 384.0]}
27
{u'isValidation': 1.0, u'scale_provided': 2.461, u'joint_self': [[356.789, 810.067, 1.0], [338.314, 740.129, 1.0], [383.18, 605.531, 1.0], [457.077, 606.851, 1.0], [391.098, 729.572, 1.0], [391.098, 812.706, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [318.521, 411.552, 1.0], [265.737, 356.129, 1.0], [149.613, 490.727, 1.0], [219.552, 513.16, 1.0], [289.49, 460.376, 1.0], [354.149, 366.686, 1.0], [355.469, 280.912, 1.0], [344.912, 174.026, 1.0]], u'people_index': 1.0, u'img_width': 768.0, u'dataset': u'LEEDS', u'annolist_index': 11031.0, u'numOtherPeople': 0.0, u'img_height': 1024.0, u'img_paths': u'lsp_dataset/images/im1031.jpg', u'objpos': [384.0, 512.0]}
30
{u'isValidation': 1.0, u'scale_provided': 3.623, u'joint_self': [[95.376, 896.642, 1.0], [187.434, 718.209, 1.0], [237.441, 565.916, 1.0], [334.044, 564.78, 1.0], [476.109, 721.619, 1.0], [432.921, 846.635, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [254.488, 303.381, 1.0], [210.164, 193.139, 1.0], [96.513, 617.059, 1.0], [155.612, 507.954, 1.0], [178.342, 378.391, 1.0], [334.044, 279.514, 1.0], [368.14, 331.794, 1.0], [442.013, 404.531, 1.0]], u'people_index': 1.0, u'img_width': 683.0, u'dataset': u'LEEDS', u'annolist_index': 11037.0, u'numOtherPeople': 0.0, u'img_height': 1024.0, u'img_paths': u'lsp_dataset/images/im1037.jpg', u'objpos': [341.5, 512.0]}
36
a = self.anno[self.valid[index]] print(index) 输出结果:
0
6
12
18
19
13
20
1
21
2
7
14
3
22
4
15
8
5
16
23
9
17
24
10
11
30
36
25