From 48aa0bdbe480e38955c33f09678cd0d85109f639 Mon Sep 17 00:00:00 2001 From: jinsheng Date: Tue, 1 Jun 2021 21:12:18 +0800 Subject: [PATCH] update keypoint --- .../_base_/kpt_3d_sview_kpt_2d_dataset.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/mmpose/datasets/datasets/_base_/kpt_3d_sview_kpt_2d_dataset.py b/mmpose/datasets/datasets/_base_/kpt_3d_sview_kpt_2d_dataset.py index 1062d30c77..c6ebde617d 100644 --- a/mmpose/datasets/datasets/_base_/kpt_3d_sview_kpt_2d_dataset.py +++ b/mmpose/datasets/datasets/_base_/kpt_3d_sview_kpt_2d_dataset.py @@ -63,7 +63,8 @@ def __init__(self, dataset_info = DatasetInfo(dataset_info) - self.ann_info['num_joints'] = data_cfg['num_joints'] + self.load_config(self.data_cfg) + assert self.ann_info['num_joints'] == dataset_info.keypoint_num self.ann_info['flip_pairs'] = dataset_info.flip_pairs self.ann_info['upper_body_ids'] = dataset_info.upper_body_ids @@ -73,7 +74,6 @@ def __init__(self, self.sigmas = dataset_info.sigmas self.dataset_name = dataset_info.dataset_name - self.load_config(self.data_cfg) self.data_info = self.load_annotations() self.sample_indices = self.build_sample_indices() self.pipeline = Compose(pipeline) @@ -96,20 +96,8 @@ def load_config(self, data_cfg): self.temporal_padding = data_cfg.get('temporal_padding', False) self.subset = data_cfg.get('subset', 1) self.need_2d_label = data_cfg.get('need_2d_label', False) - self.need_camera_param = False - # create annotation information - ann_info = {} - ann_info['num_joints'] = self.num_joints - ann_info['flip_pairs'] = None - ann_info['upper_body_ids'] = None - ann_info['lower_body_ids'] = None - ann_info['joint_weights'] = np.full( - self.num_joints, 1.0, dtype=np.float32) - - self.ann_info.update(ann_info) - def load_annotations(self): """Load data annotation.""" data = np.load(self.ann_file)