8.1.1.3.1.15. blueoil.datasets.mscoco_2017

8.1.1.3.1.15.1. Module Contents

8.1.1.3.1.15.1.1. Classes

MscocoSinglePersonKeypoints

MSCOCO_2017 dataset loader for single-person pose estimation.

class blueoil.datasets.mscoco_2017.MscocoSinglePersonKeypoints(subset='train', batch_size=10, *args, **kwargs)

Bases: blueoil.datasets.base.KeypointDetectionBase

MSCOCO_2017 dataset loader for single-person pose estimation.

References

https://github.com/dmlc/gluon-cv/blob/master/gluoncv/data/mscoco/keypoints.py

classes = ['person']
num_classes
available_subsets = ['train', 'validation']
extend_dir = MSCOCO_2017
_load_json(self)

Read items from JSON files

_labels_from_entry(self, entry)

Extract labels from entry.

Parameters

entry – a dict to store all labeled examples in an image.

Returns

a list of valid boxes which uses [x1, y1, x2, y2] format. valid_joints: a list of corresponding joints which is a numpy array of shape (17, 3) here.

Return type

valid_boxes

__getitem__(self, item)

Get an item given index. :param item: int, index.

Returns

a numpy array of shape (height, width, 3). joints: a numpy array of shape (17, 3), which has local coordinates in cropped_image.

Return type

cropped_image

__len__(self)

returns the number of items in the dataset.

property num_per_epoch(self)

Returns the number of datas in the data subset.