nicetoolbox.detectors.method_detectors.body_joints.pose_utils.interpolate_data

nicetoolbox.detectors.method_detectors.body_joints.pose_utils.interpolate_data(data, is_3d=True, max_empty=10)[source]

Interpolates missing data in the given multi-dimensional array using scipy’s interp1d function.

Parameters:
  • data (ndarray) – The input data array with shape (num_persons, num_cameras, num_frames, num_keypoints, _).

  • is_3d (bool, optional) – Indicates whether the data is 3D or not. Defaults to True.

  • max_empty (int, optional) – The maximum number of consecutive empty frames allowed. Defaults to 10.

Returns:

The interpolated data array with the same shape as the input data.

Return type:

ndarray