parameters: ( actions, data_dir, camera_frame, rcams, predict_14=False )
return_statement: return train_set, test_set, data_mean, data_std, dim_to_ignore, dim_to_use, train_root_positions, test_root_positions
docstring: Loads 3d poses, zero-centres and normalizes them
  
    Args
      actions: list of strings. Actions to load
      data_dir: string. Directory where the data can be loaded from
      camera_frame: boolean. Whether to convert the data to camera coordinates
      rcams: dictionary with camera parameters
      predict_14: boolean. Whether to predict only 14 joints
    Returns
      train_set: dictionary with loaded 3d poses for training
      test_set: dictionary with loaded 3d poses for testing
      data_mean: vector with the mean of the 3d training data
      data_std: vector with the standard deviation of the 3d training data
      dim_to_ignore: list with the dimensions to not predict
      dim_to_use: list with the dimensions to predict
      train_root_positions: dictionary with the 3d positions of the root in train
      test_root_positions: dictionary with the 3d positions of the root in test
docstring_summary: Loads 3d poses, zero-centres and normalizes them
docstring_tokens: Loads 3d poses zero - centres and normalizes them
function: def read_3d_data( actions, data_dir, camera_frame, rcams, predict_14=False ):
    """
    Loads 3d poses, zero-centres and normalizes them
  
    Args
      actions: list of strings. Actions to load
      data_dir: string. Directory where the data can be loaded from
      camera_frame: boolean. Whether to convert the data to camera coordinates
      rcams: dictionary with camera parameters
      predict_14: boolean. Whether to predict only 14 joints
    Returns
      train_set: dictionary with loaded 3d poses for training
      test_set: dictionary with loaded 3d poses for testing
      data_mean: vector with the mean of the 3d training data
      data_std: vector with the standard deviation of the 3d training data
      dim_to_ignore: list with the dimensions to not predict
      dim_to_use: list with the dimensions to predict
      train_root_positions: dictionary with the 3d positions of the root in train
      test_root_positions: dictionary with the 3d positions of the root in test
    """
    # Load 3d data
    train_set = load_data( data_dir, TRAIN_SUBJECTS, actions, dim=3 )
    test_set  = load_data( data_dir, TEST_SUBJECTS,  actions, dim=3 )
  
    if camera_frame:
      train_set = transform_world_to_camera( train_set, rcams )
      test_set  = transform_world_to_camera( test_set, rcams )
  
    # Apply 3d post-processing (centering around root)
    train_set, train_root_positions = postprocess_3d( train_set )
    test_set,  test_root_positions  = postprocess_3d( test_set )
  
    # Compute normalization statistics
    complete_train = copy.deepcopy( np.vstack( train_set.values() ))
    data_mean, data_std, dim_to_ignore, dim_to_use = normalization_stats( complete_train, dim=3, predict_14=predict_14 )
  
    # Divide every dimension independently
    train_set = normalize_data( train_set, data_mean, data_std, dim_to_use )
    test_set  = normalize_data( test_set,  data_mean, data_std, dim_to_use )
  
    return train_set, test_set, data_mean, data_std, dim_to_ignore, dim_to_use, train_root_positions, test_root_positions
function_tokens: def read_3d_data ( actions , data_dir , camera_frame , rcams , predict_14 = False ) : # Load 3d data train_set = load_data ( data_dir , TRAIN_SUBJECTS , actions , dim = 3 ) test_set = load_data ( data_dir , TEST_SUBJECTS , actions , dim = 3 ) if camera_frame : train_set = transform_world_to_camera ( train_set , rcams ) test_set = transform_world_to_camera ( test_set , rcams ) # Apply 3d post-processing (centering around root) train_set , train_root_positions = postprocess_3d ( train_set ) test_set , test_root_positions = postprocess_3d ( test_set ) # Compute normalization statistics complete_train = copy . deepcopy ( np . vstack ( train_set . values ( ) ) ) data_mean , data_std , dim_to_ignore , dim_to_use = normalization_stats ( complete_train , dim = 3 , predict_14 = predict_14 ) # Divide every dimension independently train_set = normalize_data ( train_set , data_mean , data_std , dim_to_use ) test_set = normalize_data ( test_set , data_mean , data_std , dim_to_use ) return train_set , test_set , data_mean , data_std , dim_to_ignore , dim_to_use , train_root_positions , test_root_positions