nicetoolbox.detectors.method_detectors.mmpose.mmpose_2d_inference.convert_output_to_numpy

nicetoolbox.detectors.method_detectors.mmpose.mmpose_2d_inference.convert_output_to_numpy(data, camera_subjects, number_subjects, fallback_num_keypoints)[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.

  • camera_subjects (list) – The index of subjects seen by the camera.

  • number_subjects (int) – Total number of subjects for all used cameras.

Returns:

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

Return type:

tuple