dgs.models.dataset.posetrack21

Load bboxes and poses from an existing .json file of the PoseTrack21 dataset.

See https://github.com/anDoer/PoseTrack21/blob/main/doc/dataset_structure.md#reid-pose-tracking for type definitions.

PoseTrack21 format:

  • Bounding boxes have format XYWH

  • The 17 key points and their respective visibilities are stored in one list of len 51. The list contains the x- and y-coordinate and the visibility: n [xi, yi, visi, …]

Notes

The original P21-paper said, that during evaluation they ignore all person detections that overlap with the ignore regions.

Module Functions

extract_all_bboxes([base_dataset_path, anno_dir])

Given the path to the PoseTrack21 dataset, create a new crops folder containing the image crops and its respective key point coordinates of every bounding box separated by test, train, and validation sets like the images.

extract_crops_from_json_annotation(...[, ...])

Given the path to a json file containing images and annotations in the PT21 style, extract all the bbox image crops.

extract_pt21_image_crops([dataset_dir, ...])

This function will extract the image crops and image-crop-local key-point coordinates, given the full PoseTrack21 dataset.

validate_pt21_json(json)

Check whether the given json is valid for the PoseTrack21 dataset.

Module Classes

PoseTrack21BaseDataset(*args, **kwargs)

Abstract base class for the PoseTrack21 based datasets.

PoseTrack21Torchreid(*args, **kwargs)

Load PoseTrack21 as torchreid dataset.

PoseTrack21_BBox(*args, **kwargs)

Load a single precomputed json file from the PoseTrack21 dataset.

PoseTrack21_Image(*args, **kwargs)

Load a single precomputed json file from the PoseTrack21 dataset where every index represents one image.

PoseTrack21_ImageHistory(*args, **kwargs)

A PoseTrack21 dataset that creates combined states from a current state and its history.