easycv.datasets.pose.data_sources package

class easycv.datasets.pose.data_sources.PoseTopDownSourceCoco(ann_file, img_prefix, data_cfg, dataset_info=None, test_mode=False)[source]

Bases: easycv.datasets.pose.data_sources.top_down.PoseTopDownSource

CocoSource for top-down pose estimation.

Microsoft COCO: Common Objects in Context’ ECCV’2014 More details can be found in the `paper .

The source loads raw features to build a data meta object containing the image info, annotation info and others.

COCO keypoint indexes:

0: 'nose',
1: 'left_eye',
2: 'right_eye',
3: 'left_ear',
4: 'right_ear',
5: 'left_shoulder',
6: 'right_shoulder',
7: 'left_elbow',
8: 'right_elbow',
9: 'left_wrist',
10: 'right_wrist',
11: 'left_hip',
12: 'right_hip',
13: 'left_knee',
14: 'right_knee',
15: 'left_ankle',
16: 'right_ankle'
Parameters
  • ann_file (str) – Path to the annotation file.

  • img_prefix (str) – Path to a directory where images are held. Default: None.

  • data_cfg (dict) – config

  • dataset_info (DatasetInfo) – A class containing all dataset info.

  • test_mode (bool) – Store True when building test or

  • dataset. Default (validation) – False.

__init__(ann_file, img_prefix, data_cfg, dataset_info=None, test_mode=False)[source]

Initialize self. See help(type(self)) for accurate signature.

class easycv.datasets.pose.data_sources.PoseTopDownSource(ann_file, img_prefix, data_cfg, dataset_info, coco_style=True, test_mode=False)[source]

Bases: object

Class for keypoint 2D top-down pose estimation with single-view RGB image as the data source.

Parameters
  • ann_file (str) – Path to the annotation file.

  • img_prefix (str) – Path to a directory where images are held. Default: None.

  • data_cfg (dict) – config

  • dataset_info (DatasetInfo) – A class containing all dataset info.

  • coco_style (bool) – Whether the annotation json is coco-style. Default: True

  • test_mode (bool) – Store True when building test or validation dataset. Default: False.

__init__(ann_file, img_prefix, data_cfg, dataset_info, coco_style=True, test_mode=False)[source]

Initialize self. See help(type(self)) for accurate signature.

load_image(image_file)[source]
get_length()[source]

Get the size of the dataset.

get_sample(idx)[source]

Submodules

easycv.datasets.pose.data_sources.coco module

class easycv.datasets.pose.data_sources.coco.PoseTopDownSourceCoco(ann_file, img_prefix, data_cfg, dataset_info=None, test_mode=False)[source]

Bases: easycv.datasets.pose.data_sources.top_down.PoseTopDownSource

CocoSource for top-down pose estimation.

Microsoft COCO: Common Objects in Context’ ECCV’2014 More details can be found in the `paper .

The source loads raw features to build a data meta object containing the image info, annotation info and others.

COCO keypoint indexes:

0: 'nose',
1: 'left_eye',
2: 'right_eye',
3: 'left_ear',
4: 'right_ear',
5: 'left_shoulder',
6: 'right_shoulder',
7: 'left_elbow',
8: 'right_elbow',
9: 'left_wrist',
10: 'right_wrist',
11: 'left_hip',
12: 'right_hip',
13: 'left_knee',
14: 'right_knee',
15: 'left_ankle',
16: 'right_ankle'
Parameters
  • ann_file (str) – Path to the annotation file.

  • img_prefix (str) – Path to a directory where images are held. Default: None.

  • data_cfg (dict) – config

  • dataset_info (DatasetInfo) – A class containing all dataset info.

  • test_mode (bool) – Store True when building test or

  • dataset. Default (validation) – False.

__init__(ann_file, img_prefix, data_cfg, dataset_info=None, test_mode=False)[source]

Initialize self. See help(type(self)) for accurate signature.

easycv.datasets.pose.data_sources.top_down module

class easycv.datasets.pose.data_sources.top_down.DatasetInfo(dataset_info)[source]

Bases: object

__init__(dataset_info)[source]

Initialize self. See help(type(self)) for accurate signature.

class easycv.datasets.pose.data_sources.top_down.PoseTopDownSource(ann_file, img_prefix, data_cfg, dataset_info, coco_style=True, test_mode=False)[source]

Bases: object

Class for keypoint 2D top-down pose estimation with single-view RGB image as the data source.

Parameters
  • ann_file (str) – Path to the annotation file.

  • img_prefix (str) – Path to a directory where images are held. Default: None.

  • data_cfg (dict) – config

  • dataset_info (DatasetInfo) – A class containing all dataset info.

  • coco_style (bool) – Whether the annotation json is coco-style. Default: True

  • test_mode (bool) – Store True when building test or validation dataset. Default: False.

__init__(ann_file, img_prefix, data_cfg, dataset_info, coco_style=True, test_mode=False)[source]

Initialize self. See help(type(self)) for accurate signature.

load_image(image_file)[source]
get_length()[source]

Get the size of the dataset.

get_sample(idx)[source]