Sign-Language-Project

SLD数据集介绍

数据格式

SLD使用的数据来自Public DGS Corpus提供的OpenPose数据集,数据文件为json文件,格式如下:

[
  {
    "id": "1413446",
    "camera": "b1",
    "width": 1280,
    "height": 720,
    "frames": {
      "0": {
        "version": "1.4",
        "people": [
          {
            "pose_keypoints_2d": [633.354, 180.761, 0.934899, 598.056, 288.555, 0.783343, 482.424, 290.5, 0.67519, 431.586, 443.244, 0.783926, 464.841, 556.892, 0.794432, 711.62, 284.56, 0.660724, 776.3, 429.462, 0.817113, 733.247, 543.247, 0.754609, 603.945, 570.627, 0.482199, 533.357, 570.62, 0.427028, 474.614, 715.629, 0.0697766, 0, 0, 0, 674.469, 574.547, 0.441201, 0, 0, 0, 0, 0, 0, 603.985, 163.079, 0.919416, 648.865, 153.366, 0.87903, 554.881, 165.04, 0.937211, 664.512, 157.202, 0.0903171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            "face_keypoints_2d": [559.636, 155.322, 0.691598, 562.113, 170.679, 0.735879, 564.094, 185.541, 0.754758, 570.534, 198.917, 0.729763, 578.956, 211.797, 0.739476, 590.846, 221.705, 0.83188, 603.231, 229.632, 0.798345, 618.588, 234.09, 0.789715, 633.945, 233.595, 0.797734, 642.862, 226.164, 0.817477, 646.826, 216.751, 0.777731, 651.284, 205.852, 0.741017, 655.743, 196.935, 0.6836, 658.715, 186.532, 0.812475, 659.211, 177.119, 0.818013, 659.211, 166.716, 0.813291, 658.22, 157.799, 0.754461, 579.452, 158.294, 0.772409, 587.873, 153.34, 0.827255, 598.772, 150.368, 0.882155, 608.185, 150.368, 0.855465, 618.093, 151.854, 0.796975, 635.431, 149.873, 0.79453, 641.872, 146.405, 0.87561, 647.321, 144.423, 0.82432, 654.257, 143.928, 0.856366, 658.22, 146.9, 0.849853, 629.982, 159.285, 0.928098, 631.468, 168.698, 0.903326, 634.441, 178.11, 0.939644, 637.908, 186.037, 0.837679, 623.047, 192.972, 0.848204, 629.487, 193.963, 0.853929, 634.936, 193.963, 0.87326, 639.395, 190.495, 0.902866, 642.862, 187.027, 0.900288, 593.818, 164.239, 0.756096, 600.754, 161.762, 0.778674, 608.185, 160.771, 0.793757, 614.625, 163.248, 0.89102, 608.68, 166.716, 0.86222, 600.754, 167.212, 0.786194, 638.404, 158.79, 0.818774, 642.862, 154.827, 0.886515, 648.807, 154.331, 0.910713, 652.77, 157.304, 0.839461, 649.798, 159.285, 0.865277, 643.358, 160.276, 0.806133, 607.194, 205.357, 0.700848, 618.093, 203.375, 0.757948, 627.01, 202.385, 0.884305, 634.441, 202.385, 0.891724, 638.404, 199.412, 0.862384, 642.862, 198.422, 0.897984, 646.33, 197.926, 0.944354, 643.358, 202.88, 0.886237, 639.395, 206.843, 0.863773, 634.936, 209.32, 0.860504, 626.514, 209.816, 0.852393, 617.102, 208.329, 0.760242, 614.129, 205.852, 0.653474, 626.514, 205.852, 0.799315, 634.441, 204.862, 0.835659, 638.899, 202.385, 0.95425, 643.358, 199.412, 0.854737, 638.899, 202.385, 0.971348, 634.441, 205.357, 0.877963, 626.514, 205.852, 0.811025, 605.212, 162.753, 0.76242, 645.835, 156.808, 0.712203],
            "hand_left_keypoints_2d": [733.593, 555.765, 0.439066, 716.13, 550.526, 0.624843, 693.427, 555.765, 0.80313, 683.531, 570.318, 0.767589, 679.456, 582.543, 0.678421, 711.473, 558.094, 0.601303, 696.92, 576.722, 0.831407, 684.113, 589.528, 0.836987, 674.799, 601.753, 0.928976, 726.026, 564.497, 0.80621, 713.219, 582.543, 0.806234, 699.83, 595.932, 0.903234, 689.352, 608.156, 0.824176, 735.922, 571.483, 0.713129, 730.1, 586.618, 0.541734, 719.04, 596.514, 0.905026, 707.98, 605.828, 0.935552, 745.236, 577.886, 0.631607, 746.4, 586.036, 0.747862, 743.489, 597.096, 0.953843, 739.414, 605.828, 0.904851],
            "hand_right_keypoints_2d": [465.185, 560.144, 0.500827, 485.854, 557.191, 0.647966, 506.524, 554.829, 0.807376, 520.697, 565.459, 0.788694, 530.146, 577.27, 0.784335, 497.075, 567.821, 0.765032, 515.973, 581.994, 0.871688, 530.146, 592.034, 0.851332, 540.186, 602.074, 0.870763, 482.901, 576.679, 0.77568, 505.343, 591.443, 0.860332, 520.697, 601.483, 0.968948, 535.461, 610.932, 0.87786, 471.681, 583.176, 0.658696, 487.626, 596.168, 0.708671, 501.799, 604.436, 0.852576, 513.02, 610.932, 0.835117, 463.413, 592.034, 0.583988, 468.137, 600.892, 0.728826, 478.768, 605.026, 0.821505, 491.169, 607.979, 0.849512],
            "pose_keypoints_3d": [],
            "face_keypoints_3d": [],
            "hand_left_keypoints_3d": [],
            "hand_right_keypoints_3d": []
          }
        ]
      },
      "1": {
        "version": "1.4",
        "people": [
          {
            "pose_keypoints_2d": [633.375, 180.647, 0.930031, 596.091, 290.39, 0.774164, 480.484, 292.4, 0.676786, 431.551, 445.158, 0.799943, 464.853, 556.888, 0.789953, 711.59, 286.472, 0.660198, 776.243, 429.458, 0.820613, 735.139, 543.208, 0.752218, 603.945, 570.559, 0.474483, 533.379, 570.593, 0.420479, 476.572, 715.63, 0.0538584, 0, 0, 0, 674.451, 572.556, 0.43712, 0, 0, 0, 0, 0, 0, 603.999, 161.183, 0.899311, 647.043, 151.388, 0.895144, 554.85, 165.029, 0.933676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            "face_keypoints_2d": [559.749, 156.805, 0.69378, 562.224, 170.662, 0.763378, 565.193, 186.004, 0.779556, 570.637, 200.356, 0.766918, 579.05, 212.728, 0.757448, 591.423, 221.142, 0.791173, 605.775, 229.06, 0.806826, 619.137, 233.019, 0.773316, 634.479, 231.534, 0.759958, 644.377, 225.101, 0.79308, 647.841, 214.213, 0.760015, 652.295, 204.81, 0.705716, 656.749, 195.407, 0.715062, 659.224, 186.004, 0.792872, 660.708, 176.106, 0.825536, 659.224, 165.713, 0.826763, 657.739, 155.815, 0.75929, 579.545, 157.795, 0.757018, 588.453, 152.351, 0.783228, 598.351, 149.877, 0.862358, 608.744, 149.877, 0.853069, 617.652, 150.371, 0.845051, 636.458, 146.907, 0.801058, 641.902, 144.433, 0.839794, 647.346, 142.453, 0.857359, 653.78, 142.453, 0.952257, 657.739, 145.917, 0.873436, 629.53, 158.29, 0.999809, 632.994, 166.208, 0.975708, 634.974, 175.116, 0.848026, 637.943, 184.519, 0.843038, 624.581, 190.953, 0.814678, 630.025, 191.943, 0.830157, 635.963, 191.943, 0.806174, 640.418, 189.468, 0.872114, 643.387, 186.004, 0.867644, 594.392, 163.239, 0.815047, 601.816, 160.764, 0.793223, 609.239, 158.785, 0.829847, 614.188, 162.249, 0.90985, 609.734, 165.713, 0.897041, 601.816, 166.208, 0.836202, 637.943, 157.795, 0.855559, 642.397, 153.836, 0.867579, 648.831, 152.846, 0.886644, 652.79, 154.825, 0.884294, 649.326, 158.29, 0.93674, 643.387, 158.785, 0.828397, 608.249, 202.83, 0.742721, 617.652, 201.841, 0.835413, 626.56, 201.346, 0.86215, 634.479, 201.346, 0.861136, 638.438, 197.881, 0.887078, 642.397, 197.387, 0.8836, 646.356, 196.892, 0.888977, 644.872, 201.841, 0.884845, 640.912, 205.305, 0.871878, 634.479, 207.284, 0.803216, 626.066, 208.769, 0.811896, 617.652, 206.295, 0.831482, 613.693, 203.82, 0.663633, 626.56, 204.315, 0.755912, 634.479, 202.83, 0.807987, 638.933, 201.346, 0.907563, 644.377, 197.881, 0.862126, 638.933, 201.346, 0.91814, 634.479, 203.325, 0.847738, 626.066, 204.81, 0.767518, 605.775, 161.754, 0.800453, 645.366, 154.825, 0.75132],
            "hand_left_keypoints_2d": [733.088, 555.991, 0.444387, 715.818, 550.81, 0.621989, 693.366, 555.416, 0.760385, 683.004, 569.232, 0.78285, 681.277, 582.472, 0.681041, 711.212, 556.567, 0.56541, 696.82, 577.291, 0.851235, 685.307, 588.804, 0.811253, 674.945, 600.893, 0.868853, 726.18, 564.051, 0.774633, 714.666, 582.472, 0.783082, 701.426, 594.561, 0.945142, 691.064, 607.226, 0.815924, 737.693, 570.383, 0.715378, 729.634, 585.926, 0.517641, 720.423, 596.288, 0.880808, 710.061, 604.923, 0.939223, 746.904, 577.867, 0.670789, 747.479, 585.35, 0.765085, 743.45, 596.288, 1.00169, 738.844, 605.499, 0.914546],
            "hand_right_keypoints_2d": [464.663, 559.63, 0.478863, 485.258, 557.864, 0.633409, 507.03, 555.511, 0.771427, 521.153, 566.102, 0.789389, 530.568, 576.694, 0.818743, 497.615, 568.456, 0.753613, 517.034, 581.99, 0.871979, 530.568, 591.994, 0.820129, 541.16, 602.586, 0.81939, 483.493, 577.283, 0.818907, 506.442, 591.405, 0.89021, 521.153, 600.82, 0.940421, 537.041, 611.412, 0.831669, 472.313, 585.521, 0.714497, 488.789, 596.701, 0.627042, 504.088, 604.939, 0.869403, 515.269, 611.412, 0.865296, 463.486, 591.994, 0.62388, 469.37, 600.82, 0.709784, 479.962, 604.939, 0.866586, 492.319, 609.059, 0.893597],
            "pose_keypoints_3d": [],
            "face_keypoints_3d": [],
            "hand_left_keypoints_3d": [],
            "hand_right_keypoints_3d": []
          }
        ]
      },
      ...
      "9193": {
        "version": "1.4",
        "people": [
          {
            "pose_keypoints_2d": [629.328, 194.355, 0.863771, 603.97, 286.557, 0.802409, 492.292, 282.615, 0.673606, 458.973, 433.459, 0.764933, 458.9, 556.944, 0.818866, 717.567, 288.469, 0.674171, 776.362, 449.123, 0.793485, 727.253, 568.601, 0.799694, 603.9, 576.491, 0.484731, 539.201, 572.559, 0.479548, 431.536, 715.63, 0.0710107, 0, 0, 0, 668.568, 584.302, 0.457259, 0, 0, 0, 0, 0, 0, 603.963, 165.12, 0.92653, 648.964, 166.993, 0.910127, 568.603, 161.097, 0.865735, 676.401, 167.057, 0.860964, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            "face_keypoints_2d": [572.259, 152.373, 0.728176, 572.259, 167.601, 0.723208, 572.75, 182.828, 0.765899, 575.206, 196.582, 0.750049, 579.627, 211.319, 0.805093, 587.486, 223.599, 0.810012, 595.837, 234.897, 0.7996, 605.17, 244.23, 0.806619, 619.415, 247.177, 0.886941, 631.695, 244.23, 0.81804, 642.502, 234.897, 0.803124, 650.853, 224.09, 0.765286, 659.203, 214.266, 0.785828, 665.589, 202.968, 0.791687, 668.045, 189.214, 0.772961, 670.501, 175.951, 0.788173, 671.975, 161.215, 0.656003, 584.539, 160.233, 0.731027, 591.907, 156.794, 0.834408, 600.258, 156.303, 0.88217, 608.117, 156.794, 0.885395, 616.468, 160.233, 0.806426, 636.608, 160.724, 0.779701, 643.976, 158.268, 0.777663, 651.835, 156.794, 0.84144, 660.186, 157.285, 0.808072, 666.572, 161.706, 0.765099, 627.766, 169.566, 0.84789, 627.766, 179.881, 0.912731, 627.766, 189.705, 0.810234, 628.257, 200.021, 0.875735, 615.486, 199.53, 0.935388, 619.906, 203.459, 0.887579, 627.275, 205.915, 0.883779, 632.678, 203.459, 0.825725, 638.081, 199.53, 0.891527, 596.328, 168.583, 0.865727, 601.24, 167.601, 0.842131, 607.626, 167.601, 0.899615, 612.538, 171.53, 0.776436, 607.626, 172.022, 0.896017, 600.258, 172.022, 0.928741, 639.064, 171.53, 0.906521, 643.976, 168.092, 0.902105, 650.853, 168.092, 0.977319, 655.274, 171.039, 0.873785, 650.853, 172.513, 0.953723, 643.976, 172.513, 0.918405, 599.276, 206.407, 0.876454, 607.626, 207.389, 0.942999, 616.468, 208.863, 0.822383, 624.327, 211.319, 0.874909, 631.204, 211.319, 0.888228, 639.064, 210.336, 0.842069, 644.467, 209.354, 0.862815, 639.064, 219.178, 0.901124, 631.695, 224.09, 0.842181, 622.854, 226.055, 0.837348, 612.538, 223.108, 0.890011, 604.188, 215.74, 0.927057, 601.24, 207.88, 0.941189, 615.486, 211.81, 0.913226, 623.836, 214.757, 0.811361, 631.695, 213.775, 0.799556, 642.502, 211.319, 0.855427, 631.695, 218.687, 0.897101, 623.345, 219.669, 0.935551, 613.029, 216.231, 0.803254, 604.188, 168.583, 0.917742, 646.923, 169.074, 0.949726],
            "hand_left_keypoints_2d": [725.481, 574.139, 0.396456, 706.026, 572.256, 0.557098, 683.433, 581.043, 0.82188, 675.274, 600.498, 0.792927, 672.137, 615.56, 0.791049, 703.516, 586.063, 0.663118, 689.709, 609.911, 0.901909, 678.412, 623.091, 0.826547, 668.999, 634.387, 0.862664, 719.205, 591.084, 0.774519, 704.143, 614.932, 0.810495, 692.219, 629.994, 0.907391, 679.668, 641.918, 0.895267, 729.874, 599.87, 0.740667, 721.088, 618.698, 0.804571, 712.929, 629.994, 0.85473, 703.516, 639.408, 0.896417, 738.033, 608.656, 0.719308, 734.895, 621.208, 0.664864, 733.64, 630.622, 0.962288, 729.874, 640.663, 0.917218],
            "hand_right_keypoints_2d": [456.043, 559.158, 0.418999, 469.644, 565.392, 0.574227, 479.845, 576.159, 0.684464, 477.578, 591.46, 0.666739, 474.178, 603.928, 0.682957, 448.676, 581.826, 0.661677, 461.143, 601.094, 0.879395, 473.044, 612.995, 0.81066, 480.978, 623.196, 0.832527, 437.341, 589.76, 0.796667, 449.809, 608.461, 0.667425, 461.71, 620.362, 0.817534, 473.044, 631.13, 0.956649, 429.974, 598.827, 0.560732, 438.475, 614.129, 0.486685, 443.009, 622.062, 0.730689, 451.509, 631.13, 0.870492, 426.574, 605.061, 0.43186, 426.574, 617.529, 0.732016, 429.408, 624.896, 0.738646, 434.508, 632.83, 0.749563],
            "pose_keypoints_3d": [],
            "face_keypoints_3d": [],
            "hand_left_keypoints_3d": [],
            "hand_right_keypoints_3d": []
          }
        ]
      }
    }
  },
  {
    "id": "1413446",
    "camera": "c",
    "width": 1280,
    "height": 720,
    "frames": {
      "0": {
        "version": "1.4",
        "people": [
          {
            ...
          }
        ]
      }
    }
  }
]

不难发现,每个json文件包含了最多三个camera获取的数据,三个摄像头分别命名名为a,bc,在这里我们只需要获取ab摄像头拍摄的数据。 每个摄像头中的数据分别存在对应的frames字典下,字典中的"0","1"...表示帧号,而人的肢体数据保存在其中的people列表中。

如何获取

你可以在DGS-Corpus官网上获取相关的经过预处理的OpenPose数据集,获取到的json文件命名格式为 “ 编号 + openpose.json ” ,如:```1413446_openpose.json``。

解析json文件

我这里提供了两个操作json文件的实例,分别为 data_proccessing.pytest.ipynb,可以参考其中的解析方法来对获取的json文件进行解析。 Tips:这两个操作实例对应的json文件是数据集网站中编号为1413446的文件。

存储数据

在实例 data_proccessing.py 中,我使用了scikit-learn库中的joblib进行数据的存储。具体的可以阅读代码中的注释