nicetoolbox.detectors.method_detectors.body_joints.mmpose_inference.convert_output_to_numpy

nicetoolbox.detectors.method_detectors.body_joints.mmpose_inference.convert_output_to_numpy(data, num_persons)[source]

Convert the output data from a pose estimation model to numpy arrays.

The output has the following structure: - 2d: Numpy array of shape

(num_persons, num_frames, num_keypoints, [coordinate_x, coordinate_y, confidence_score])

  • bbox_2d: Numpy array of shape

    (num_persons, num_frames, 1, [top_left_x, top_left_y, bottom_right_x, bottom_right_y, confidence_score])

  • data_description: A dictionary containing the description of the data.

Parameters:
  • data (list) – The output data from the pose estimation model.

  • num_persons (int) – The number of persons detected in the data.

Returns:

A tuple containing the keypoints array, bbox array, and data description.

Return type:

tuple