nicetoolbox.detectors.method_detectors.body_joints.pose_utils¶
Pose estimation utilities. # TODO: Move to a more appropriate location?
Functions
Compute the intersection over union (IoU) of subject bounding boxes across frames and cameras. |
|
Interpolates missing data in the given multi-dimensional array using scipy's interp1d function. |
- nicetoolbox.detectors.method_detectors.body_joints.pose_utils.create_iou_all_pairs(data)[source]¶
Compute the intersection over union (IoU) of subject bounding boxes across frames and cameras.
Args: data (np.ndarray): Bounding box array with shape (#Subject, #Camera, #Frame, ‘full_body’, BBox), where each BBox
is represented as [x1, y1, x2, y2, conf].
Returns: iou_array (np.ndarray) : float32
IoU laid out as (subject, camera, frame, with_subject).
- 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