annotation_to_tot_height

hybrid_learning.datasets.custom.coco.keypoints_processing.annotation_to_tot_height(annotation, all_keypoint_names=('nose', 'left_eye', 'right_eye', 'left_ear', 'right_ear', 'left_shoulder', 'right_shoulder', 'left_elbow', 'right_elbow', 'left_wrist', 'right_wrist', 'left_hip', 'right_hip', 'left_knee', 'right_knee', 'left_ankle', 'right_ankle'), assumed_height=1.7, factors=           bbox_width  bbox_height  ...  upper_arm  lower_arm slope               1            1  ...     3.7200     4.4600 intersect           0            0  ...     0.4486     0.5694  [2 rows x 11 columns], use_bbox_info=False)[source]

Wrapper around annotation_to_sizes() that returns the cleaned maximum total height.

Parameters
  • annotation (Dict[str, Any]) – the annotation to estimate the total person height of

  • all_keypoint_names (Sequence[str]) – see annotation_to_sizes()

  • assumed_height – see annotation_to_sizes()

  • factors – see annotation_to_sizes()

  • use_bbox_info (bool) – whether to use the bounding box width and height as fallback estimations of the person height; only useful for very small sizes, as otherwise close-ups of body parts with too few annotated keypoints may result in wrong classification

Returns

the maximum estimated total height of the person described by the annotation instance; if size cannot be estimated, None is returned

Return type

Optional[float]