hyperpose.Dataset.mpii_dataset package¶
Submodules¶
hyperpose.Dataset.mpii_dataset.dataset module¶
-
class
hyperpose.Dataset.mpii_dataset.dataset.MPII_dataset(config, input_kpt_cvter=None, output_kpt_cvter=None, dataset_filter=None)¶ Bases:
hyperpose.Dataset.base_dataset.Base_dataseta dataset class specified for mpii dataset, provides uniform APIs
Methods
get_eval_dataset(self[, in_list])provide uniform tensorflow dataset for evaluating
get_train_dataset(self[, in_list, …])provide uniform tensorflow dataset for training
official_eval(self, pd_anns[, eval_dir])providing official evaluation of MPII dataset
prepare_dataset(self)download,extract, and reformat the dataset the official dataset is in .mat format, format it into json format automaticly.
visualize(self[, vis_num])visualize annotations of the train dataset
generate_eval_data
generate_test_data
generate_train_data
get_colors
get_dataset_type
get_eval_datasize
get_input_kpt_cvter
get_output_kpt_cvter
get_parts
get_test_dataset
get_test_datasize
get_train_datasize
official_test
set_dataset_version
set_input_kpt_cvter
set_output_kpt_cvter
-
generate_eval_data(self)¶
-
generate_test_data(self)¶
-
generate_train_data(self)¶
-
get_colors(self)¶
-
get_dataset_type(self)¶
-
get_input_kpt_cvter(self)¶
-
get_output_kpt_cvter(self)¶
-
get_parts(self)¶
-
official_eval(self, pd_anns, eval_dir='./eval_dir')¶ providing official evaluation of MPII dataset
output model metrics of PCHs on mpii evaluation dataset(split automaticly)
- Parameters
- arg1String
A string path of the json file in the same format of cocoeval annotation file(person_keypoints_val2017.json) which contains predicted results. one can refer the evaluation pipeline of models for generation procedure of this json file.
- arg2String
A string path indicates where the result json file which contains MPII PCH metrics of various keypoint saves.
- Returns
- None
-
official_test(self, pd_anns, test_dir='./test_dir')¶
-
prepare_dataset(self)¶ download,extract, and reformat the dataset the official dataset is in .mat format, format it into json format automaticly.
- Parameters
- None
- Returns
- None
-
set_input_kpt_cvter(self, input_kpt_cvter)¶
-
set_output_kpt_cvter(self, output_kpt_cvter)¶
-
visualize(self, vis_num=10)¶ visualize annotations of the train dataset
visualize the annotation points in the image to help understand and check annotation the visualized image will be saved in the “data_vis_dir” of the corresponding model directory(specified by model name). the visualized annotations are from the train dataset.
- Parameters
- arg1Int
An integer indicates how many images with their annotations are going to be visualized.
- Returns
- None
-
-
hyperpose.Dataset.mpii_dataset.dataset.init_dataset(config)¶
hyperpose.Dataset.mpii_dataset.define module¶
-
class
hyperpose.Dataset.mpii_dataset.define.MpiiPart(value)¶ Bases:
enum.EnumAn enumeration.
-
Headtop= 9¶
-
LAnkle= 5¶
-
LElbow= 14¶
-
LHip= 3¶
-
LKnee= 4¶
-
LShoulder= 13¶
-
LWrist= 15¶
-
Pelvis= 6¶
-
RAnkle= 0¶
-
RElbow= 11¶
-
RHip= 2¶
-
RKnee= 1¶
-
RShoulder= 12¶
-
RWrist= 10¶
-
Thorax= 7¶
-
UpperNeck= 8¶
-
static
from_coco(human)¶
-
-
hyperpose.Dataset.mpii_dataset.define.opps_input_converter(mpii_kpts)¶
-
hyperpose.Dataset.mpii_dataset.define.opps_output_converter(kpt_list)¶
-
hyperpose.Dataset.mpii_dataset.define.ppn_input_converter(coco_kpts)¶
-
hyperpose.Dataset.mpii_dataset.define.ppn_output_converter(kpt_list)¶
hyperpose.Dataset.mpii_dataset.format module¶
-
class
hyperpose.Dataset.mpii_dataset.format.MPIIMeta(image_path, annos_list)¶ Bases:
objectMethods
to_anns_list
-
to_anns_list(self)¶
-
-
class
hyperpose.Dataset.mpii_dataset.format.PoseInfo(image_dir, annos_path, dataset_filter=None)¶ Bases:
objectMethods
get_center_list
get_headbbx_list
get_image_annos
get_image_id_list
get_image_list
get_kpt_list
get_scale_list
-
get_center_list(self)¶
-
get_headbbx_list(self)¶
-
get_image_annos(self)¶
-
get_image_id_list(self)¶
-
get_image_list(self)¶
-
get_kpt_list(self)¶
-
get_scale_list(self)¶
-
-
hyperpose.Dataset.mpii_dataset.format.generate_json(mat_path, is_test=False)¶
hyperpose.Dataset.mpii_dataset.generate module¶
-
hyperpose.Dataset.mpii_dataset.generate.generate_eval_data(eval_images_path, eval_annos_path, dataset_filter=None)¶
-
hyperpose.Dataset.mpii_dataset.generate.generate_test_data(test_images_path, test_annos_path)¶
-
hyperpose.Dataset.mpii_dataset.generate.generate_train_data(train_images_path, train_annos_path, dataset_filter=None, input_kpt_cvter=<function <lambda> at 0x7f2d22b98ea0>)¶
hyperpose.Dataset.mpii_dataset.prepare module¶
-
hyperpose.Dataset.mpii_dataset.prepare.prepare_dataset(dataset_path)¶
hyperpose.Dataset.mpii_dataset.utils module¶
-
hyperpose.Dataset.mpii_dataset.utils.affine_transform(pt, t)¶
-
hyperpose.Dataset.mpii_dataset.utils.get_3rd_point(a, b)¶
-
hyperpose.Dataset.mpii_dataset.utils.get_affine_transform(center, scale, rot, output_size, shift=array([0.0, 0.0], dtype=float32), inv=0)¶
-
hyperpose.Dataset.mpii_dataset.utils.get_dir(src_point, rot_rad)¶