Skip to content

Commit

Permalink
update keypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jin-s13 committed Jun 1, 2021
1 parent cc5b569 commit 91483a0
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions mmpose/datasets/datasets/_base_/kpt_3d_sview_kpt_2d_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 91483a0

Please sign in to comment.