def setUp(self):
        """Setup some variables which are used in every test method.

        TestCase calls functions in this order: setUp() -> testMethod() ->
        tearDown() -> cleanUp()
        """
        self.tmp_dir = tempfile.TemporaryDirectory()

        self.ann_file_coco = 'tests/data/coco/test_coco.json'
        meta_info_coco = dict(from_file='configs/_base_/datasets/coco.py')
        self.dataset_meta_coco = parse_pose_metainfo(meta_info_coco)
        self.coco = COCO(self.ann_file_coco)
        self.dataset_meta_coco['CLASSES'] = self.coco.loadCats(
            self.coco.getCatIds())

        self.topdown_data_coco = self._convert_ann_to_topdown_batch_data(
            self.ann_file_coco)
        assert len(self.topdown_data_coco) == 14
        self.bottomup_data_coco = self._convert_ann_to_bottomup_batch_data(
            self.ann_file_coco)
        assert len(self.bottomup_data_coco) == 4
        self.target_coco = {
            'coco/AP': 1.0,
            'coco/AP .5': 1.0,
            'coco/AP .75': 1.0,
            'coco/AP (M)': 1.0,
            'coco/AP (L)': 1.0,
            'coco/AR': 1.0,
            'coco/AR .5': 1.0,
            'coco/AR .75': 1.0,
            'coco/AR (M)': 1.0,
            'coco/AR (L)': 1.0,
        }

        self.ann_file_crowdpose = 'tests/data/crowdpose/test_crowdpose.json'
        self.coco_crowdpose = COCO(self.ann_file_crowdpose)
        meta_info_crowdpose = dict(
            from_file='configs/_base_/datasets/crowdpose.py')
        self.dataset_meta_crowdpose = parse_pose_metainfo(meta_info_crowdpose)
        self.dataset_meta_crowdpose['CLASSES'] = self.coco_crowdpose.loadCats(
            self.coco_crowdpose.getCatIds())

        self.topdown_data_crowdpose = self._convert_ann_to_topdown_batch_data(
            self.ann_file_crowdpose)
        assert len(self.topdown_data_crowdpose) == 5
        self.bottomup_data_crowdpose = \
            self._convert_ann_to_bottomup_batch_data(self.ann_file_crowdpose)
        assert len(self.bottomup_data_crowdpose) == 2

        self.target_crowdpose = {
            'crowdpose/AP': 1.0,
            'crowdpose/AP .5': 1.0,
            'crowdpose/AP .75': 1.0,
            'crowdpose/AR': 1.0,
            'crowdpose/AR .5': 1.0,
            'crowdpose/AR .75': 1.0,
            'crowdpose/AP(E)': -1.0,
            'crowdpose/AP(M)': 1.0,
            'crowdpose/AP(H)': -1.0,
        }

        self.ann_file_ap10k = 'tests/data/ap10k/test_ap10k.json'
        self.coco_ap10k = COCO(self.ann_file_ap10k)
        meta_info_ap10k = dict(from_file='configs/_base_/datasets/ap10k.py')
        self.dataset_meta_ap10k = parse_pose_metainfo(meta_info_ap10k)
        self.dataset_meta_ap10k['CLASSES'] = self.coco_ap10k.loadCats(
            self.coco_ap10k.getCatIds())

        self.topdown_data_ap10k = self._convert_ann_to_topdown_batch_data(
            self.ann_file_ap10k)
        assert len(self.topdown_data_ap10k) == 2
        self.bottomup_data_ap10k = self._convert_ann_to_bottomup_batch_data(
            self.ann_file_ap10k)
        assert len(self.bottomup_data_ap10k) == 2

        self.target_ap10k = {
            'coco/AP': 1.0,
            'coco/AP .5': 1.0,
            'coco/AP .75': 1.0,
            'coco/AP (M)': -1.0,
            'coco/AP (L)': 1.0,
            'coco/AR': 1.0,
            'coco/AR .5': 1.0,
            'coco/AR .75': 1.0,
            'coco/AR (M)': -1.0,
            'coco/AR (L)': 1.0,
        }
Setup some variables which are used in every test method.

        TestCase calls functions in this order: setUp() -> testMethod() ->
        tearDown() -> cleanUp()
        
mmpose/tests/test_evaluation/test_metrics/test_coco_metric.py