def __init__(self, ann_file, img_prefix, data_cfg, pipeline, dataset_info=None, test_mode=False):
    if (dataset_info is None):
        warnings.warn('dataset_info is missing. Check https://github.com/open-mmlab/mmpose/pull/663 for details.', DeprecationWarning)
        cfg = Config.fromfile('configs/_base_/datasets/coco_wholebody.py')
        dataset_info = cfg._cfg_dict['dataset_info']
    super(TopDownCocoDataset, self).__init__(ann_file, img_prefix, data_cfg, pipeline, dataset_info=dataset_info, test_mode=test_mode)
    self.use_gt_bbox = data_cfg['use_gt_bbox']
    self.bbox_file = data_cfg['bbox_file']
    self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0)
    self.use_nms = data_cfg.get('use_nms', True)
    self.soft_nms = data_cfg['soft_nms']
    self.nms_thr = data_cfg['nms_thr']
    self.oks_thr = data_cfg['oks_thr']
    self.vis_thr = data_cfg['vis_thr']
    self.body_num = 17
    self.foot_num = 6
    self.face_num = 68
    self.left_hand_num = 21
    self.right_hand_num = 21
    self.db = self._get_db()
    print(f'=> num_images: {self.num_images}')
    print(f'=> load {len(self.db)} samples')
def __init__(self, ann_file, img_prefix, data_cfg, pipeline, dataset_info=None, test_mode=False):
    if (dataset_info is None):
        warnings.warn('dataset_info is missing. Check https://github.com/open-mmlab/mmpose/pull/663 for details.', DeprecationWarning)
        cfg = Config.fromfile('configs/_base_/datasets/coco_wholebody.py')
        dataset_info = cfg._cfg_dict['dataset_info']
    super(TopDownCocoDataset, self).__init__(ann_file, img_prefix, data_cfg, pipeline, dataset_info=dataset_info, test_mode=test_mode)
    self.use_gt_bbox = data_cfg['use_gt_bbox']
    self.bbox_file = data_cfg['bbox_file']
    self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0)
    self.use_nms = data_cfg.get('use_nms', True)
    self.soft_nms = data_cfg['soft_nms']
    self.nms_thr = data_cfg['nms_thr']
    self.oks_thr = data_cfg['oks_thr']
    self.vis_thr = data_cfg['vis_thr']
    self.body_num = 17
    self.foot_num = 6
    self.face_num = 68
    self.left_hand_num = 21
    self.right_hand_num = 21
    self.db = self._get_db()
    print(f'=> num_images: {self.num_images}')
    print(f'=> load {len(self.db)} samples')