hyperpose.Dataset package

Subpackages

Submodules

hyperpose.Dataset.common module

hyperpose.Dataset.common.file_log(log_file, msg)
hyperpose.Dataset.common.get_domainadapt_targets(domainadapt_img_paths)
hyperpose.Dataset.common.imread_rgb_float(image_path, data_format='channels_first')
hyperpose.Dataset.common.imwrite_rgb_float(image, image_path, data_format='channels_first')
hyperpose.Dataset.common.unzip(path_to_zip_file, directory_to_extract_to)
hyperpose.Dataset.common.visualize(vis_dir, vis_num, dataset, parts, colors, dataset_name='default')

Module contents

hyperpose.Dataset.enum2dataset(dataset_type)
hyperpose.Dataset.get_dataset(config)

get dataset object based on the config object

consturct and return a dataset object based on the config. No matter what the bottom dataset type is, the APIs of the returned dataset object are uniform, they are the following APIs:

visualize: visualize annotations of the train dataset and save it in “data_vir_dir” get_dataset_type: return the type of the bottom dataset. get_train_dataset: return a uniform tensorflow dataset object for training. get_val_dataset: return a uniform tensorflow dataset object for evaluating. official_eval: perform official evaluation on this dataset.

The construction pipeline of this dataset object is below:

1.check whether the dataset file(official zip or mat) is under data_path, if it isn’t, download it from official website automaticly

2.decode the official dataset file, organize the annotations in corresponding Meta classes, conveniet for processing.

3.based on annotation, split train and evaluat part for furthur use.

if user defined thier own dataset_filter, it will be executed in the train dataset or evaluate dataset generating procedure.

use the APIs of this returned dataset object, the difference of different dataset is minimized.

Parameters
arg1config object

the config object return by Config.get_config() function, which includes all the configuration information.

Returns
dataset

a dataset object with unifrom APIs: visualize, get_dataset_type, get_train_dataset, get_val_dataset,official_eval

hyperpose.Dataset.get_pretrain_dataset(config)