keypoints_processing

Description

Util functions to process, transform, and evaluate MS COCO keypoint information.

The main functionality is:

Attributes

COCO_STD_KEYPOINT_NAMES

The standard list of keypoint names for MS COCO.

Functions

all_keypts_visible(ann, keypoint_idxs)

Whether all given keypoints are marked as visible in the given annotation.

annotation_to_sizes(annotation[, ...])

Estimate the body size of a person in an image in pixels from skeletal keypoints and linear formulas given by factors.

annotation_to_tot_height(annotation[, ...])

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

annotations_to_heatmap(annotation_wh, ...[, ...])

Create a heatmap marking the centroids of the linked keypoints from the annotations list.

annotations_to_mask(*, annotation_wh, ...[, ...])

Create a mask of the linked keypoints from the annotations list.

any_keypts_visible(ann[, keypoint_idxs])

Whether any of the given keypoints are marked as visible in the given annotation.

pad_and_scale_annotation(ann, from_size[, ...])

Given a MS COCO style annotation, apply first padding and/or then scaling to its coordinates.

person_has_rel_size(img_meta, ann[, ...])

Check whether the relative size of the person described by annotation ann wrt image size is in specified range.

to_keypoint_idxs(keypoint_names[, coco, ...])

Return the start indices for the given keypoints within an annotations 'keypoint' field.