class documentation

class COCODataset(BaseJointDataset):

View In Hierarchy

Undocumented

Method __getitem__ Undocumented
Method __init__ Undocumented
Method __len__ Undocumented
Constant EXTRA_TOKENS Undocumented
Constant MAPPING Undocumented
Instance Variable coco Undocumented
Instance Variable ids Undocumented
Instance Variable json Undocumented
Instance Variable 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):
EXTRA_TOKENS: dict[str, int] =

Undocumented

Value
{'left_eye': 1, 'right_eye': 2, 'left_ear': 3, 'right_ear': 4}
MAPPING: dict[int, int] =

Undocumented

Value
{0: 0,
 1: 5,
 2: 7,
 3: 9,
 4: 6,
 5: 8,
 6: 10,
...
coco =

Undocumented

ids =

Undocumented

json =

Undocumented

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.