class documentation

class MPIIDataset(BaseJointDataset):

View In Hierarchy

Undocumented

Method __getitem__ Undocumented
Method __init__ Undocumented
Method __len__ Undocumented
Method load_labels Undocumented
Constant EXTRA_TOKENS Undocumented
Constant MAPPING Undocumented
Instance Variable annotations Undocumented
Instance Variable image_root Undocumented
Instance Variable json_path Undocumented
Instance Variable split Undocumented
Method _apply_mapping Apply the mapping from any dataset to the unipose format. This is used to reorder the keypoints and mask to the unipose format, according to the MAPPING and EXTRA_TOKENS class variables.

Inherited from BaseJointDataset:

Method make_dataloader Make a dataloader for the dataset.
def __getitem__(self, idx):
def __init__(self, path, split='train'):

Undocumented

Parameters
path:strUndocumented
split:Literal['train', 'val']Undocumented
def __len__(self):
def load_labels(self):

Undocumented

EXTRA_TOKENS: dict[str, int] =

Undocumented

Value
{'pelvis': 6, 'head_top': 9}
MAPPING: dict[int, int] =

Undocumented

Value
{0: 8,
 1: 13,
 2: 14,
 3: 15,
 4: 12,
 5: 11,
 6: 10,
...
annotations =

Undocumented

image_root =

Undocumented

json_path =

Undocumented

split =

Undocumented

def _apply_mapping(self, keypoints, mask):

Apply the mapping from any dataset to the unipose format. This is used to reorder the keypoints and mask to the unipose format, according to the MAPPING and EXTRA_TOKENS class variables.

Parameters
keypoints:torch.TensorThe keypoints to reorder.
mask:torch.TensorThe mask to reorder.