From 91313365b7bdef1ce8cedbf5d907affc47ac11c6 Mon Sep 17 00:00:00 2001 From: zengwang430521 Date: Wed, 25 Aug 2021 10:03:24 +0800 Subject: [PATCH 01/19] Fix import and deprecation issues in unit tests (#871) * fix some bugs in the unit test of smpl model. * reorganize `tests/` to solve importing issue (PEP 420) * fix deprecation warnings in unit tests Co-authored-by: ly015 --- mmpose/core/evaluation/top_down_eval.py | 4 +- .../core/post_processing/one_euro_filter.py | 2 +- mmpose/core/visualization/image.py | 2 +- .../body3d/body3d_mpi_inf_3dhp_dataset.py | 6 +-- .../datasets/mesh/mesh_adv_dataset.py | 2 +- .../datasets/mesh/mesh_base_dataset.py | 5 +- .../datasets/top_down/topdown_mhp_dataset.py | 9 +++- .../datasets/top_down/topdown_mpii_dataset.py | 4 +- .../datasets/pipelines/bottom_up_transform.py | 14 ++--- mmpose/datasets/pipelines/pose3d_transform.py | 2 +- {tools => tests}/__init__.py | 0 .../{test_api => test_apis}/test_inference.py | 0 .../test_inference_3d.py | 21 +++++--- .../test_inference_tracking.py | 0 .../test_eval_hook_compatibility.py | 10 ++-- tests/test_datasets/test_animal_dataset.py | 9 ++-- tests/test_datasets/test_face_dataset.py | 9 ++-- tests/test_datasets/test_fashion_dataset.py | 9 ++-- tests/test_datasets/test_hand_dataset.py | 9 ++-- tests/test_datasets/test_mesh_dataset.py | 5 +- tests/test_datasets/test_top_down_dataset.py | 13 +++-- tests/test_eval_hook.py | 25 +++++---- tests/test_evaluation/test_pose3d_eval.py | 4 +- tests/test_evaluation/test_top_down_eval.py | 4 +- .../test_smpl.py | 23 ++++++--- .../test_bottom_up_losses.py | 0 .../test_classification_loss.py | 0 .../test_mesh_losses.py | 0 .../test_regression_losses.py | 0 .../test_top_down_losses.py | 0 .../test_bottom_up_forward.py | 0 .../test_bottom_up_head.py | 0 .../test_interhand_3d_forward.py | 0 .../test_interhand_3d_head.py | 0 .../{test_model => test_models}/test_layer.py | 0 .../test_mesh_forward.py | 51 +++++-------------- .../test_mesh_head.py | 0 .../test_multitask_forward.py | 4 +- .../test_pose_lifter_forward.py | 0 .../test_temporal_regression_head.py | 0 .../test_top_down_forward.py | 0 .../test_top_down_head.py | 0 tests/test_onnx.py | 4 +- tests/utils/mesh_utils.py | 34 +++++++++++++ tools/deployment/__init__.py | 0 45 files changed, 163 insertions(+), 121 deletions(-) rename {tools => tests}/__init__.py (100%) rename tests/{test_api => test_apis}/test_inference.py (100%) rename tests/{test_api => test_apis}/test_inference_3d.py (91%) rename tests/{test_api => test_apis}/test_inference_tracking.py (100%) rename tests/{test_external_model => test_external}/test_smpl.py (78%) rename tests/{test_loss => test_losses}/test_bottom_up_losses.py (100%) rename tests/{test_loss => test_losses}/test_classification_loss.py (100%) rename tests/{test_loss => test_losses}/test_mesh_losses.py (100%) rename tests/{test_loss => test_losses}/test_regression_losses.py (100%) rename tests/{test_loss => test_losses}/test_top_down_losses.py (100%) rename tests/{test_model => test_models}/test_bottom_up_forward.py (100%) rename tests/{test_model => test_models}/test_bottom_up_head.py (100%) rename tests/{test_model => test_models}/test_interhand_3d_forward.py (100%) rename tests/{test_model => test_models}/test_interhand_3d_head.py (100%) rename tests/{test_model => test_models}/test_layer.py (100%) rename tests/{test_model => test_models}/test_mesh_forward.py (75%) rename tests/{test_model => test_models}/test_mesh_head.py (100%) rename tests/{test_model => test_models}/test_multitask_forward.py (97%) rename tests/{test_model => test_models}/test_pose_lifter_forward.py (100%) rename tests/{test_model => test_models}/test_temporal_regression_head.py (100%) rename tests/{test_model => test_models}/test_top_down_forward.py (100%) rename tests/{test_model => test_models}/test_top_down_head.py (100%) create mode 100644 tests/utils/mesh_utils.py delete mode 100644 tools/deployment/__init__.py diff --git a/mmpose/core/evaluation/top_down_eval.py b/mmpose/core/evaluation/top_down_eval.py index f1df4ab84f..704131c2db 100644 --- a/mmpose/core/evaluation/top_down_eval.py +++ b/mmpose/core/evaluation/top_down_eval.py @@ -370,7 +370,7 @@ def post_dark_udp(coords, batch_heatmaps, kernel=3): index = coords[..., 0] + 1 + (coords[..., 1] + 1) * (W + 2) index += (W + 2) * (H + 2) * np.arange(0, B * K).reshape(-1, K) - index = index.astype(np.int).reshape(-1, 1) + index = index.astype(int).reshape(-1, 1) i_ = batch_heatmaps_pad[index] ix1 = batch_heatmaps_pad[index + 1] iy1 = batch_heatmaps_pad[index + W + 2] @@ -577,7 +577,7 @@ def keypoints_from_heatmaps(heatmaps, preds, maxvals = _get_max_preds(heatmaps) index = preds[..., 0] + preds[..., 1] * W index += W * H * np.arange(0, N * K / 3) - index = index.astype(np.int).reshape(N, K // 3, 1) + index = index.astype(int).reshape(N, K // 3, 1) preds += np.concatenate((offset_x[index], offset_y[index]), axis=2) else: raise ValueError('target_type should be either ' diff --git a/mmpose/core/post_processing/one_euro_filter.py b/mmpose/core/post_processing/one_euro_filter.py index 0a995c56c8..614516f2ee 100644 --- a/mmpose/core/post_processing/one_euro_filter.py +++ b/mmpose/core/post_processing/one_euro_filter.py @@ -42,7 +42,7 @@ def __init__(self, self.beta = np.full(x0.shape, beta) self.d_cutoff = np.full(x0.shape, d_cutoff) # Previous values. - self.x_prev = x0.astype(np.float) + self.x_prev = x0.astype(float) self.dx_prev = np.full(x0.shape, dx0) self.mask_prev = np.ma.masked_where(x0 <= 0, x0) self.realtime = True diff --git a/mmpose/core/visualization/image.py b/mmpose/core/visualization/image.py index 9f0ef24976..4ad34d3525 100644 --- a/mmpose/core/visualization/image.py +++ b/mmpose/core/visualization/image.py @@ -372,7 +372,7 @@ def imshow_mesh_3d(img, try: renderer = pyrender.OffscreenRenderer( viewport_width=W, viewport_height=H) - except RuntimeError: + except (ImportError, RuntimeError): warnings.warn('pyrender package is not installed correctly.') return img diff --git a/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py b/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py index cfe508596b..66cbdaf7d9 100644 --- a/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py @@ -278,7 +278,7 @@ def _report_mpjpe(self, keypoint_results, mode='mpjpe'): preds = np.stack(preds) gts = np.stack(gts) - masks = np.ones_like(gts[:, :, 0], dtype=np.bool) + masks = np.ones_like(gts[:, :, 0], dtype=bool) err_name = mode.upper() if mode == 'mpjpe': @@ -319,7 +319,7 @@ def _report_3d_pck(self, keypoint_results, mode='3dpck'): preds = np.stack(preds) gts = np.stack(gts) - masks = np.ones_like(gts[:, :, 0], dtype=np.bool) + masks = np.ones_like(gts[:, :, 0], dtype=bool) err_name = mode.upper() if mode == '3dpck': @@ -360,7 +360,7 @@ def _report_3d_auc(self, keypoint_results, mode='3dauc'): preds = np.stack(preds) gts = np.stack(gts) - masks = np.ones_like(gts[:, :, 0], dtype=np.bool) + masks = np.ones_like(gts[:, :, 0], dtype=bool) err_name = mode.upper() if mode == '3dauc': diff --git a/mmpose/datasets/datasets/mesh/mesh_adv_dataset.py b/mmpose/datasets/datasets/mesh/mesh_adv_dataset.py index 341e2cb918..6f6ea92989 100644 --- a/mmpose/datasets/datasets/mesh/mesh_adv_dataset.py +++ b/mmpose/datasets/datasets/mesh/mesh_adv_dataset.py @@ -36,7 +36,7 @@ def __getitem__(self, i): """ data = self.train_dataset[i] ind_adv = np.random.randint( - low=0, high=len(self.adversarial_dataset), dtype=np.int) + low=0, high=len(self.adversarial_dataset), dtype=int) data.update(self.adversarial_dataset[ind_adv % len(self.adversarial_dataset)]) return data diff --git a/mmpose/datasets/datasets/mesh/mesh_base_dataset.py b/mmpose/datasets/datasets/mesh/mesh_base_dataset.py index 0169f535bf..d993077a80 100644 --- a/mmpose/datasets/datasets/mesh/mesh_base_dataset.py +++ b/mmpose/datasets/datasets/mesh/mesh_base_dataset.py @@ -113,10 +113,9 @@ def _get_db(self, ann_file): # Get gender data, if available if 'gender' in data.keys(): _genders = data['gender'] - _genders = np.array([str(g) != 'm' - for g in _genders]).astype(np.int) + _genders = np.array([str(g) != 'm' for g in _genders]).astype(int) else: - _genders = -1 * np.ones(dataset_len).astype(np.int) + _genders = -1 * np.ones(dataset_len).astype(int) # Get IUV image, if available if 'iuv_names' in data.keys(): diff --git a/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py index 704cd8fce5..8f29f15b01 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py @@ -1,3 +1,5 @@ +import warnings + import numpy as np from xtcocotools.coco import COCO from xtcocotools.cocoeval import COCOeval @@ -64,7 +66,12 @@ def __init__(self, self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] - self.image_thr = data_cfg['image_thr'] + self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) + if 'image_thr' in data_cfg: + warnings.warn( + 'image_thr is deprecated, ' + 'please use det_bbox_thr instead', DeprecationWarning) + self.det_bbox_thr = data_cfg['image_thr'] self.use_nms = data_cfg.get('use_nms', True) self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py index 93ab7c3d37..6938941d33 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py @@ -89,8 +89,8 @@ def _get_db(self): for a in anno: image_name = a['image'] - center = np.array(a['center'], dtype=np.float) - scale = np.array([a['scale'], a['scale']], dtype=np.float) + center = np.array(a['center'], dtype=float) + scale = np.array([a['scale'], a['scale']], dtype=float) # Adjust center/scale slightly to avoid cropping limbs if center[0] != -1: diff --git a/mmpose/datasets/pipelines/bottom_up_transform.py b/mmpose/datasets/pipelines/bottom_up_transform.py index 1e21bfaeea..299145158d 100644 --- a/mmpose/datasets/pipelines/bottom_up_transform.py +++ b/mmpose/datasets/pipelines/bottom_up_transform.py @@ -117,9 +117,9 @@ def _resize_align_multi_scale_udp(image, input_size, current_scale, min_scale): trans = get_warp_matrix( theta=0, - size_input=np.array(scale, dtype=np.float), - size_dst=np.array(size_resized, dtype=np.float) - 1.0, - size_target=np.array(scale, dtype=np.float)) + size_input=np.array(scale, dtype=float), + size_dst=np.array(size_resized, dtype=float) - 1.0, + size_target=np.array(scale, dtype=float)) image_resized = cv2.warpAffine( image.copy(), trans, size_resized, flags=cv2.INTER_LINEAR) @@ -457,8 +457,8 @@ def __call__(self, results): theta=aug_rot, size_input=center * 2.0, size_dst=np.array( - (_output_size, _output_size), dtype=np.float) - 1.0, - size_target=np.array((scale, scale), dtype=np.float)) + (_output_size, _output_size), dtype=float) - 1.0, + size_target=np.array((scale, scale), dtype=float)) mask[i] = cv2.warpAffine( (mask[i] * 255).astype(np.uint8), trans, (int(_output_size), int(_output_size)), @@ -472,8 +472,8 @@ def __call__(self, results): theta=aug_rot, size_input=center * 2.0, size_dst=np.array( - (self.input_size, self.input_size), dtype=np.float) - 1.0, - size_target=np.array((scale, scale), dtype=np.float)) + (self.input_size, self.input_size), dtype=float) - 1.0, + size_target=np.array((scale, scale), dtype=float)) image = cv2.warpAffine( image, mat_input, (int(self.input_size), int(self.input_size)), diff --git a/mmpose/datasets/pipelines/pose3d_transform.py b/mmpose/datasets/pipelines/pose3d_transform.py index 143b5e90d7..c004defc8a 100644 --- a/mmpose/datasets/pipelines/pose3d_transform.py +++ b/mmpose/datasets/pipelines/pose3d_transform.py @@ -532,7 +532,7 @@ def __call__(self, results): np.arange(num_joints)[:, None, None, None], [1, local_size, local_size, local_size]) idx = np.stack([idx_joints, zz, yy, xx], - axis=-1).astype(np.long).reshape(-1, 4) + axis=-1).astype(int).reshape(-1, 4) target[idx[:, 0], idx[:, 1], idx[:, 2], idx[:, 3]] = local_target.reshape(-1) target = target * self.max_bound diff --git a/tools/__init__.py b/tests/__init__.py similarity index 100% rename from tools/__init__.py rename to tests/__init__.py diff --git a/tests/test_api/test_inference.py b/tests/test_apis/test_inference.py similarity index 100% rename from tests/test_api/test_inference.py rename to tests/test_apis/test_inference.py diff --git a/tests/test_api/test_inference_3d.py b/tests/test_apis/test_inference_3d.py similarity index 91% rename from tests/test_api/test_inference_3d.py rename to tests/test_apis/test_inference_3d.py index 78ec5306ec..f4ce839675 100644 --- a/tests/test_api/test_inference_3d.py +++ b/tests/test_apis/test_inference_3d.py @@ -1,8 +1,11 @@ +import os.path as osp +import tempfile + import mmcv import numpy as np import pytest import torch -from tests.test_model.test_mesh_forward import generate_smpl_weight_file +from tests.utils.mesh_utils import generate_smpl_weight_file from mmpose.apis import (extract_pose_sequence, inference_interhand_3d_model, inference_mesh_model, inference_pose_lifter_model, @@ -166,14 +169,16 @@ def test_body_mesh_demo(): config.model.mesh_head.smpl_mean_params = \ 'tests/data/smpl/smpl_mean_params.npz' - config.model.smpl.smpl_path = 'tests/data/smpl' - config.model.smpl.joints_regressor = \ - 'tests/data/smpl/test_joint_regressor.npy' - - # generate weight file for SMPL model. - generate_smpl_weight_file('tests/data/smpl') + pose_model = None + with tempfile.TemporaryDirectory() as tmpdir: + config.model.smpl.smpl_path = tmpdir + config.model.smpl.joints_regressor = osp.join( + tmpdir, 'test_joint_regressor.npy') + # generate weight file for SMPL model. + generate_smpl_weight_file(tmpdir) + pose_model = build_posenet(config.model) - pose_model = build_posenet(config.model) + assert pose_model is not None, 'Fail to build pose model' pose_model.cfg = config pose_model.to(device) pose_model.eval() diff --git a/tests/test_api/test_inference_tracking.py b/tests/test_apis/test_inference_tracking.py similarity index 100% rename from tests/test_api/test_inference_tracking.py rename to tests/test_apis/test_inference_tracking.py diff --git a/tests/test_backward_compatibility/test_eval_hook_compatibility.py b/tests/test_backward_compatibility/test_eval_hook_compatibility.py index 21caafcaeb..f809b54120 100644 --- a/tests/test_backward_compatibility/test_eval_hook_compatibility.py +++ b/tests/test_backward_compatibility/test_eval_hook_compatibility.py @@ -1,5 +1,6 @@ import unittest.mock as mock +import pytest import torch from torch.utils.data import DataLoader, Dataset @@ -34,8 +35,11 @@ def test_old_fashion_eval_hook_parameters(): shuffle=False) # test argument "key_indicator" - _ = EvalHook(data_loader, key_indicator='AP') - _ = DistEvalHook(data_loader, key_indicator='AP') + with pytest.warns(DeprecationWarning): + _ = EvalHook(data_loader, key_indicator='AP') + with pytest.warns(DeprecationWarning): + _ = DistEvalHook(data_loader, key_indicator='AP') # test argument "gpu_collect" - _ = EvalHook(data_loader, save_best='AP', gpu_collect=False) + with pytest.warns(DeprecationWarning): + _ = EvalHook(data_loader, save_best='AP', gpu_collect=False) diff --git a/tests/test_datasets/test_animal_dataset.py b/tests/test_datasets/test_animal_dataset.py index 944b8ab3af..4d0362e8b8 100644 --- a/tests/test_datasets/test_animal_dataset.py +++ b/tests/test_datasets/test_animal_dataset.py @@ -28,14 +28,15 @@ def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) ] bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack( + box = np.stack([ np.array([ db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], db[j]['scale'][0] * db[j]['scale'][1] * - 200 * 200, 1.0 + db[j]['scale'][1], + db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 ], dtype=np.float32) - for j in range(i, min(i + batch_size, len_db))) + for j in range(i, min(i + batch_size, len_db)) + ]) output = {} output['preds'] = keypoints diff --git a/tests/test_datasets/test_face_dataset.py b/tests/test_datasets/test_face_dataset.py index 12a31072ca..71d4f3d7e2 100644 --- a/tests/test_datasets/test_face_dataset.py +++ b/tests/test_datasets/test_face_dataset.py @@ -29,14 +29,15 @@ def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) ] bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack( + box = np.stack([ np.array([ db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], db[j]['scale'][0] * db[j]['scale'][1] * - 200 * 200, 1.0 + db[j]['scale'][1], + db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 ], dtype=np.float32) - for j in range(i, min(i + batch_size, len_db))) + for j in range(i, min(i + batch_size, len_db)) + ]) output = {} output['preds'] = keypoints diff --git a/tests/test_datasets/test_fashion_dataset.py b/tests/test_datasets/test_fashion_dataset.py index 6073b011f4..97c16dc071 100644 --- a/tests/test_datasets/test_fashion_dataset.py +++ b/tests/test_datasets/test_fashion_dataset.py @@ -28,14 +28,15 @@ def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) ] bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack( + box = np.stack([ np.array([ db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], db[j]['scale'][0] * db[j]['scale'][1] * - 200 * 200, 1.0 + db[j]['scale'][1], + db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 ], dtype=np.float32) - for j in range(i, min(i + batch_size, len_db))) + for j in range(i, min(i + batch_size, len_db)) + ]) output = {} output['preds'] = keypoints diff --git a/tests/test_datasets/test_hand_dataset.py b/tests/test_datasets/test_hand_dataset.py index 6249a767f7..995cddd5cd 100644 --- a/tests/test_datasets/test_hand_dataset.py +++ b/tests/test_datasets/test_hand_dataset.py @@ -24,14 +24,15 @@ def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) ] bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack( + box = np.stack([ np.array([ db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], db[j]['scale'][0] * db[j]['scale'][1] * - 200 * 200, 1.0 + db[j]['scale'][1], + db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 ], dtype=np.float32) - for j in range(i, min(i + batch_size, len_db))) + for j in range(i, min(i + batch_size, len_db)) + ]) output = {} output['preds'] = keypoints diff --git a/tests/test_datasets/test_mesh_dataset.py b/tests/test_datasets/test_mesh_dataset.py index 9c82920570..9eb8a90034 100644 --- a/tests/test_datasets/test_mesh_dataset.py +++ b/tests/test_datasets/test_mesh_dataset.py @@ -1,3 +1,5 @@ +import tempfile + from mmpose.datasets import DATASETS @@ -47,7 +49,8 @@ def test_mesh_H36M_dataset(): keypoints_3d=item['joints_3d'][None, ...], image_path=item['image_file']) outputs.append(pred) - eval_result = custom_dataset.evaluate(outputs, 'tests/data/h36m') + with tempfile.TemporaryDirectory() as tmpdir: + eval_result = custom_dataset.evaluate(outputs, tmpdir) assert 'MPJPE' in eval_result assert 'MPJPE-PA' in eval_result diff --git a/tests/test_datasets/test_top_down_dataset.py b/tests/test_datasets/test_top_down_dataset.py index 9ea42ebb13..6fc5f6ee81 100644 --- a/tests/test_datasets/test_top_down_dataset.py +++ b/tests/test_datasets/test_top_down_dataset.py @@ -29,14 +29,15 @@ def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) ] bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack( + box = np.stack([ np.array([ db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], db[j]['scale'][0] * db[j]['scale'][1] * - 200 * 200, 1.0 + db[j]['scale'][1], + db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 ], dtype=np.float32) - for j in range(i, min(i + batch_size, len_db))) + for j in range(i, min(i + batch_size, len_db)) + ]) output = {} output['preds'] = keypoints @@ -161,7 +162,7 @@ def test_top_down_MHP_dataset(): vis_thr=0.2, bbox_thr=1.0, use_gt_bbox=True, - image_thr=0.0, + det_bbox_thr=0.0, bbox_file='', ) @@ -595,7 +596,6 @@ def test_top_down_AIC_dataset(): vis_thr=0.2, use_gt_bbox=True, det_bbox_thr=0.0, - image_thr=0.0, bbox_file='') with pytest.raises(AssertionError): @@ -669,7 +669,6 @@ def test_top_down_JHMDB_dataset(): vis_thr=0.2, use_gt_bbox=True, det_bbox_thr=0.0, - image_thr=0.0, bbox_file='') with pytest.raises(AssertionError): diff --git a/tests/test_eval_hook.py b/tests/test_eval_hook.py index f12f8cd01b..f32fa6b129 100644 --- a/tests/test_eval_hook.py +++ b/tests/test_eval_hook.py @@ -120,9 +120,10 @@ def test_eval_hook(EvalHookCls): batch_processor=None, optimizer=optimizer, work_dir=tmpdir, - logger=logger) + logger=logger, + max_epochs=1) runner.register_hook(eval_hook) - runner.run([loader], [('train', 1)], 1) + runner.run([loader], [('train', 1)]) assert runner.meta is None or 'best_score' not in runner.meta[ 'hook_msgs'] assert runner.meta is None or 'best_ckpt' not in runner.meta[ @@ -163,10 +164,11 @@ def test_eval_hook(EvalHookCls): batch_processor=None, optimizer=optimizer, work_dir=tmpdir, - logger=logger) + logger=logger, + max_epochs=8) runner.register_checkpoint_hook(dict(interval=1)) runner.register_hook(eval_hook) - runner.run([loader], [('train', 1)], 8) + runner.run([loader], [('train', 1)]) real_path = osp.join(tmpdir, 'best_acc_epoch_4.pth') @@ -202,10 +204,11 @@ def test_eval_hook(EvalHookCls): batch_processor=None, optimizer=optimizer, work_dir=tmpdir, - logger=logger) + logger=logger, + max_epochs=8) runner.register_checkpoint_hook(dict(interval=1)) runner.register_hook(eval_hook) - runner.run([loader], [('train', 1)], 8) + runner.run([loader], [('train', 1)]) real_path = osp.join(tmpdir, 'best_acc_epoch_6.pth') @@ -221,10 +224,11 @@ def test_eval_hook(EvalHookCls): batch_processor=None, optimizer=optimizer, work_dir=tmpdir, - logger=logger) + logger=logger, + max_epochs=2) runner.register_checkpoint_hook(dict(interval=1)) runner.register_hook(eval_hook) - runner.run([loader], [('train', 1)], 2) + runner.run([loader], [('train', 1)]) real_path = osp.join(tmpdir, 'best_acc_epoch_2.pth') @@ -239,11 +243,12 @@ def test_eval_hook(EvalHookCls): batch_processor=None, optimizer=optimizer, work_dir=tmpdir, - logger=logger) + logger=logger, + max_epochs=8) runner.register_checkpoint_hook(dict(interval=1)) runner.register_hook(eval_hook) runner.resume(resume_from) - runner.run([loader], [('train', 1)], 8) + runner.run([loader], [('train', 1)]) real_path = osp.join(tmpdir, 'best_acc_epoch_4.pth') diff --git a/tests/test_evaluation/test_pose3d_eval.py b/tests/test_evaluation/test_pose3d_eval.py index 82b4751d00..c9acfb5fe9 100644 --- a/tests/test_evaluation/test_pose3d_eval.py +++ b/tests/test_evaluation/test_pose3d_eval.py @@ -7,7 +7,7 @@ def test_keypoint_3d_pck(): target = np.random.rand(2, 5, 3) output = np.copy(target) - mask = np.ones((output.shape[0], output.shape[1]), dtype=np.bool) + mask = np.ones((output.shape[0], output.shape[1]), dtype=bool) with pytest.raises(ValueError): _ = keypoint_3d_pck(output, target, mask, alignment='norm') @@ -31,7 +31,7 @@ def test_keypoint_3d_pck(): def test_keypoint_3d_auc(): target = np.random.rand(2, 5, 3) output = np.copy(target) - mask = np.ones((output.shape[0], output.shape[1]), dtype=np.bool) + mask = np.ones((output.shape[0], output.shape[1]), dtype=bool) with pytest.raises(ValueError): _ = keypoint_3d_auc(output, target, mask, alignment='norm') diff --git a/tests/test_evaluation/test_top_down_eval.py b/tests/test_evaluation/test_top_down_eval.py index 94cc3ae563..6a1a61ecfe 100644 --- a/tests/test_evaluation/test_top_down_eval.py +++ b/tests/test_evaluation/test_top_down_eval.py @@ -41,10 +41,10 @@ def test_keypoints_from_heatmaps(): with pytest.raises(AssertionError): # kernel should > 0 _ = keypoints_from_heatmaps( - heatmaps, center, scale, unbiased=True, kernel=0) + heatmaps, center, scale, post_process='unbiased', kernel=0) preds, maxvals = keypoints_from_heatmaps( - heatmaps, center, scale, unbiased=True) + heatmaps, center, scale, post_process='unbiased') assert_array_almost_equal(preds, np.array([[[126, 126]]]), decimal=4) assert_array_almost_equal(maxvals, np.array([[[2]]]), decimal=4) assert isinstance(preds, np.ndarray) diff --git a/tests/test_external_model/test_smpl.py b/tests/test_external/test_smpl.py similarity index 78% rename from tests/test_external_model/test_smpl.py rename to tests/test_external/test_smpl.py index 2c8f385b77..3cd4a55c75 100644 --- a/tests/test_external_model/test_smpl.py +++ b/tests/test_external/test_smpl.py @@ -1,6 +1,9 @@ +import os.path as osp +import tempfile + import numpy as np import torch -from tests.test_model.test_mesh_forward import generate_smpl_weight_file +from tests.utils.mesh_utils import generate_smpl_weight_file from mmpose.models.utils import SMPL @@ -8,14 +11,18 @@ def test_smpl(): """Test smpl model.""" - # generate weight file for SMPL model. - generate_smpl_weight_file('tests/data/smpl') - # build smpl model - smpl_cfg = dict( - smpl_path='tests/data/smpl', - joints_regressor='tests/data/smpl/test_joint_regressor.npy') - smpl = SMPL(**smpl_cfg) + smpl = None + with tempfile.TemporaryDirectory() as tmpdir: + # generate weight file for SMPL model. + generate_smpl_weight_file(tmpdir) + + smpl_cfg = dict( + smpl_path=tmpdir, + joints_regressor=osp.join(tmpdir, 'test_joint_regressor.npy')) + smpl = SMPL(**smpl_cfg) + + assert smpl is not None, 'Fail to build SMPL model' # test get face function faces = smpl.get_faces() diff --git a/tests/test_loss/test_bottom_up_losses.py b/tests/test_losses/test_bottom_up_losses.py similarity index 100% rename from tests/test_loss/test_bottom_up_losses.py rename to tests/test_losses/test_bottom_up_losses.py diff --git a/tests/test_loss/test_classification_loss.py b/tests/test_losses/test_classification_loss.py similarity index 100% rename from tests/test_loss/test_classification_loss.py rename to tests/test_losses/test_classification_loss.py diff --git a/tests/test_loss/test_mesh_losses.py b/tests/test_losses/test_mesh_losses.py similarity index 100% rename from tests/test_loss/test_mesh_losses.py rename to tests/test_losses/test_mesh_losses.py diff --git a/tests/test_loss/test_regression_losses.py b/tests/test_losses/test_regression_losses.py similarity index 100% rename from tests/test_loss/test_regression_losses.py rename to tests/test_losses/test_regression_losses.py diff --git a/tests/test_loss/test_top_down_losses.py b/tests/test_losses/test_top_down_losses.py similarity index 100% rename from tests/test_loss/test_top_down_losses.py rename to tests/test_losses/test_top_down_losses.py diff --git a/tests/test_model/test_bottom_up_forward.py b/tests/test_models/test_bottom_up_forward.py similarity index 100% rename from tests/test_model/test_bottom_up_forward.py rename to tests/test_models/test_bottom_up_forward.py diff --git a/tests/test_model/test_bottom_up_head.py b/tests/test_models/test_bottom_up_head.py similarity index 100% rename from tests/test_model/test_bottom_up_head.py rename to tests/test_models/test_bottom_up_head.py diff --git a/tests/test_model/test_interhand_3d_forward.py b/tests/test_models/test_interhand_3d_forward.py similarity index 100% rename from tests/test_model/test_interhand_3d_forward.py rename to tests/test_models/test_interhand_3d_forward.py diff --git a/tests/test_model/test_interhand_3d_head.py b/tests/test_models/test_interhand_3d_head.py similarity index 100% rename from tests/test_model/test_interhand_3d_head.py rename to tests/test_models/test_interhand_3d_head.py diff --git a/tests/test_model/test_layer.py b/tests/test_models/test_layer.py similarity index 100% rename from tests/test_model/test_layer.py rename to tests/test_models/test_layer.py diff --git a/tests/test_model/test_mesh_forward.py b/tests/test_models/test_mesh_forward.py similarity index 75% rename from tests/test_model/test_mesh_forward.py rename to tests/test_models/test_mesh_forward.py index 4563bad9dd..ac03eb3497 100644 --- a/tests/test_model/test_mesh_forward.py +++ b/tests/test_models/test_mesh_forward.py @@ -1,48 +1,20 @@ -import os -import pickle +import os.path as osp +import tempfile import numpy as np import torch -from scipy.sparse import csc_matrix +from tests.utils.mesh_utils import generate_smpl_weight_file from mmpose.core.optimizer import build_optimizers from mmpose.models.detectors.mesh import ParametricMesh -def generate_smpl_weight_file(output_dir): - """Generate a SMPL model weight file to initialize SMPL model, and generate - a 3D joints regressor file.""" - - if not os.path.exists(output_dir): - os.makedirs(output_dir) - - joint_regressor_file = os.path.join(output_dir, 'test_joint_regressor.npy') - np.save(joint_regressor_file, np.zeros([24, 6890])) - - test_data = {} - test_data['f'] = np.zeros([1, 3], dtype=np.int32) - test_data['J_regressor'] = csc_matrix(np.zeros([24, 6890])) - test_data['kintree_table'] = np.zeros([2, 24], dtype=np.uint32) - test_data['J'] = np.zeros([24, 3]) - test_data['weights'] = np.zeros([6890, 24]) - test_data['posedirs'] = np.zeros([6890, 3, 207]) - test_data['v_template'] = np.zeros([6890, 3]) - test_data['shapedirs'] = np.zeros([6890, 3, 10]) - - with open(os.path.join(output_dir, 'SMPL_NEUTRAL.pkl'), 'wb') as out_file: - pickle.dump(test_data, out_file) - with open(os.path.join(output_dir, 'SMPL_MALE.pkl'), 'wb') as out_file: - pickle.dump(test_data, out_file) - with open(os.path.join(output_dir, 'SMPL_FEMALE.pkl'), 'wb') as out_file: - pickle.dump(test_data, out_file) - return - - def test_parametric_mesh_forward(): """Test parametric mesh forward.""" + tmpdir = tempfile.TemporaryDirectory() # generate weight file for SMPL model. - generate_smpl_weight_file('tests/data/smpl') + generate_smpl_weight_file(tmpdir.name) # Test ParametricMesh without discriminator model_cfg = dict( @@ -51,13 +23,13 @@ def test_parametric_mesh_forward(): mesh_head=dict( type='HMRMeshHead', in_channels=2048, - smpl_mean_params='tests/data/smpl/smpl_mean_params.npz', - ), + smpl_mean_params='tests/data/smpl/smpl_mean_params.npz'), disc=None, smpl=dict( type='SMPL', - smpl_path='tests/data/smpl', - joints_regressor='tests/data/smpl/test_joint_regressor.npy'), + smpl_path=tmpdir.name, + joints_regressor=osp.join(tmpdir.name, + 'test_joint_regressor.npy')), train_cfg=dict(disc_step=1), test_cfg=dict( flip_test=False, @@ -74,10 +46,11 @@ def test_parametric_mesh_forward(): focal_length=5000, img_res=256), loss_gan=None) - optimizers_config = dict(generator=dict(type='Adam', lr=0.0001)) detector = ParametricMesh(**model_cfg) detector.init_weights() + + optimizers_config = dict(generator=dict(type='Adam', lr=0.0001)) optims = build_optimizers(detector, optimizers_config) input_shape = (1, 3, 256, 256) @@ -129,6 +102,8 @@ def test_parametric_mesh_forward(): _ = detector.forward_dummy(imgs) + tmpdir.cleanup() + def _demo_mm_inputs(input_shape=(1, 3, 256, 256)): """Create a superset of inputs needed to run test or train batches. diff --git a/tests/test_model/test_mesh_head.py b/tests/test_models/test_mesh_head.py similarity index 100% rename from tests/test_model/test_mesh_head.py rename to tests/test_models/test_mesh_head.py diff --git a/tests/test_model/test_multitask_forward.py b/tests/test_models/test_multitask_forward.py similarity index 97% rename from tests/test_model/test_multitask_forward.py rename to tests/test_models/test_multitask_forward.py index 3d934f6a3c..61589668b7 100644 --- a/tests/test_model/test_multitask_forward.py +++ b/tests/test_models/test_multitask_forward.py @@ -1,7 +1,7 @@ import numpy as np import torch -from mmpose.models.detectors.multi_task import MultiTask +from mmpose.models.detectors import MultiTask def test_multitask_forward(): @@ -48,7 +48,7 @@ def test_multitask_forward(): backbone=dict(type='ResNet', depth=50), heads=[ dict( - type='TopDownSimpleHead', + type='TopdownHeatmapSimpleHead', in_channels=2048, out_channels=17, num_deconv_layers=3, diff --git a/tests/test_model/test_pose_lifter_forward.py b/tests/test_models/test_pose_lifter_forward.py similarity index 100% rename from tests/test_model/test_pose_lifter_forward.py rename to tests/test_models/test_pose_lifter_forward.py diff --git a/tests/test_model/test_temporal_regression_head.py b/tests/test_models/test_temporal_regression_head.py similarity index 100% rename from tests/test_model/test_temporal_regression_head.py rename to tests/test_models/test_temporal_regression_head.py diff --git a/tests/test_model/test_top_down_forward.py b/tests/test_models/test_top_down_forward.py similarity index 100% rename from tests/test_model/test_top_down_forward.py rename to tests/test_models/test_top_down_forward.py diff --git a/tests/test_model/test_top_down_head.py b/tests/test_models/test_top_down_head.py similarity index 100% rename from tests/test_model/test_top_down_head.py rename to tests/test_models/test_top_down_head.py diff --git a/tests/test_onnx.py b/tests/test_onnx.py index cb1b9e9438..fbb9a14800 100644 --- a/tests/test_onnx.py +++ b/tests/test_onnx.py @@ -5,7 +5,7 @@ from tools.deployment.pytorch2onnx import _convert_batchnorm, pytorch2onnx -class TestModel(nn.Module): +class DummyModel(nn.Module): def __init__(self): super().__init__() @@ -22,7 +22,7 @@ def forward_dummy(self, x): def test_onnx_exporting(): with tempfile.TemporaryDirectory() as tmpdir: out_file = osp.join(tmpdir, 'tmp.onnx') - model = TestModel() + model = DummyModel() model = _convert_batchnorm(model) # test exporting pytorch2onnx(model, (1, 1, 1, 1, 1), output_file=out_file) diff --git a/tests/utils/mesh_utils.py b/tests/utils/mesh_utils.py new file mode 100644 index 0000000000..2760ba26d9 --- /dev/null +++ b/tests/utils/mesh_utils.py @@ -0,0 +1,34 @@ +import os +import pickle + +import numpy as np +from scipy.sparse import csc_matrix + + +def generate_smpl_weight_file(output_dir): + """Generate a SMPL model weight file to initialize SMPL model, and generate + a 3D joints regressor file.""" + + if not os.path.exists(output_dir): + os.makedirs(output_dir) + + joint_regressor_file = os.path.join(output_dir, 'test_joint_regressor.npy') + np.save(joint_regressor_file, np.zeros([24, 6890])) + + test_data = {} + test_data['f'] = np.zeros([1, 3], dtype=np.int32) + test_data['J_regressor'] = csc_matrix(np.zeros([24, 6890])) + test_data['kintree_table'] = np.zeros([2, 24], dtype=np.uint32) + test_data['J'] = np.zeros([24, 3]) + test_data['weights'] = np.zeros([6890, 24]) + test_data['posedirs'] = np.zeros([6890, 3, 207]) + test_data['v_template'] = np.zeros([6890, 3]) + test_data['shapedirs'] = np.zeros([6890, 3, 10]) + + with open(os.path.join(output_dir, 'SMPL_NEUTRAL.pkl'), 'wb') as out_file: + pickle.dump(test_data, out_file) + with open(os.path.join(output_dir, 'SMPL_MALE.pkl'), 'wb') as out_file: + pickle.dump(test_data, out_file) + with open(os.path.join(output_dir, 'SMPL_FEMALE.pkl'), 'wb') as out_file: + pickle.dump(test_data, out_file) + return diff --git a/tools/deployment/__init__.py b/tools/deployment/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 From f39830bb7f5dd04cf0aae62148a39b1b5878a973 Mon Sep 17 00:00:00 2001 From: Qikai Li <87690686+liqikai9@users.noreply.github.com> Date: Wed, 25 Aug 2021 14:25:06 +0800 Subject: [PATCH 02/19] add benchmark regression test script with tmux (#849) * test the simple case using tmux to run multiple benchmark regression test tasks * modify and rename the config file and script * Delete config_list.yaml * modify the config and rename the filename * Delete test_benchmark_tmux.py * modify the script and rename the filename * Update setup.cfg * using mmcv.load to avoid introducing the extra dependency on yaml * fix some typo * refactor the config file and modify the script accordingly * modify the config and script * rename the config file --- .dev_scripts/benchmark_regression.py | 249 ++++++++++++++++++ .../benchmark_regression_cfg_tmpl.yaml | 215 +++++++++++++++ tools/test.py | 17 +- 3 files changed, 477 insertions(+), 4 deletions(-) create mode 100644 .dev_scripts/benchmark_regression.py create mode 100644 .dev_scripts/benchmark_regression_cfg_tmpl.yaml diff --git a/.dev_scripts/benchmark_regression.py b/.dev_scripts/benchmark_regression.py new file mode 100644 index 0000000000..f8604442b7 --- /dev/null +++ b/.dev_scripts/benchmark_regression.py @@ -0,0 +1,249 @@ +import argparse +import math +import os +import os.path as osp +import random +import socket +from datetime import datetime + +import mmcv + + +def is_port_available(port, host='127.0.0.1'): + """check whether a port is in use return True if the port is available else + False.""" + s = None + try: + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.settimeout(1) + s.connect((host, int(port))) + return True + except socket.error: + return False + finally: + if s: + s.close() + + +def parse_args(): + parser = argparse.ArgumentParser( + description='running benchmark regression with tmux') + parser.add_argument( + '--config', + help='test config file path', + default='./.dev_scripts/benchmark_regression_cfg_tmpl.yaml') + parser.add_argument( + '--priority', + nargs=2, + type=int, + help='largest priority for test and train tasks respectively', + default=[3, 3]) + + # runtime setting parameters + parser.add_argument( + '--root-work-dir', help='the root working directory to store logs') + parser.add_argument( + '--session-name', '-s', help='the tmux session name', default='test') + parser.add_argument( + '--panes-per-window', + type=int, + help='the maximum number of panes in each tmux window', + default=12) + parser.add_argument( + '--env', + help='the conda environment used to run the tasks', + default='pt1.6') + parser.add_argument( + '--partition', help='the partition name', default='mm_human') + parser.add_argument('--gpus', help='the total number of GPUs', default=8) + parser.add_argument( + '--gpus-per-node', + default=8, + help='the number of GPUs used per computing node', + choices=[1, 2, 3, 4, 5, 6, 7, 8]) + parser.add_argument( + '--cpus-per-task', default=5, help='the number of CPUs used per task') + + args = parser.parse_args() + return args + + +def main(): + args = parse_args() + + if args.root_work_dir is None: + # get the current time stamp + now = datetime.now() + ts = now.strftime('%Y_%m_%d_%H_%M') + args.root_work_dir = f'work_dirs/benchmark_regression_{ts}' + mmcv.mkdir_or_exist(osp.abspath(args.root_work_dir)) + + cfg = mmcv.load(args.config) + + # priority for test and train tasks respectively + prio_test, prio_train = args.priority + prio = max(prio_test, prio_train) + 1 + + # number of benchmark regression tasks + num_task = 0 + for i in range(prio): + if i <= prio_test: + num_task += len(cfg['model_list'][f'P{i}']) + if i <= prio_train: + num_task += len(cfg['model_list'][f'P{i}']) + + # number of windows need to be created + num_win = math.ceil(num_task / args.panes_per_window) + + # create a new tmux session + os.system(f'tmux new -s {args.session_name} -d') + + # tmux select-window -t 0 + os.system('tmux select-window -t 0') + + num_task_tmp = num_task + # create new windows and panes + for i in range(num_win): + # tmux select-window -t 0 + os.system('tmux select-window -t 0') + # tmux new-window -n win_1 + os.system(f'tmux new-window -n win_{i+1}') + + # decide how many panes will be created in current window + if num_task_tmp >= args.panes_per_window: + num_cur_win_task = args.panes_per_window + num_task_tmp -= args.panes_per_window + else: + num_cur_win_task = num_task_tmp + + # split each window into different panes + for j in range(num_cur_win_task - 1): + ratio = int(100 - 100 / (num_cur_win_task - j)) + os.system(f'tmux split-window -h -p {ratio}') + os.system('tmux select-layout tiled') + + # the initial number of task + cur_task = 1 + + # get the hostname + hostname = socket.gethostname() + print('hostname: ', hostname) + # get the host ip + ip = socket.gethostbyname(hostname) + print('ip: ', ip) + + # initialize a starting port + cur_port = 29500 + + for i in range(prio): + models = cfg['model_list'][f'P{i}'] + + # modes = ['test','train'] + modes = [] + if i <= prio_test: + modes.append('test') + if i <= prio_train: + modes.append('train') + + for model in models: + cur_config = model['config'] + cur_checkpoint = model['checkpoint'] + + if 'task_name' in model.keys(): + task_name = model['task_name'] + else: + task_name = osp.splitext(osp.basename(cur_config))[0] + + for mode in modes: + # select the window and pane + cur_win = int(math.ceil(cur_task / args.panes_per_window)) + os.system('tmux select-window -t 0') + os.system(f'tmux select-window -t win_{cur_win}') + cur_pane = (cur_task - 1) % args.panes_per_window + os.system(f'tmux select-pane -t {cur_pane}') + + cmd = f'conda activate {args.env}' + os.system(f'tmux send-keys "{cmd}" "C-m"') + cmd = f'echo executing task: {cur_task}' + os.system(f'tmux send-keys "{cmd}" "C-m"') + + cur_partition = model[mode][ + 'partition'] if 'partition' in model[mode].keys( + ) else args.partition + cur_gpus = model[mode]['gpus'] if 'gpus' in model[mode].keys( + ) else args.gpus + cur_gpus_per_node = model[mode][ + 'gpus_per_node'] if 'gpus_per_node' in model[mode].keys( + ) else args.gpus_per_node + cur_cpus_per_task = model[mode][ + 'cpus_per_task'] if 'cpus_per_task' in model[mode].keys( + ) else args.cpus_per_task + + cur_task_name = mode + '_' + task_name + cur_work_dir = osp.join(args.root_work_dir, cur_task_name) + + if mode == 'test': + # deal with extra python arguments + py_cmd = f' --work-dir {cur_work_dir} ' + if 'py_args' in model[mode].keys(): + keys = list(model[mode]['py_args'].keys()) + values = list(model[mode]['py_args'].values()) + + for k in range(len(keys)): + if values[k] is None: + if keys[k] in ['fuse_conv_bn', 'gpu_collect']: + py_cmd += f' --{keys[k]} ' + else: + py_cmd += f' --{keys[k]} {values[k]} ' + cmd = f'MASTER_PORT={cur_port} GPUS={cur_gpus} ' + \ + f'GPUS_PER_NODE={cur_gpus_per_node} ' + \ + f'CPUS_PER_TASK={cur_cpus_per_task} ' + \ + f'./tools/slurm_test.sh {cur_partition} ' + \ + f'{cur_task_name} ' + \ + f'{cur_config} {cur_checkpoint} ' + \ + f'{py_cmd}' + + os.system(f'tmux send-keys "{cmd}" "C-m"') + + else: + py_cmd = ' ' + # deal with extra python arguments + if 'py_args' in model[mode].keys(): + keys = list(model[mode]['py_args'].keys()) + values = list(model[mode]['py_args'].values()) + + for k in range(len(keys)): + if values[k] is None: + if keys[k] in [ + 'no-validate', 'deterministic', + 'autoscale-lr' + ]: + py_cmd += f' --{keys[k]} ' + else: + py_cmd += f' --{keys[k]} {values[k]} ' + cmd = f'MASTER_PORT={cur_port} GPUS={cur_gpus} ' + \ + f'GPUS_PER_NODE={cur_gpus_per_node} ' + \ + f'CPUS_PER_TASK={cur_cpus_per_task} ' + \ + f'./tools/slurm_train.sh {cur_partition} ' + \ + f'{cur_task_name} ' + \ + f'{cur_config} {cur_work_dir} ' + \ + f'{py_cmd}' + os.system(f'tmux send-keys "{cmd}" "C-m"') + + cur_port += 1 + # if the port is used, use a random number for port + while not is_port_available(cur_port, ip): + cur_port = random.randint(29000, 39000) + print(f'port used in task {cur_task} is: {cur_port}') + cur_task += 1 + + # close the base window + os.system('tmux select-window -t 0') + cmd = 'tmux kill-window -t 0' + os.system(f'tmux send-keys -t {args.session_name} "{cmd}" "C-m"') + + print('All tasks submitted!') + + +if __name__ == '__main__': + main() diff --git a/.dev_scripts/benchmark_regression_cfg_tmpl.yaml b/.dev_scripts/benchmark_regression_cfg_tmpl.yaml new file mode 100644 index 0000000000..bfbe9e1aa3 --- /dev/null +++ b/.dev_scripts/benchmark_regression_cfg_tmpl.yaml @@ -0,0 +1,215 @@ +model_list: + P0: # priority of the models, P0: core, P1: important, P2: less important, P3: least important + - config: configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192.py # path to the config file + checkpoint: https://download.openmmlab.com/mmpose/top_down/resnet/res50_coco_256x192-ec54d7f3_20200709.pth # path or url to the config file + task_name: res50_coco_256x192 # the job name in slurm will be specified according to this field and the mode. If not specified, use the basename of the config file + + # each model has two modes currently, e.g. 'test' and 'train' + test: # benchmark the trained model with given checkpoint file on the test dataset + gpus: 8 # number of GPUs needed according to the specific task + gpus_per_node: 8 # number of GPUs used each computing node + cpus_per_task: 5 # number of cpus per task + partition: openmmlab # partition name + + py_args: # additional arguments to run the script tools/test.py + eval: mAP # evaluation metric, which depends on the dataset, e.g., "mAP" for MSCOCO + fuse-conv-bn: + gpu_collect: + + train: # benchmark the accuracy of the model trained from scratch + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + + py_args: # additional arguments to run the script tools/train.py + resume-from: # checkpoint file to resume from + # override some settings in the used config, the key-value pair + # in xxx=yyy format, will be merged into config file. For example, + # '--cfg-options model.backbone.depth=18 model.backbone.with_cp=True' + cfg-options: + workflow=\"[(train,1),(val,1)]\" + model.backbone.depth=18 + model.backbone.with_cp=True + lr_config.warmup_ratio=0.01 + no-validate: + deterministic: + autoscale-lr: + + - config: configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192.py + checkpoint: https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_coco_256x192-c78dce93_20200708.pth + task_name: hrnet_w32_coco_256x192 + + test: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + py_args: + eval: mAP + fuse-conv-bn: + + train: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + + py_args: + resume-from: + cfg-options: + workflow=\"[(train,1),(val,1)]\" + lr_config.warmup_ratio=0.01 + deterministic: + autoscale-lr: + + P1: + - config: configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_dark.py + checkpoint: https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_coco_256x192_dark-07f147eb_20200812.pth + # task_name: hrnet_w32_coco_256x192_dark # test the task name field + + test: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + py_args: + eval: mAP + fuse-conv-bn: + + train: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + + py_args: + resume-from: + cfg-options: + workflow=\"[(train,1),(val,1)]\" + autoscale-lr: + + - config: configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_256x192.py + checkpoint: https://download.openmmlab.com/mmpose/top_down/mobilenetv2/mobilenetv2_coco_256x192-d1e58e7b_20200727.pth + task_name: mobilenetv2_coco_256x192 + + test: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + py_args: + eval: mAP + fuse-conv-bn: + + train: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + + py_args: + resume-from: + cfg-options: + workflow=\"[(train,1),(val,1)]\" + deterministic: + + P2: + - config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py + checkpoint: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512-bcb8c247_20200816.pth + task_name: hrnet_w32_coco_512x512 + + test: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + py_args: + fuse-conv-bn: + + train: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + + py_args: + cfg-options: + workflow=\"[(train,1),(val,1)]\" + autoscale-lr: + + + - config: configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256.py + checkpoint: https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_mpii_256x256-6c4f923f_20200812.pth + task_name: hrnet_w32_mpii_256x256 + + test: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + py_args: + fuse-conv-bn: + + train: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + + py_args: + resume-from: + cfg-options: + workflow=\"[(train,1),(val,1)]\" + deterministic: + autoscale-lr: + + P3: + - config: configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/litehrnet_30_coco_256x192.py + checkpoint: https://download.openmmlab.com/mmpose/top_down/litehrnet/litehrnet30_coco_256x192-4176555b_20210626.pth + task_name: litehrnet_30_coco_256x192 + + test: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + py_args: + eval: mAP + fuse-conv-bn: + + train: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + + py_args: + cfg-options: + workflow=\"[(train,1),(val,1)]\" + autoscale-lr: + + - config: /configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/vipnas_res50_coco_256x192.py + checkpoint: https://download.openmmlab.com/mmpose/top_down/vipnas/vipnas_res50_coco_256x192-cc43b466_20210624.pth + task_name: vipnas_res50_coco_256x192 + + test: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + py_args: + eval: mAP + fuse-conv-bn: + + train: + gpus: 8 + gpus_per_node: 8 + cpus_per_task: 5 + partition: openmmlab + + py_args: + cfg-options: + workflow=\"[(train,1),(val,1)]\" + deterministic: + autoscale-lr: diff --git a/tools/test.py b/tools/test.py index 8bc7d5d122..02138f8758 100644 --- a/tools/test.py +++ b/tools/test.py @@ -27,6 +27,8 @@ def parse_args(): parser.add_argument('config', help='test config file path') parser.add_argument('checkpoint', help='checkpoint file') parser.add_argument('--out', help='output result file') + parser.add_argument( + '--work-dir', help='the dir to save evaluation results') parser.add_argument( '--fuse-conv-bn', action='store_true', @@ -88,9 +90,16 @@ def main(): cfg.model.pretrained = None cfg.data.test.test_mode = True - args.work_dir = osp.join('./work_dirs', - osp.splitext(osp.basename(args.config))[0]) - mmcv.mkdir_or_exist(osp.abspath(args.work_dir)) + # work_dir is determined in this priority: CLI > segment in file > filename + if args.work_dir is not None: + # update configs according to CLI args if args.work_dir is not None + cfg.work_dir = args.work_dir + elif cfg.get('work_dir', None) is None: + # use config filename as default work_dir if cfg.work_dir is None + cfg.work_dir = osp.join('./work_dirs', + osp.splitext(osp.basename(args.config))[0]) + + mmcv.mkdir_or_exist(osp.abspath(cfg.work_dir)) # init distributed env first, since logger depends on the dist info. if args.launcher == 'none': @@ -141,7 +150,7 @@ def main(): print(f'\nwriting results to {args.out}') mmcv.dump(outputs, args.out) - results = dataset.evaluate(outputs, args.work_dir, **eval_config) + results = dataset.evaluate(outputs, cfg.work_dir, **eval_config) for k, v in sorted(results.items()): print(f'{k}: {v}') From 7d9b249958d72ad6fb7963cd210369c68db52309 Mon Sep 17 00:00:00 2001 From: Zhiqiang Wang Date: Wed, 25 Aug 2021 19:49:40 +0800 Subject: [PATCH 03/19] Correct dataset preparation guide of WFLW (#873) --- docs/tasks/2d_face_keypoint.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/tasks/2d_face_keypoint.md b/docs/tasks/2d_face_keypoint.md index a734cc9504..181e89ef6d 100644 --- a/docs/tasks/2d_face_keypoint.md +++ b/docs/tasks/2d_face_keypoint.md @@ -121,9 +121,7 @@ mmpose | |── face_landmarks_wflw_test_blur.json | |── face_landmarks_wflw_test_occlusion.json | |── face_landmarks_wflw_test_expression.json - | |── face_landmarks_wflw_test_occlusion.json | |── face_landmarks_wflw_test_largepose.json - | |── face_landmarks_wflw_test_occlusion.json | |── face_landmarks_wflw_test_illumination.json | |── face_landmarks_wflw_test_makeup.json | From 1c135f1d7e1871f0cb2151c8d49ba0e2489219b0 Mon Sep 17 00:00:00 2001 From: Yining Li Date: Fri, 27 Aug 2021 10:21:03 +0800 Subject: [PATCH 04/19] add pr template (#875) --- .github/pull_request_template.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..2fae00e03f --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,32 @@ +Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. + +## Motivation + +Please describe the motivation of this PR and the goal you want to achieve through this PR. + +## Modification + +Please briefly describe what modification is made in this PR. + +## BC-breaking (Optional) + +Does the modification introduce changes that break the backward-compatibility of the downstream repositories? +If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR. + +## Use cases (Optional) + +If this PR introduces a new feature, it is better to list some use cases here, and update the documentation. + +## Checklist + +**Before PR**: + +- [ ] I have read and followed the workflow indicated in the [CONTRIBUTING.md](https://github.com/open-mmlab/mmpose/blob/master/.github/CONTRIBUTING.md) to create this PR. +- [ ] Pre-commit or linting tools indicated in [CONTRIBUTING.md](https://github.com/open-mmlab/mmpose/blob/master/.github/CONTRIBUTING.md) are used to fix the potential lint issues. +- [ ] Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests. +- [ ] New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness. +- [ ] The documentation has been modified accordingly, including docstring or example tutorials. + +**After PR**: + +- [ ] CLA has been signed and all committers have signed the CLA in this PR. From 91d2b90668d7210290df040e334850cce99e58c6 Mon Sep 17 00:00:00 2001 From: Yining Li Date: Fri, 27 Aug 2021 10:21:13 +0800 Subject: [PATCH 05/19] add CITATION.cff and update setup.py (#876) --- CITATION.cff | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000000..62b75a422a --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,8 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +authors: + - name: "MMPose Contributors" +title: "OpenMMLab Pose Estimation Toolbox and Benchmark" +date-released: 2020-08-31 +url: "https://github.com/open-mmlab/mmpose" +license: Apache-2.0 diff --git a/setup.py b/setup.py index f2f9f2ae19..95568135fd 100644 --- a/setup.py +++ b/setup.py @@ -158,7 +158,7 @@ def add_mim_extension(): name='mmpose', version=get_version(), description='OpenMMLab Pose Estimation Toolbox and Benchmark.', - maintainer='MMPose Authors', + maintainer='MMPose Contributors', maintainer_email='openmmlab@gmail.com', long_description=readme(), long_description_content_type='text/markdown', From c85159da60f25bc6bbab763c37c2be1e49e4052f Mon Sep 17 00:00:00 2001 From: Yining Li Date: Fri, 27 Aug 2021 10:42:52 +0800 Subject: [PATCH 06/19] Add copyright header and pre-commit hook (#872) * Add pre-commit hook to automatically add copyright file header * update files with copyright header * Limit copyright checking in the first 2 lines of a file * Exclude configs in demo/ * set max-header-lines as 5 * rebase to master and add copyright to new files * move benchmark_regression into .dev_scripts/benchmark --- .../{ => benchmark}/benchmark_regression.py | 3 +- .../benchmark_regression_cfg_tmpl.yaml | 0 .dev_scripts/github/update_copyright.py | 100 ++++++++++++++++++ .../github}/update_model_index.py | 1 + .pre-commit-config.yaml | 9 +- demo/body3d_two_stage_img_demo.py | 1 + demo/body3d_two_stage_video_demo.py | 1 + demo/bottom_up_img_demo.py | 1 + demo/bottom_up_pose_tracking_demo.py | 1 + demo/bottom_up_video_demo.py | 1 + demo/face_img_demo.py | 1 + demo/face_video_demo.py | 1 + demo/interhand3d_img_demo.py | 1 + demo/mesh_img_demo.py | 1 + demo/top_down_img_demo.py | 1 + demo/top_down_img_demo_with_mmdet.py | 1 + .../top_down_pose_tracking_demo_with_mmdet.py | 1 + ...down_pose_tracking_demo_with_mmtracking.py | 1 + ..._down_video_demo_full_frame_without_det.py | 1 + demo/top_down_video_demo_with_mmdet.py | 1 + demo/webcam_demo.py | 1 + docs/collect.py | 1 + docs/conf.py | 1 + docs/merge_docs.sh | 1 + docs/stats.py | 1 + docs_zh-CN/collect.py | 1 + docs_zh-CN/conf.py | 1 + docs_zh-CN/merge_docs.sh | 1 + docs_zh-CN/stats.py | 1 + mmpose/__init__.py | 1 + mmpose/apis/__init__.py | 1 + mmpose/apis/inference.py | 1 + mmpose/apis/inference_3d.py | 1 + mmpose/apis/inference_tracking.py | 1 + mmpose/apis/test.py | 1 + mmpose/apis/train.py | 1 + mmpose/core/__init__.py | 1 + mmpose/core/camera/__init__.py | 1 + mmpose/core/camera/camera_base.py | 1 + mmpose/core/camera/single_camera.py | 1 + mmpose/core/distributed_wrapper.py | 1 + mmpose/core/evaluation/__init__.py | 1 + mmpose/core/evaluation/bottom_up_eval.py | 1 + mmpose/core/evaluation/eval_hooks.py | 1 + mmpose/core/evaluation/pose3d_eval.py | 1 + mmpose/core/evaluation/top_down_eval.py | 1 + mmpose/core/fp16/__init__.py | 1 + mmpose/core/fp16/decorators.py | 1 + mmpose/core/fp16/hooks.py | 1 + mmpose/core/fp16/utils.py | 1 + mmpose/core/optimizer/__init__.py | 1 + mmpose/core/optimizer/builder.py | 1 + mmpose/core/post_processing/__init__.py | 1 + mmpose/core/utils/__init__.py | 1 + mmpose/core/utils/dist_utils.py | 1 + mmpose/core/utils/regularizations.py | 1 + mmpose/core/visualization/__init__.py | 1 + mmpose/core/visualization/effects.py | 1 + mmpose/core/visualization/image.py | 1 + mmpose/datasets/__init__.py | 1 + mmpose/datasets/builder.py | 1 + mmpose/datasets/dataset_wrappers.py | 1 + mmpose/datasets/datasets/__init__.py | 1 + mmpose/datasets/datasets/animal/__init__.py | 1 + .../datasets/animal/animal_atrw_dataset.py | 1 + .../datasets/animal/animal_base_dataset.py | 1 + .../datasets/animal/animal_fly_dataset.py | 1 + .../datasets/animal/animal_horse10_dataset.py | 1 + .../datasets/animal/animal_locust_dataset.py | 1 + .../datasets/animal/animal_macaque_dataset.py | 1 + .../datasets/animal/animal_pose_dataset.py | 1 + .../datasets/animal/animal_zebra_dataset.py | 1 + mmpose/datasets/datasets/body3d/__init__.py | 1 + .../datasets/body3d/body3d_base_dataset.py | 1 + .../datasets/body3d/body3d_h36m_dataset.py | 1 + .../body3d/body3d_mpi_inf_3dhp_dataset.py | 1 + .../body3d/body3d_semi_supervision_dataset.py | 1 + .../datasets/datasets/bottom_up/__init__.py | 1 + .../datasets/bottom_up/bottom_up_aic.py | 1 + .../bottom_up/bottom_up_base_dataset.py | 1 + .../datasets/bottom_up/bottom_up_coco.py | 1 + .../bottom_up/bottom_up_coco_wholebody.py | 1 + .../datasets/bottom_up/bottom_up_crowdpose.py | 1 + .../datasets/bottom_up/bottom_up_mhp.py | 1 + mmpose/datasets/datasets/face/__init__.py | 1 + .../datasets/face/face_300w_dataset.py | 1 + .../datasets/face/face_aflw_dataset.py | 1 + .../datasets/face/face_base_dataset.py | 1 + .../datasets/face/face_cofw_dataset.py | 1 + .../datasets/face/face_wflw_dataset.py | 1 + mmpose/datasets/datasets/fashion/__init__.py | 1 + .../datasets/fashion/deepfashion_dataset.py | 1 + .../datasets/fashion/fashion_base_dataset.py | 1 + mmpose/datasets/datasets/hand/__init__.py | 1 + .../datasets/hand/freihand_dataset.py | 1 + .../datasets/hand/hand_base_dataset.py | 1 + .../datasets/hand/interhand2d_dataset.py | 1 + .../datasets/hand/interhand3d_dataset.py | 1 + .../datasets/hand/onehand10k_dataset.py | 1 + .../datasets/hand/panoptic_dataset.py | 1 + .../datasets/datasets/hand/rhd2d_dataset.py | 1 + mmpose/datasets/datasets/mesh/__init__.py | 1 + .../datasets/mesh/mesh_adv_dataset.py | 1 + .../datasets/mesh/mesh_base_dataset.py | 1 + .../datasets/mesh/mesh_h36m_dataset.py | 1 + .../datasets/mesh/mesh_mix_dataset.py | 1 + mmpose/datasets/datasets/mesh/mosh_dataset.py | 1 + mmpose/datasets/datasets/top_down/__init__.py | 1 + .../datasets/top_down/topdown_aic_dataset.py | 1 + .../datasets/top_down/topdown_base_dataset.py | 1 + .../datasets/top_down/topdown_coco_dataset.py | 1 + .../topdown_coco_wholebody_dataset.py | 1 + .../top_down/topdown_crowdpose_dataset.py | 1 + .../datasets/top_down/topdown_h36m_dataset.py | 1 + .../top_down/topdown_jhmdb_dataset.py | 1 + .../datasets/top_down/topdown_mhp_dataset.py | 1 + .../datasets/top_down/topdown_mpii_dataset.py | 1 + .../top_down/topdown_mpii_trb_dataset.py | 1 + .../top_down/topdown_ochuman_dataset.py | 1 + .../top_down/topdown_posetrack18_dataset.py | 1 + mmpose/datasets/pipelines/__init__.py | 1 + .../datasets/pipelines/bottom_up_transform.py | 1 + mmpose/datasets/pipelines/hand_transform.py | 1 + mmpose/datasets/pipelines/loading.py | 1 + mmpose/datasets/pipelines/mesh_transform.py | 1 + mmpose/datasets/pipelines/pose3d_transform.py | 1 + mmpose/datasets/pipelines/shared_transform.py | 1 + .../datasets/pipelines/top_down_transform.py | 1 + mmpose/datasets/registry.py | 1 + mmpose/datasets/samplers/__init__.py | 1 + .../datasets/samplers/distributed_sampler.py | 1 + mmpose/deprecated.py | 1 + mmpose/models/__init__.py | 1 + mmpose/models/backbones/__init__.py | 1 + mmpose/models/backbones/alexnet.py | 1 + mmpose/models/backbones/base_backbone.py | 1 + mmpose/models/backbones/cpm.py | 1 + mmpose/models/backbones/hourglass.py | 1 + mmpose/models/backbones/hrnet.py | 1 + mmpose/models/backbones/mobilenet_v2.py | 1 + mmpose/models/backbones/mobilenet_v3.py | 1 + mmpose/models/backbones/mspn.py | 1 + mmpose/models/backbones/regnet.py | 1 + mmpose/models/backbones/resnest.py | 1 + mmpose/models/backbones/resnet.py | 1 + mmpose/models/backbones/resnext.py | 1 + mmpose/models/backbones/rsn.py | 1 + mmpose/models/backbones/scnet.py | 1 + mmpose/models/backbones/seresnet.py | 1 + mmpose/models/backbones/seresnext.py | 1 + mmpose/models/backbones/shufflenet_v1.py | 1 + mmpose/models/backbones/shufflenet_v2.py | 1 + mmpose/models/backbones/tcn.py | 1 + mmpose/models/backbones/utils/__init__.py | 1 + .../models/backbones/utils/channel_shuffle.py | 1 + .../backbones/utils/inverted_residual.py | 1 + .../models/backbones/utils/make_divisible.py | 1 + mmpose/models/backbones/utils/se_layer.py | 1 + mmpose/models/backbones/utils/utils.py | 1 + mmpose/models/backbones/vgg.py | 1 + mmpose/models/backbones/vipnas_resnet.py | 1 + mmpose/models/builder.py | 1 + mmpose/models/detectors/__init__.py | 1 + .../models/detectors/associative_embedding.py | 1 + mmpose/models/detectors/base.py | 1 + mmpose/models/detectors/interhand_3d.py | 1 + mmpose/models/detectors/mesh.py | 1 + mmpose/models/detectors/multi_task.py | 1 + mmpose/models/detectors/pose_lifter.py | 1 + mmpose/models/detectors/top_down.py | 1 + mmpose/models/heads/__init__.py | 1 + .../models/heads/ae_higher_resolution_head.py | 1 + mmpose/models/heads/ae_simple_head.py | 1 + .../models/heads/deeppose_regression_head.py | 1 + mmpose/models/heads/hmr_head.py | 1 + mmpose/models/heads/interhand_3d_head.py | 1 + .../models/heads/temporal_regression_head.py | 1 + .../models/heads/topdown_heatmap_base_head.py | 1 + .../heads/topdown_heatmap_multi_stage_head.py | 1 + .../heads/topdown_heatmap_simple_head.py | 1 + .../heads/vipnas_heatmap_simple_head.py | 1 + mmpose/models/losses/__init__.py | 1 + mmpose/models/losses/classfication_loss.py | 1 + mmpose/models/losses/mesh_loss.py | 1 + mmpose/models/losses/mse_loss.py | 1 + mmpose/models/losses/regression_loss.py | 1 + mmpose/models/misc/__init__.py | 1 + mmpose/models/necks/__init__.py | 1 + mmpose/models/necks/gap_neck.py | 1 + mmpose/models/registry.py | 1 + mmpose/models/utils/__init__.py | 1 + mmpose/models/utils/geometry.py | 1 + mmpose/models/utils/ops.py | 1 + mmpose/models/utils/smpl.py | 1 + mmpose/utils/__init__.py | 1 + mmpose/utils/collect_env.py | 1 + mmpose/utils/hooks.py | 1 + mmpose/utils/logger.py | 1 + mmpose/utils/timer.py | 1 + tests/__init__.py | 1 + tests/test_apis/test_inference.py | 1 + tests/test_apis/test_inference_3d.py | 1 + tests/test_apis/test_inference_tracking.py | 1 + tests/test_backbones/test_alexnet.py | 1 + tests/test_backbones/test_backbones_utils.py | 1 + tests/test_backbones/test_cpm.py | 1 + tests/test_backbones/test_hourglass.py | 1 + tests/test_backbones/test_hrnet.py | 1 + tests/test_backbones/test_litehrnet.py | 1 + tests/test_backbones/test_mobilenet_v2.py | 1 + tests/test_backbones/test_mobilenet_v3.py | 1 + tests/test_backbones/test_mspn.py | 1 + tests/test_backbones/test_regnet.py | 1 + tests/test_backbones/test_resnest.py | 1 + tests/test_backbones/test_resnet.py | 1 + tests/test_backbones/test_resnext.py | 1 + tests/test_backbones/test_rsn.py | 1 + tests/test_backbones/test_scnet.py | 1 + tests/test_backbones/test_seresnet.py | 1 + tests/test_backbones/test_seresnext.py | 1 + tests/test_backbones/test_shufflenet_v1.py | 1 + tests/test_backbones/test_shufflenet_v2.py | 1 + tests/test_backbones/test_tcn.py | 1 + tests/test_backbones/test_vgg.py | 1 + tests/test_backbones/test_vipnas.py | 1 + .../test_eval_hook_compatibility.py | 1 + .../test_registry_compatibility.py | 1 + tests/test_compose.py | 1 + tests/test_config.py | 1 + tests/test_datasets/test_animal_dataset.py | 1 + tests/test_datasets/test_body3d_dataset.py | 1 + tests/test_datasets/test_bottom_up_dataset.py | 1 + tests/test_datasets/test_face_dataset.py | 1 + tests/test_datasets/test_fashion_dataset.py | 1 + tests/test_datasets/test_hand_dataset.py | 1 + tests/test_datasets/test_mesh_dataset.py | 1 + tests/test_datasets/test_top_down_dataset.py | 1 + tests/test_eval_hook.py | 1 + tests/test_evaluation/test_bottom_up_eval.py | 1 + tests/test_evaluation/test_mesh_eval.py | 1 + tests/test_evaluation/test_pose3d_eval.py | 1 + tests/test_evaluation/test_top_down_eval.py | 1 + tests/test_external/test_smpl.py | 1 + tests/test_losses/test_bottom_up_losses.py | 1 + tests/test_losses/test_classification_loss.py | 1 + tests/test_losses/test_mesh_losses.py | 1 + tests/test_losses/test_regression_losses.py | 1 + tests/test_losses/test_top_down_losses.py | 1 + tests/test_models/test_bottom_up_forward.py | 1 + tests/test_models/test_bottom_up_head.py | 1 + .../test_models/test_interhand_3d_forward.py | 1 + tests/test_models/test_interhand_3d_head.py | 1 + tests/test_models/test_layer.py | 1 + tests/test_models/test_mesh_forward.py | 1 + tests/test_models/test_mesh_head.py | 1 + tests/test_models/test_multitask_forward.py | 1 + tests/test_models/test_pose_lifter_forward.py | 1 + .../test_temporal_regression_head.py | 1 + tests/test_models/test_top_down_forward.py | 1 + tests/test_models/test_top_down_head.py | 1 + tests/test_necks/test_gap_neck.py | 1 + tests/test_onnx.py | 1 + tests/test_optimizer.py | 1 + .../test_bottom_up_pipelines.py | 1 + tests/test_pipelines/test_hand_transform.py | 1 + tests/test_pipelines/test_mesh_pipelines.py | 1 + tests/test_pipelines/test_pose3d_transform.py | 1 + tests/test_pipelines/test_shared_transform.py | 1 + .../test_pipelines/test_top_down_pipelines.py | 1 + tests/test_post_processing.py | 1 + tests/test_post_processing/test_filter.py | 1 + tests/test_post_processing/test_group.py | 1 + tests/test_post_processing/test_nms.py | 1 + tests/test_regularization.py | 1 + tests/test_utils.py | 1 + tests/test_version.py | 1 + tests/test_visualization.py | 1 + tests/utils/mesh_utils.py | 1 + tools/analysis/analyze_logs.py | 1 + tools/analysis/benchmark_inference.py | 1 + tools/analysis/benchmark_processing.py | 1 + tools/analysis/get_flops.py | 1 + tools/analysis/print_config.py | 1 + tools/dataset/h36m_to_coco.py | 1 + tools/dataset/mat2json.py | 1 + tools/dataset/parse_animalpose_dataset.py | 1 + tools/dataset/parse_cofw_dataset.py | 1 + tools/dataset/parse_deepposekit_dataset.py | 1 + tools/dataset/parse_macaquepose_dataset.py | 1 + tools/dataset/preprocess_mpi_inf_3dhp.py | 1 + tools/deployment/pytorch2onnx.py | 1 + tools/dist_test.sh | 1 + tools/dist_train.sh | 1 + tools/misc/publish_model.py | 1 + tools/slurm_test.sh | 1 + tools/slurm_train.sh | 1 + tools/test.py | 1 + tools/train.py | 1 + 298 files changed, 404 insertions(+), 2 deletions(-) rename .dev_scripts/{ => benchmark}/benchmark_regression.py (98%) rename .dev_scripts/{ => benchmark}/benchmark_regression_cfg_tmpl.yaml (100%) create mode 100755 .dev_scripts/github/update_copyright.py rename {tools/misc => .dev_scripts/github}/update_model_index.py (99%) diff --git a/.dev_scripts/benchmark_regression.py b/.dev_scripts/benchmark/benchmark_regression.py similarity index 98% rename from .dev_scripts/benchmark_regression.py rename to .dev_scripts/benchmark/benchmark_regression.py index f8604442b7..c21856f9b4 100644 --- a/.dev_scripts/benchmark_regression.py +++ b/.dev_scripts/benchmark/benchmark_regression.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse import math import os @@ -31,7 +32,7 @@ def parse_args(): parser.add_argument( '--config', help='test config file path', - default='./.dev_scripts/benchmark_regression_cfg_tmpl.yaml') + default='./.dev_scripts/benchmark/benchmark_regression_cfg.yaml') parser.add_argument( '--priority', nargs=2, diff --git a/.dev_scripts/benchmark_regression_cfg_tmpl.yaml b/.dev_scripts/benchmark/benchmark_regression_cfg_tmpl.yaml similarity index 100% rename from .dev_scripts/benchmark_regression_cfg_tmpl.yaml rename to .dev_scripts/benchmark/benchmark_regression_cfg_tmpl.yaml diff --git a/.dev_scripts/github/update_copyright.py b/.dev_scripts/github/update_copyright.py new file mode 100755 index 0000000000..7432019859 --- /dev/null +++ b/.dev_scripts/github/update_copyright.py @@ -0,0 +1,100 @@ +#!/usr/bin/env python +# Copyright (c) OpenMMLab. All rights reserved. + +import argparse +import os +import os.path as osp +import re +import sys + +HEADER = 'Copyright (c) OpenMMLab. All rights reserved.\n' +HEADER_KEYWORDS = {'Copyright', 'License'} + + +def contains_header(lines, comment_symbol, max_header_lines): + for line in lines[:max_header_lines]: + if line.startswith('#!'): + # skip shebang line + continue + elif re.match(f'{comment_symbol}.*({"|".join(HEADER_KEYWORDS)})', + line): + return True + + return False + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument( + 'files', + type=str, + nargs='*', + help='Files to add copyright header. If an empty list is given, ' + 'search target files according to "--src", "--exclude" and ' + '"--suffixes"') + parser.add_argument( + '--src', type=str, default=None, help='Root path to search files.') + parser.add_argument( + '--exclude', type=str, default=None, help='Path to exclude in search.') + parser.add_argument( + '--suffixes', + type=str, + nargs='+', + default=['.py', '.c', '.cpp', '.cu', '.sh'], + help='Only files with one of the given suffixes will be searched.') + parser.add_argument( + '--max-header-lines', + type=int, + default=5, + help='Only checkout copyright information in the first several lines ' + 'of a file.') + + args = parser.parse_args() + return args + + +def main(): + args = parse_args() + + file_list = [] + if args.files: + file_list = args.files + else: + assert args.src is not None + for root, _, files in os.walk(args.src): + if args.exclude and osp.realpath(root).startswith( + osp.realpath(args.exclude)): + continue + + for file in files: + if osp.splitext(file)[1] in args.suffixes: + file_list.append(osp.join(root, file)) + + modified = False + for file in file_list: + suffix = osp.splitext(file)[1] + if suffix in {'.py', '.sh'}: + comment_symbol = '# ' + elif suffix in {'.c', '.cpp', '.cu'}: + comment_symbol = '// ' + else: + raise ValueError(f'Comment symbol of files with suffix {suffix} ' + 'is unspecified.') + + with open(file, 'r') as f: + lines = f.readlines() + if not contains_header(lines, comment_symbol, args.max_header_lines): + if lines and lines[0].startswith('#!'): + lines.insert(1, comment_symbol + HEADER) + else: + lines.insert(0, comment_symbol + HEADER) + + with open(file, 'w') as f: + f.writelines(lines) + modified = True + + return int(modified) + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/tools/misc/update_model_index.py b/.dev_scripts/github/update_model_index.py similarity index 99% rename from tools/misc/update_model_index.py rename to .dev_scripts/github/update_model_index.py index 8083ea7fd3..e9556e0e91 100755 --- a/tools/misc/update_model_index.py +++ b/.dev_scripts/github/update_model_index.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# Copyright (c) OpenMMLab. All rights reserved. # This tool is used to update model-index.yml which is required by MIM, and # will be automatically called as a pre-commit hook. The updating will be diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6fc12fb22f..b669ee87e6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,8 +44,15 @@ repos: - id: update-model-index name: update-model-index description: Collect model information and update model-index.yml - entry: tools/misc/update_model_index.py + entry: .dev_scripts/github/update_model_index.py additional_dependencies: [mmcv] language: python files: ^configs/.*\.md$ require_serial: true + - id: update-copyright + name: update-copyright + description: Add OpenMMLab copyright header to files + entry: .dev_scripts/github/update_copyright.py + language: python + files: ^(demo|docs|docs_zh-CN|mmpose|tests|tools|\.dev_scripts)/.*\.(py|c|cpp|cu|sh)$ + exclude: ^demo/mm(detection|tracking)_cfg/.*$ diff --git a/demo/body3d_two_stage_img_demo.py b/demo/body3d_two_stage_img_demo.py index 730622c3f8..a035bf819c 100644 --- a/demo/body3d_two_stage_img_demo.py +++ b/demo/body3d_two_stage_img_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import os.path as osp from argparse import ArgumentParser diff --git a/demo/body3d_two_stage_video_demo.py b/demo/body3d_two_stage_video_demo.py index 781ebbf38a..5f47f62aeb 100644 --- a/demo/body3d_two_stage_video_demo.py +++ b/demo/body3d_two_stage_video_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import os import os.path as osp diff --git a/demo/bottom_up_img_demo.py b/demo/bottom_up_img_demo.py index 3954ff2229..195ade4180 100644 --- a/demo/bottom_up_img_demo.py +++ b/demo/bottom_up_img_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/bottom_up_pose_tracking_demo.py b/demo/bottom_up_pose_tracking_demo.py index a3c318b828..f9cdfb98bd 100644 --- a/demo/bottom_up_pose_tracking_demo.py +++ b/demo/bottom_up_pose_tracking_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/bottom_up_video_demo.py b/demo/bottom_up_video_demo.py index f963d1a546..f877d2246a 100644 --- a/demo/bottom_up_video_demo.py +++ b/demo/bottom_up_video_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/face_img_demo.py b/demo/face_img_demo.py index 14a5acb40e..ff22a83ee6 100644 --- a/demo/face_img_demo.py +++ b/demo/face_img_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/face_video_demo.py b/demo/face_video_demo.py index 1173f3d8c3..543280196f 100644 --- a/demo/face_video_demo.py +++ b/demo/face_video_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/interhand3d_img_demo.py b/demo/interhand3d_img_demo.py index 3069e33123..759dc07019 100644 --- a/demo/interhand3d_img_demo.py +++ b/demo/interhand3d_img_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import os.path as osp from argparse import ArgumentParser diff --git a/demo/mesh_img_demo.py b/demo/mesh_img_demo.py index 130e29e921..127ebad3b7 100644 --- a/demo/mesh_img_demo.py +++ b/demo/mesh_img_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/top_down_img_demo.py b/demo/top_down_img_demo.py index 2fc608a170..3aa87d96a2 100644 --- a/demo/top_down_img_demo.py +++ b/demo/top_down_img_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/top_down_img_demo_with_mmdet.py b/demo/top_down_img_demo_with_mmdet.py index c35f76a084..0ff74f8abf 100644 --- a/demo/top_down_img_demo_with_mmdet.py +++ b/demo/top_down_img_demo_with_mmdet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/top_down_pose_tracking_demo_with_mmdet.py b/demo/top_down_pose_tracking_demo_with_mmdet.py index aff29f977a..d2ff1c48a3 100644 --- a/demo/top_down_pose_tracking_demo_with_mmdet.py +++ b/demo/top_down_pose_tracking_demo_with_mmdet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/top_down_pose_tracking_demo_with_mmtracking.py b/demo/top_down_pose_tracking_demo_with_mmtracking.py index d76efed736..c400f94f69 100644 --- a/demo/top_down_pose_tracking_demo_with_mmtracking.py +++ b/demo/top_down_pose_tracking_demo_with_mmtracking.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/top_down_video_demo_full_frame_without_det.py b/demo/top_down_video_demo_full_frame_without_det.py index 7e3a5c804c..ec60499e95 100644 --- a/demo/top_down_video_demo_full_frame_without_det.py +++ b/demo/top_down_video_demo_full_frame_without_det.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/top_down_video_demo_with_mmdet.py b/demo/top_down_video_demo_with_mmdet.py index c1d64d579c..ac1949b140 100644 --- a/demo/top_down_video_demo_with_mmdet.py +++ b/demo/top_down_video_demo_with_mmdet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from argparse import ArgumentParser diff --git a/demo/webcam_demo.py b/demo/webcam_demo.py index e10c43a116..8de6e3d45c 100644 --- a/demo/webcam_demo.py +++ b/demo/webcam_demo.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse import time from collections import deque diff --git a/docs/collect.py b/docs/collect.py index bed4771910..cc3e4d5581 100755 --- a/docs/collect.py +++ b/docs/collect.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# Copyright (c) OpenMMLab. All rights reserved. import os import re from glob import glob diff --git a/docs/conf.py b/docs/conf.py index 971b84b780..91f12a1cd8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full diff --git a/docs/merge_docs.sh b/docs/merge_docs.sh index 03b2b7b20c..df4eaf68cb 100755 --- a/docs/merge_docs.sh +++ b/docs/merge_docs.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) OpenMMLab. All rights reserved. sed -i '$a\\n' ../demo/docs/*_demo.md cat ../demo/docs/*_demo.md | sed "s/#/#&/" | sed "s/md###t/html#t/g" | sed '1i\# Demo' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmpose/tree/master/=g' >demo.md diff --git a/docs/stats.py b/docs/stats.py index 83965c495e..10ce3ab40f 100755 --- a/docs/stats.py +++ b/docs/stats.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# Copyright (c) OpenMMLab. All rights reserved. import functools as func import glob import re diff --git a/docs_zh-CN/collect.py b/docs_zh-CN/collect.py index bed4771910..cc3e4d5581 100755 --- a/docs_zh-CN/collect.py +++ b/docs_zh-CN/collect.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# Copyright (c) OpenMMLab. All rights reserved. import os import re from glob import glob diff --git a/docs_zh-CN/conf.py b/docs_zh-CN/conf.py index c29635c69e..3a5afc9b32 100644 --- a/docs_zh-CN/conf.py +++ b/docs_zh-CN/conf.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full diff --git a/docs_zh-CN/merge_docs.sh b/docs_zh-CN/merge_docs.sh index 4c5ec15292..d1596ec99b 100755 --- a/docs_zh-CN/merge_docs.sh +++ b/docs_zh-CN/merge_docs.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) OpenMMLab. All rights reserved. sed -i '$a\\n' ../demo/docs/*_demo.md cat ../demo/docs/*_demo.md | sed "s/#/#&/" | sed "s/md###t/html#t/g" | sed '1i\# 示例' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmpose/tree/master/=g' >demo.md diff --git a/docs_zh-CN/stats.py b/docs_zh-CN/stats.py index d585672eb5..d947ab10ba 100755 --- a/docs_zh-CN/stats.py +++ b/docs_zh-CN/stats.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# Copyright (c) OpenMMLab. All rights reserved. import functools as func import glob import re diff --git a/mmpose/__init__.py b/mmpose/__init__.py index efe94e8c03..8f891e22b4 100644 --- a/mmpose/__init__.py +++ b/mmpose/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import mmcv from mmcv import digit_version, parse_version_info diff --git a/mmpose/apis/__init__.py b/mmpose/apis/__init__.py index d6e3f1220b..bef566c0de 100644 --- a/mmpose/apis/__init__.py +++ b/mmpose/apis/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .inference import (inference_bottom_up_pose_model, inference_top_down_pose_model, init_pose_model, process_mmdet_results, vis_pose_result) diff --git a/mmpose/apis/inference.py b/mmpose/apis/inference.py index 0ec0ebc0f5..f8a68d6f31 100644 --- a/mmpose/apis/inference.py +++ b/mmpose/apis/inference.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import cv2 diff --git a/mmpose/apis/inference_3d.py b/mmpose/apis/inference_3d.py index 8721644d6b..f4a828e9fc 100644 --- a/mmpose/apis/inference_3d.py +++ b/mmpose/apis/inference_3d.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmcv.parallel import collate, scatter diff --git a/mmpose/apis/inference_tracking.py b/mmpose/apis/inference_tracking.py index 3e7d70aa0b..e0441ca787 100644 --- a/mmpose/apis/inference_tracking.py +++ b/mmpose/apis/inference_tracking.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import numpy as np diff --git a/mmpose/apis/test.py b/mmpose/apis/test.py index d8e3a2acde..9f96bb8fc8 100644 --- a/mmpose/apis/test.py +++ b/mmpose/apis/test.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import pickle import shutil diff --git a/mmpose/apis/train.py b/mmpose/apis/train.py index e01d19a9a4..cd22fb0f4b 100644 --- a/mmpose/apis/train.py +++ b/mmpose/apis/train.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import torch diff --git a/mmpose/core/__init__.py b/mmpose/core/__init__.py index ebee19ad52..66185b72c4 100644 --- a/mmpose/core/__init__.py +++ b/mmpose/core/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .camera import * # noqa: F401, F403 from .evaluation import * # noqa: F401, F403 from .fp16 import * # noqa: F401, F403 diff --git a/mmpose/core/camera/__init__.py b/mmpose/core/camera/__init__.py index 6d49c58770..05d05bbb6b 100644 --- a/mmpose/core/camera/__init__.py +++ b/mmpose/core/camera/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .camera_base import CAMERAS from .single_camera import SimpleCamera diff --git a/mmpose/core/camera/camera_base.py b/mmpose/core/camera/camera_base.py index dbf2fa8f52..28b23e7c62 100644 --- a/mmpose/core/camera/camera_base.py +++ b/mmpose/core/camera/camera_base.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta, abstractmethod from mmcv.utils import Registry diff --git a/mmpose/core/camera/single_camera.py b/mmpose/core/camera/single_camera.py index eaead82cba..ee4d10a25e 100644 --- a/mmpose/core/camera/single_camera.py +++ b/mmpose/core/camera/single_camera.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from .camera_base import CAMERAS, SingleCameraBase diff --git a/mmpose/core/distributed_wrapper.py b/mmpose/core/distributed_wrapper.py index 3117c3eec5..4a8c3e0a57 100644 --- a/mmpose/core/distributed_wrapper.py +++ b/mmpose/core/distributed_wrapper.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn from mmcv.parallel import MODULE_WRAPPERS, MMDistributedDataParallel diff --git a/mmpose/core/evaluation/__init__.py b/mmpose/core/evaluation/__init__.py index 3f25120823..9ca97043d5 100644 --- a/mmpose/core/evaluation/__init__.py +++ b/mmpose/core/evaluation/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .bottom_up_eval import (aggregate_results, get_group_preds, get_multi_stage_outputs) from .eval_hooks import DistEvalHook, EvalHook diff --git a/mmpose/core/evaluation/bottom_up_eval.py b/mmpose/core/evaluation/bottom_up_eval.py index 5d90027044..cdb69e938d 100644 --- a/mmpose/core/evaluation/bottom_up_eval.py +++ b/mmpose/core/evaluation/bottom_up_eval.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch diff --git a/mmpose/core/evaluation/eval_hooks.py b/mmpose/core/evaluation/eval_hooks.py index 4156401caf..d6fd0aed59 100644 --- a/mmpose/core/evaluation/eval_hooks.py +++ b/mmpose/core/evaluation/eval_hooks.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import tempfile import warnings diff --git a/mmpose/core/evaluation/pose3d_eval.py b/mmpose/core/evaluation/pose3d_eval.py index c0bbd19914..56a58dc940 100644 --- a/mmpose/core/evaluation/pose3d_eval.py +++ b/mmpose/core/evaluation/pose3d_eval.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from .mesh_eval import compute_similarity_transform diff --git a/mmpose/core/evaluation/top_down_eval.py b/mmpose/core/evaluation/top_down_eval.py index 704131c2db..a710809577 100644 --- a/mmpose/core/evaluation/top_down_eval.py +++ b/mmpose/core/evaluation/top_down_eval.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import cv2 diff --git a/mmpose/core/fp16/__init__.py b/mmpose/core/fp16/__init__.py index 3d85523c50..5cb0548108 100644 --- a/mmpose/core/fp16/__init__.py +++ b/mmpose/core/fp16/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .decorators import auto_fp16, force_fp32 from .hooks import Fp16OptimizerHook, wrap_fp16_model from .utils import cast_tensor_type diff --git a/mmpose/core/fp16/decorators.py b/mmpose/core/fp16/decorators.py index 59481a9567..2d70ddf533 100644 --- a/mmpose/core/fp16/decorators.py +++ b/mmpose/core/fp16/decorators.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import functools import warnings from inspect import getfullargspec diff --git a/mmpose/core/fp16/hooks.py b/mmpose/core/fp16/hooks.py index b503a621c0..74081a9b73 100644 --- a/mmpose/core/fp16/hooks.py +++ b/mmpose/core/fp16/hooks.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import torch diff --git a/mmpose/core/fp16/utils.py b/mmpose/core/fp16/utils.py index 29f191acd3..f1ec3d3283 100644 --- a/mmpose/core/fp16/utils.py +++ b/mmpose/core/fp16/utils.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from collections import abc import numpy as np diff --git a/mmpose/core/optimizer/__init__.py b/mmpose/core/optimizer/__init__.py index faed650e5f..4340ffc075 100644 --- a/mmpose/core/optimizer/__init__.py +++ b/mmpose/core/optimizer/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .builder import OPTIMIZERS, build_optimizers __all__ = ['build_optimizers', 'OPTIMIZERS'] diff --git a/mmpose/core/optimizer/builder.py b/mmpose/core/optimizer/builder.py index da71588af0..7d6accd707 100644 --- a/mmpose/core/optimizer/builder.py +++ b/mmpose/core/optimizer/builder.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from mmcv.runner import build_optimizer from mmcv.utils import Registry diff --git a/mmpose/core/post_processing/__init__.py b/mmpose/core/post_processing/__init__.py index 1878492f46..1ee6858d95 100644 --- a/mmpose/core/post_processing/__init__.py +++ b/mmpose/core/post_processing/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .nms import oks_iou, oks_nms, soft_oks_nms from .one_euro_filter import OneEuroFilter from .post_transforms import (affine_transform, flip_back, fliplr_joints, diff --git a/mmpose/core/utils/__init__.py b/mmpose/core/utils/__init__.py index 54605c89f1..bd6c0277a0 100644 --- a/mmpose/core/utils/__init__.py +++ b/mmpose/core/utils/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .dist_utils import allreduce_grads from .regularizations import WeightNormClipHook diff --git a/mmpose/core/utils/dist_utils.py b/mmpose/core/utils/dist_utils.py index 3aab2af859..e76e591050 100644 --- a/mmpose/core/utils/dist_utils.py +++ b/mmpose/core/utils/dist_utils.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from collections import OrderedDict import torch.distributed as dist diff --git a/mmpose/core/utils/regularizations.py b/mmpose/core/utils/regularizations.py index 93841f6557..d8c7449038 100644 --- a/mmpose/core/utils/regularizations.py +++ b/mmpose/core/utils/regularizations.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta, abstractmethod, abstractproperty import torch diff --git a/mmpose/core/visualization/__init__.py b/mmpose/core/visualization/__init__.py index af99d16b27..2d684b6693 100644 --- a/mmpose/core/visualization/__init__.py +++ b/mmpose/core/visualization/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .effects import apply_bugeye_effect, apply_sunglasses_effect from .image import (imshow_bboxes, imshow_keypoints, imshow_keypoints_3d, imshow_mesh_3d) diff --git a/mmpose/core/visualization/effects.py b/mmpose/core/visualization/effects.py index 8711f1b52d..d3add7d95d 100644 --- a/mmpose/core/visualization/effects.py +++ b/mmpose/core/visualization/effects.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import cv2 import numpy as np diff --git a/mmpose/core/visualization/image.py b/mmpose/core/visualization/image.py index 4ad34d3525..a68839397d 100644 --- a/mmpose/core/visualization/image.py +++ b/mmpose/core/visualization/image.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import math import os import warnings diff --git a/mmpose/datasets/__init__.py b/mmpose/datasets/__init__.py index f048247291..7e1d274632 100644 --- a/mmpose/datasets/__init__.py +++ b/mmpose/datasets/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .builder import DATASETS, PIPELINES, build_dataloader, build_dataset from .pipelines import Compose from .samplers import DistributedSampler diff --git a/mmpose/datasets/builder.py b/mmpose/datasets/builder.py index 6421a8e178..cdee6d1ebf 100644 --- a/mmpose/datasets/builder.py +++ b/mmpose/datasets/builder.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import platform import random from functools import partial diff --git a/mmpose/datasets/dataset_wrappers.py b/mmpose/datasets/dataset_wrappers.py index 2aa4674f24..aaaa173b91 100644 --- a/mmpose/datasets/dataset_wrappers.py +++ b/mmpose/datasets/dataset_wrappers.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .builder import DATASETS diff --git a/mmpose/datasets/datasets/__init__.py b/mmpose/datasets/datasets/__init__.py index 7228000e37..11863e410a 100644 --- a/mmpose/datasets/datasets/__init__.py +++ b/mmpose/datasets/datasets/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from ...deprecated import (TopDownFreiHandDataset, TopDownOneHand10KDataset, TopDownPanopticDataset) from .animal import (AnimalATRWDataset, AnimalFlyDataset, AnimalHorse10Dataset, diff --git a/mmpose/datasets/datasets/animal/__init__.py b/mmpose/datasets/datasets/animal/__init__.py index 4aa870e5ae..24f873d9af 100644 --- a/mmpose/datasets/datasets/animal/__init__.py +++ b/mmpose/datasets/datasets/animal/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .animal_atrw_dataset import AnimalATRWDataset from .animal_fly_dataset import AnimalFlyDataset from .animal_horse10_dataset import AnimalHorse10Dataset diff --git a/mmpose/datasets/datasets/animal/animal_atrw_dataset.py b/mmpose/datasets/datasets/animal/animal_atrw_dataset.py index db80a0d814..066b907470 100644 --- a/mmpose/datasets/datasets/animal/animal_atrw_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_atrw_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import warnings from collections import OrderedDict, defaultdict diff --git a/mmpose/datasets/datasets/animal/animal_base_dataset.py b/mmpose/datasets/datasets/animal/animal_base_dataset.py index 4bc3ddbf72..2ece2432ee 100644 --- a/mmpose/datasets/datasets/animal/animal_base_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy from abc import ABCMeta, abstractmethod diff --git a/mmpose/datasets/datasets/animal/animal_fly_dataset.py b/mmpose/datasets/datasets/animal/animal_fly_dataset.py index 2209b8ff82..5e3a91781d 100644 --- a/mmpose/datasets/datasets/animal/animal_fly_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_fly_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/animal/animal_horse10_dataset.py b/mmpose/datasets/datasets/animal/animal_horse10_dataset.py index 36638195cc..d5cd227044 100644 --- a/mmpose/datasets/datasets/animal/animal_horse10_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_horse10_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/animal/animal_locust_dataset.py b/mmpose/datasets/datasets/animal/animal_locust_dataset.py index c19f2effa8..779416ddf6 100644 --- a/mmpose/datasets/datasets/animal/animal_locust_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_locust_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/animal/animal_macaque_dataset.py b/mmpose/datasets/datasets/animal/animal_macaque_dataset.py index 41a7de4b40..7666d88561 100644 --- a/mmpose/datasets/datasets/animal/animal_macaque_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_macaque_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import warnings from collections import OrderedDict, defaultdict diff --git a/mmpose/datasets/datasets/animal/animal_pose_dataset.py b/mmpose/datasets/datasets/animal/animal_pose_dataset.py index fb942c3b18..dd025fc0ac 100644 --- a/mmpose/datasets/datasets/animal/animal_pose_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_pose_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import warnings from collections import OrderedDict, defaultdict diff --git a/mmpose/datasets/datasets/animal/animal_zebra_dataset.py b/mmpose/datasets/datasets/animal/animal_zebra_dataset.py index 7369d5a5f3..4efb646643 100644 --- a/mmpose/datasets/datasets/animal/animal_zebra_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_zebra_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/body3d/__init__.py b/mmpose/datasets/datasets/body3d/__init__.py index 3402755f6b..cdb74ae4e4 100644 --- a/mmpose/datasets/datasets/body3d/__init__.py +++ b/mmpose/datasets/datasets/body3d/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .body3d_h36m_dataset import Body3DH36MDataset from .body3d_mpi_inf_3dhp_dataset import Body3DMpiInf3dhpDataset from .body3d_semi_supervision_dataset import Body3DSemiSupervisionDataset diff --git a/mmpose/datasets/datasets/body3d/body3d_base_dataset.py b/mmpose/datasets/datasets/body3d/body3d_base_dataset.py index 67511548be..edce69937e 100644 --- a/mmpose/datasets/datasets/body3d/body3d_base_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy from abc import ABCMeta, abstractmethod diff --git a/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py b/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py index 0a2969f795..2882518608 100644 --- a/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp from collections import OrderedDict, defaultdict diff --git a/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py b/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py index 66cbdaf7d9..8a513e489d 100644 --- a/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp from collections import OrderedDict, defaultdict diff --git a/mmpose/datasets/datasets/body3d/body3d_semi_supervision_dataset.py b/mmpose/datasets/datasets/body3d/body3d_semi_supervision_dataset.py index 7d81acd9b1..491d54914d 100644 --- a/mmpose/datasets/datasets/body3d/body3d_semi_supervision_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_semi_supervision_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from torch.utils.data import Dataset diff --git a/mmpose/datasets/datasets/bottom_up/__init__.py b/mmpose/datasets/datasets/bottom_up/__init__.py index 8eadb7687c..2ac79377f8 100644 --- a/mmpose/datasets/datasets/bottom_up/__init__.py +++ b/mmpose/datasets/datasets/bottom_up/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .bottom_up_aic import BottomUpAicDataset from .bottom_up_coco import BottomUpCocoDataset from .bottom_up_coco_wholebody import BottomUpCocoWholeBodyDataset diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py b/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py index 3b1822e98d..ee99dcd260 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import json_tricks as json import numpy as np from xtcocotools.coco import COCO diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py b/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py index 3941f25a39..f47400d6ac 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import numpy as np diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py b/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py index 02fe73a816..6275402851 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict, defaultdict diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py b/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py index 8abccabbba..3a7f0dbfca 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from xtcocotools.coco import COCO from xtcocotools.cocoeval import COCOeval diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py b/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py index ba25173e60..fb4390ecea 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import json_tricks as json import numpy as np from xtcocotools.coco import COCO diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py b/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py index ae60f54c04..33e1a64391 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import json_tricks as json import numpy as np from xtcocotools.coco import COCO diff --git a/mmpose/datasets/datasets/face/__init__.py b/mmpose/datasets/datasets/face/__init__.py index bdbd0af3b8..1fc8de3166 100644 --- a/mmpose/datasets/datasets/face/__init__.py +++ b/mmpose/datasets/datasets/face/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .face_300w_dataset import Face300WDataset from .face_aflw_dataset import FaceAFLWDataset from .face_cofw_dataset import FaceCOFWDataset diff --git a/mmpose/datasets/datasets/face/face_300w_dataset.py b/mmpose/datasets/datasets/face/face_300w_dataset.py index 6a46861d7d..ece58a3c9d 100644 --- a/mmpose/datasets/datasets/face/face_300w_dataset.py +++ b/mmpose/datasets/datasets/face/face_300w_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/face/face_aflw_dataset.py b/mmpose/datasets/datasets/face/face_aflw_dataset.py index ba18eec61d..53c6dd8dd2 100644 --- a/mmpose/datasets/datasets/face/face_aflw_dataset.py +++ b/mmpose/datasets/datasets/face/face_aflw_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/face/face_base_dataset.py b/mmpose/datasets/datasets/face/face_base_dataset.py index 02cab91e3b..e5304a65b4 100644 --- a/mmpose/datasets/datasets/face/face_base_dataset.py +++ b/mmpose/datasets/datasets/face/face_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy from abc import ABCMeta, abstractmethod diff --git a/mmpose/datasets/datasets/face/face_cofw_dataset.py b/mmpose/datasets/datasets/face/face_cofw_dataset.py index 040674f3f7..27a785d1a9 100644 --- a/mmpose/datasets/datasets/face/face_cofw_dataset.py +++ b/mmpose/datasets/datasets/face/face_cofw_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/face/face_wflw_dataset.py b/mmpose/datasets/datasets/face/face_wflw_dataset.py index b09cd68ba1..5138d0ba52 100644 --- a/mmpose/datasets/datasets/face/face_wflw_dataset.py +++ b/mmpose/datasets/datasets/face/face_wflw_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/fashion/__init__.py b/mmpose/datasets/datasets/fashion/__init__.py index 42a326d176..575d6ed4af 100644 --- a/mmpose/datasets/datasets/fashion/__init__.py +++ b/mmpose/datasets/datasets/fashion/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .deepfashion_dataset import DeepFashionDataset __all__ = ['DeepFashionDataset'] diff --git a/mmpose/datasets/datasets/fashion/deepfashion_dataset.py b/mmpose/datasets/datasets/fashion/deepfashion_dataset.py index dda9c055df..5d1533c3eb 100644 --- a/mmpose/datasets/datasets/fashion/deepfashion_dataset.py +++ b/mmpose/datasets/datasets/fashion/deepfashion_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/fashion/fashion_base_dataset.py b/mmpose/datasets/datasets/fashion/fashion_base_dataset.py index 74d1f536b0..fffd8040c3 100644 --- a/mmpose/datasets/datasets/fashion/fashion_base_dataset.py +++ b/mmpose/datasets/datasets/fashion/fashion_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy from abc import ABCMeta, abstractmethod diff --git a/mmpose/datasets/datasets/hand/__init__.py b/mmpose/datasets/datasets/hand/__init__.py index bf0781f1e5..5d4d7ebef2 100644 --- a/mmpose/datasets/datasets/hand/__init__.py +++ b/mmpose/datasets/datasets/hand/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .freihand_dataset import FreiHandDataset from .interhand2d_dataset import InterHand2DDataset from .interhand3d_dataset import InterHand3DDataset diff --git a/mmpose/datasets/datasets/hand/freihand_dataset.py b/mmpose/datasets/datasets/hand/freihand_dataset.py index d374f072e0..f73e272407 100644 --- a/mmpose/datasets/datasets/hand/freihand_dataset.py +++ b/mmpose/datasets/datasets/hand/freihand_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/hand/hand_base_dataset.py b/mmpose/datasets/datasets/hand/hand_base_dataset.py index ce0ae80ab7..2adc413b1b 100644 --- a/mmpose/datasets/datasets/hand/hand_base_dataset.py +++ b/mmpose/datasets/datasets/hand/hand_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy from abc import ABCMeta, abstractmethod diff --git a/mmpose/datasets/datasets/hand/interhand2d_dataset.py b/mmpose/datasets/datasets/hand/interhand2d_dataset.py index 2c36c878c9..e3f45223cd 100644 --- a/mmpose/datasets/datasets/hand/interhand2d_dataset.py +++ b/mmpose/datasets/datasets/hand/interhand2d_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/hand/interhand3d_dataset.py b/mmpose/datasets/datasets/hand/interhand3d_dataset.py index 7144325108..fe73ea7880 100644 --- a/mmpose/datasets/datasets/hand/interhand3d_dataset.py +++ b/mmpose/datasets/datasets/hand/interhand3d_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/hand/onehand10k_dataset.py b/mmpose/datasets/datasets/hand/onehand10k_dataset.py index 57f0f74adf..8bd703a269 100644 --- a/mmpose/datasets/datasets/hand/onehand10k_dataset.py +++ b/mmpose/datasets/datasets/hand/onehand10k_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/hand/panoptic_dataset.py b/mmpose/datasets/datasets/hand/panoptic_dataset.py index b0fe9c5803..dbbee41f42 100644 --- a/mmpose/datasets/datasets/hand/panoptic_dataset.py +++ b/mmpose/datasets/datasets/hand/panoptic_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/hand/rhd2d_dataset.py b/mmpose/datasets/datasets/hand/rhd2d_dataset.py index c77c8cc63b..314445c6a6 100644 --- a/mmpose/datasets/datasets/hand/rhd2d_dataset.py +++ b/mmpose/datasets/datasets/hand/rhd2d_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/mesh/__init__.py b/mmpose/datasets/datasets/mesh/__init__.py index cca6651582..14297c7261 100644 --- a/mmpose/datasets/datasets/mesh/__init__.py +++ b/mmpose/datasets/datasets/mesh/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .mesh_adv_dataset import MeshAdversarialDataset from .mesh_h36m_dataset import MeshH36MDataset from .mesh_mix_dataset import MeshMixDataset diff --git a/mmpose/datasets/datasets/mesh/mesh_adv_dataset.py b/mmpose/datasets/datasets/mesh/mesh_adv_dataset.py index 6f6ea92989..cd9ba39d50 100644 --- a/mmpose/datasets/datasets/mesh/mesh_adv_dataset.py +++ b/mmpose/datasets/datasets/mesh/mesh_adv_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from torch.utils.data import Dataset diff --git a/mmpose/datasets/datasets/mesh/mesh_base_dataset.py b/mmpose/datasets/datasets/mesh/mesh_base_dataset.py index d993077a80..06756eaed9 100644 --- a/mmpose/datasets/datasets/mesh/mesh_base_dataset.py +++ b/mmpose/datasets/datasets/mesh/mesh_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy as cp import os from abc import ABCMeta diff --git a/mmpose/datasets/datasets/mesh/mesh_h36m_dataset.py b/mmpose/datasets/datasets/mesh/mesh_h36m_dataset.py index 8585711a4e..d57ab1c1c7 100644 --- a/mmpose/datasets/datasets/mesh/mesh_h36m_dataset.py +++ b/mmpose/datasets/datasets/mesh/mesh_h36m_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py b/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py index 67dae0f214..244a7c323c 100644 --- a/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py +++ b/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta import numpy as np diff --git a/mmpose/datasets/datasets/mesh/mosh_dataset.py b/mmpose/datasets/datasets/mesh/mosh_dataset.py index 36b1893c63..5dce0793b1 100644 --- a/mmpose/datasets/datasets/mesh/mosh_dataset.py +++ b/mmpose/datasets/datasets/mesh/mosh_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy as cp from abc import ABCMeta diff --git a/mmpose/datasets/datasets/top_down/__init__.py b/mmpose/datasets/datasets/top_down/__init__.py index 9eff81c177..72b99d4a8b 100644 --- a/mmpose/datasets/datasets/top_down/__init__.py +++ b/mmpose/datasets/datasets/top_down/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .topdown_aic_dataset import TopDownAicDataset from .topdown_coco_dataset import TopDownCocoDataset from .topdown_coco_wholebody_dataset import TopDownCocoWholeBodyDataset diff --git a/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py b/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py index 1b945166b1..245f6a93ba 100644 --- a/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import numpy as np diff --git a/mmpose/datasets/datasets/top_down/topdown_base_dataset.py b/mmpose/datasets/datasets/top_down/topdown_base_dataset.py index f0d4c99d63..edc008c5b6 100644 --- a/mmpose/datasets/datasets/top_down/topdown_base_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy from abc import ABCMeta, abstractmethod diff --git a/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py b/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py index ffd98357e7..92b51340fa 100644 --- a/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import warnings from collections import OrderedDict, defaultdict diff --git a/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py b/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py index 554f6b699f..29eb8311de 100644 --- a/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import warnings diff --git a/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py b/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py index 3f883c7a52..0c8134fb35 100644 --- a/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import numpy as np diff --git a/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py b/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py index 38f1d2a6a1..d167c5113d 100644 --- a/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py index 01a29db88e..a38fa33e94 100644 --- a/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import warnings from collections import OrderedDict diff --git a/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py index 8f29f15b01..cd6d5ada16 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import numpy as np diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py index 6938941d33..e1fbfcc6bf 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import json import os from collections import OrderedDict diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py index b6e077b76a..c8e79da08d 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy as cp import os import os.path as osp diff --git a/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py b/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py index e8e8fa1715..5c66447ef1 100644 --- a/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import numpy as np diff --git a/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py b/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py index fea9773a4c..13ad86e782 100644 --- a/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import os.path as osp import warnings diff --git a/mmpose/datasets/pipelines/__init__.py b/mmpose/datasets/pipelines/__init__.py index c6a81d4fa1..cf06db1c9d 100644 --- a/mmpose/datasets/pipelines/__init__.py +++ b/mmpose/datasets/pipelines/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .bottom_up_transform import * # noqa from .hand_transform import * # noqa from .loading import LoadImageFromFile # noqa diff --git a/mmpose/datasets/pipelines/bottom_up_transform.py b/mmpose/datasets/pipelines/bottom_up_transform.py index 299145158d..f556bd866c 100644 --- a/mmpose/datasets/pipelines/bottom_up_transform.py +++ b/mmpose/datasets/pipelines/bottom_up_transform.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import cv2 import numpy as np diff --git a/mmpose/datasets/pipelines/hand_transform.py b/mmpose/datasets/pipelines/hand_transform.py index 6844300372..e6fa095a95 100644 --- a/mmpose/datasets/pipelines/hand_transform.py +++ b/mmpose/datasets/pipelines/hand_transform.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from mmpose.datasets.builder import PIPELINES diff --git a/mmpose/datasets/pipelines/loading.py b/mmpose/datasets/pipelines/loading.py index e460a6ec6a..b0eb605a10 100644 --- a/mmpose/datasets/pipelines/loading.py +++ b/mmpose/datasets/pipelines/loading.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import mmcv from ..builder import PIPELINES diff --git a/mmpose/datasets/pipelines/mesh_transform.py b/mmpose/datasets/pipelines/mesh_transform.py index 71334c3cb6..c79ca4c01b 100644 --- a/mmpose/datasets/pipelines/mesh_transform.py +++ b/mmpose/datasets/pipelines/mesh_transform.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import cv2 import mmcv import numpy as np diff --git a/mmpose/datasets/pipelines/pose3d_transform.py b/mmpose/datasets/pipelines/pose3d_transform.py index c004defc8a..249a84e3b9 100644 --- a/mmpose/datasets/pipelines/pose3d_transform.py +++ b/mmpose/datasets/pipelines/pose3d_transform.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import mmcv diff --git a/mmpose/datasets/pipelines/shared_transform.py b/mmpose/datasets/pipelines/shared_transform.py index 15e837c9a8..7346a0556f 100644 --- a/mmpose/datasets/pipelines/shared_transform.py +++ b/mmpose/datasets/pipelines/shared_transform.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings from collections.abc import Sequence diff --git a/mmpose/datasets/pipelines/top_down_transform.py b/mmpose/datasets/pipelines/top_down_transform.py index 5162f37468..32576604b5 100644 --- a/mmpose/datasets/pipelines/top_down_transform.py +++ b/mmpose/datasets/pipelines/top_down_transform.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import cv2 import numpy as np diff --git a/mmpose/datasets/registry.py b/mmpose/datasets/registry.py index cc312b51c5..ba3cc49e45 100644 --- a/mmpose/datasets/registry.py +++ b/mmpose/datasets/registry.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings from .builder import DATASETS, PIPELINES diff --git a/mmpose/datasets/samplers/__init__.py b/mmpose/datasets/samplers/__init__.py index cffe4dcb0f..da09effaf2 100644 --- a/mmpose/datasets/samplers/__init__.py +++ b/mmpose/datasets/samplers/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .distributed_sampler import DistributedSampler __all__ = ['DistributedSampler'] diff --git a/mmpose/datasets/samplers/distributed_sampler.py b/mmpose/datasets/samplers/distributed_sampler.py index 52eee0f7c3..bcb5f522a2 100644 --- a/mmpose/datasets/samplers/distributed_sampler.py +++ b/mmpose/datasets/samplers/distributed_sampler.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch from torch.utils.data import DistributedSampler as _DistributedSampler diff --git a/mmpose/deprecated.py b/mmpose/deprecated.py index 32162f7dd9..11937b2a34 100644 --- a/mmpose/deprecated.py +++ b/mmpose/deprecated.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings from .datasets.builder import DATASETS diff --git a/mmpose/models/__init__.py b/mmpose/models/__init__.py index 63e7f89b32..dbec55e439 100644 --- a/mmpose/models/__init__.py +++ b/mmpose/models/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .backbones import * # noqa from .builder import (BACKBONES, HEADS, LOSSES, MESH_MODELS, NECKS, POSENETS, build_backbone, build_head, build_loss, build_mesh_model, diff --git a/mmpose/models/backbones/__init__.py b/mmpose/models/backbones/__init__.py index 0917ab2079..53de992dfa 100644 --- a/mmpose/models/backbones/__init__.py +++ b/mmpose/models/backbones/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .alexnet import AlexNet from .cpm import CPM from .hourglass import HourglassNet diff --git a/mmpose/models/backbones/alexnet.py b/mmpose/models/backbones/alexnet.py index 8e45368522..a8efd74d11 100644 --- a/mmpose/models/backbones/alexnet.py +++ b/mmpose/models/backbones/alexnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch.nn as nn from ..builder import BACKBONES diff --git a/mmpose/models/backbones/base_backbone.py b/mmpose/models/backbones/base_backbone.py index b68e23d38d..b2e9d6e06e 100644 --- a/mmpose/models/backbones/base_backbone.py +++ b/mmpose/models/backbones/base_backbone.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import logging from abc import ABCMeta, abstractmethod diff --git a/mmpose/models/backbones/cpm.py b/mmpose/models/backbones/cpm.py index 3aa09523ed..4a638db8d7 100644 --- a/mmpose/models/backbones/cpm.py +++ b/mmpose/models/backbones/cpm.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import torch diff --git a/mmpose/models/backbones/hourglass.py b/mmpose/models/backbones/hourglass.py index dd301c1f77..bf75fad989 100644 --- a/mmpose/models/backbones/hourglass.py +++ b/mmpose/models/backbones/hourglass.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import torch.nn as nn diff --git a/mmpose/models/backbones/hrnet.py b/mmpose/models/backbones/hrnet.py index ed20041157..9eaceae64c 100644 --- a/mmpose/models/backbones/hrnet.py +++ b/mmpose/models/backbones/hrnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import torch.nn as nn diff --git a/mmpose/models/backbones/mobilenet_v2.py b/mmpose/models/backbones/mobilenet_v2.py index b3c0c30634..5dc0cd1b7d 100644 --- a/mmpose/models/backbones/mobilenet_v2.py +++ b/mmpose/models/backbones/mobilenet_v2.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import logging diff --git a/mmpose/models/backbones/mobilenet_v3.py b/mmpose/models/backbones/mobilenet_v3.py index 8da34f819c..05c98b9e17 100644 --- a/mmpose/models/backbones/mobilenet_v3.py +++ b/mmpose/models/backbones/mobilenet_v3.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import logging diff --git a/mmpose/models/backbones/mspn.py b/mmpose/models/backbones/mspn.py index 2169e2a6f3..6d28a49f14 100644 --- a/mmpose/models/backbones/mspn.py +++ b/mmpose/models/backbones/mspn.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy as cp from collections import OrderedDict diff --git a/mmpose/models/backbones/regnet.py b/mmpose/models/backbones/regnet.py index 2b611a9d10..c5327bccf9 100644 --- a/mmpose/models/backbones/regnet.py +++ b/mmpose/models/backbones/regnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import numpy as np diff --git a/mmpose/models/backbones/resnest.py b/mmpose/models/backbones/resnest.py index 7f00006b5a..2c38fa2ff2 100644 --- a/mmpose/models/backbones/resnest.py +++ b/mmpose/models/backbones/resnest.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn import torch.nn.functional as F diff --git a/mmpose/models/backbones/resnet.py b/mmpose/models/backbones/resnet.py index bd7ac00e1e..649496a755 100644 --- a/mmpose/models/backbones/resnet.py +++ b/mmpose/models/backbones/resnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import torch.nn as nn diff --git a/mmpose/models/backbones/resnext.py b/mmpose/models/backbones/resnext.py index 51c649ee3f..c10dc33f98 100644 --- a/mmpose/models/backbones/resnext.py +++ b/mmpose/models/backbones/resnext.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from mmcv.cnn import build_conv_layer, build_norm_layer from ..builder import BACKBONES diff --git a/mmpose/models/backbones/rsn.py b/mmpose/models/backbones/rsn.py index 22da29c86a..29038afe2a 100644 --- a/mmpose/models/backbones/rsn.py +++ b/mmpose/models/backbones/rsn.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy as cp import torch diff --git a/mmpose/models/backbones/scnet.py b/mmpose/models/backbones/scnet.py index eb72190f32..3786c5731d 100644 --- a/mmpose/models/backbones/scnet.py +++ b/mmpose/models/backbones/scnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import torch diff --git a/mmpose/models/backbones/seresnet.py b/mmpose/models/backbones/seresnet.py index 8fa245644b..ac2d53b40a 100644 --- a/mmpose/models/backbones/seresnet.py +++ b/mmpose/models/backbones/seresnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch.utils.checkpoint as cp from ..builder import BACKBONES diff --git a/mmpose/models/backbones/seresnext.py b/mmpose/models/backbones/seresnext.py index aff1276b23..c5c4e4ce03 100644 --- a/mmpose/models/backbones/seresnext.py +++ b/mmpose/models/backbones/seresnext.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from mmcv.cnn import build_conv_layer, build_norm_layer from ..builder import BACKBONES diff --git a/mmpose/models/backbones/shufflenet_v1.py b/mmpose/models/backbones/shufflenet_v1.py index 0be1997410..9f98cbd213 100644 --- a/mmpose/models/backbones/shufflenet_v1.py +++ b/mmpose/models/backbones/shufflenet_v1.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import logging diff --git a/mmpose/models/backbones/shufflenet_v2.py b/mmpose/models/backbones/shufflenet_v2.py index 845bcf4032..e93533367a 100644 --- a/mmpose/models/backbones/shufflenet_v2.py +++ b/mmpose/models/backbones/shufflenet_v2.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import logging diff --git a/mmpose/models/backbones/tcn.py b/mmpose/models/backbones/tcn.py index b918005f8f..deca2290ae 100644 --- a/mmpose/models/backbones/tcn.py +++ b/mmpose/models/backbones/tcn.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import torch.nn as nn diff --git a/mmpose/models/backbones/utils/__init__.py b/mmpose/models/backbones/utils/__init__.py index aeea0a48a1..52a30ca9f7 100644 --- a/mmpose/models/backbones/utils/__init__.py +++ b/mmpose/models/backbones/utils/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .channel_shuffle import channel_shuffle from .inverted_residual import InvertedResidual from .make_divisible import make_divisible diff --git a/mmpose/models/backbones/utils/channel_shuffle.py b/mmpose/models/backbones/utils/channel_shuffle.py index 51d6d98c9b..27006a8065 100644 --- a/mmpose/models/backbones/utils/channel_shuffle.py +++ b/mmpose/models/backbones/utils/channel_shuffle.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch diff --git a/mmpose/models/backbones/utils/inverted_residual.py b/mmpose/models/backbones/utils/inverted_residual.py index a9613825ef..caa3385b1e 100644 --- a/mmpose/models/backbones/utils/inverted_residual.py +++ b/mmpose/models/backbones/utils/inverted_residual.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import torch.nn as nn diff --git a/mmpose/models/backbones/utils/make_divisible.py b/mmpose/models/backbones/utils/make_divisible.py index 02ee047c50..b7666be659 100644 --- a/mmpose/models/backbones/utils/make_divisible.py +++ b/mmpose/models/backbones/utils/make_divisible.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. def make_divisible(value, divisor, min_value=None, min_ratio=0.9): """Make divisible function. diff --git a/mmpose/models/backbones/utils/se_layer.py b/mmpose/models/backbones/utils/se_layer.py index 80b2ee277f..07f70802eb 100644 --- a/mmpose/models/backbones/utils/se_layer.py +++ b/mmpose/models/backbones/utils/se_layer.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import mmcv import torch.nn as nn from mmcv.cnn import ConvModule diff --git a/mmpose/models/backbones/utils/utils.py b/mmpose/models/backbones/utils/utils.py index d4147890ed..a9ac948653 100644 --- a/mmpose/models/backbones/utils/utils.py +++ b/mmpose/models/backbones/utils/utils.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from collections import OrderedDict from mmcv.runner.checkpoint import _load_checkpoint, load_state_dict diff --git a/mmpose/models/backbones/vgg.py b/mmpose/models/backbones/vgg.py index 0a85989dc1..3ad021b95f 100644 --- a/mmpose/models/backbones/vgg.py +++ b/mmpose/models/backbones/vgg.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch.nn as nn from mmcv.cnn import ConvModule, constant_init, kaiming_init, normal_init from mmcv.utils.parrots_wrapper import _BatchNorm diff --git a/mmpose/models/backbones/vipnas_resnet.py b/mmpose/models/backbones/vipnas_resnet.py index 65777b370f..9ee1fee27f 100644 --- a/mmpose/models/backbones/vipnas_resnet.py +++ b/mmpose/models/backbones/vipnas_resnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import torch.nn as nn diff --git a/mmpose/models/builder.py b/mmpose/models/builder.py index 78db853301..a9b50e848c 100644 --- a/mmpose/models/builder.py +++ b/mmpose/models/builder.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from mmcv.cnn import build_model_from_cfg from mmcv.utils import Registry diff --git a/mmpose/models/detectors/__init__.py b/mmpose/models/detectors/__init__.py index 5420dfd1c6..7753e4c02a 100644 --- a/mmpose/models/detectors/__init__.py +++ b/mmpose/models/detectors/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .associative_embedding import AssociativeEmbedding from .interhand_3d import Interhand3D from .mesh import ParametricMesh diff --git a/mmpose/models/detectors/associative_embedding.py b/mmpose/models/detectors/associative_embedding.py index 30c07a66f4..a3bbec98e2 100644 --- a/mmpose/models/detectors/associative_embedding.py +++ b/mmpose/models/detectors/associative_embedding.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import mmcv diff --git a/mmpose/models/detectors/base.py b/mmpose/models/detectors/base.py index 7d9eb674b8..338efdba3c 100644 --- a/mmpose/models/detectors/base.py +++ b/mmpose/models/detectors/base.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta, abstractmethod from collections import OrderedDict diff --git a/mmpose/models/detectors/interhand_3d.py b/mmpose/models/detectors/interhand_3d.py index c633337ac6..444cb3c6b1 100644 --- a/mmpose/models/detectors/interhand_3d.py +++ b/mmpose/models/detectors/interhand_3d.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import mmcv import numpy as np diff --git a/mmpose/models/detectors/mesh.py b/mmpose/models/detectors/mesh.py index 16a7892447..d9611308c3 100644 --- a/mmpose/models/detectors/mesh.py +++ b/mmpose/models/detectors/mesh.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import cv2 import mmcv import numpy as np diff --git a/mmpose/models/detectors/multi_task.py b/mmpose/models/detectors/multi_task.py index 03ce211e92..db08aea9a5 100644 --- a/mmpose/models/detectors/multi_task.py +++ b/mmpose/models/detectors/multi_task.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch.nn as nn from .. import builder diff --git a/mmpose/models/detectors/pose_lifter.py b/mmpose/models/detectors/pose_lifter.py index 64ecd19110..141cf5a3db 100644 --- a/mmpose/models/detectors/pose_lifter.py +++ b/mmpose/models/detectors/pose_lifter.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import mmcv diff --git a/mmpose/models/detectors/top_down.py b/mmpose/models/detectors/top_down.py index 8aa26bb9e7..a037288bed 100644 --- a/mmpose/models/detectors/top_down.py +++ b/mmpose/models/detectors/top_down.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import mmcv diff --git a/mmpose/models/heads/__init__.py b/mmpose/models/heads/__init__.py index 4922ebfe78..c36df07c34 100644 --- a/mmpose/models/heads/__init__.py +++ b/mmpose/models/heads/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .ae_higher_resolution_head import AEHigherResolutionHead from .ae_simple_head import AESimpleHead from .deeppose_regression_head import DeepposeRegressionHead diff --git a/mmpose/models/heads/ae_higher_resolution_head.py b/mmpose/models/heads/ae_higher_resolution_head.py index a4c7a55036..2ec4b88f00 100644 --- a/mmpose/models/heads/ae_higher_resolution_head.py +++ b/mmpose/models/heads/ae_higher_resolution_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn from mmcv.cnn import (build_conv_layer, build_upsample_layer, constant_init, diff --git a/mmpose/models/heads/ae_simple_head.py b/mmpose/models/heads/ae_simple_head.py index 6b90eecd3e..586814afdb 100644 --- a/mmpose/models/heads/ae_simple_head.py +++ b/mmpose/models/heads/ae_simple_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch.nn as nn from mmcv.cnn import (build_conv_layer, build_upsample_layer, constant_init, normal_init) diff --git a/mmpose/models/heads/deeppose_regression_head.py b/mmpose/models/heads/deeppose_regression_head.py index a18c4d551a..f1b8e5d092 100644 --- a/mmpose/models/heads/deeppose_regression_head.py +++ b/mmpose/models/heads/deeppose_regression_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch.nn as nn from mmcv.cnn import normal_init diff --git a/mmpose/models/heads/hmr_head.py b/mmpose/models/heads/hmr_head.py index 9395234075..c74cd8e5b4 100644 --- a/mmpose/models/heads/hmr_head.py +++ b/mmpose/models/heads/hmr_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch import torch.nn as nn diff --git a/mmpose/models/heads/interhand_3d_head.py b/mmpose/models/heads/interhand_3d_head.py index 3137e7077b..252963469a 100644 --- a/mmpose/models/heads/interhand_3d_head.py +++ b/mmpose/models/heads/interhand_3d_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch import torch.nn as nn diff --git a/mmpose/models/heads/temporal_regression_head.py b/mmpose/models/heads/temporal_regression_head.py index 4306e17ceb..6e24778c27 100644 --- a/mmpose/models/heads/temporal_regression_head.py +++ b/mmpose/models/heads/temporal_regression_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch.nn as nn from mmcv.cnn import build_conv_layer, constant_init, kaiming_init diff --git a/mmpose/models/heads/topdown_heatmap_base_head.py b/mmpose/models/heads/topdown_heatmap_base_head.py index 8304b5049c..75e591e19c 100644 --- a/mmpose/models/heads/topdown_heatmap_base_head.py +++ b/mmpose/models/heads/topdown_heatmap_base_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta, abstractmethod import numpy as np diff --git a/mmpose/models/heads/topdown_heatmap_multi_stage_head.py b/mmpose/models/heads/topdown_heatmap_multi_stage_head.py index 094d3914f5..f9410abb77 100644 --- a/mmpose/models/heads/topdown_heatmap_multi_stage_head.py +++ b/mmpose/models/heads/topdown_heatmap_multi_stage_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy as cp import torch.nn as nn diff --git a/mmpose/models/heads/topdown_heatmap_simple_head.py b/mmpose/models/heads/topdown_heatmap_simple_head.py index 3d43514492..cbe449af28 100644 --- a/mmpose/models/heads/topdown_heatmap_simple_head.py +++ b/mmpose/models/heads/topdown_heatmap_simple_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn from mmcv.cnn import (build_conv_layer, build_norm_layer, build_upsample_layer, diff --git a/mmpose/models/heads/vipnas_heatmap_simple_head.py b/mmpose/models/heads/vipnas_heatmap_simple_head.py index 69852e0d13..6062cade4f 100644 --- a/mmpose/models/heads/vipnas_heatmap_simple_head.py +++ b/mmpose/models/heads/vipnas_heatmap_simple_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn from mmcv.cnn import (build_conv_layer, build_norm_layer, build_upsample_layer, diff --git a/mmpose/models/losses/__init__.py b/mmpose/models/losses/__init__.py index 471f56d1ff..d284eb420a 100644 --- a/mmpose/models/losses/__init__.py +++ b/mmpose/models/losses/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .classfication_loss import BCELoss from .mesh_loss import GANLoss, MeshLoss from .mse_loss import JointsMSELoss, JointsOHKMMSELoss diff --git a/mmpose/models/losses/classfication_loss.py b/mmpose/models/losses/classfication_loss.py index 35fc0930dc..868d98c645 100644 --- a/mmpose/models/losses/classfication_loss.py +++ b/mmpose/models/losses/classfication_loss.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch.nn as nn import torch.nn.functional as F diff --git a/mmpose/models/losses/mesh_loss.py b/mmpose/models/losses/mesh_loss.py index 3a57092fd4..ff7203db03 100644 --- a/mmpose/models/losses/mesh_loss.py +++ b/mmpose/models/losses/mesh_loss.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn diff --git a/mmpose/models/losses/mse_loss.py b/mmpose/models/losses/mse_loss.py index 4232d13590..f972efadfd 100644 --- a/mmpose/models/losses/mse_loss.py +++ b/mmpose/models/losses/mse_loss.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn diff --git a/mmpose/models/losses/regression_loss.py b/mmpose/models/losses/regression_loss.py index 6160ea24ce..8359ae88a4 100644 --- a/mmpose/models/losses/regression_loss.py +++ b/mmpose/models/losses/regression_loss.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import math import torch diff --git a/mmpose/models/misc/__init__.py b/mmpose/models/misc/__init__.py index e69de29bb2..ef101fec61 100644 --- a/mmpose/models/misc/__init__.py +++ b/mmpose/models/misc/__init__.py @@ -0,0 +1 @@ +# Copyright (c) OpenMMLab. All rights reserved. diff --git a/mmpose/models/necks/__init__.py b/mmpose/models/necks/__init__.py index 3b9f8d121d..c97bd01571 100644 --- a/mmpose/models/necks/__init__.py +++ b/mmpose/models/necks/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .gap_neck import GlobalAveragePooling __all__ = ['GlobalAveragePooling'] diff --git a/mmpose/models/necks/gap_neck.py b/mmpose/models/necks/gap_neck.py index b0a407afde..5e6ad68ec1 100644 --- a/mmpose/models/necks/gap_neck.py +++ b/mmpose/models/necks/gap_neck.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn diff --git a/mmpose/models/registry.py b/mmpose/models/registry.py index 5824b84a94..f354ae9e13 100644 --- a/mmpose/models/registry.py +++ b/mmpose/models/registry.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings from .builder import BACKBONES, HEADS, LOSSES, NECKS, POSENETS diff --git a/mmpose/models/utils/__init__.py b/mmpose/models/utils/__init__.py index 70e174c50c..6871c66e50 100644 --- a/mmpose/models/utils/__init__.py +++ b/mmpose/models/utils/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .smpl import SMPL __all__ = ['SMPL'] diff --git a/mmpose/models/utils/geometry.py b/mmpose/models/utils/geometry.py index e5f2f098fe..0ceadaec30 100644 --- a/mmpose/models/utils/geometry.py +++ b/mmpose/models/utils/geometry.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch from torch.nn import functional as F diff --git a/mmpose/models/utils/ops.py b/mmpose/models/utils/ops.py index 70d6342670..858d0a9214 100644 --- a/mmpose/models/utils/ops.py +++ b/mmpose/models/utils/ops.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import warnings import torch diff --git a/mmpose/models/utils/smpl.py b/mmpose/models/utils/smpl.py index e03ed96c7f..fe723d483a 100644 --- a/mmpose/models/utils/smpl.py +++ b/mmpose/models/utils/smpl.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch import torch.nn as nn diff --git a/mmpose/utils/__init__.py b/mmpose/utils/__init__.py index 860a2d4a57..99dbec8d2e 100644 --- a/mmpose/utils/__init__.py +++ b/mmpose/utils/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .collect_env import collect_env from .logger import get_root_logger from .timer import StopWatch diff --git a/mmpose/utils/collect_env.py b/mmpose/utils/collect_env.py index f7f982fdde..f75c5ea733 100644 --- a/mmpose/utils/collect_env.py +++ b/mmpose/utils/collect_env.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from mmcv.utils import collect_env as collect_basic_env from mmcv.utils import get_git_hash diff --git a/mmpose/utils/hooks.py b/mmpose/utils/hooks.py index b62c2e494f..b68940f2b7 100644 --- a/mmpose/utils/hooks.py +++ b/mmpose/utils/hooks.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import functools diff --git a/mmpose/utils/logger.py b/mmpose/utils/logger.py index 221bb9a99d..294837fa6a 100644 --- a/mmpose/utils/logger.py +++ b/mmpose/utils/logger.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import logging from mmcv.utils import get_logger diff --git a/mmpose/utils/timer.py b/mmpose/utils/timer.py index 97d2bdd450..31cb217276 100644 --- a/mmpose/utils/timer.py +++ b/mmpose/utils/timer.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from collections import defaultdict import numpy as np diff --git a/tests/__init__.py b/tests/__init__.py index e69de29bb2..ef101fec61 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1 @@ +# Copyright (c) OpenMMLab. All rights reserved. diff --git a/tests/test_apis/test_inference.py b/tests/test_apis/test_inference.py index 479d594743..9754a15cf1 100644 --- a/tests/test_apis/test_inference.py +++ b/tests/test_apis/test_inference.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest diff --git a/tests/test_apis/test_inference_3d.py b/tests/test_apis/test_inference_3d.py index f4ce839675..02928f91c9 100644 --- a/tests/test_apis/test_inference_3d.py +++ b/tests/test_apis/test_inference_3d.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import tempfile diff --git a/tests/test_apis/test_inference_tracking.py b/tests/test_apis/test_inference_tracking.py index ae2a321219..080f2bdf6e 100644 --- a/tests/test_apis/test_inference_tracking.py +++ b/tests/test_apis/test_inference_tracking.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest from mmpose.apis import (get_track_id, inference_bottom_up_pose_model, diff --git a/tests/test_backbones/test_alexnet.py b/tests/test_backbones/test_alexnet.py index 99dad8ffa3..a01f3e8255 100644 --- a/tests/test_backbones/test_alexnet.py +++ b/tests/test_backbones/test_alexnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch from mmpose.models.backbones import AlexNet diff --git a/tests/test_backbones/test_backbones_utils.py b/tests/test_backbones/test_backbones_utils.py index a5f778536b..9b2769eb58 100644 --- a/tests/test_backbones/test_backbones_utils.py +++ b/tests/test_backbones/test_backbones_utils.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from torch.nn.modules import GroupNorm diff --git a/tests/test_backbones/test_cpm.py b/tests/test_backbones/test_cpm.py index 3a9481539a..c7a79a7d21 100644 --- a/tests/test_backbones/test_cpm.py +++ b/tests/test_backbones/test_cpm.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch diff --git a/tests/test_backbones/test_hourglass.py b/tests/test_backbones/test_hourglass.py index 85cfaf0106..b8a0e09003 100644 --- a/tests/test_backbones/test_hourglass.py +++ b/tests/test_backbones/test_hourglass.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch diff --git a/tests/test_backbones/test_hrnet.py b/tests/test_backbones/test_hrnet.py index 5de8545046..17f00b0f86 100644 --- a/tests/test_backbones/test_hrnet.py +++ b/tests/test_backbones/test_hrnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch from torch.nn.modules.batchnorm import _BatchNorm diff --git a/tests/test_backbones/test_litehrnet.py b/tests/test_backbones/test_litehrnet.py index a823edfe83..de2b6db776 100644 --- a/tests/test_backbones/test_litehrnet.py +++ b/tests/test_backbones/test_litehrnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from torch.nn.modules.batchnorm import _BatchNorm diff --git a/tests/test_backbones/test_mobilenet_v2.py b/tests/test_backbones/test_mobilenet_v2.py index 421de11261..1381ec2604 100644 --- a/tests/test_backbones/test_mobilenet_v2.py +++ b/tests/test_backbones/test_mobilenet_v2.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from torch.nn.modules import GroupNorm diff --git a/tests/test_backbones/test_mobilenet_v3.py b/tests/test_backbones/test_mobilenet_v3.py index 41ce602690..1cc00ea2a1 100644 --- a/tests/test_backbones/test_mobilenet_v3.py +++ b/tests/test_backbones/test_mobilenet_v3.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from torch.nn.modules import GroupNorm diff --git a/tests/test_backbones/test_mspn.py b/tests/test_backbones/test_mspn.py index f0abf476fd..6aca441763 100644 --- a/tests/test_backbones/test_mspn.py +++ b/tests/test_backbones/test_mspn.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch diff --git a/tests/test_backbones/test_regnet.py b/tests/test_backbones/test_regnet.py index f3e1b04f8a..165aad7f2f 100644 --- a/tests/test_backbones/test_regnet.py +++ b/tests/test_backbones/test_regnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch diff --git a/tests/test_backbones/test_resnest.py b/tests/test_backbones/test_resnest.py index 2c5cfdb553..3bb41b198b 100644 --- a/tests/test_backbones/test_resnest.py +++ b/tests/test_backbones/test_resnest.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch diff --git a/tests/test_backbones/test_resnet.py b/tests/test_backbones/test_resnet.py index 0e043cb2d5..036a76c19e 100644 --- a/tests/test_backbones/test_resnet.py +++ b/tests/test_backbones/test_resnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch import torch.nn as nn diff --git a/tests/test_backbones/test_resnext.py b/tests/test_backbones/test_resnext.py index 3b11c6c92b..88191e1427 100644 --- a/tests/test_backbones/test_resnext.py +++ b/tests/test_backbones/test_resnext.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch diff --git a/tests/test_backbones/test_rsn.py b/tests/test_backbones/test_rsn.py index 8e1b79a0b5..617dd9ed98 100644 --- a/tests/test_backbones/test_rsn.py +++ b/tests/test_backbones/test_rsn.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch diff --git a/tests/test_backbones/test_scnet.py b/tests/test_backbones/test_scnet.py index 400dacffc8..e03a87ba94 100644 --- a/tests/test_backbones/test_scnet.py +++ b/tests/test_backbones/test_scnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from torch.nn.modules.batchnorm import _BatchNorm diff --git a/tests/test_backbones/test_seresnet.py b/tests/test_backbones/test_seresnet.py index 2f867674f6..4484c66dde 100644 --- a/tests/test_backbones/test_seresnet.py +++ b/tests/test_backbones/test_seresnet.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from torch.nn.modules import AvgPool2d diff --git a/tests/test_backbones/test_seresnext.py b/tests/test_backbones/test_seresnext.py index a0c690546e..2c15605088 100644 --- a/tests/test_backbones/test_seresnext.py +++ b/tests/test_backbones/test_seresnext.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch diff --git a/tests/test_backbones/test_shufflenet_v1.py b/tests/test_backbones/test_shufflenet_v1.py index 70887f8431..302d52f56a 100644 --- a/tests/test_backbones/test_shufflenet_v1.py +++ b/tests/test_backbones/test_shufflenet_v1.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from torch.nn.modules import GroupNorm diff --git a/tests/test_backbones/test_shufflenet_v2.py b/tests/test_backbones/test_shufflenet_v2.py index e95a846af8..2af5254d87 100644 --- a/tests/test_backbones/test_shufflenet_v2.py +++ b/tests/test_backbones/test_shufflenet_v2.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from torch.nn.modules import GroupNorm diff --git a/tests/test_backbones/test_tcn.py b/tests/test_backbones/test_tcn.py index 7581b44c4b..be66a0a7d3 100644 --- a/tests/test_backbones/test_tcn.py +++ b/tests/test_backbones/test_tcn.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch diff --git a/tests/test_backbones/test_vgg.py b/tests/test_backbones/test_vgg.py index 9dcd7e9c3b..f69e38b3a3 100644 --- a/tests/test_backbones/test_vgg.py +++ b/tests/test_backbones/test_vgg.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from mmcv.utils.parrots_wrapper import _BatchNorm diff --git a/tests/test_backbones/test_vipnas.py b/tests/test_backbones/test_vipnas.py index 899aec45d7..d3ca70e174 100644 --- a/tests/test_backbones/test_vipnas.py +++ b/tests/test_backbones/test_vipnas.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch import torch.nn as nn diff --git a/tests/test_backward_compatibility/test_eval_hook_compatibility.py b/tests/test_backward_compatibility/test_eval_hook_compatibility.py index f809b54120..f62f5868aa 100644 --- a/tests/test_backward_compatibility/test_eval_hook_compatibility.py +++ b/tests/test_backward_compatibility/test_eval_hook_compatibility.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import unittest.mock as mock import pytest diff --git a/tests/test_backward_compatibility/test_registry_compatibility.py b/tests/test_backward_compatibility/test_registry_compatibility.py index 17054139ce..fd15c5b90a 100644 --- a/tests/test_backward_compatibility/test_registry_compatibility.py +++ b/tests/test_backward_compatibility/test_registry_compatibility.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest diff --git a/tests/test_compose.py b/tests/test_compose.py index f66a8a8866..a34f661907 100644 --- a/tests/test_compose.py +++ b/tests/test_compose.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest diff --git a/tests/test_config.py b/tests/test_config.py index 50ce03fb07..7c745ff83b 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from os.path import dirname, exists, join, relpath import torch diff --git a/tests/test_datasets/test_animal_dataset.py b/tests/test_datasets/test_animal_dataset.py index 4d0362e8b8..f46c03475a 100644 --- a/tests/test_datasets/test_animal_dataset.py +++ b/tests/test_datasets/test_animal_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import tempfile diff --git a/tests/test_datasets/test_body3d_dataset.py b/tests/test_datasets/test_body3d_dataset.py index ffe0cc3dde..27d25ba6ce 100644 --- a/tests/test_datasets/test_body3d_dataset.py +++ b/tests/test_datasets/test_body3d_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import tempfile import numpy as np diff --git a/tests/test_datasets/test_bottom_up_dataset.py b/tests/test_datasets/test_bottom_up_dataset.py index c1275da15c..02365e9b2f 100644 --- a/tests/test_datasets/test_bottom_up_dataset.py +++ b/tests/test_datasets/test_bottom_up_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import tempfile import numpy as np diff --git a/tests/test_datasets/test_face_dataset.py b/tests/test_datasets/test_face_dataset.py index 71d4f3d7e2..730357489c 100644 --- a/tests/test_datasets/test_face_dataset.py +++ b/tests/test_datasets/test_face_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import tempfile from unittest.mock import MagicMock diff --git a/tests/test_datasets/test_fashion_dataset.py b/tests/test_datasets/test_fashion_dataset.py index 97c16dc071..8cc04162a2 100644 --- a/tests/test_datasets/test_fashion_dataset.py +++ b/tests/test_datasets/test_fashion_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import tempfile from unittest.mock import MagicMock diff --git a/tests/test_datasets/test_hand_dataset.py b/tests/test_datasets/test_hand_dataset.py index 995cddd5cd..de0bc2c664 100644 --- a/tests/test_datasets/test_hand_dataset.py +++ b/tests/test_datasets/test_hand_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import tempfile diff --git a/tests/test_datasets/test_mesh_dataset.py b/tests/test_datasets/test_mesh_dataset.py index 9eb8a90034..59938a0658 100644 --- a/tests/test_datasets/test_mesh_dataset.py +++ b/tests/test_datasets/test_mesh_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import tempfile from mmpose.datasets import DATASETS diff --git a/tests/test_datasets/test_top_down_dataset.py b/tests/test_datasets/test_top_down_dataset.py index 6fc5f6ee81..7b05db61ff 100644 --- a/tests/test_datasets/test_top_down_dataset.py +++ b/tests/test_datasets/test_top_down_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import tempfile from unittest.mock import MagicMock diff --git a/tests/test_eval_hook.py b/tests/test_eval_hook.py index f32fa6b129..4a933dc6be 100644 --- a/tests/test_eval_hook.py +++ b/tests/test_eval_hook.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import tempfile import unittest.mock as mock diff --git a/tests/test_evaluation/test_bottom_up_eval.py b/tests/test_evaluation/test_bottom_up_eval.py index bcb3788ade..5bf900712d 100644 --- a/tests/test_evaluation/test_bottom_up_eval.py +++ b/tests/test_evaluation/test_bottom_up_eval.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import numpy as np diff --git a/tests/test_evaluation/test_mesh_eval.py b/tests/test_evaluation/test_mesh_eval.py index 81b94d8942..9ff4fa20e8 100644 --- a/tests/test_evaluation/test_mesh_eval.py +++ b/tests/test_evaluation/test_mesh_eval.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from numpy.testing import assert_array_almost_equal diff --git a/tests/test_evaluation/test_pose3d_eval.py b/tests/test_evaluation/test_pose3d_eval.py index c9acfb5fe9..80aaba57c2 100644 --- a/tests/test_evaluation/test_pose3d_eval.py +++ b/tests/test_evaluation/test_pose3d_eval.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest diff --git a/tests/test_evaluation/test_top_down_eval.py b/tests/test_evaluation/test_top_down_eval.py index 6a1a61ecfe..6d98460e94 100644 --- a/tests/test_evaluation/test_top_down_eval.py +++ b/tests/test_evaluation/test_top_down_eval.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest from numpy.testing import assert_array_almost_equal diff --git a/tests/test_external/test_smpl.py b/tests/test_external/test_smpl.py index 3cd4a55c75..cd054768e8 100644 --- a/tests/test_external/test_smpl.py +++ b/tests/test_external/test_smpl.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import tempfile diff --git a/tests/test_losses/test_bottom_up_losses.py b/tests/test_losses/test_bottom_up_losses.py index 3a598ea63c..803c19fa93 100644 --- a/tests/test_losses/test_bottom_up_losses.py +++ b/tests/test_losses/test_bottom_up_losses.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch diff --git a/tests/test_losses/test_classification_loss.py b/tests/test_losses/test_classification_loss.py index ee2adfd19a..3cda4d653b 100644 --- a/tests/test_losses/test_classification_loss.py +++ b/tests/test_losses/test_classification_loss.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch diff --git a/tests/test_losses/test_mesh_losses.py b/tests/test_losses/test_mesh_losses.py index 1904f6196f..98907675d2 100644 --- a/tests/test_losses/test_mesh_losses.py +++ b/tests/test_losses/test_mesh_losses.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from numpy.testing import assert_almost_equal diff --git a/tests/test_losses/test_regression_losses.py b/tests/test_losses/test_regression_losses.py index 26601ecfc2..6756c3ae97 100644 --- a/tests/test_losses/test_regression_losses.py +++ b/tests/test_losses/test_regression_losses.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch from mmpose.models import build_loss diff --git a/tests/test_losses/test_top_down_losses.py b/tests/test_losses/test_top_down_losses.py index e22ee15671..6f6e0b62b1 100644 --- a/tests/test_losses/test_top_down_losses.py +++ b/tests/test_losses/test_top_down_losses.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch diff --git a/tests/test_models/test_bottom_up_forward.py b/tests/test_models/test_bottom_up_forward.py index c72bf8601a..97b9ec3841 100644 --- a/tests/test_models/test_bottom_up_forward.py +++ b/tests/test_models/test_bottom_up_forward.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch diff --git a/tests/test_models/test_bottom_up_head.py b/tests/test_models/test_bottom_up_head.py index 41b2f4ef1e..618aab4c57 100644 --- a/tests/test_models/test_bottom_up_head.py +++ b/tests/test_models/test_bottom_up_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch diff --git a/tests/test_models/test_interhand_3d_forward.py b/tests/test_models/test_interhand_3d_forward.py index 59a16dd51d..a2b272487d 100644 --- a/tests/test_models/test_interhand_3d_forward.py +++ b/tests/test_models/test_interhand_3d_forward.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch diff --git a/tests/test_models/test_interhand_3d_head.py b/tests/test_models/test_interhand_3d_head.py index 2d259274d2..69242324ee 100644 --- a/tests/test_models/test_interhand_3d_head.py +++ b/tests/test_models/test_interhand_3d_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch diff --git a/tests/test_models/test_layer.py b/tests/test_models/test_layer.py index ca94b50d3e..b88fd1b958 100644 --- a/tests/test_models/test_layer.py +++ b/tests/test_models/test_layer.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch import torch.nn as nn diff --git a/tests/test_models/test_mesh_forward.py b/tests/test_models/test_mesh_forward.py index ac03eb3497..a6538f55dc 100644 --- a/tests/test_models/test_mesh_forward.py +++ b/tests/test_models/test_mesh_forward.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import tempfile diff --git a/tests/test_models/test_mesh_head.py b/tests/test_models/test_mesh_head.py index 91fad70776..4d1fc0e188 100644 --- a/tests/test_models/test_mesh_head.py +++ b/tests/test_models/test_mesh_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch diff --git a/tests/test_models/test_multitask_forward.py b/tests/test_models/test_multitask_forward.py index 61589668b7..f65e0387a5 100644 --- a/tests/test_models/test_multitask_forward.py +++ b/tests/test_models/test_multitask_forward.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch diff --git a/tests/test_models/test_pose_lifter_forward.py b/tests/test_models/test_pose_lifter_forward.py index a77223a3ed..99501320ad 100644 --- a/tests/test_models/test_pose_lifter_forward.py +++ b/tests/test_models/test_pose_lifter_forward.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import mmcv import numpy as np import torch diff --git a/tests/test_models/test_temporal_regression_head.py b/tests/test_models/test_temporal_regression_head.py index 4d487d620c..65f7d7823b 100644 --- a/tests/test_models/test_temporal_regression_head.py +++ b/tests/test_models/test_temporal_regression_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch diff --git a/tests/test_models/test_top_down_forward.py b/tests/test_models/test_top_down_forward.py index 42efa3e036..f59192ad4e 100644 --- a/tests/test_models/test_top_down_forward.py +++ b/tests/test_models/test_top_down_forward.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch diff --git a/tests/test_models/test_top_down_head.py b/tests/test_models/test_top_down_head.py index 502ef327dc..2558e33c52 100644 --- a/tests/test_models/test_top_down_head.py +++ b/tests/test_models/test_top_down_head.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch diff --git a/tests/test_necks/test_gap_neck.py b/tests/test_necks/test_gap_neck.py index c50610c4d5..57d26cb0bd 100644 --- a/tests/test_necks/test_gap_neck.py +++ b/tests/test_necks/test_gap_neck.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch diff --git a/tests/test_onnx.py b/tests/test_onnx.py index fbb9a14800..2cbc0b759c 100644 --- a/tests/test_onnx.py +++ b/tests/test_onnx.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import tempfile diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index 17a06c2bd6..2379f615c7 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn diff --git a/tests/test_pipelines/test_bottom_up_pipelines.py b/tests/test_pipelines/test_bottom_up_pipelines.py index ec855a4b79..037d07b8be 100644 --- a/tests/test_pipelines/test_bottom_up_pipelines.py +++ b/tests/test_pipelines/test_bottom_up_pipelines.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import os.path as osp diff --git a/tests/test_pipelines/test_hand_transform.py b/tests/test_pipelines/test_hand_transform.py index 4d95f72034..2225b87592 100644 --- a/tests/test_pipelines/test_hand_transform.py +++ b/tests/test_pipelines/test_hand_transform.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import numpy as np diff --git a/tests/test_pipelines/test_mesh_pipelines.py b/tests/test_pipelines/test_mesh_pipelines.py index 62e7978d94..e534d4d52e 100644 --- a/tests/test_pipelines/test_mesh_pipelines.py +++ b/tests/test_pipelines/test_mesh_pipelines.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import os diff --git a/tests/test_pipelines/test_pose3d_transform.py b/tests/test_pipelines/test_pose3d_transform.py index 293dd20763..b6a52d9d05 100644 --- a/tests/test_pipelines/test_pose3d_transform.py +++ b/tests/test_pipelines/test_pose3d_transform.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import os.path as osp import tempfile diff --git a/tests/test_pipelines/test_shared_transform.py b/tests/test_pipelines/test_shared_transform.py index 0772ea2a00..23f57d30f6 100644 --- a/tests/test_pipelines/test_shared_transform.py +++ b/tests/test_pipelines/test_shared_transform.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import numpy as np diff --git a/tests/test_pipelines/test_top_down_pipelines.py b/tests/test_pipelines/test_top_down_pipelines.py index 20377dbc5a..c2731b2c47 100644 --- a/tests/test_pipelines/test_top_down_pipelines.py +++ b/tests/test_pipelines/test_top_down_pipelines.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy import os.path as osp diff --git a/tests/test_post_processing.py b/tests/test_post_processing.py index d3d598534d..8830a978ec 100644 --- a/tests/test_post_processing.py +++ b/tests/test_post_processing.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from numpy.testing import assert_array_almost_equal diff --git a/tests/test_post_processing/test_filter.py b/tests/test_post_processing/test_filter.py index 98b094e25e..47016976f5 100644 --- a/tests/test_post_processing/test_filter.py +++ b/tests/test_post_processing/test_filter.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from mmpose.core.post_processing.one_euro_filter import OneEuroFilter diff --git a/tests/test_post_processing/test_group.py b/tests/test_post_processing/test_group.py index 4ba031a5fd..aea0be195e 100644 --- a/tests/test_post_processing/test_group.py +++ b/tests/test_post_processing/test_group.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import torch from mmpose.core.post_processing.group import HeatmapParser diff --git a/tests/test_post_processing/test_nms.py b/tests/test_post_processing/test_nms.py index 44bd7a4ad8..86da74f270 100644 --- a/tests/test_post_processing/test_nms.py +++ b/tests/test_post_processing/test_nms.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from mmpose.core.post_processing.nms import nms, oks_iou, oks_nms, soft_oks_nms diff --git a/tests/test_regularization.py b/tests/test_regularization.py index 3de10aceef..a93cc63adf 100644 --- a/tests/test_regularization.py +++ b/tests/test_regularization.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch diff --git a/tests/test_utils.py b/tests/test_utils.py index 67fa096cb8..a15a087ec1 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import time import cv2 diff --git a/tests/test_version.py b/tests/test_version.py index 28dcdcaddd..392ded4380 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import mmpose diff --git a/tests/test_visualization.py b/tests/test_visualization.py index 73e28fd5bc..88caa76941 100644 --- a/tests/test_visualization.py +++ b/tests/test_visualization.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import tempfile import mmcv diff --git a/tests/utils/mesh_utils.py b/tests/utils/mesh_utils.py index 2760ba26d9..a03b5ab28a 100644 --- a/tests/utils/mesh_utils.py +++ b/tests/utils/mesh_utils.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import os import pickle diff --git a/tools/analysis/analyze_logs.py b/tools/analysis/analyze_logs.py index 84380d23de..d0e1a02608 100644 --- a/tools/analysis/analyze_logs.py +++ b/tools/analysis/analyze_logs.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse import json from collections import defaultdict diff --git a/tools/analysis/benchmark_inference.py b/tools/analysis/benchmark_inference.py index 88aa174c3e..14c0736d5d 100755 --- a/tools/analysis/benchmark_inference.py +++ b/tools/analysis/benchmark_inference.py @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) OpenMMLab. All rights reserved. import argparse import time diff --git a/tools/analysis/benchmark_processing.py b/tools/analysis/benchmark_processing.py index 7dc379cca2..d326f3defb 100755 --- a/tools/analysis/benchmark_processing.py +++ b/tools/analysis/benchmark_processing.py @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) OpenMMLab. All rights reserved. """This file is for benchmark data loading process. It can also be used to refresh the memcached cache. The command line to run this file is: diff --git a/tools/analysis/get_flops.py b/tools/analysis/get_flops.py index b00bee28e1..46bb823913 100644 --- a/tools/analysis/get_flops.py +++ b/tools/analysis/get_flops.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse from mmcv import Config diff --git a/tools/analysis/print_config.py b/tools/analysis/print_config.py index 2ba994fb38..c3538ef56b 100644 --- a/tools/analysis/print_config.py +++ b/tools/analysis/print_config.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse from mmcv import Config, DictAction diff --git a/tools/dataset/h36m_to_coco.py b/tools/dataset/h36m_to_coco.py index 0093fe37a8..f306d409ee 100644 --- a/tools/dataset/h36m_to_coco.py +++ b/tools/dataset/h36m_to_coco.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse import os.path as osp from functools import wraps diff --git a/tools/dataset/mat2json.py b/tools/dataset/mat2json.py index 2938d970e3..caf7453e70 100644 --- a/tools/dataset/mat2json.py +++ b/tools/dataset/mat2json.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse import json import time diff --git a/tools/dataset/parse_animalpose_dataset.py b/tools/dataset/parse_animalpose_dataset.py index 08c298c459..db37860164 100644 --- a/tools/dataset/parse_animalpose_dataset.py +++ b/tools/dataset/parse_animalpose_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import json import os import re diff --git a/tools/dataset/parse_cofw_dataset.py b/tools/dataset/parse_cofw_dataset.py index 9a42533f0f..46b6affcb6 100644 --- a/tools/dataset/parse_cofw_dataset.py +++ b/tools/dataset/parse_cofw_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import json import os import time diff --git a/tools/dataset/parse_deepposekit_dataset.py b/tools/dataset/parse_deepposekit_dataset.py index e1281a291a..b751c3be5f 100644 --- a/tools/dataset/parse_deepposekit_dataset.py +++ b/tools/dataset/parse_deepposekit_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import json import os import time diff --git a/tools/dataset/parse_macaquepose_dataset.py b/tools/dataset/parse_macaquepose_dataset.py index 0f251a3db6..39be985272 100644 --- a/tools/dataset/parse_macaquepose_dataset.py +++ b/tools/dataset/parse_macaquepose_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import csv import json import os diff --git a/tools/dataset/preprocess_mpi_inf_3dhp.py b/tools/dataset/preprocess_mpi_inf_3dhp.py index f32ec42e6b..3bef25c943 100644 --- a/tools/dataset/preprocess_mpi_inf_3dhp.py +++ b/tools/dataset/preprocess_mpi_inf_3dhp.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse import os import pickle diff --git a/tools/deployment/pytorch2onnx.py b/tools/deployment/pytorch2onnx.py index c904a49ec4..bd27a4a99d 100644 --- a/tools/deployment/pytorch2onnx.py +++ b/tools/deployment/pytorch2onnx.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse import numpy as np diff --git a/tools/dist_test.sh b/tools/dist_test.sh index 3c74ec6ecd..9dcb8851c9 100755 --- a/tools/dist_test.sh +++ b/tools/dist_test.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) OpenMMLab. All rights reserved. CONFIG=$1 CHECKPOINT=$2 diff --git a/tools/dist_train.sh b/tools/dist_train.sh index 5b43fffbf2..9727f5310a 100755 --- a/tools/dist_train.sh +++ b/tools/dist_train.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) OpenMMLab. All rights reserved. CONFIG=$1 GPUS=$2 diff --git a/tools/misc/publish_model.py b/tools/misc/publish_model.py index 12a7f784c2..393721ab06 100644 --- a/tools/misc/publish_model.py +++ b/tools/misc/publish_model.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse import subprocess from datetime import date diff --git a/tools/slurm_test.sh b/tools/slurm_test.sh index 6dd67e5744..c528dc9d45 100755 --- a/tools/slurm_test.sh +++ b/tools/slurm_test.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) OpenMMLab. All rights reserved. set -x diff --git a/tools/slurm_train.sh b/tools/slurm_train.sh index b3feb3d9c7..c3b65490a5 100755 --- a/tools/slurm_train.sh +++ b/tools/slurm_train.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) OpenMMLab. All rights reserved. set -x diff --git a/tools/test.py b/tools/test.py index 02138f8758..a1e095268a 100644 --- a/tools/test.py +++ b/tools/test.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse import os import os.path as osp diff --git a/tools/train.py b/tools/train.py index b0b78c6e1f..f57c876fcd 100644 --- a/tools/train.py +++ b/tools/train.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import argparse import copy import os From e3367023b84a7a15c0130d94efa1a093153a37b1 Mon Sep 17 00:00:00 2001 From: "ZhiYuan-REN:-)" <52560835+ZhiYuan-REN@users.noreply.github.com> Date: Fri, 27 Aug 2021 13:41:29 +0800 Subject: [PATCH 07/19] Translate tasks/2d_body_keypoint.md (#842) * 2rd PR remove poseval * fix lint * revise the CN version Co-authored-by: ly015 --- docs/tasks/2d_body_keypoint.md | 2 +- docs_zh-CN/tasks/2d_body_keypoint.md | 497 ++++++++++++++++++++++++++- 2 files changed, 496 insertions(+), 3 deletions(-) diff --git a/docs/tasks/2d_body_keypoint.md b/docs/tasks/2d_body_keypoint.md index a275235d13..625e4d5714 100644 --- a/docs/tasks/2d_body_keypoint.md +++ b/docs/tasks/2d_body_keypoint.md @@ -40,8 +40,8 @@ MMPose supported datasets: For [COCO](http://cocodataset.org/) data, please download from [COCO download](http://cocodataset.org/#download), 2017 Train/Val is needed for COCO keypoints training and validation. [HRNet-Human-Pose-Estimation](https://github.com/HRNet/HRNet-Human-Pose-Estimation) provides person detection result of COCO val2017 to reproduce our multi-person pose estimation results. Please download from [OneDrive](https://1drv.ms/f/s!AhIXJn_J-blWzzDXoz5BeFl8sWM-) or [GoogleDrive](https://drive.google.com/drive/folders/1fRUDNUDxe9fjqcRZ2bnF_TKMlO0nB_dk?usp=sharing). -Download and extract them under $MMPOSE/data, and make them look like this: Optionally, to evaluate on COCO'2017 test-dev, please download the [image-info](https://download.openmmlab.com/mmpose/datasets/person_keypoints_test-dev-2017.json). +Download and extract them under $MMPOSE/data, and make them look like this: ```text mmpose diff --git a/docs_zh-CN/tasks/2d_body_keypoint.md b/docs_zh-CN/tasks/2d_body_keypoint.md index 3da95780e2..47a1c3e40a 100644 --- a/docs_zh-CN/tasks/2d_body_keypoint.md +++ b/docs_zh-CN/tasks/2d_body_keypoint.md @@ -1,3 +1,496 @@ -# 2D人体关键点数据集 +# 2D 人体关键点数据集 -内容建设中…… +我们建议您将数据集的根目录放置在 `$MMPOSE/data` 下。 +如果您的文件结构比较特别,您需要在配置文件中修改相应的路径。 + +MMPose 支持的数据集如下所示: + +- 图像 + - [COCO](#coco) \[ [主页](http://cocodataset.org/) \] + - [MPII](#mpii) \[ [主页](http://human-pose.mpi-inf.mpg.de/) \] + - [MPII-TRB](#mpii-trb) \[ [主页](https://github.com/kennymckormick/Triplet-Representation-of-human-Body) \] + - [AI Challenger](#aic) \[ [主页](https://github.com/AIChallenger/AI_Challenger_2017) \] + - [CrowdPose](#crowdpose) \[ [主页](https://github.com/Jeff-sjtu/CrowdPose) \] + - [OCHuman](#ochuman) \[ [主页](https://github.com/liruilong940607/OCHumanApi) \] + - [MHP](#mhp) \[ [主页](https://lv-mhp.github.io/dataset) \] +- 视频 + - [PoseTrack18](#posetrack18) \[ [主页](https://posetrack.net/users/download.php) \] + - [sub-JHMDB](#sub-jhmdb-dataset) \[ [主页](http://jhmdb.is.tue.mpg.de/dataset) \] + +## COCO + + + +
+COCO (ECCV'2014) + +```bibtex +@inproceedings{lin2014microsoft, + title={Microsoft coco: Common objects in context}, + author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence}, + booktitle={European conference on computer vision}, + pages={740--755}, + year={2014}, + organization={Springer} +} +``` + +
+ +请从此链接 [COCO download](http://cocodataset.org/#download) 下载数据集。请注意,2017 Train/Val 对于 COCO 关键点的训练和评估是非常必要的。 +[HRNet-Human-Pose-Estimation](https://github.com/HRNet/HRNet-Human-Pose-Estimation) 提供了 COCO val2017 的检测结果,可用于复现我们的多人姿态估计的结果。 +请从 [OneDrive](https://1drv.ms/f/s!AhIXJn_J-blWzzDXoz5BeFl8sWM-) 或 [GoogleDrive](https://drive.google.com/drive/folders/1fRUDNUDxe9fjqcRZ2bnF_TKMlO0nB_dk?usp=sharing)下载。 +可选地, 为了在 COCO'2017 test-dev 上评估, 请下载 [image-info](https://download.openmmlab.com/mmpose/datasets/person_keypoints_test-dev-2017.json)。 +请将数据置于 $MMPOSE/data 目录下,并整理成如下的格式: + +```text +mmpose +├── mmpose +├── docs +├── tests +├── tools +├── configs +`── data + │── coco + │-- annotations + │ │-- person_keypoints_train2017.json + │ |-- person_keypoints_val2017.json + │ |-- person_keypoints_test-dev-2017.json + |-- person_detection_results + | |-- COCO_val2017_detections_AP_H_56_person.json + | |-- COCO_test-dev2017_detections_AP_H_609_person.json + │-- train2017 + │ │-- 000000000009.jpg + │ │-- 000000000025.jpg + │ │-- 000000000030.jpg + │ │-- ... + `-- val2017 + │-- 000000000139.jpg + │-- 000000000285.jpg + │-- 000000000632.jpg + │-- ... + +``` + +## MPII + + + +
+MPII (CVPR'2014) + +```bibtex +@inproceedings{andriluka14cvpr, + author = {Mykhaylo Andriluka and Leonid Pishchulin and Peter Gehler and Schiele, Bernt}, + title = {2D Human Pose Estimation: New Benchmark and State of the Art Analysis}, + booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, + year = {2014}, + month = {June} +} +``` + +
+ +请从此链接 [MPII Human Pose Dataset](http://human-pose.mpi-inf.mpg.de/) 下载数据集。 +我们已经将原来的标注文件转成了 json 格式,请从此链接 [mpii_annotations](https://download.openmmlab.com/mmpose/datasets/mpii_annotations.tar) 下载。 +请将数据置于 $MMPOSE/data 目录下,并整理成如下的格式: + +```text +mmpose +├── mmpose +├── docs +├── tests +├── tools +├── configs +`── data + │── mpii + |── annotations + | |── mpii_gt_val.mat + | |── mpii_test.json + | |── mpii_train.json + | |── mpii_trainval.json + | `── mpii_val.json + `── images + |── 000001163.jpg + |── 000003072.jpg + +``` + +在训练和推理过程中,预测结果将会被默认保存为 '.mat' 的格式。我们提供了一个工具将这种 '.mat' 的格式转换成更加易读的 '.json' 格式。 + +```shell +python tools/dataset/mat2json ${PRED_MAT_FILE} ${GT_JSON_FILE} ${OUTPUT_PRED_JSON_FILE} +``` + +比如, + +```shell +python tools/dataset/mat2json work_dirs/res50_mpii_256x256/pred.mat data/mpii/annotations/mpii_val.json pred.json +``` + +## MPII-TRB + + + +
+MPII-TRB (ICCV'2019) + +```bibtex +@inproceedings{duan2019trb, + title={TRB: A Novel Triplet Representation for Understanding 2D Human Body}, + author={Duan, Haodong and Lin, Kwan-Yee and Jin, Sheng and Liu, Wentao and Qian, Chen and Ouyang, Wanli}, + booktitle={Proceedings of the IEEE International Conference on Computer Vision}, + pages={9479--9488}, + year={2019} +} +``` + +
+ +请从此链接[MPII Human Pose Dataset](http://human-pose.mpi-inf.mpg.de/)下载数据集,并从此链接 [mpii_trb_annotations](https://download.openmmlab.com/mmpose/datasets/mpii_trb_annotations.tar) 下载标注文件。 +请将数据置于 $MMPOSE/data 目录下,并整理成如下的格式: + +```text +mmpose +├── mmpose +├── docs +├── tests +├── tools +├── configs +`── data + │── mpii + |── annotations + | |── mpii_trb_train.json + | |── mpii_trb_val.json + `── images + |── 000001163.jpg + |── 000003072.jpg + +``` + +## AIC + + + +
+AI Challenger (ArXiv'2017) + +```bibtex +@article{wu2017ai, + title={Ai challenger: A large-scale dataset for going deeper in image understanding}, + author={Wu, Jiahong and Zheng, He and Zhao, Bo and Li, Yixin and Yan, Baoming and Liang, Rui and Wang, Wenjia and Zhou, Shipei and Lin, Guosen and Fu, Yanwei and others}, + journal={arXiv preprint arXiv:1711.06475}, + year={2017} +} +``` + +
+ +请从此链接 [AI Challenger 2017](https://github.com/AIChallenger/AI_Challenger_2017) 下载 [AIC](https://github.com/AIChallenger/AI_Challenger_2017) 数据集。请注意,2017 Train/Val 对于关键点的训练和评估是必要的。 +请从此链接 [aic_annotations](https://download.openmmlab.com/mmpose/datasets/aic_annotations.tar) 下载标注文件。 +请将数据置于 $MMPOSE/data 目录下,并整理成如下的格式: + +```text +mmpose +├── mmpose +├── docs +├── tests +├── tools +├── configs +`── data + │── aic + │-- annotations + │ │-- aic_train.json + │ |-- aic_val.json + │-- ai_challenger_keypoint_train_20170902 + │ │-- keypoint_train_images_20170902 + │ │ │-- 0000252aea98840a550dac9a78c476ecb9f47ffa.jpg + │ │ │-- 000050f770985ac9653198495ef9b5c82435d49c.jpg + │ │ │-- ... + `-- ai_challenger_keypoint_validation_20170911 + │-- keypoint_validation_images_20170911 + │-- 0002605c53fb92109a3f2de4fc3ce06425c3b61f.jpg + │-- 0003b55a2c991223e6d8b4b820045bd49507bf6d.jpg + │-- ... +``` + +## CrowdPose + + + +
+CrowdPose (CVPR'2019) + +```bibtex +@article{li2018crowdpose, + title={CrowdPose: Efficient Crowded Scenes Pose Estimation and A New Benchmark}, + author={Li, Jiefeng and Wang, Can and Zhu, Hao and Mao, Yihuan and Fang, Hao-Shu and Lu, Cewu}, + journal={arXiv preprint arXiv:1812.00324}, + year={2018} +} +``` + +
+ +请从此链接 [CrowdPose](https://github.com/Jeff-sjtu/CrowdPose) 下载数据集,并从此链接 [crowdpose_annotations](https://download.openmmlab.com/mmpose/datasets/crowdpose_annotations.tar) 下载标注文件和人体检测结果。 +对于 top-down 方法,我们仿照 [CrowdPose](https://arxiv.org/abs/1812.00324),使用 [YOLOv3](https://github.com/eriklindernoren/PyTorch-YOLOv3)的[预训练权重](https://pjreddie.com/media/files/yolov3.weights) 来产生人体的检测框。 +对于模型训练, 我们仿照 [HigherHRNet](https://github.com/HRNet/HigherHRNet-Human-Pose-Estimation),在 CrowdPose 训练/验证 数据集上训练模型, 并在 CrowdPose 测试集上评估模型。 +请将数据置于 $MMPOSE/data 目录下,并整理成如下的格式: + +```text +mmpose +├── mmpose +├── docs +├── tests +├── tools +├── configs +`── data + │── crowdpose + │-- annotations + │ │-- mmpose_crowdpose_train.json + │ │-- mmpose_crowdpose_val.json + │ │-- mmpose_crowdpose_trainval.json + │ │-- mmpose_crowdpose_test.json + │ │-- det_for_crowd_test_0.1_0.5.json + │-- images + │-- 100000.jpg + │-- 100001.jpg + │-- 100002.jpg + │-- ... +``` + +## OCHuman + + + +
+OCHuman (CVPR'2019) + +```bibtex +@inproceedings{zhang2019pose2seg, + title={Pose2seg: Detection free human instance segmentation}, + author={Zhang, Song-Hai and Li, Ruilong and Dong, Xin and Rosin, Paul and Cai, Zixi and Han, Xi and Yang, Dingcheng and Huang, Haozhi and Hu, Shi-Min}, + booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition}, + pages={889--898}, + year={2019} +} +``` + +
+ +请从此链接 [OCHuman](https://github.com/liruilong940607/OCHumanApi) 下载数据集的图像和标注文件。 +请将数据置于 $MMPOSE/data 目录下,并整理成如下的格式: + +```text +mmpose +├── mmpose +├── docs +├── tests +├── tools +├── configs +`── data + │── ochuman + │-- annotations + │ │-- ochuman_coco_format_val_range_0.00_1.00.json + │ |-- ochuman_coco_format_test_range_0.00_1.00.json + |-- images + │-- 000001.jpg + │-- 000002.jpg + │-- 000003.jpg + │-- ... + +``` + +## MHP + + + +
+MHP (ACM MM'2018) + +```bibtex +@inproceedings{zhao2018understanding, + title={Understanding humans in crowded scenes: Deep nested adversarial learning and a new benchmark for multi-human parsing}, + author={Zhao, Jian and Li, Jianshu and Cheng, Yu and Sim, Terence and Yan, Shuicheng and Feng, Jiashi}, + booktitle={Proceedings of the 26th ACM international conference on Multimedia}, + pages={792--800}, + year={2018} +} +``` + +
+ +请从此链接 [MHP](https://lv-mhp.github.io/dataset)下载数据文件,并从此链接 [mhp_annotations](https://download.openmmlab.com/mmpose/datasets/mhp_annotations.tar.gz)下载标注文件。 +请将数据置于 $MMPOSE/data 目录下,并整理成如下的格式: + +```text +mmpose +├── mmpose +├── docs +├── tests +├── tools +├── configs +`── data + │── mhp + │-- annotations + │ │-- mhp_train.json + │ │-- mhp_val.json + │ + `-- train + │ │-- images + │ │ │-- 1004.jpg + │ │ │-- 10050.jpg + │ │ │-- ... + │ + `-- val + │ │-- images + │ │ │-- 10059.jpg + │ │ │-- 10068.jpg + │ │ │-- ... + │ + `-- test + │ │-- images + │ │ │-- 1005.jpg + │ │ │-- 10052.jpg + │ │ │-- ...~~~~ +``` + +## PoseTrack18 + + + +
+PoseTrack18 (CVPR'2018) + +```bibtex +@inproceedings{andriluka2018posetrack, + title={Posetrack: A benchmark for human pose estimation and tracking}, + author={Andriluka, Mykhaylo and Iqbal, Umar and Insafutdinov, Eldar and Pishchulin, Leonid and Milan, Anton and Gall, Juergen and Schiele, Bernt}, + booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition}, + pages={5167--5176}, + year={2018} +} +``` + +
+ +请从此链接 [PoseTrack18](https://posetrack.net/users/download.php)下载数据文件,并从此链接下载 [posetrack18_annotations](https://download.openmmlab.com/mmpose/datasets/posetrack18_annotations.tar)下载标注文件。 +我们已将官方提供的所有单视频标注文件合并为两个 json 文件 (posetrack18_train & posetrack18_val.json),并生成了 [mask files](https://download.openmmlab.com/mmpose/datasets/posetrack18_mask.tar) 来加速训练。 +对于 top-down 的方法, 我们使用 [MMDetection](https://github.com/open-mmlab/mmdetection) 的预训练 [Cascade R-CNN](https://download.openmmlab.com/mmdetection/v2.0/cascade_rcnn/cascade_rcnn_x101_64x4d_fpn_20e_coco/cascade_rcnn_x101_64x4d_fpn_20e_coco_20200509_224357-051557b1.pth) (X-101-64x4d-FPN) 来生成人体的检测框。 +请将数据置于 $MMPOSE/data 目录下,并整理成如下的格式: + +```text +mmpose +├── mmpose +├── docs +├── tests +├── tools +├── configs +`── data + │── posetrack18 + │-- annotations + │ │-- posetrack18_train.json + │ │-- posetrack18_val.json + │ │-- posetrack18_val_human_detections.json + │ │-- train + │ │ │-- 000001_bonn_train.json + │ │ │-- 000002_bonn_train.json + │ │ │-- ... + │ │-- val + │ │ │-- 000342_mpii_test.json + │ │ │-- 000522_mpii_test.json + │ │ │-- ... + │ `-- test + │ │-- 000001_mpiinew_test.json + │ │-- 000002_mpiinew_test.json + │ │-- ... + │ + `-- images + │ │-- train + │ │ │-- 000001_bonn_train + │ │ │ │-- 000000.jpg + │ │ │ │-- 000001.jpg + │ │ │ │-- ... + │ │ │-- ... + │ │-- val + │ │ │-- 000342_mpii_test + │ │ │ │-- 000000.jpg + │ │ │ │-- 000001.jpg + │ │ │ │-- ... + │ │ │-- ... + │ `-- test + │ │-- 000001_mpiinew_test + │ │ │-- 000000.jpg + │ │ │-- 000001.jpg + │ │ │-- ... + │ │-- ... + `-- mask + │-- train + │ │-- 000002_bonn_train + │ │ │-- 000000.jpg + │ │ │-- 000001.jpg + │ │ │-- ... + │ │-- ... + `-- val + │-- 000522_mpii_test + │ │-- 000000.jpg + │ │-- 000001.jpg + │ │-- ... + │-- ... +``` + +请从 Github 上安装 PoseTrack 官方评估工具: + +```shell +pip install git+https://github.com/svenkreiss/poseval.git +``` + +## sub-JHMDB dataset + + + +
+RSN (ECCV'2020) + +```bibtex +@misc{cai2020learning, + title={Learning Delicate Local Representations for Multi-Person Pose Estimation}, + author={Yuanhao Cai and Zhicheng Wang and Zhengxiong Luo and Binyi Yin and Angang Du and Haoqian Wang and Xinyu Zhou and Erjin Zhou and Xiangyu Zhang and Jian Sun}, + year={2020}, + eprint={2003.04030}, + archivePrefix={arXiv}, + primaryClass={cs.CV} +} +``` + +
+ +对于 [sub-JHMDB](http://jhmdb.is.tue.mpg.de/dataset) 数据集,请从此链接 [images](<(http://files.is.tue.mpg.de/jhmdb/Rename_Images.tar.gz)>) (来自 [JHMDB](http://jhmdb.is.tue.mpg.de/dataset))下载, +请从此链接 [jhmdb_annotations](https://download.openmmlab.com/mmpose/datasets/jhmdb_annotations.tar)下载标注文件。 +将它们移至 $MMPOSE/data目录下, 使得文件呈如下的格式: + +```text +mmpose +├── mmpose +├── docs +├── tests +├── tools +├── configs +`── data + │── jhmdb + │-- annotations + │ │-- Sub1_train.json + │ |-- Sub1_test.json + │ │-- Sub2_train.json + │ |-- Sub2_test.json + │ │-- Sub3_train.json + │ |-- Sub3_test.json + |-- Rename_Images + │-- brush_hair + │ │--April_09_brush_hair_u_nm_np1_ba_goo_0 + | │ │--00001.png + | │ │--00002.png + │-- catch + │-- ... + +``` From a60408d3bb3a64493a6efd025d9f87c008a13a75 Mon Sep 17 00:00:00 2001 From: zengwang Date: Tue, 24 Aug 2021 01:59:54 +0800 Subject: [PATCH 08/19] fix some bugs in the unit test of smpl model. --- tests/test_external/test_smpl.py | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tests/test_external/test_smpl.py b/tests/test_external/test_smpl.py index cd054768e8..348e025e9a 100644 --- a/tests/test_external/test_smpl.py +++ b/tests/test_external/test_smpl.py @@ -5,10 +5,47 @@ import numpy as np import torch from tests.utils.mesh_utils import generate_smpl_weight_file +======= +import os +import pickle + +import numpy as np +import torch +from scipy.sparse import csc_matrix +>>>>>>> fix some bugs in the unit test of smpl model.:tests/test_model/test_smpl.py from mmpose.models.utils import SMPL +def generate_smpl_weight_file(output_dir): + """Generate a SMPL model weight file to initialize SMPL model, and generate + a 3D joints regressor file.""" + + if not os.path.exists(output_dir): + os.makedirs(output_dir) + + joint_regressor_file = os.path.join(output_dir, 'test_joint_regressor.npy') + np.save(joint_regressor_file, np.zeros([24, 6890])) + + test_data = {} + test_data['f'] = np.zeros([1, 3], dtype=np.int32) + test_data['J_regressor'] = csc_matrix(np.zeros([24, 6890])) + test_data['kintree_table'] = np.zeros([2, 24], dtype=np.uint32) + test_data['J'] = np.zeros([24, 3]) + test_data['weights'] = np.zeros([6890, 24]) + test_data['posedirs'] = np.zeros([6890, 3, 207]) + test_data['v_template'] = np.zeros([6890, 3]) + test_data['shapedirs'] = np.zeros([6890, 3, 10]) + + with open(os.path.join(output_dir, 'SMPL_NEUTRAL.pkl'), 'wb') as out_file: + pickle.dump(test_data, out_file) + with open(os.path.join(output_dir, 'SMPL_MALE.pkl'), 'wb') as out_file: + pickle.dump(test_data, out_file) + with open(os.path.join(output_dir, 'SMPL_FEMALE.pkl'), 'wb') as out_file: + pickle.dump(test_data, out_file) + return + + def test_smpl(): """Test smpl model.""" From a1eb217c3bf524ef1af181a45e44236365a97835 Mon Sep 17 00:00:00 2001 From: ly015 Date: Tue, 24 Aug 2021 11:55:38 +0800 Subject: [PATCH 09/19] * reorganiz `tests/` to solve importing issue (PEP 420) --- tests/test_external/test_smpl.py | 37 -------------------------------- 1 file changed, 37 deletions(-) diff --git a/tests/test_external/test_smpl.py b/tests/test_external/test_smpl.py index 348e025e9a..cd054768e8 100644 --- a/tests/test_external/test_smpl.py +++ b/tests/test_external/test_smpl.py @@ -5,47 +5,10 @@ import numpy as np import torch from tests.utils.mesh_utils import generate_smpl_weight_file -======= -import os -import pickle - -import numpy as np -import torch -from scipy.sparse import csc_matrix ->>>>>>> fix some bugs in the unit test of smpl model.:tests/test_model/test_smpl.py from mmpose.models.utils import SMPL -def generate_smpl_weight_file(output_dir): - """Generate a SMPL model weight file to initialize SMPL model, and generate - a 3D joints regressor file.""" - - if not os.path.exists(output_dir): - os.makedirs(output_dir) - - joint_regressor_file = os.path.join(output_dir, 'test_joint_regressor.npy') - np.save(joint_regressor_file, np.zeros([24, 6890])) - - test_data = {} - test_data['f'] = np.zeros([1, 3], dtype=np.int32) - test_data['J_regressor'] = csc_matrix(np.zeros([24, 6890])) - test_data['kintree_table'] = np.zeros([2, 24], dtype=np.uint32) - test_data['J'] = np.zeros([24, 3]) - test_data['weights'] = np.zeros([6890, 24]) - test_data['posedirs'] = np.zeros([6890, 3, 207]) - test_data['v_template'] = np.zeros([6890, 3]) - test_data['shapedirs'] = np.zeros([6890, 3, 10]) - - with open(os.path.join(output_dir, 'SMPL_NEUTRAL.pkl'), 'wb') as out_file: - pickle.dump(test_data, out_file) - with open(os.path.join(output_dir, 'SMPL_MALE.pkl'), 'wb') as out_file: - pickle.dump(test_data, out_file) - with open(os.path.join(output_dir, 'SMPL_FEMALE.pkl'), 'wb') as out_file: - pickle.dump(test_data, out_file) - return - - def test_smpl(): """Test smpl model.""" From e03f5a837fd3c3d8b21610c93c8447cad69bcd43 Mon Sep 17 00:00:00 2001 From: jinsheng Date: Thu, 20 May 2021 19:33:49 +0800 Subject: [PATCH 10/19] add dataset info --- configs/_base_/datasets/300w.py | 384 ++++++ configs/_base_/datasets/aflw.py | 83 ++ configs/_base_/datasets/aic.py | 140 ++ configs/_base_/datasets/animalpose.py | 166 +++ configs/_base_/datasets/atrw.py | 144 +++ configs/_base_/datasets/coco.py | 181 +++ configs/_base_/datasets/coco_wholebody.py | 1150 +++++++++++++++++ configs/_base_/datasets/cofw.py | 134 ++ configs/_base_/datasets/crowdpose.py | 147 +++ configs/_base_/datasets/deepfashion_full.py | 74 ++ configs/_base_/datasets/deepfashion_lower.py | 46 + configs/_base_/datasets/deepfashion_upper.py | 60 + configs/_base_/datasets/fly.py | 237 ++++ configs/_base_/datasets/freihand2d.py | 144 +++ configs/_base_/datasets/h36m.py | 151 +++ configs/_base_/datasets/horse10.py | 201 +++ configs/_base_/datasets/interhand2d.py | 142 ++ configs/_base_/datasets/interhand3d.py | 487 +++++++ configs/_base_/datasets/jhmdb.py | 129 ++ configs/_base_/datasets/locust.py | 263 ++++ configs/_base_/datasets/macaque.py | 183 +++ configs/_base_/datasets/mhp.py | 156 +++ configs/_base_/datasets/mpi_inf_3dhp.py | 132 ++ configs/_base_/datasets/mpii.py | 155 +++ configs/_base_/datasets/mpii_trb.py | 380 ++++++ configs/_base_/datasets/ochuman.py | 181 +++ configs/_base_/datasets/onehand10k.py | 142 ++ configs/_base_/datasets/panoptic_hand2d.py | 143 ++ configs/_base_/datasets/posetrack18.py | 176 +++ configs/_base_/datasets/rhd2d.py | 141 ++ configs/_base_/datasets/wflw.py | 582 +++++++++ configs/_base_/datasets/zebra.py | 64 + .../hrnet_w32_animalpose_256x256.py | 10 +- .../hrnet_w48_animalpose_256x256.py | 10 +- .../animalpose/res101_animalpose_256x256.py | 10 +- .../animalpose/res152_animalpose_256x256.py | 10 +- .../animalpose/res50_animalpose_256x256.py | 10 +- .../atrw/hrnet_w32_atrw_256x256.py | 10 +- .../atrw/hrnet_w48_atrw_256x256.py | 10 +- .../atrw/res101_atrw_256x256.py | 10 +- .../atrw/res152_atrw_256x256.py | 10 +- .../atrw/res50_atrw_256x256.py | 10 +- .../topdown_heatmap/fly/res101_fly_192x192.py | 10 +- .../topdown_heatmap/fly/res152_fly_192x192.py | 10 +- .../topdown_heatmap/fly/res50_fly_192x192.py | 10 +- .../hrnet_w32_horse10_256x256-split1.py | 10 +- .../hrnet_w32_horse10_256x256-split2.py | 10 +- .../hrnet_w32_horse10_256x256-split3.py | 10 +- .../hrnet_w48_horse10_256x256-split1.py | 10 +- .../hrnet_w48_horse10_256x256-split2.py | 10 +- .../hrnet_w48_horse10_256x256-split3.py | 10 +- .../horse10/res101_horse10_256x256-split1.py | 10 +- .../horse10/res101_horse10_256x256-split2.py | 10 +- .../horse10/res101_horse10_256x256-split3.py | 10 +- .../horse10/res152_horse10_256x256-split1.py | 10 +- .../horse10/res152_horse10_256x256-split2.py | 10 +- .../horse10/res152_horse10_256x256-split3.py | 10 +- .../horse10/res50_horse10_256x256-split1.py | 10 +- .../horse10/res50_horse10_256x256-split2.py | 10 +- .../horse10/res50_horse10_256x256-split3.py | 10 +- .../locust/res101_locust_160x160.py | 10 +- .../locust/res152_locust_160x160.py | 10 +- .../locust/res50_locust_160x160.py | 10 +- .../macaque/hrnet_w32_macaque_256x192.py | 10 +- .../macaque/hrnet_w48_macaque_256x192.py | 10 +- .../macaque/res101_macaque_256x192.py | 10 +- .../macaque/res152_macaque_256x192.py | 10 +- .../macaque/res50_macaque_256x192.py | 10 +- .../zebra/res101_zebra_160x160.py | 10 +- .../zebra/res152_zebra_160x160.py | 10 +- .../zebra/res50_zebra_160x160.py | 10 +- .../aic/higherhrnet_w32_aic_512x512.py | 10 +- .../aic/higherhrnet_w32_aic_512x512_udp.py | 10 +- .../aic/hrnet_w32_aic_512x512.py | 10 +- .../coco/higherhrnet_w32_coco_512x512.py | 10 +- .../coco/higherhrnet_w32_coco_512x512_udp.py | 10 +- .../coco/higherhrnet_w32_coco_640x640.py | 10 +- .../coco/higherhrnet_w32_coco_640x640_udp.py | 10 +- .../coco/higherhrnet_w48_coco_512x512.py | 10 +- .../coco/higherhrnet_w48_coco_512x512_udp.py | 10 +- .../coco/hrnet_w32_coco_512x512.py | 10 +- .../coco/hrnet_w32_coco_512x512_udp.py | 10 +- .../coco/hrnet_w32_coco_640x640.py | 10 +- .../coco/hrnet_w32_coco_640x640_udp.py | 10 +- .../coco/hrnet_w48_coco_512x512.py | 10 +- .../coco/hrnet_w48_coco_512x512_udp.py | 10 +- .../coco/hrnet_w48_coco_640x640.py | 10 +- .../coco/hrnet_w48_coco_640x640_udp.py | 10 +- .../coco/mobilenetv2_coco_512x512.py | 10 +- .../coco/res101_coco_512x512.py | 10 +- .../coco/res101_coco_640x640.py | 10 +- .../coco/res152_coco_512x512.py | 10 +- .../coco/res152_coco_640x640.py | 10 +- .../coco/res50_coco_512x512.py | 10 +- .../coco/res50_coco_640x640.py | 10 +- .../higherhrnet_w32_crowdpose_512x512.py | 10 +- .../higherhrnet_w32_crowdpose_512x512_udp.py | 10 +- .../higherhrnet_w32_crowdpose_640x640.py | 10 +- .../higherhrnet_w32_crowdpose_640x640_udp.py | 10 +- .../higherhrnet_w48_crowdpose_512x512.py | 10 +- .../higherhrnet_w48_crowdpose_512x512_udp.py | 10 +- .../mobilenetv2_crowdpose_512x512.py | 10 +- .../crowdpose/res101_crowdpose_512x512.py | 10 +- .../crowdpose/res152_crowdpose_512x512.py | 10 +- .../crowdpose/res50_crowdpose_512x512.py | 10 +- .../mhp/hrnet_w48_mhp_512x512.py | 10 +- .../deeppose/coco/res101_coco_256x192.py | 10 +- .../deeppose/coco/res152_coco_256x192.py | 10 +- .../deeppose/coco/res50_coco_256x192.py | 10 +- .../deeppose/mpii/res101_mpii_256x256.py | 10 +- .../deeppose/mpii/res152_mpii_256x256.py | 10 +- .../deeppose/mpii/res50_mpii_256x256.py | 10 +- .../aic/hrnet_w32_aic_256x192.py | 10 +- .../aic/hrnet_w32_aic_384x288.py | 10 +- .../aic/hrnet_w48_aic_256x192.py | 10 +- .../aic/hrnet_w48_aic_384x288.py | 10 +- .../topdown_heatmap/aic/res101_aic_256x192.py | 10 +- .../topdown_heatmap/aic/res101_aic_384x288.py | 10 +- .../topdown_heatmap/aic/res152_aic_256x192.py | 10 +- .../topdown_heatmap/aic/res152_aic_384x288.py | 10 +- .../topdown_heatmap/aic/res50_aic_256x192.py | 10 +- .../topdown_heatmap/aic/res50_aic_384x288.py | 10 +- .../coco/2xmspn50_coco_256x192.py | 10 +- .../coco/2xrsn50_coco_256x192.py | 10 +- .../coco/3xmspn50_coco_256x192.py | 10 +- .../coco/3xrsn50_coco_256x192.py | 10 +- .../coco/4xmspn50_coco_256x192.py | 10 +- .../coco/alexnet_coco_256x192.py | 10 +- .../topdown_heatmap/coco/cpm_coco_256x192.py | 10 +- .../topdown_heatmap/coco/cpm_coco_384x288.py | 10 +- .../coco/hourglass52_coco_256x256.py | 10 +- .../coco/hourglass52_coco_384x384.py | 10 +- .../coco/hrnet_w32_coco_256x192.py | 10 +- .../hrnet_w32_coco_256x192_coarsedropout.py | 10 +- .../coco/hrnet_w32_coco_256x192_dark.py | 10 +- .../coco/hrnet_w32_coco_256x192_gridmask.py | 10 +- .../hrnet_w32_coco_256x192_photometric.py | 10 +- .../coco/hrnet_w32_coco_256x192_udp.py | 10 +- .../hrnet_w32_coco_256x192_udp_regress.py | 10 +- .../coco/hrnet_w32_coco_384x288.py | 10 +- .../coco/hrnet_w32_coco_384x288_dark.py | 10 +- .../coco/hrnet_w32_coco_384x288_udp.py | 10 +- .../coco/hrnet_w48_coco_256x192.py | 10 +- .../coco/hrnet_w48_coco_256x192_dark.py | 10 +- .../coco/hrnet_w48_coco_256x192_udp.py | 10 +- .../coco/hrnet_w48_coco_384x288.py | 10 +- .../coco/hrnet_w48_coco_384x288_dark.py | 10 +- .../coco/hrnet_w48_coco_384x288_udp.py | 10 +- .../coco/mobilenetv2_coco_256x192.py | 10 +- .../coco/mobilenetv2_coco_384x288.py | 10 +- .../coco/mspn50_coco_256x192.py | 10 +- .../coco/res101_coco_256x192.py | 10 +- .../coco/res101_coco_256x192_dark.py | 10 +- .../coco/res101_coco_384x288.py | 10 +- .../coco/res101_coco_384x288_dark.py | 10 +- .../coco/res152_coco_256x192.py | 10 +- .../coco/res152_coco_256x192_dark.py | 10 +- .../coco/res152_coco_384x288.py | 10 +- .../coco/res152_coco_384x288_dark.py | 10 +- .../coco/res50_coco_256x192.py | 10 +- .../coco/res50_coco_256x192_dark.py | 10 +- .../coco/res50_coco_384x288.py | 10 +- .../coco/res50_coco_384x288_dark.py | 10 +- .../coco/resnest101_coco_256x192.py | 10 +- .../coco/resnest101_coco_384x288.py | 10 +- .../coco/resnest200_coco_256x192.py | 10 +- .../coco/resnest200_coco_384x288.py | 10 +- .../coco/resnest269_coco_256x192.py | 10 +- .../coco/resnest269_coco_384x288.py | 10 +- .../coco/resnest50_coco_256x192.py | 10 +- .../coco/resnest50_coco_384x288.py | 10 +- .../coco/resnetv1d101_coco_256x192.py | 10 +- .../coco/resnetv1d101_coco_384x288.py | 10 +- .../coco/resnetv1d152_coco_256x192.py | 10 +- .../coco/resnetv1d152_coco_384x288.py | 10 +- .../coco/resnetv1d50_coco_256x192.py | 10 +- .../coco/resnetv1d50_coco_384x288.py | 10 +- .../coco/resnext101_coco_256x192.py | 10 +- .../coco/resnext101_coco_384x288.py | 10 +- .../coco/resnext152_coco_256x192.py | 10 +- .../coco/resnext152_coco_384x288.py | 10 +- .../coco/resnext50_coco_256x192.py | 10 +- .../coco/resnext50_coco_384x288.py | 10 +- .../coco/rsn18_coco_256x192.py | 10 +- .../coco/rsn50_coco_256x192.py | 10 +- .../coco/scnet101_coco_256x192.py | 10 +- .../coco/scnet101_coco_384x288.py | 10 +- .../coco/scnet50_coco_256x192.py | 10 +- .../coco/scnet50_coco_384x288.py | 10 +- .../coco/seresnet101_coco_256x192.py | 10 +- .../coco/seresnet101_coco_384x288.py | 10 +- .../coco/seresnet152_coco_256x192.py | 10 +- .../coco/seresnet152_coco_384x288.py | 10 +- .../coco/seresnet50_coco_256x192.py | 10 +- .../coco/seresnet50_coco_384x288.py | 10 +- .../coco/shufflenetv1_coco_256x192.py | 10 +- .../coco/shufflenetv1_coco_384x288.py | 10 +- .../coco/shufflenetv2_coco_256x192.py | 10 +- .../coco/shufflenetv2_coco_384x288.py | 10 +- .../coco/vgg16_bn_coco_256x192.py | 10 +- .../crowdpose/hrnet_w32_crowdpose_256x192.py | 7 +- .../crowdpose/hrnet_w32_crowdpose_384x288.py | 7 +- .../crowdpose/hrnet_w48_crowdpose_256x192.py | 7 +- .../crowdpose/hrnet_w48_crowdpose_384x288.py | 7 +- .../crowdpose/res101_crowdpose_256x192.py | 7 +- .../crowdpose/res101_crowdpose_320x256.py | 7 +- .../crowdpose/res101_crowdpose_384x288.py | 7 +- .../crowdpose/res152_crowdpose_256x192.py | 7 +- .../crowdpose/res152_crowdpose_384x288.py | 7 +- .../crowdpose/res50_crowdpose_256x192.py | 7 +- .../crowdpose/res50_crowdpose_384x288.py | 7 +- .../h36m/hrnet_w32_h36m_256x256.py | 10 +- .../h36m/hrnet_w48_h36m_256x256.py | 10 +- .../jhmdb/cpm_jhmdb_sub1_368x368.py | 10 +- .../jhmdb/cpm_jhmdb_sub2_368x368.py | 10 +- .../jhmdb/cpm_jhmdb_sub3_368x368.py | 10 +- .../jhmdb/res50_2deconv_jhmdb_sub1_256x256.py | 10 +- .../jhmdb/res50_2deconv_jhmdb_sub2_256x256.py | 10 +- .../jhmdb/res50_2deconv_jhmdb_sub3_256x256.py | 10 +- .../jhmdb/res50_jhmdb_sub1_256x256.py | 10 +- .../jhmdb/res50_jhmdb_sub2_256x256.py | 10 +- .../jhmdb/res50_jhmdb_sub3_256x256.py | 10 +- .../topdown_heatmap/mhp/res50_mhp_256x192.py | 10 +- .../topdown_heatmap/mpii/cpm_mpii_368x368.py | 10 +- .../mpii/hourglass52_mpii_256x256.py | 10 +- .../mpii/hourglass52_mpii_384x384.py | 10 +- .../mpii/hrnet_w32_mpii_256x256.py | 10 +- .../mpii/hrnet_w32_mpii_256x256_dark.py | 10 +- .../mpii/hrnet_w32_mpii_256x256_udp.py | 10 +- .../mpii/hrnet_w48_mpii_256x256.py | 10 +- .../mpii/hrnet_w48_mpii_256x256_dark.py | 10 +- .../mpii/hrnet_w48_mpii_256x256_udp.py | 10 +- .../mpii/mobilenetv2_mpii_256x256.py | 10 +- .../mpii/res101_mpii_256x256.py | 10 +- .../mpii/res152_mpii_256x256.py | 10 +- .../mpii/res50_mpii_256x256.py | 10 +- .../mpii/resnetv1d101_mpii_256x256.py | 10 +- .../mpii/resnetv1d152_mpii_256x256.py | 10 +- .../mpii/resnetv1d50_mpii_256x256.py | 10 +- .../mpii/resnext101_mpii_256x256.py | 10 +- .../mpii/resnext152_mpii_256x256.py | 10 +- .../mpii/resnext50_mpii_256x256.py | 10 +- .../mpii/scnet101_mpii_256x256.py | 10 +- .../mpii/scnet50_mpii_256x256.py | 10 +- .../mpii/seresnet101_mpii_256x256.py | 10 +- .../mpii/seresnet152_mpii_256x256.py | 10 +- .../mpii/seresnet50_mpii_256x256.py | 10 +- .../mpii/shufflenetv1_mpii_256x256.py | 10 +- .../mpii/shufflenetv2_mpii_256x256.py | 10 +- .../mpii_trb/res101_mpii_trb_256x256.py | 7 +- .../mpii_trb/res152_mpii_trb_256x256.py | 7 +- .../mpii_trb/res50_mpii_trb_256x256.py | 7 +- .../ochuman/res101_ochuman_256x192.py | 10 +- .../ochuman/res101_ochuman_384x288.py | 10 +- .../ochuman/res152_ochuman_256x192.py | 10 +- .../ochuman/res152_ochuman_384x288.py | 10 +- .../ochuman/res50_ochuman_256x192.py | 10 +- .../ochuman/res50_ochuman_384x288.py | 10 +- .../hrnet_w32_posetrack18_256x192.py | 10 +- .../posetrack18/res50_posetrack18_256x192.py | 10 +- .../pose_lift/h36m/simplebaseline3d_h36m.py | 10 +- ..._h36m_1frame_fullconv_supervised_cpn_ft.py | 10 +- ...se3d_h36m_243frames_fullconv_supervised.py | 10 +- ...6m_243frames_fullconv_supervised_cpn_ft.py | 10 +- ..._h36m_27frames_fullconv_semi-supervised.py | 13 +- ...7frames_fullconv_semi-supervised_cpn_ft.py | 13 +- ...ose3d_h36m_27frames_fullconv_supervised.py | 10 +- ...ose3d_h36m_81frames_fullconv_supervised.py | 10 +- .../hmr/mixed/res50_mixed_224x224.py | 2 +- .../deeppose/wflw/res50_wflw_256x256.py | 10 +- .../wflw/res50_wflw_256x256_wingloss.py | 10 +- .../300w/hrnetv2_w18_300w_256x256.py | 10 +- .../300w/hrnetv2_w18_300w_256x256_dark.py | 10 +- .../300w/res50_300w_256x256.py | 10 +- .../aflw/hrnetv2_w18_aflw_256x256.py | 10 +- .../aflw/hrnetv2_w18_aflw_256x256_dark.py | 10 +- .../aflw/res50_aflw_256x256.py | 10 +- .../cofw/hrnetv2_w18_cofw_256x256.py | 10 +- .../cofw/hrnetv2_w18_cofw_256x256_dark.py | 10 +- .../cofw/res50_cofw_256x256.py | 10 +- .../wflw/hrnetv2_w18_wflw_256x256.py | 10 +- .../wflw/hrnetv2_w18_wflw_256x256_dark.py | 10 +- .../wflw/res50_wflw_256x256.py | 10 +- .../res101_deepfashion_full_256x192.py | 10 +- .../res101_deepfashion_lower_256x192.py | 10 +- .../res101_deepfashion_upper_256x192.py | 10 +- .../res152_deepfashion_full_256x192.py | 10 +- .../res152_deepfashion_lower_256x192.py | 10 +- .../res152_deepfashion_upper_256x192.py | 10 +- .../res50_deepfashion_full_256x192.py | 10 +- .../res50_deepfashion_lower_256x192.py | 10 +- .../res50_deepfashion_upper_256x192.py | 10 +- .../hrnet_w32_deepfashion_full_256x192.py | 10 +- .../hrnet_w32_deepfashion_full_256x192_udp.py | 10 +- .../hrnet_w32_deepfashion_lower_256x192.py | 10 +- ...hrnet_w32_deepfashion_lower_256x192_udp.py | 10 +- .../hrnet_w32_deepfashion_upper_256x192.py | 10 +- ...hrnet_w32_deepfashion_upper_256x192_udp.py | 10 +- .../hrnet_w48_deepfashion_full_256x192.py | 10 +- .../hrnet_w48_deepfashion_full_256x192_udp.py | 10 +- .../hrnet_w48_deepfashion_lower_256x192.py | 10 +- ...hrnet_w48_deepfashion_lower_256x192_udp.py | 10 +- .../hrnet_w48_deepfashion_upper_256x192.py | 10 +- ...hrnet_w48_deepfashion_upper_256x192_udp.py | 10 +- .../res101_deepfashion_full_256x192.py | 10 +- .../res101_deepfashion_lower_256x192.py | 10 +- .../res101_deepfashion_upper_256x192.py | 10 +- .../res152_deepfashion_full_256x192.py | 10 +- .../res152_deepfashion_lower_256x192.py | 10 +- .../res152_deepfashion_upper_256x192.py | 10 +- .../res50_deepfashion_full_256x192.py | 10 +- .../res50_deepfashion_lower_256x192.py | 10 +- .../res50_deepfashion_upper_256x192.py | 10 +- .../onehand10k/res50_onehand10k_256x256.py | 10 +- .../panoptic2d/res50_panoptic2d_256x256.py | 10 +- .../deeppose/rhd2d/res50_rhd2d_256x256.py | 10 +- .../freihand2d/res50_freihand2d_224x224.py | 10 +- .../res50_interhand2d_all_256x256.py | 10 +- .../res50_interhand2d_human_256x256.py | 10 +- .../res50_interhand2d_machine_256x256.py | 10 +- .../hrnetv2_w18_onehand10k_256x256.py | 10 +- .../hrnetv2_w18_onehand10k_256x256_dark.py | 10 +- .../hrnetv2_w18_onehand10k_256x256_udp.py | 10 +- .../mobilenetv2_onehand10k_256x256.py | 10 +- .../onehand10k/res50_onehand10k_256x256.py | 10 +- .../hrnetv2_w18_panoptic2d_256x256.py | 10 +- .../hrnetv2_w18_panoptic2d_256x256_dark.py | 10 +- .../hrnetv2_w18_panoptic2d_256x256_udp.py | 10 +- .../mobilenetv2_panoptic2d_256x256.py | 10 +- .../panoptic2d/res50_panoptic2d_256x256.py | 10 +- .../rhd2d/hrnetv2_w18_rhd2d_256x256.py | 10 +- .../rhd2d/hrnetv2_w18_rhd2d_256x256_dark.py | 10 +- .../rhd2d/hrnetv2_w18_rhd2d_256x256_udp.py | 10 +- .../rhd2d/mobilenetv2_rhd2d_256x256.py | 10 +- .../rhd2d/res50_rhd2d_224x224.py | 10 +- .../rhd2d/res50_rhd2d_256x256.py | 10 +- .../res50_interhand3d_all_256x256.py | 10 +- .../higherhrnet_w32_coco_wholebody_512x512.py | 10 +- .../higherhrnet_w32_coco_wholebody_640x640.py | 10 +- .../higherhrnet_w48_coco_wholebody_512x512.py | 10 +- .../higherhrnet_w48_coco_wholebody_640x640.py | 10 +- .../hrnet_w32_coco_wholebody_512x512.py | 10 +- .../hrnet_w32_coco_wholebody_640x640.py | 10 +- .../hrnet_w48_coco_wholebody_512x512.py | 10 +- .../hrnet_w48_coco_wholebody_640x640.py | 10 +- .../hrnet_w32_coco_wholebody_256x192.py | 10 +- .../hrnet_w32_coco_wholebody_256x192_dark.py | 10 +- .../hrnet_w32_coco_wholebody_384x288.py | 10 +- .../hrnet_w32_coco_wholebody_384x288_dark.py | 10 +- .../hrnet_w48_coco_wholebody_256x192.py | 10 +- .../hrnet_w48_coco_wholebody_256x192_dark.py | 10 +- .../hrnet_w48_coco_wholebody_384x288.py | 10 +- .../hrnet_w48_coco_wholebody_384x288_dark.py | 10 +- ...et_w48_coco_wholebody_384x288_dark_plus.py | 10 +- .../res101_coco_wholebody_256x192.py | 10 +- .../res101_coco_wholebody_384x288.py | 10 +- .../res152_coco_wholebody_256x192.py | 10 +- .../res152_coco_wholebody_384x288.py | 10 +- .../res50_coco_wholebody_256x192.py | 10 +- .../res50_coco_wholebody_384x288.py | 10 +- demo/body3d_two_stage_img_demo.py | 23 + demo/bottom_up_img_demo.py | 15 +- demo/bottom_up_pose_tracking_demo.py | 15 +- demo/bottom_up_video_demo.py | 15 +- demo/face_img_demo.py | 12 + demo/face_video_demo.py | 12 + demo/top_down_img_demo.py | 12 + demo/top_down_img_demo_with_mmdet.py | 11 + .../top_down_pose_tracking_demo_with_mmdet.py | 12 + ...down_pose_tracking_demo_with_mmtracking.py | 12 + ..._down_video_demo_full_frame_without_det.py | 12 + demo/top_down_video_demo_with_mmdet.py | 12 + mmpose/apis/inference.py | 665 +++++----- mmpose/apis/inference_3d.py | 338 ++--- mmpose/apis/inference_tracking.py | 123 +- mmpose/apis/train.py | 5 +- .../core/post_processing/one_euro_filter.py | 2 +- mmpose/core/visualization/image.py | 59 +- mmpose/datasets/__init__.py | 3 +- mmpose/datasets/dataset_info.py | 103 ++ mmpose/datasets/datasets/_base_/__init__.py | 12 + .../kpt_2d_sview_rgb_img_bottom_up_dataset.py | 188 +++ .../kpt_2d_sview_rgb_img_top_down_dataset.py} | 83 +- .../kpt_3d_sview_kpt_2d_dataset.py} | 35 +- .../kpt_3d_sview_rgb_img_top_down_dataset.py | 256 ++++ .../datasets/animal/animal_atrw_dataset.py | 62 +- .../datasets/animal/animal_base_dataset.py | 149 --- .../datasets/animal/animal_fly_dataset.py | 89 +- .../datasets/animal/animal_horse10_dataset.py | 75 +- .../datasets/animal/animal_locust_dataset.py | 89 +- .../datasets/animal/animal_macaque_dataset.py | 66 +- .../datasets/animal/animal_pose_dataset.py | 68 +- .../datasets/animal/animal_zebra_dataset.py | 86 +- .../datasets/body3d/body3d_h36m_dataset.py | 36 +- .../body3d/body3d_mpi_inf_3dhp_dataset.py | 35 +- .../datasets/bottom_up/bottom_up_aic.py | 57 +- .../bottom_up/bottom_up_base_dataset.py | 96 -- .../datasets/bottom_up/bottom_up_coco.py | 116 +- .../bottom_up/bottom_up_coco_wholebody.py | 122 +- .../datasets/bottom_up/bottom_up_crowdpose.py | 63 +- .../datasets/bottom_up/bottom_up_mhp.py | 62 +- .../datasets/face/face_300w_dataset.py | 79 +- .../datasets/face/face_aflw_dataset.py | 75 +- .../datasets/face/face_base_dataset.py | 149 --- .../datasets/face/face_cofw_dataset.py | 73 +- .../datasets/face/face_wflw_dataset.py | 81 +- .../datasets/fashion/deepfashion_dataset.py | 60 +- mmpose/datasets/datasets/hand/__init__.py | 2 +- .../datasets/hand/freihand_dataset.py | 28 +- .../datasets/hand/hand_base_dataset.py | 220 ---- .../datasets/hand/interhand2d_dataset.py | 31 +- .../datasets/hand/interhand3d_dataset.py | 102 +- .../datasets/hand/onehand10k_dataset.py | 28 +- ..._dataset.py => panoptic_hand2d_dataset.py} | 34 +- .../datasets/datasets/hand/rhd2d_dataset.py | 28 +- .../datasets/mesh/mesh_base_dataset.py | 2 +- mmpose/datasets/datasets/mesh/mosh_dataset.py | 2 +- .../datasets/top_down/topdown_aic_dataset.py | 62 +- .../datasets/top_down/topdown_base_dataset.py | 74 -- .../datasets/top_down/topdown_coco_dataset.py | 118 +- .../topdown_coco_wholebody_dataset.py | 120 +- .../top_down/topdown_crowdpose_dataset.py | 68 +- .../datasets/top_down/topdown_h36m_dataset.py | 152 +-- .../top_down/topdown_jhmdb_dataset.py | 61 +- .../datasets/top_down/topdown_mhp_dataset.py | 58 +- .../datasets/top_down/topdown_mpii_dataset.py | 41 +- .../top_down/topdown_mpii_trb_dataset.py | 41 +- .../top_down/topdown_ochuman_dataset.py | 63 +- .../top_down/topdown_posetrack18_dataset.py | 65 +- .../datasets/pipelines/bottom_up_transform.py | 15 +- mmpose/deprecated.py | 8 +- .../models/detectors/associative_embedding.py | 9 +- mmpose/models/detectors/interhand_3d.py | 10 +- mmpose/models/detectors/pose_lifter.py | 19 +- mmpose/models/detectors/top_down.py | 9 +- tests/test_datasets/test_animal_dataset.py | 7 + tests/test_datasets/test_body3d_dataset.py | 2 + tests/test_datasets/test_bottom_up_dataset.py | 10 +- tests/test_datasets/test_dataset_info.py | 76 ++ tests/test_datasets/test_face_dataset.py | 56 + tests/test_datasets/test_hand_dataset.py | 6 + tests/test_visualization.py | 8 +- 442 files changed, 11494 insertions(+), 4098 deletions(-) create mode 100644 configs/_base_/datasets/300w.py create mode 100644 configs/_base_/datasets/aflw.py create mode 100644 configs/_base_/datasets/aic.py create mode 100644 configs/_base_/datasets/animalpose.py create mode 100644 configs/_base_/datasets/atrw.py create mode 100644 configs/_base_/datasets/coco.py create mode 100644 configs/_base_/datasets/coco_wholebody.py create mode 100644 configs/_base_/datasets/cofw.py create mode 100644 configs/_base_/datasets/crowdpose.py create mode 100644 configs/_base_/datasets/deepfashion_full.py create mode 100644 configs/_base_/datasets/deepfashion_lower.py create mode 100644 configs/_base_/datasets/deepfashion_upper.py create mode 100644 configs/_base_/datasets/fly.py create mode 100644 configs/_base_/datasets/freihand2d.py create mode 100644 configs/_base_/datasets/h36m.py create mode 100644 configs/_base_/datasets/horse10.py create mode 100644 configs/_base_/datasets/interhand2d.py create mode 100644 configs/_base_/datasets/interhand3d.py create mode 100644 configs/_base_/datasets/jhmdb.py create mode 100644 configs/_base_/datasets/locust.py create mode 100644 configs/_base_/datasets/macaque.py create mode 100644 configs/_base_/datasets/mhp.py create mode 100644 configs/_base_/datasets/mpi_inf_3dhp.py create mode 100644 configs/_base_/datasets/mpii.py create mode 100644 configs/_base_/datasets/mpii_trb.py create mode 100644 configs/_base_/datasets/ochuman.py create mode 100644 configs/_base_/datasets/onehand10k.py create mode 100644 configs/_base_/datasets/panoptic_hand2d.py create mode 100644 configs/_base_/datasets/posetrack18.py create mode 100644 configs/_base_/datasets/rhd2d.py create mode 100644 configs/_base_/datasets/wflw.py create mode 100644 configs/_base_/datasets/zebra.py create mode 100644 mmpose/datasets/dataset_info.py create mode 100644 mmpose/datasets/datasets/_base_/__init__.py create mode 100644 mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_bottom_up_dataset.py rename mmpose/datasets/datasets/{fashion/fashion_base_dataset.py => _base_/kpt_2d_sview_rgb_img_top_down_dataset.py} (67%) rename mmpose/datasets/datasets/{body3d/body3d_base_dataset.py => _base_/kpt_3d_sview_kpt_2d_dataset.py} (87%) create mode 100644 mmpose/datasets/datasets/_base_/kpt_3d_sview_rgb_img_top_down_dataset.py delete mode 100644 mmpose/datasets/datasets/animal/animal_base_dataset.py delete mode 100644 mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py delete mode 100644 mmpose/datasets/datasets/face/face_base_dataset.py delete mode 100644 mmpose/datasets/datasets/hand/hand_base_dataset.py rename mmpose/datasets/datasets/hand/{panoptic_dataset.py => panoptic_hand2d_dataset.py} (86%) delete mode 100644 mmpose/datasets/datasets/top_down/topdown_base_dataset.py create mode 100644 tests/test_datasets/test_dataset_info.py diff --git a/configs/_base_/datasets/300w.py b/configs/_base_/datasets/300w.py new file mode 100644 index 0000000000..10c343a2ad --- /dev/null +++ b/configs/_base_/datasets/300w.py @@ -0,0 +1,384 @@ +dataset_info = dict( + dataset_name='300w', + paper_info=dict( + author='Sagonas, Christos and Antonakos, Epameinondas ' + 'and Tzimiropoulos, Georgios and Zafeiriou, Stefanos ' + 'and Pantic, Maja', + title='300 faces in-the-wild challenge: ' + 'Database and results', + container='Image and vision computing', + year='2016', + homepage='https://ibug.doc.ic.ac.uk/resources/300-W/', + ), + keypoint_info={ + 0: + dict( + name='kpt-0', id=0, color=[255, 255, 255], type='', swap='kpt-16'), + 1: + dict( + name='kpt-1', id=1, color=[255, 255, 255], type='', swap='kpt-15'), + 2: + dict( + name='kpt-2', id=2, color=[255, 255, 255], type='', swap='kpt-14'), + 3: + dict( + name='kpt-3', id=3, color=[255, 255, 255], type='', swap='kpt-13'), + 4: + dict( + name='kpt-4', id=4, color=[255, 255, 255], type='', swap='kpt-12'), + 5: + dict( + name='kpt-5', id=5, color=[255, 255, 255], type='', swap='kpt-11'), + 6: + dict( + name='kpt-6', id=6, color=[255, 255, 255], type='', swap='kpt-10'), + 7: + dict(name='kpt-7', id=7, color=[255, 255, 255], type='', swap='kpt-9'), + 8: + dict(name='kpt-8', id=8, color=[255, 255, 255], type='', swap=''), + 9: + dict(name='kpt-9', id=9, color=[255, 255, 255], type='', swap='kpt-7'), + 10: + dict( + name='kpt-10', id=10, color=[255, 255, 255], type='', + swap='kpt-6'), + 11: + dict( + name='kpt-11', id=11, color=[255, 255, 255], type='', + swap='kpt-5'), + 12: + dict( + name='kpt-12', id=12, color=[255, 255, 255], type='', + swap='kpt-4'), + 13: + dict( + name='kpt-13', id=13, color=[255, 255, 255], type='', + swap='kpt-3'), + 14: + dict( + name='kpt-14', id=14, color=[255, 255, 255], type='', + swap='kpt-2'), + 15: + dict( + name='kpt-15', id=15, color=[255, 255, 255], type='', + swap='kpt-1'), + 16: + dict( + name='kpt-16', id=16, color=[255, 255, 255], type='', + swap='kpt-0'), + 17: + dict( + name='kpt-17', + id=17, + color=[255, 255, 255], + type='', + swap='kpt-26'), + 18: + dict( + name='kpt-18', + id=18, + color=[255, 255, 255], + type='', + swap='kpt-25'), + 19: + dict( + name='kpt-19', + id=19, + color=[255, 255, 255], + type='', + swap='kpt-24'), + 20: + dict( + name='kpt-20', + id=20, + color=[255, 255, 255], + type='', + swap='kpt-23'), + 21: + dict( + name='kpt-21', + id=21, + color=[255, 255, 255], + type='', + swap='kpt-22'), + 22: + dict( + name='kpt-22', + id=22, + color=[255, 255, 255], + type='', + swap='kpt-21'), + 23: + dict( + name='kpt-23', + id=23, + color=[255, 255, 255], + type='', + swap='kpt-20'), + 24: + dict( + name='kpt-24', + id=24, + color=[255, 255, 255], + type='', + swap='kpt-19'), + 25: + dict( + name='kpt-25', + id=25, + color=[255, 255, 255], + type='', + swap='kpt-18'), + 26: + dict( + name='kpt-26', + id=26, + color=[255, 255, 255], + type='', + swap='kpt-17'), + 27: + dict(name='kpt-27', id=27, color=[255, 255, 255], type='', swap=''), + 28: + dict(name='kpt-28', id=28, color=[255, 255, 255], type='', swap=''), + 29: + dict(name='kpt-29', id=29, color=[255, 255, 255], type='', swap=''), + 30: + dict(name='kpt-30', id=30, color=[255, 255, 255], type='', swap=''), + 31: + dict( + name='kpt-31', + id=31, + color=[255, 255, 255], + type='', + swap='kpt-35'), + 32: + dict( + name='kpt-32', + id=32, + color=[255, 255, 255], + type='', + swap='kpt-34'), + 33: + dict(name='kpt-33', id=33, color=[255, 255, 255], type='', swap=''), + 34: + dict( + name='kpt-34', + id=34, + color=[255, 255, 255], + type='', + swap='kpt-32'), + 35: + dict( + name='kpt-35', + id=35, + color=[255, 255, 255], + type='', + swap='kpt-31'), + 36: + dict( + name='kpt-36', + id=36, + color=[255, 255, 255], + type='', + swap='kpt-45'), + 37: + dict( + name='kpt-37', + id=37, + color=[255, 255, 255], + type='', + swap='kpt-44'), + 38: + dict( + name='kpt-38', + id=38, + color=[255, 255, 255], + type='', + swap='kpt-43'), + 39: + dict( + name='kpt-39', + id=39, + color=[255, 255, 255], + type='', + swap='kpt-42'), + 40: + dict( + name='kpt-40', + id=40, + color=[255, 255, 255], + type='', + swap='kpt-47'), + 41: + dict( + name='kpt-41', + id=41, + color=[255, 255, 255], + type='', + swap='kpt-46'), + 42: + dict( + name='kpt-42', + id=42, + color=[255, 255, 255], + type='', + swap='kpt-39'), + 43: + dict( + name='kpt-43', + id=43, + color=[255, 255, 255], + type='', + swap='kpt-38'), + 44: + dict( + name='kpt-44', + id=44, + color=[255, 255, 255], + type='', + swap='kpt-37'), + 45: + dict( + name='kpt-45', + id=45, + color=[255, 255, 255], + type='', + swap='kpt-36'), + 46: + dict( + name='kpt-46', + id=46, + color=[255, 255, 255], + type='', + swap='kpt-41'), + 47: + dict( + name='kpt-47', + id=47, + color=[255, 255, 255], + type='', + swap='kpt-40'), + 48: + dict( + name='kpt-48', + id=48, + color=[255, 255, 255], + type='', + swap='kpt-54'), + 49: + dict( + name='kpt-49', + id=49, + color=[255, 255, 255], + type='', + swap='kpt-53'), + 50: + dict( + name='kpt-50', + id=50, + color=[255, 255, 255], + type='', + swap='kpt-52'), + 51: + dict(name='kpt-51', id=51, color=[255, 255, 255], type='', swap=''), + 52: + dict( + name='kpt-52', + id=52, + color=[255, 255, 255], + type='', + swap='kpt-50'), + 53: + dict( + name='kpt-53', + id=53, + color=[255, 255, 255], + type='', + swap='kpt-49'), + 54: + dict( + name='kpt-54', + id=54, + color=[255, 255, 255], + type='', + swap='kpt-48'), + 55: + dict( + name='kpt-55', + id=55, + color=[255, 255, 255], + type='', + swap='kpt-59'), + 56: + dict( + name='kpt-56', + id=56, + color=[255, 255, 255], + type='', + swap='kpt-58'), + 57: + dict(name='kpt-57', id=57, color=[255, 255, 255], type='', swap=''), + 58: + dict( + name='kpt-58', + id=58, + color=[255, 255, 255], + type='', + swap='kpt-56'), + 59: + dict( + name='kpt-59', + id=59, + color=[255, 255, 255], + type='', + swap='kpt-55'), + 60: + dict( + name='kpt-60', + id=60, + color=[255, 255, 255], + type='', + swap='kpt-64'), + 61: + dict( + name='kpt-61', + id=61, + color=[255, 255, 255], + type='', + swap='kpt-63'), + 62: + dict(name='kpt-62', id=62, color=[255, 255, 255], type='', swap=''), + 63: + dict( + name='kpt-63', + id=63, + color=[255, 255, 255], + type='', + swap='kpt-61'), + 64: + dict( + name='kpt-64', + id=64, + color=[255, 255, 255], + type='', + swap='kpt-60'), + 65: + dict( + name='kpt-65', + id=65, + color=[255, 255, 255], + type='', + swap='kpt-67'), + 66: + dict(name='kpt-66', id=66, color=[255, 255, 255], type='', swap=''), + 67: + dict( + name='kpt-67', + id=67, + color=[255, 255, 255], + type='', + swap='kpt-65'), + }, + skeleton_info={}, + joint_weights=[1.] * 68, + sigmas=[]) diff --git a/configs/_base_/datasets/aflw.py b/configs/_base_/datasets/aflw.py new file mode 100644 index 0000000000..bf534cbb75 --- /dev/null +++ b/configs/_base_/datasets/aflw.py @@ -0,0 +1,83 @@ +dataset_info = dict( + dataset_name='aflw', + paper_info=dict( + author='Koestinger, Martin and Wohlhart, Paul and ' + 'Roth, Peter M and Bischof, Horst', + title='Annotated facial landmarks in the wild: ' + 'A large-scale, real-world database for facial ' + 'landmark localization', + container='2011 IEEE international conference on computer ' + 'vision workshops (ICCV workshops)', + year='2011', + homepage='https://www.tugraz.at/institute/icg/research/' + 'team-bischof/lrs/downloads/aflw/', + ), + keypoint_info={ + 0: + dict(name='kpt-0', id=0, color=[255, 255, 255], type='', swap='kpt-5'), + 1: + dict(name='kpt-1', id=1, color=[255, 255, 255], type='', swap='kpt-4'), + 2: + dict(name='kpt-2', id=2, color=[255, 255, 255], type='', swap='kpt-3'), + 3: + dict(name='kpt-3', id=3, color=[255, 255, 255], type='', swap='kpt-2'), + 4: + dict(name='kpt-4', id=4, color=[255, 255, 255], type='', swap='kpt-1'), + 5: + dict(name='kpt-5', id=5, color=[255, 255, 255], type='', swap='kpt-0'), + 6: + dict( + name='kpt-6', id=6, color=[255, 255, 255], type='', swap='kpt-11'), + 7: + dict( + name='kpt-7', id=7, color=[255, 255, 255], type='', swap='kpt-10'), + 8: + dict(name='kpt-8', id=8, color=[255, 255, 255], type='', swap='kpt-9'), + 9: + dict(name='kpt-9', id=9, color=[255, 255, 255], type='', swap='kpt-8'), + 10: + dict( + name='kpt-10', id=10, color=[255, 255, 255], type='', + swap='kpt-7'), + 11: + dict( + name='kpt-11', id=11, color=[255, 255, 255], type='', + swap='kpt-6'), + 12: + dict( + name='kpt-12', + id=12, + color=[255, 255, 255], + type='', + swap='kpt-14'), + 13: + dict(name='kpt-13', id=13, color=[255, 255, 255], type='', swap=''), + 14: + dict( + name='kpt-14', + id=14, + color=[255, 255, 255], + type='', + swap='kpt-12'), + 15: + dict( + name='kpt-15', + id=15, + color=[255, 255, 255], + type='', + swap='kpt-17'), + 16: + dict(name='kpt-16', id=16, color=[255, 255, 255], type='', swap=''), + 17: + dict( + name='kpt-17', + id=17, + color=[255, 255, 255], + type='', + swap='kpt-15'), + 18: + dict(name='kpt-18', id=18, color=[255, 255, 255], type='', swap='') + }, + skeleton_info={}, + joint_weights=[1.] * 19, + sigmas=[]) diff --git a/configs/_base_/datasets/aic.py b/configs/_base_/datasets/aic.py new file mode 100644 index 0000000000..9ecdbe3f0a --- /dev/null +++ b/configs/_base_/datasets/aic.py @@ -0,0 +1,140 @@ +dataset_info = dict( + dataset_name='aic', + paper_info=dict( + author='Wu, Jiahong and Zheng, He and Zhao, Bo and ' + 'Li, Yixin and Yan, Baoming and Liang, Rui and ' + 'Wang, Wenjia and Zhou, Shipei and Lin, Guosen and ' + 'Fu, Yanwei and others', + title='Ai challenger: A large-scale dataset for going ' + 'deeper in image understanding', + container='arXiv', + year='2017', + homepage='https://github.com/AIChallenger/AI_Challenger_2017', + ), + keypoint_info={ + 0: + dict( + name='right_shoulder', + id=0, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 1: + dict( + name='right_elbow', + id=1, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 2: + dict( + name='right_wrist', + id=2, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 3: + dict( + name='left_shoulder', + id=3, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 4: + dict( + name='left_elbow', + id=4, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 5: + dict( + name='left_wrist', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 6: + dict( + name='right_hip', + id=6, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 7: + dict( + name='right_knee', + id=7, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 8: + dict( + name='right_ankle', + id=8, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 9: + dict( + name='left_hip', + id=9, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 10: + dict( + name='left_knee', + id=10, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 11: + dict( + name='left_ankle', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 12: + dict( + name='head_top', + id=12, + color=[51, 153, 255], + type='upper', + swap=''), + 13: + dict(name='neck', id=13, color=[51, 153, 255], type='upper', swap='') + }, + skeleton_info={ + 0: + dict(link=('right_wrist', 'right_elbow'), id=0, color=[255, 128, 0]), + 1: dict( + link=('right_elbow', 'right_shoulder'), id=1, color=[255, 128, 0]), + 2: dict(link=('right_shoulder', 'neck'), id=2, color=[51, 153, 255]), + 3: dict(link=('neck', 'left_shoulder'), id=3, color=[51, 153, 255]), + 4: dict(link=('left_shoulder', 'left_elbow'), id=4, color=[0, 255, 0]), + 5: dict(link=('left_elbow', 'left_wrist'), id=5, color=[0, 255, 0]), + 6: dict(link=('right_ankle', 'right_knee'), id=6, color=[255, 128, 0]), + 7: dict(link=('right_knee', 'right_hip'), id=7, color=[255, 128, 0]), + 8: dict(link=('right_hip', 'left_hip'), id=8, color=[51, 153, 255]), + 9: dict(link=('left_hip', 'left_knee'), id=9, color=[0, 255, 0]), + 10: dict(link=('left_knee', 'left_ankle'), id=10, color=[0, 255, 0]), + 11: dict(link=('head_top', 'neck'), id=11, color=[51, 153, 255]), + 12: dict( + link=('right_shoulder', 'right_hip'), id=12, color=[51, 153, 255]), + 13: + dict(link=('left_shoulder', 'left_hip'), id=13, color=[51, 153, 255]) + }, + joint_weights=[ + 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1. + ], + + # 'https://github.com/AIChallenger/AI_Challenger_2017/blob/master/' + # 'Evaluation/keypoint_eval/keypoint_eval.py#L50' + # delta = 2 x sigma + sigmas=[ + 0.01388152, 0.01515228, 0.01057665, 0.01417709, 0.01497891, 0.01402144, + 0.03909642, 0.03686941, 0.01981803, 0.03843971, 0.03412318, 0.02415081, + 0.01291456, 0.01236173 + ]) diff --git a/configs/_base_/datasets/animalpose.py b/configs/_base_/datasets/animalpose.py new file mode 100644 index 0000000000..d5bb62d951 --- /dev/null +++ b/configs/_base_/datasets/animalpose.py @@ -0,0 +1,166 @@ +dataset_info = dict( + dataset_name='animalpose', + paper_info=dict( + author='Cao, Jinkun and Tang, Hongyang and Fang, Hao-Shu and ' + 'Shen, Xiaoyong and Lu, Cewu and Tai, Yu-Wing', + title='Cross-Domain Adaptation for Animal Pose Estimation', + container='The IEEE International Conference on ' + 'Computer Vision (ICCV)', + year='2019', + homepage='https://sites.google.com/view/animal-pose/', + ), + keypoint_info={ + 0: + dict( + name='L_Eye', id=0, color=[0, 255, 0], type='upper', swap='R_Eye'), + 1: + dict( + name='R_Eye', + id=1, + color=[255, 128, 0], + type='upper', + swap='L_Eye'), + 2: + dict( + name='L_EarBase', + id=2, + color=[0, 255, 0], + type='upper', + swap='R_EarBase'), + 3: + dict( + name='R_EarBase', + id=3, + color=[255, 128, 0], + type='upper', + swap='L_EarBase'), + 4: + dict(name='Nose', id=4, color=[51, 153, 255], type='upper', swap=''), + 5: + dict(name='Throat', id=5, color=[51, 153, 255], type='upper', swap=''), + 6: + dict( + name='TailBase', id=6, color=[51, 153, 255], type='lower', + swap=''), + 7: + dict( + name='Withers', id=7, color=[51, 153, 255], type='upper', swap=''), + 8: + dict( + name='L_F_Elbow', + id=8, + color=[0, 255, 0], + type='upper', + swap='R_F_Elbow'), + 9: + dict( + name='R_F_Elbow', + id=9, + color=[255, 128, 0], + type='upper', + swap='L_F_Elbow'), + 10: + dict( + name='L_B_Elbow', + id=10, + color=[0, 255, 0], + type='lower', + swap='R_B_Elbow'), + 11: + dict( + name='R_B_Elbow', + id=11, + color=[255, 128, 0], + type='lower', + swap='L_B_Elbow'), + 12: + dict( + name='L_F_Knee', + id=12, + color=[0, 255, 0], + type='upper', + swap='R_F_Knee'), + 13: + dict( + name='R_F_Knee', + id=13, + color=[255, 128, 0], + type='upper', + swap='L_F_Knee'), + 14: + dict( + name='L_B_Knee', + id=14, + color=[0, 255, 0], + type='lower', + swap='R_B_Knee'), + 15: + dict( + name='R_B_Knee', + id=15, + color=[255, 128, 0], + type='lower', + swap='L_B_Knee'), + 16: + dict( + name='L_F_Paw', + id=16, + color=[0, 255, 0], + type='upper', + swap='R_F_Paw'), + 17: + dict( + name='R_F_Paw', + id=17, + color=[255, 128, 0], + type='upper', + swap='L_F_Paw'), + 18: + dict( + name='L_B_Paw', + id=18, + color=[0, 255, 0], + type='lower', + swap='R_B_Paw'), + 19: + dict( + name='R_B_Paw', + id=19, + color=[255, 128, 0], + type='lower', + swap='L_B_Paw') + }, + skeleton_info={ + 0: dict(link=('L_Eye', 'R_Eye'), id=0, color=[51, 153, 255]), + 1: dict(link=('L_Eye', 'L_EarBase'), id=1, color=[0, 255, 0]), + 2: dict(link=('R_Eye', 'R_EarBase'), id=2, color=[255, 128, 0]), + 3: dict(link=('L_Eye', 'Nose'), id=3, color=[0, 255, 0]), + 4: dict(link=('R_Eye', 'Nose'), id=4, color=[255, 128, 0]), + 5: dict(link=('Nose', 'Throat'), id=5, color=[51, 153, 255]), + 6: dict(link=('Throat', 'Withers'), id=6, color=[51, 153, 255]), + 7: dict(link=('TailBase', 'Withers'), id=7, color=[51, 153, 255]), + 8: dict(link=('Throat', 'L_F_Elbow'), id=8, color=[0, 255, 0]), + 9: dict(link=('L_F_Elbow', 'L_F_Knee'), id=9, color=[0, 255, 0]), + 10: dict(link=('L_F_Knee', 'L_F_Paw'), id=10, color=[0, 255, 0]), + 11: dict(link=('Throat', 'R_F_Elbow'), id=11, color=[255, 128, 0]), + 12: dict(link=('R_F_Elbow', 'R_F_Knee'), id=12, color=[255, 128, 0]), + 13: dict(link=('R_F_Knee', 'R_F_Paw'), id=13, color=[255, 128, 0]), + 14: dict(link=('TailBase', 'L_B_Elbow'), id=14, color=[0, 255, 0]), + 15: dict(link=('L_B_Elbow', 'L_B_Knee'), id=15, color=[0, 255, 0]), + 16: dict(link=('L_B_Knee', 'L_B_Paw'), id=16, color=[0, 255, 0]), + 17: dict(link=('TailBase', 'R_B_Elbow'), id=17, color=[255, 128, 0]), + 18: dict(link=('R_B_Elbow', 'R_B_Knee'), id=18, color=[255, 128, 0]), + 19: dict(link=('R_B_Knee', 'R_B_Paw'), id=19, color=[255, 128, 0]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.2, 1.2, + 1.5, 1.5, 1.5, 1.5 + ], + + # Note: The original paper did not provide enough information about + # the sigmas. We modified from 'https://github.com/cocodataset/' + # 'cocoapi/blob/master/PythonAPI/pycocotools/cocoeval.py#L523' + sigmas=[ + 0.025, 0.025, 0.026, 0.035, 0.035, 0.10, 0.10, 0.10, 0.107, 0.107, + 0.107, 0.107, 0.087, 0.087, 0.087, 0.087, 0.089, 0.089, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/atrw.py b/configs/_base_/datasets/atrw.py new file mode 100644 index 0000000000..7ec71c8c50 --- /dev/null +++ b/configs/_base_/datasets/atrw.py @@ -0,0 +1,144 @@ +dataset_info = dict( + dataset_name='atrw', + paper_info=dict( + author='Li, Shuyuan and Li, Jianguo and Tang, Hanlin ' + 'and Qian, Rui and Lin, Weiyao', + title='ATRW: A Benchmark for Amur Tiger ' + 'Re-identification in the Wild', + container='Proceedings of the 28th ACM ' + 'International Conference on Multimedia', + year='2020', + homepage='https://cvwc2019.github.io/challenge.html', + ), + keypoint_info={ + 0: + dict( + name='left_ear', + id=0, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 1: + dict( + name='right_ear', + id=1, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 2: + dict(name='nose', id=2, color=[51, 153, 255], type='upper', swap=''), + 3: + dict( + name='right_shoulder', + id=3, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 4: + dict( + name='right_front_paw', + id=4, + color=[255, 128, 0], + type='upper', + swap='left_front_paw'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='left_front_paw', + id=6, + color=[0, 255, 0], + type='upper', + swap='right_front_paw'), + 7: + dict( + name='right_hip', + id=7, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 8: + dict( + name='right_knee', + id=8, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 9: + dict( + name='right_back_paw', + id=9, + color=[255, 128, 0], + type='lower', + swap='left_back_paw'), + 10: + dict( + name='left_hip', + id=10, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 11: + dict( + name='left_knee', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 12: + dict( + name='left_back_paw', + id=12, + color=[0, 255, 0], + type='lower', + swap='right_back_paw'), + 13: + dict(name='tail', id=13, color=[51, 153, 255], type='lower', swap=''), + 14: + dict( + name='center', id=14, color=[51, 153, 255], type='lower', swap=''), + }, + skeleton_info={ + 0: + dict(link=('left_ear', 'nose'), id=0, color=[51, 153, 255]), + 1: + dict(link=('right_ear', 'nose'), id=1, color=[51, 153, 255]), + 2: + dict(link=('nose', 'center'), id=2, color=[51, 153, 255]), + 3: + dict( + link=('left_shoulder', 'left_front_paw'), id=3, color=[0, 255, 0]), + 4: + dict(link=('left_shoulder', 'center'), id=4, color=[0, 255, 0]), + 5: + dict( + link=('right_shoulder', 'right_front_paw'), + id=5, + color=[255, 128, 0]), + 6: + dict(link=('right_shoulder', 'center'), id=6, color=[255, 128, 0]), + 7: + dict(link=('tail', 'center'), id=7, color=[51, 153, 255]), + 8: + dict(link=('right_back_paw', 'right_knee'), id=8, color=[255, 128, 0]), + 9: + dict(link=('right_knee', 'right_hip'), id=9, color=[255, 128, 0]), + 10: + dict(link=('right_hip', 'tail'), id=10, color=[255, 128, 0]), + 11: + dict(link=('left_back_paw', 'left_knee'), id=11, color=[0, 255, 0]), + 12: + dict(link=('left_knee', 'left_hip'), id=12, color=[0, 255, 0]), + 13: + dict(link=('left_hip', 'tail'), id=13, color=[0, 255, 0]), + }, + joint_weights=[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], + sigmas=[ + 0.0277, 0.0823, 0.0831, 0.0202, 0.0716, 0.0263, 0.0646, 0.0302, 0.0440, + 0.0316, 0.0333, 0.0547, 0.0263, 0.0683, 0.0539 + ]) diff --git a/configs/_base_/datasets/coco.py b/configs/_base_/datasets/coco.py new file mode 100644 index 0000000000..865a95bc02 --- /dev/null +++ b/configs/_base_/datasets/coco.py @@ -0,0 +1,181 @@ +dataset_info = dict( + dataset_name='coco', + paper_info=dict( + author='Lin, Tsung-Yi and Maire, Michael and ' + 'Belongie, Serge and Hays, James and ' + 'Perona, Pietro and Ramanan, Deva and ' + r'Doll{\'a}r, Piotr and Zitnick, C Lawrence', + title='Microsoft coco: Common objects in context', + container='European conference on computer vision', + year='2014', + homepage='http://cocodataset.org/', + ), + keypoint_info={ + 0: + dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), + 1: + dict( + name='left_eye', + id=1, + color=[51, 153, 255], + type='upper', + swap='right_eye'), + 2: + dict( + name='right_eye', + id=2, + color=[51, 153, 255], + type='upper', + swap='left_eye'), + 3: + dict( + name='left_ear', + id=3, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 4: + dict( + name='right_ear', + id=4, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='right_shoulder', + id=6, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 7: + dict( + name='left_elbow', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 8: + dict( + name='right_elbow', + id=8, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 9: + dict( + name='left_wrist', + id=9, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='right_hip', + id=12, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 13: + dict( + name='left_knee', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 14: + dict( + name='right_knee', + id=14, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 15: + dict( + name='left_ankle', + id=15, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 16: + dict( + name='right_ankle', + id=16, + color=[255, 128, 0], + type='lower', + swap='left_ankle') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('left_eye', 'right_eye'), id=12, color=[51, 153, 255]), + 13: + dict(link=('nose', 'left_eye'), id=13, color=[51, 153, 255]), + 14: + dict(link=('nose', 'right_eye'), id=14, color=[51, 153, 255]), + 15: + dict(link=('left_eye', 'left_ear'), id=15, color=[51, 153, 255]), + 16: + dict(link=('right_eye', 'right_ear'), id=16, color=[51, 153, 255]), + 17: + dict(link=('left_ear', 'left_shoulder'), id=17, color=[51, 153, 255]), + 18: + dict( + link=('right_ear', 'right_shoulder'), id=18, color=[51, 153, 255]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, 1.2, 1.5, + 1.5 + ], + sigmas=[ + 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, + 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/coco_wholebody.py b/configs/_base_/datasets/coco_wholebody.py new file mode 100644 index 0000000000..1756862b54 --- /dev/null +++ b/configs/_base_/datasets/coco_wholebody.py @@ -0,0 +1,1150 @@ +dataset_info = dict( + dataset_name='coco_wholebody', + paper_info=dict( + author='Jin, Sheng and Xu, Lumin and Xu, Jin and ' + 'Wang, Can and Liu, Wentao and ' + 'Qian, Chen and Ouyang, Wanli and Luo, Ping', + title='Whole-Body Human Pose Estimation in the Wild', + container='Proceedings of the European ' + 'Conference on Computer Vision (ECCV)', + year='2020', + homepage='https://github.com/jin-s13/COCO-WholeBody/', + ), + keypoint_info={ + 0: + dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), + 1: + dict( + name='left_eye', + id=1, + color=[51, 153, 255], + type='upper', + swap='right_eye'), + 2: + dict( + name='right_eye', + id=2, + color=[51, 153, 255], + type='upper', + swap='left_eye'), + 3: + dict( + name='left_ear', + id=3, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 4: + dict( + name='right_ear', + id=4, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='right_shoulder', + id=6, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 7: + dict( + name='left_elbow', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 8: + dict( + name='right_elbow', + id=8, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 9: + dict( + name='left_wrist', + id=9, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='right_hip', + id=12, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 13: + dict( + name='left_knee', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 14: + dict( + name='right_knee', + id=14, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 15: + dict( + name='left_ankle', + id=15, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 16: + dict( + name='right_ankle', + id=16, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 17: + dict( + name='left_big_toe', + id=17, + color=[255, 128, 0], + type='lower', + swap='right_big_toe'), + 18: + dict( + name='left_small_toe', + id=18, + color=[255, 128, 0], + type='lower', + swap='right_small_toe'), + 19: + dict( + name='left_heel', + id=19, + color=[255, 128, 0], + type='lower', + swap='right_heel'), + 20: + dict( + name='right_big_toe', + id=20, + color=[255, 128, 0], + type='lower', + swap='left_big_toe'), + 21: + dict( + name='right_small_toe', + id=21, + color=[255, 128, 0], + type='lower', + swap='left_small_toe'), + 22: + dict( + name='right_heel', + id=22, + color=[255, 128, 0], + type='lower', + swap='left_heel'), + 23: + dict( + name='face-0', + id=23, + color=[255, 255, 255], + type='', + swap='face-16'), + 24: + dict( + name='face-1', + id=24, + color=[255, 255, 255], + type='', + swap='face-15'), + 25: + dict( + name='face-2', + id=25, + color=[255, 255, 255], + type='', + swap='face-14'), + 26: + dict( + name='face-3', + id=26, + color=[255, 255, 255], + type='', + swap='face-13'), + 27: + dict( + name='face-4', + id=27, + color=[255, 255, 255], + type='', + swap='face-12'), + 28: + dict( + name='face-5', + id=28, + color=[255, 255, 255], + type='', + swap='face-11'), + 29: + dict( + name='face-6', + id=29, + color=[255, 255, 255], + type='', + swap='face-10'), + 30: + dict( + name='face-7', + id=30, + color=[255, 255, 255], + type='', + swap='face-9'), + 31: + dict(name='face-8', id=31, color=[255, 255, 255], type='', swap=''), + 32: + dict( + name='face-9', + id=32, + color=[255, 255, 255], + type='', + swap='face-7'), + 33: + dict( + name='face-10', + id=33, + color=[255, 255, 255], + type='', + swap='face-6'), + 34: + dict( + name='face-11', + id=34, + color=[255, 255, 255], + type='', + swap='face-5'), + 35: + dict( + name='face-12', + id=35, + color=[255, 255, 255], + type='', + swap='face-4'), + 36: + dict( + name='face-13', + id=36, + color=[255, 255, 255], + type='', + swap='face-3'), + 37: + dict( + name='face-14', + id=37, + color=[255, 255, 255], + type='', + swap='face-2'), + 38: + dict( + name='face-15', + id=38, + color=[255, 255, 255], + type='', + swap='face-1'), + 39: + dict( + name='face-16', + id=39, + color=[255, 255, 255], + type='', + swap='face-0'), + 40: + dict( + name='face-17', + id=40, + color=[255, 255, 255], + type='', + swap='face-26'), + 41: + dict( + name='face-18', + id=41, + color=[255, 255, 255], + type='', + swap='face-25'), + 42: + dict( + name='face-19', + id=42, + color=[255, 255, 255], + type='', + swap='face-24'), + 43: + dict( + name='face-20', + id=43, + color=[255, 255, 255], + type='', + swap='face-23'), + 44: + dict( + name='face-21', + id=44, + color=[255, 255, 255], + type='', + swap='face-22'), + 45: + dict( + name='face-22', + id=45, + color=[255, 255, 255], + type='', + swap='face-21'), + 46: + dict( + name='face-23', + id=46, + color=[255, 255, 255], + type='', + swap='face-20'), + 47: + dict( + name='face-24', + id=47, + color=[255, 255, 255], + type='', + swap='face-19'), + 48: + dict( + name='face-25', + id=48, + color=[255, 255, 255], + type='', + swap='face-18'), + 49: + dict( + name='face-26', + id=49, + color=[255, 255, 255], + type='', + swap='face-17'), + 50: + dict(name='face-27', id=50, color=[255, 255, 255], type='', swap=''), + 51: + dict(name='face-28', id=51, color=[255, 255, 255], type='', swap=''), + 52: + dict(name='face-29', id=52, color=[255, 255, 255], type='', swap=''), + 53: + dict(name='face-30', id=53, color=[255, 255, 255], type='', swap=''), + 54: + dict( + name='face-31', + id=54, + color=[255, 255, 255], + type='', + swap='face-35'), + 55: + dict( + name='face-32', + id=55, + color=[255, 255, 255], + type='', + swap='face-34'), + 56: + dict(name='face-33', id=56, color=[255, 255, 255], type='', swap=''), + 57: + dict( + name='face-34', + id=57, + color=[255, 255, 255], + type='', + swap='face-32'), + 58: + dict( + name='face-35', + id=58, + color=[255, 255, 255], + type='', + swap='face-31'), + 59: + dict( + name='face-36', + id=59, + color=[255, 255, 255], + type='', + swap='face-45'), + 60: + dict( + name='face-37', + id=60, + color=[255, 255, 255], + type='', + swap='face-44'), + 61: + dict( + name='face-38', + id=61, + color=[255, 255, 255], + type='', + swap='face-43'), + 62: + dict( + name='face-39', + id=62, + color=[255, 255, 255], + type='', + swap='face-42'), + 63: + dict( + name='face-40', + id=63, + color=[255, 255, 255], + type='', + swap='face-47'), + 64: + dict( + name='face-41', + id=64, + color=[255, 255, 255], + type='', + swap='face-46'), + 65: + dict( + name='face-42', + id=65, + color=[255, 255, 255], + type='', + swap='face-39'), + 66: + dict( + name='face-43', + id=66, + color=[255, 255, 255], + type='', + swap='face-38'), + 67: + dict( + name='face-44', + id=67, + color=[255, 255, 255], + type='', + swap='face-37'), + 68: + dict( + name='face-45', + id=68, + color=[255, 255, 255], + type='', + swap='face-36'), + 69: + dict( + name='face-46', + id=69, + color=[255, 255, 255], + type='', + swap='face-41'), + 70: + dict( + name='face-47', + id=70, + color=[255, 255, 255], + type='', + swap='face-40'), + 71: + dict( + name='face-48', + id=71, + color=[255, 255, 255], + type='', + swap='face-54'), + 72: + dict( + name='face-49', + id=72, + color=[255, 255, 255], + type='', + swap='face-53'), + 73: + dict( + name='face-50', + id=73, + color=[255, 255, 255], + type='', + swap='face-52'), + 74: + dict(name='face-51', id=74, color=[255, 255, 255], type='', swap=''), + 75: + dict( + name='face-52', + id=75, + color=[255, 255, 255], + type='', + swap='face-50'), + 76: + dict( + name='face-53', + id=76, + color=[255, 255, 255], + type='', + swap='face-49'), + 77: + dict( + name='face-54', + id=77, + color=[255, 255, 255], + type='', + swap='face-48'), + 78: + dict( + name='face-55', + id=78, + color=[255, 255, 255], + type='', + swap='face-59'), + 79: + dict( + name='face-56', + id=79, + color=[255, 255, 255], + type='', + swap='face-58'), + 80: + dict(name='face-57', id=80, color=[255, 255, 255], type='', swap=''), + 81: + dict( + name='face-58', + id=81, + color=[255, 255, 255], + type='', + swap='face-56'), + 82: + dict( + name='face-59', + id=82, + color=[255, 255, 255], + type='', + swap='face-55'), + 83: + dict( + name='face-60', + id=83, + color=[255, 255, 255], + type='', + swap='face-64'), + 84: + dict( + name='face-61', + id=84, + color=[255, 255, 255], + type='', + swap='face-63'), + 85: + dict(name='face-62', id=85, color=[255, 255, 255], type='', swap=''), + 86: + dict( + name='face-63', + id=86, + color=[255, 255, 255], + type='', + swap='face-61'), + 87: + dict( + name='face-64', + id=87, + color=[255, 255, 255], + type='', + swap='face-60'), + 88: + dict( + name='face-65', + id=88, + color=[255, 255, 255], + type='', + swap='face-67'), + 89: + dict(name='face-66', id=89, color=[255, 255, 255], type='', swap=''), + 90: + dict( + name='face-67', + id=90, + color=[255, 255, 255], + type='', + swap='face-65'), + 91: + dict( + name='left_wrist', + id=91, + color=[255, 255, 255], + type='', + swap='right_wrist'), + 92: + dict( + name='left_thumb1', + id=92, + color=[255, 128, 0], + type='', + swap='right_thumb1'), + 93: + dict( + name='left_thumb2', + id=93, + color=[255, 128, 0], + type='', + swap='right_thumb2'), + 94: + dict( + name='left_thumb3', + id=94, + color=[255, 128, 0], + type='', + swap='right_thumb3'), + 95: + dict( + name='left_thumb4', + id=95, + color=[255, 128, 0], + type='', + swap='right_thumb4'), + 96: + dict( + name='left_forefinger1', + id=96, + color=[255, 153, 255], + type='', + swap='right_forefinger1'), + 97: + dict( + name='left_forefinger2', + id=97, + color=[255, 153, 255], + type='', + swap='right_forefinger2'), + 98: + dict( + name='left_forefinger3', + id=98, + color=[255, 153, 255], + type='', + swap='right_forefinger3'), + 99: + dict( + name='left_forefinger4', + id=99, + color=[255, 153, 255], + type='', + swap='right_forefinger4'), + 100: + dict( + name='left_middle_finger1', + id=100, + color=[102, 178, 255], + type='', + swap='right_middle_finger1'), + 101: + dict( + name='left_middle_finger2', + id=101, + color=[102, 178, 255], + type='', + swap='right_middle_finger2'), + 102: + dict( + name='left_middle_finger3', + id=102, + color=[102, 178, 255], + type='', + swap='right_middle_finger3'), + 103: + dict( + name='left_middle_finger4', + id=103, + color=[102, 178, 255], + type='', + swap='right_middle_finger4'), + 104: + dict( + name='left_ring_finger1', + id=104, + color=[255, 51, 51], + type='', + swap='right_ring_finger1'), + 105: + dict( + name='left_ring_finger2', + id=105, + color=[255, 51, 51], + type='', + swap='right_ring_finger2'), + 106: + dict( + name='left_ring_finger3', + id=106, + color=[255, 51, 51], + type='', + swap='right_ring_finger3'), + 107: + dict( + name='left_ring_finger4', + id=107, + color=[255, 51, 51], + type='', + swap='right_ring_finger4'), + 108: + dict( + name='left_pinky_finger1', + id=108, + color=[0, 255, 0], + type='', + swap='right_pinky_finger1'), + 109: + dict( + name='left_pinky_finger2', + id=109, + color=[0, 255, 0], + type='', + swap='right_pinky_finger2'), + 110: + dict( + name='left_pinky_finger3', + id=110, + color=[0, 255, 0], + type='', + swap='right_pinky_finger3'), + 111: + dict( + name='left_pinky_finger4', + id=111, + color=[0, 255, 0], + type='', + swap='right_pinky_finger4'), + 112: + dict( + name='right_wrist', + id=112, + color=[255, 255, 255], + type='', + swap='left_wrist'), + 113: + dict( + name='right_thumb1', + id=113, + color=[255, 128, 0], + type='', + swap='left_thumb1'), + 114: + dict( + name='right_thumb2', + id=114, + color=[255, 128, 0], + type='', + swap='left_thumb2'), + 115: + dict( + name='right_thumb3', + id=115, + color=[255, 128, 0], + type='', + swap='left_thumb3'), + 116: + dict( + name='right_thumb4', + id=116, + color=[255, 128, 0], + type='', + swap='left_thumb4'), + 117: + dict( + name='right_forefinger1', + id=117, + color=[255, 153, 255], + type='', + swap='left_forefinger1'), + 118: + dict( + name='right_forefinger2', + id=118, + color=[255, 153, 255], + type='', + swap='left_forefinger2'), + 119: + dict( + name='right_forefinger3', + id=119, + color=[255, 153, 255], + type='', + swap='left_forefinger3'), + 120: + dict( + name='right_forefinger4', + id=120, + color=[255, 153, 255], + type='', + swap='left_forefinger4'), + 121: + dict( + name='right_middle_finger1', + id=121, + color=[102, 178, 255], + type='', + swap='left_middle_finger1'), + 122: + dict( + name='right_middle_finger2', + id=122, + color=[102, 178, 255], + type='', + swap='left_middle_finger2'), + 123: + dict( + name='right_middle_finger3', + id=123, + color=[102, 178, 255], + type='', + swap='left_middle_finger3'), + 124: + dict( + name='right_middle_finger4', + id=124, + color=[102, 178, 255], + type='', + swap='left_middle_finger4'), + 125: + dict( + name='right_ring_finger1', + id=125, + color=[255, 51, 51], + type='', + swap='left_ring_finger1'), + 126: + dict( + name='right_ring_finger2', + id=126, + color=[255, 51, 51], + type='', + swap='left_ring_finger2'), + 127: + dict( + name='right_ring_finger3', + id=127, + color=[255, 51, 51], + type='', + swap='left_ring_finger3'), + 128: + dict( + name='right_ring_finger4', + id=128, + color=[255, 51, 51], + type='', + swap='left_ring_finger4'), + 129: + dict( + name='right_pinky_finger1', + id=129, + color=[0, 255, 0], + type='', + swap='left_pinky_finger1'), + 130: + dict( + name='right_pinky_finger2', + id=130, + color=[0, 255, 0], + type='', + swap='left_pinky_finger2'), + 131: + dict( + name='right_pinky_finger3', + id=131, + color=[0, 255, 0], + type='', + swap='left_pinky_finger3'), + 132: + dict( + name='right_pinky_finger4', + id=132, + color=[0, 255, 0], + type='', + swap='left_pinky_finger4') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('left_eye', 'right_eye'), id=12, color=[51, 153, 255]), + 13: + dict(link=('nose', 'left_eye'), id=13, color=[51, 153, 255]), + 14: + dict(link=('nose', 'right_eye'), id=14, color=[51, 153, 255]), + 15: + dict(link=('left_eye', 'left_ear'), id=15, color=[51, 153, 255]), + 16: + dict(link=('right_eye', 'right_ear'), id=16, color=[51, 153, 255]), + 17: + dict(link=('left_ear', 'left_shoulder'), id=17, color=[51, 153, 255]), + 18: + dict( + link=('right_ear', 'right_shoulder'), id=18, color=[51, 153, 255]), + 19: + dict(link=('left_ankle', 'left_big_toe'), id=19, color=[0, 255, 0]), + 20: + dict(link=('left_ankle', 'left_small_toe'), id=20, color=[0, 255, 0]), + 21: + dict(link=('left_ankle', 'left_heel'), id=21, color=[0, 255, 0]), + 22: + dict( + link=('right_ankle', 'right_big_toe'), id=22, color=[255, 128, 0]), + 23: + dict( + link=('right_ankle', 'right_small_toe'), + id=23, + color=[255, 128, 0]), + 24: + dict(link=('right_ankle', 'right_heel'), id=24, color=[255, 128, 0]), + 25: + dict(link=('left_wrist', 'left_thumb1'), id=25, color=[255, 128, 0]), + 26: + dict(link=('left_thumb1', 'left_thumb2'), id=26, color=[255, 128, 0]), + 27: + dict(link=('left_thumb2', 'left_thumb3'), id=27, color=[255, 128, 0]), + 28: + dict(link=('left_thumb3', 'left_thumb4'), id=28, color=[255, 128, 0]), + 29: + dict( + link=('left_wrist', 'left_forefinger1'), + id=29, + color=[255, 153, 255]), + 30: + dict( + link=('left_forefinger1', 'left_forefinger2'), + id=30, + color=[255, 153, 255]), + 31: + dict( + link=('left_forefinger2', 'left_forefinger3'), + id=31, + color=[255, 153, 255]), + 32: + dict( + link=('left_forefinger3', 'left_forefinger4'), + id=32, + color=[255, 153, 255]), + 33: + dict( + link=('left_wrist', 'left_middle_finger1'), + id=33, + color=[102, 178, 255]), + 34: + dict( + link=('left_middle_finger1', 'left_middle_finger2'), + id=34, + color=[102, 178, 255]), + 35: + dict( + link=('left_middle_finger2', 'left_middle_finger3'), + id=35, + color=[102, 178, 255]), + 36: + dict( + link=('left_middle_finger3', 'left_middle_finger4'), + id=36, + color=[102, 178, 255]), + 37: + dict( + link=('left_wrist', 'left_ring_finger1'), + id=37, + color=[255, 51, 51]), + 38: + dict( + link=('left_ring_finger1', 'left_ring_finger2'), + id=38, + color=[255, 51, 51]), + 39: + dict( + link=('left_ring_finger2', 'left_ring_finger3'), + id=39, + color=[255, 51, 51]), + 40: + dict( + link=('left_ring_finger3', 'left_ring_finger4'), + id=40, + color=[255, 51, 51]), + 41: + dict( + link=('left_wrist', 'left_pinky_finger1'), + id=41, + color=[0, 255, 0]), + 42: + dict( + link=('left_pinky_finger1', 'left_pinky_finger2'), + id=42, + color=[0, 255, 0]), + 43: + dict( + link=('left_pinky_finger2', 'left_pinky_finger3'), + id=43, + color=[0, 255, 0]), + 44: + dict( + link=('left_pinky_finger3', 'left_pinky_finger4'), + id=44, + color=[0, 255, 0]), + 45: + dict(link=('right_wrist', 'right_thumb1'), id=45, color=[255, 128, 0]), + 46: + dict( + link=('right_thumb1', 'right_thumb2'), id=46, color=[255, 128, 0]), + 47: + dict( + link=('right_thumb2', 'right_thumb3'), id=47, color=[255, 128, 0]), + 48: + dict( + link=('right_thumb3', 'right_thumb4'), id=48, color=[255, 128, 0]), + 49: + dict( + link=('right_wrist', 'right_forefinger1'), + id=49, + color=[255, 153, 255]), + 50: + dict( + link=('right_forefinger1', 'right_forefinger2'), + id=50, + color=[255, 153, 255]), + 51: + dict( + link=('right_forefinger2', 'right_forefinger3'), + id=51, + color=[255, 153, 255]), + 52: + dict( + link=('right_forefinger3', 'right_forefinger4'), + id=52, + color=[255, 153, 255]), + 53: + dict( + link=('right_wrist', 'right_middle_finger1'), + id=53, + color=[102, 178, 255]), + 54: + dict( + link=('right_middle_finger1', 'right_middle_finger2'), + id=54, + color=[102, 178, 255]), + 55: + dict( + link=('right_middle_finger2', 'right_middle_finger3'), + id=55, + color=[102, 178, 255]), + 56: + dict( + link=('right_middle_finger3', 'right_middle_finger4'), + id=56, + color=[102, 178, 255]), + 57: + dict( + link=('right_wrist', 'right_ring_finger1'), + id=57, + color=[255, 51, 51]), + 58: + dict( + link=('right_ring_finger1', 'right_ring_finger2'), + id=58, + color=[255, 51, 51]), + 59: + dict( + link=('right_ring_finger2', 'right_ring_finger3'), + id=59, + color=[255, 51, 51]), + 60: + dict( + link=('right_ring_finger3', 'right_ring_finger4'), + id=60, + color=[255, 51, 51]), + 61: + dict( + link=('right_wrist', 'right_pinky_finger1'), + id=61, + color=[0, 255, 0]), + 62: + dict( + link=('right_pinky_finger1', 'right_pinky_finger2'), + id=62, + color=[0, 255, 0]), + 63: + dict( + link=('right_pinky_finger2', 'right_pinky_finger3'), + id=63, + color=[0, 255, 0]), + 64: + dict( + link=('right_pinky_finger3', 'right_pinky_finger4'), + id=64, + color=[0, 255, 0]) + }, + joint_weights=[1.] * 133, + + # 'https://github.com/jin-s13/COCO-WholeBody/blob/master/' + # 'evaluation/myeval_wholebody.py#L170' + sigmas=[ + 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, + 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089, 0.068, 0.066, 0.066, + 0.092, 0.094, 0.094, 0.042, 0.043, 0.044, 0.043, 0.040, 0.035, 0.031, + 0.025, 0.020, 0.023, 0.029, 0.032, 0.037, 0.038, 0.043, 0.041, 0.045, + 0.013, 0.012, 0.011, 0.011, 0.012, 0.012, 0.011, 0.011, 0.013, 0.015, + 0.009, 0.007, 0.007, 0.007, 0.012, 0.009, 0.008, 0.016, 0.010, 0.017, + 0.011, 0.009, 0.011, 0.009, 0.007, 0.013, 0.008, 0.011, 0.012, 0.010, + 0.034, 0.008, 0.008, 0.009, 0.008, 0.008, 0.007, 0.010, 0.008, 0.009, + 0.009, 0.009, 0.007, 0.007, 0.008, 0.011, 0.008, 0.008, 0.008, 0.01, + 0.008, 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, 0.035, + 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, 0.019, + 0.022, 0.031, 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, + 0.035, 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, + 0.019, 0.022, 0.031 + ]) diff --git a/configs/_base_/datasets/cofw.py b/configs/_base_/datasets/cofw.py new file mode 100644 index 0000000000..2fb7ad2f8d --- /dev/null +++ b/configs/_base_/datasets/cofw.py @@ -0,0 +1,134 @@ +dataset_info = dict( + dataset_name='cofw', + paper_info=dict( + author='Burgos-Artizzu, Xavier P and Perona, ' + r'Pietro and Doll{\'a}r, Piotr', + title='Robust face landmark estimation under occlusion', + container='Proceedings of the IEEE international ' + 'conference on computer vision', + year='2013', + homepage='http://www.vision.caltech.edu/xpburgos/ICCV13/', + ), + keypoint_info={ + 0: + dict(name='kpt-0', id=0, color=[255, 255, 255], type='', swap='kpt-1'), + 1: + dict(name='kpt-1', id=1, color=[255, 255, 255], type='', swap='kpt-0'), + 2: + dict(name='kpt-2', id=2, color=[255, 255, 255], type='', swap='kpt-3'), + 3: + dict(name='kpt-3', id=3, color=[255, 255, 255], type='', swap='kpt-2'), + 4: + dict(name='kpt-4', id=4, color=[255, 255, 255], type='', swap='kpt-6'), + 5: + dict(name='kpt-5', id=5, color=[255, 255, 255], type='', swap='kpt-7'), + 6: + dict(name='kpt-6', id=6, color=[255, 255, 255], type='', swap='kpt-4'), + 7: + dict(name='kpt-7', id=7, color=[255, 255, 255], type='', swap='kpt-5'), + 8: + dict(name='kpt-8', id=8, color=[255, 255, 255], type='', swap='kpt-9'), + 9: + dict(name='kpt-9', id=9, color=[255, 255, 255], type='', swap='kpt-8'), + 10: + dict( + name='kpt-10', + id=10, + color=[255, 255, 255], + type='', + swap='kpt-11'), + 11: + dict( + name='kpt-11', + id=11, + color=[255, 255, 255], + type='', + swap='kpt-10'), + 12: + dict( + name='kpt-12', + id=12, + color=[255, 255, 255], + type='', + swap='kpt-14'), + 13: + dict( + name='kpt-13', + id=13, + color=[255, 255, 255], + type='', + swap='kpt-15'), + 14: + dict( + name='kpt-14', + id=14, + color=[255, 255, 255], + type='', + swap='kpt-12'), + 15: + dict( + name='kpt-15', + id=15, + color=[255, 255, 255], + type='', + swap='kpt-13'), + 16: + dict( + name='kpt-16', + id=16, + color=[255, 255, 255], + type='', + swap='kpt-17'), + 17: + dict( + name='kpt-17', + id=17, + color=[255, 255, 255], + type='', + swap='kpt-16'), + 18: + dict( + name='kpt-18', + id=18, + color=[255, 255, 255], + type='', + swap='kpt-19'), + 19: + dict( + name='kpt-19', + id=19, + color=[255, 255, 255], + type='', + swap='kpt-18'), + 20: + dict(name='kpt-20', id=20, color=[255, 255, 255], type='', swap=''), + 21: + dict(name='kpt-21', id=21, color=[255, 255, 255], type='', swap=''), + 22: + dict( + name='kpt-22', + id=22, + color=[255, 255, 255], + type='', + swap='kpt-23'), + 23: + dict( + name='kpt-23', + id=23, + color=[255, 255, 255], + type='', + swap='kpt-22'), + 24: + dict(name='kpt-24', id=24, color=[255, 255, 255], type='', swap=''), + 25: + dict(name='kpt-25', id=25, color=[255, 255, 255], type='', swap=''), + 26: + dict(name='kpt-26', id=26, color=[255, 255, 255], type='', swap=''), + 27: + dict(name='kpt-27', id=27, color=[255, 255, 255], type='', swap=''), + 28: + dict(name='kpt-28', id=28, color=[255, 255, 255], type='', swap='') + }, + skeleton_info={}, + joint_weights=[1.] * 29, + sigmas=[]) diff --git a/configs/_base_/datasets/crowdpose.py b/configs/_base_/datasets/crowdpose.py new file mode 100644 index 0000000000..45086531a6 --- /dev/null +++ b/configs/_base_/datasets/crowdpose.py @@ -0,0 +1,147 @@ +dataset_info = dict( + dataset_name='crowdpose', + paper_info=dict( + author='Li, Jiefeng and Wang, Can and Zhu, Hao and ' + 'Mao, Yihuan and Fang, Hao-Shu and Lu, Cewu', + title='CrowdPose: Efficient Crowded Scenes Pose Estimation ' + 'and A New Benchmark', + container='Proceedings of IEEE Conference on Computer ' + 'Vision and Pattern Recognition (CVPR)', + year='2019', + homepage='https://github.com/Jeff-sjtu/CrowdPose', + ), + keypoint_info={ + 0: + dict( + name='left_shoulder', + id=0, + color=[51, 153, 255], + type='upper', + swap='right_shoulder'), + 1: + dict( + name='right_shoulder', + id=1, + color=[51, 153, 255], + type='upper', + swap='left_shoulder'), + 2: + dict( + name='left_elbow', + id=2, + color=[51, 153, 255], + type='upper', + swap='right_elbow'), + 3: + dict( + name='right_elbow', + id=3, + color=[51, 153, 255], + type='upper', + swap='left_elbow'), + 4: + dict( + name='left_wrist', + id=4, + color=[51, 153, 255], + type='upper', + swap='right_wrist'), + 5: + dict( + name='right_wrist', + id=5, + color=[0, 255, 0], + type='upper', + swap='left_wrist'), + 6: + dict( + name='left_hip', + id=6, + color=[255, 128, 0], + type='lower', + swap='right_hip'), + 7: + dict( + name='right_hip', + id=7, + color=[0, 255, 0], + type='lower', + swap='left_hip'), + 8: + dict( + name='left_knee', + id=8, + color=[255, 128, 0], + type='lower', + swap='right_knee'), + 9: + dict( + name='right_knee', + id=9, + color=[0, 255, 0], + type='lower', + swap='left_knee'), + 10: + dict( + name='left_ankle', + id=10, + color=[255, 128, 0], + type='lower', + swap='right_ankle'), + 11: + dict( + name='right_ankle', + id=11, + color=[0, 255, 0], + type='lower', + swap='left_ankle'), + 12: + dict( + name='top_head', id=12, color=[255, 128, 0], type='upper', + swap=''), + 13: + dict(name='neck', id=13, color=[0, 255, 0], type='upper', swap='') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('top_head', 'neck'), id=12, color=[51, 153, 255]), + 13: + dict(link=('right_shoulder', 'neck'), id=13, color=[51, 153, 255]), + 14: + dict(link=('left_shoulder', 'neck'), id=14, color=[51, 153, 255]) + }, + joint_weights=[ + 0.2, 0.2, 0.2, 1.3, 1.5, 0.2, 1.3, 1.5, 0.2, 0.2, 0.5, 0.2, 0.2, 0.5 + ], + sigmas=[ + 0.079, 0.079, 0.072, 0.072, 0.062, 0.062, 0.107, 0.107, 0.087, 0.087, + 0.089, 0.089, 0.079, 0.079 + ]) diff --git a/configs/_base_/datasets/deepfashion_full.py b/configs/_base_/datasets/deepfashion_full.py new file mode 100644 index 0000000000..4d989069ee --- /dev/null +++ b/configs/_base_/datasets/deepfashion_full.py @@ -0,0 +1,74 @@ +dataset_info = dict( + dataset_name='deepfashion_full', + paper_info=dict( + author='Liu, Ziwei and Luo, Ping and Qiu, Shi ' + 'and Wang, Xiaogang and Tang, Xiaoou', + title='DeepFashion: Powering Robust Clothes Recognition ' + 'and Retrieval with Rich Annotations', + container='Proceedings of IEEE Conference on Computer ' + 'Vision and Pattern Recognition (CVPR)', + year='2016', + homepage='http://mmlab.ie.cuhk.edu.hk/projects/' + 'DeepFashion/LandmarkDetection.html', + ), + keypoint_info={ + 0: + dict( + name='left collar', + id=0, + color=[255, 255, 255], + type='', + swap='right collar'), + 1: + dict( + name='right collar', + id=1, + color=[255, 255, 255], + type='', + swap='left collar'), + 2: + dict( + name='left sleeve', + id=2, + color=[255, 255, 255], + type='', + swap='right sleeve'), + 3: + dict( + name='right sleeve', + id=3, + color=[255, 255, 255], + type='', + swap='left sleeve'), + 4: + dict( + name='left waistline', + id=0, + color=[255, 255, 255], + type='', + swap='right waistline'), + 5: + dict( + name='right waistline', + id=1, + color=[255, 255, 255], + type='', + swap='left waistline'), + 6: + dict( + name='left hem', + id=2, + color=[255, 255, 255], + type='', + swap='right hem'), + 7: + dict( + name='right hem', + id=3, + color=[255, 255, 255], + type='', + swap='left hem'), + }, + skeleton_info={}, + joint_weights=[1.] * 8, + sigmas=[]) diff --git a/configs/_base_/datasets/deepfashion_lower.py b/configs/_base_/datasets/deepfashion_lower.py new file mode 100644 index 0000000000..db014a1747 --- /dev/null +++ b/configs/_base_/datasets/deepfashion_lower.py @@ -0,0 +1,46 @@ +dataset_info = dict( + dataset_name='deepfashion_lower', + paper_info=dict( + author='Liu, Ziwei and Luo, Ping and Qiu, Shi ' + 'and Wang, Xiaogang and Tang, Xiaoou', + title='DeepFashion: Powering Robust Clothes Recognition ' + 'and Retrieval with Rich Annotations', + container='Proceedings of IEEE Conference on Computer ' + 'Vision and Pattern Recognition (CVPR)', + year='2016', + homepage='http://mmlab.ie.cuhk.edu.hk/projects/' + 'DeepFashion/LandmarkDetection.html', + ), + keypoint_info={ + 0: + dict( + name='left waistline', + id=0, + color=[255, 255, 255], + type='', + swap='right waistline'), + 1: + dict( + name='right waistline', + id=1, + color=[255, 255, 255], + type='', + swap='left waistline'), + 2: + dict( + name='left hem', + id=2, + color=[255, 255, 255], + type='', + swap='right hem'), + 3: + dict( + name='right hem', + id=3, + color=[255, 255, 255], + type='', + swap='left hem'), + }, + skeleton_info={}, + joint_weights=[1.] * 4, + sigmas=[]) diff --git a/configs/_base_/datasets/deepfashion_upper.py b/configs/_base_/datasets/deepfashion_upper.py new file mode 100644 index 0000000000..f0b012fd37 --- /dev/null +++ b/configs/_base_/datasets/deepfashion_upper.py @@ -0,0 +1,60 @@ +dataset_info = dict( + dataset_name='deepfashion_upper', + paper_info=dict( + author='Liu, Ziwei and Luo, Ping and Qiu, Shi ' + 'and Wang, Xiaogang and Tang, Xiaoou', + title='DeepFashion: Powering Robust Clothes Recognition ' + 'and Retrieval with Rich Annotations', + container='Proceedings of IEEE Conference on Computer ' + 'Vision and Pattern Recognition (CVPR)', + year='2016', + homepage='http://mmlab.ie.cuhk.edu.hk/projects/' + 'DeepFashion/LandmarkDetection.html', + ), + keypoint_info={ + 0: + dict( + name='left collar', + id=0, + color=[255, 255, 255], + type='', + swap='right collar'), + 1: + dict( + name='right collar', + id=1, + color=[255, 255, 255], + type='', + swap='left collar'), + 2: + dict( + name='left sleeve', + id=2, + color=[255, 255, 255], + type='', + swap='right sleeve'), + 3: + dict( + name='right sleeve', + id=3, + color=[255, 255, 255], + type='', + swap='left sleeve'), + 4: + dict( + name='left hem', + id=4, + color=[255, 255, 255], + type='', + swap='right hem'), + 5: + dict( + name='right hem', + id=5, + color=[255, 255, 255], + type='', + swap='left hem'), + }, + skeleton_info={}, + joint_weights=[1.] * 6, + sigmas=[]) diff --git a/configs/_base_/datasets/fly.py b/configs/_base_/datasets/fly.py new file mode 100644 index 0000000000..5f94ff57ca --- /dev/null +++ b/configs/_base_/datasets/fly.py @@ -0,0 +1,237 @@ +dataset_info = dict( + dataset_name='fly', + paper_info=dict( + author='Pereira, Talmo D and Aldarondo, Diego E and ' + 'Willmore, Lindsay and Kislin, Mikhail and ' + 'Wang, Samuel S-H and Murthy, Mala and Shaevitz, Joshua W', + title='Fast animal pose estimation using deep neural networks', + container='Nature methods', + year='2019', + homepage='https://github.com/jgraving/DeepPoseKit-Data', + ), + keypoint_info={ + 0: + dict(name='head', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='eyeL', id=1, color=[255, 255, 255], type='', swap='eyeR'), + 2: + dict(name='eyeR', id=2, color=[255, 255, 255], type='', swap='eyeL'), + 3: + dict(name='neck', id=3, color=[255, 255, 255], type='', swap=''), + 4: + dict(name='thorax', id=4, color=[255, 255, 255], type='', swap=''), + 5: + dict(name='abdomen', id=5, color=[255, 255, 255], type='', swap=''), + 6: + dict( + name='forelegR1', + id=6, + color=[255, 255, 255], + type='', + swap='forelegL1'), + 7: + dict( + name='forelegR2', + id=7, + color=[255, 255, 255], + type='', + swap='forelegL2'), + 8: + dict( + name='forelegR3', + id=8, + color=[255, 255, 255], + type='', + swap='forelegL3'), + 9: + dict( + name='forelegR4', + id=9, + color=[255, 255, 255], + type='', + swap='forelegL4'), + 10: + dict( + name='midlegR1', + id=10, + color=[255, 255, 255], + type='', + swap='midlegL1'), + 11: + dict( + name='midlegR2', + id=11, + color=[255, 255, 255], + type='', + swap='midlegL2'), + 12: + dict( + name='midlegR3', + id=12, + color=[255, 255, 255], + type='', + swap='midlegL3'), + 13: + dict( + name='midlegR4', + id=13, + color=[255, 255, 255], + type='', + swap='midlegL4'), + 14: + dict( + name='hindlegR1', + id=14, + color=[255, 255, 255], + type='', + swap='hindlegL1'), + 15: + dict( + name='hindlegR2', + id=15, + color=[255, 255, 255], + type='', + swap='hindlegL2'), + 16: + dict( + name='hindlegR3', + id=16, + color=[255, 255, 255], + type='', + swap='hindlegL3'), + 17: + dict( + name='hindlegR4', + id=17, + color=[255, 255, 255], + type='', + swap='hindlegL4'), + 18: + dict( + name='forelegL1', + id=18, + color=[255, 255, 255], + type='', + swap='forelegR1'), + 19: + dict( + name='forelegL2', + id=19, + color=[255, 255, 255], + type='', + swap='forelegR2'), + 20: + dict( + name='forelegL3', + id=20, + color=[255, 255, 255], + type='', + swap='forelegR3'), + 21: + dict( + name='forelegL4', + id=21, + color=[255, 255, 255], + type='', + swap='forelegR4'), + 22: + dict( + name='midlegL1', + id=22, + color=[255, 255, 255], + type='', + swap='midlegR1'), + 23: + dict( + name='midlegL2', + id=23, + color=[255, 255, 255], + type='', + swap='midlegR2'), + 24: + dict( + name='midlegL3', + id=24, + color=[255, 255, 255], + type='', + swap='midlegR3'), + 25: + dict( + name='midlegL4', + id=25, + color=[255, 255, 255], + type='', + swap='midlegR4'), + 26: + dict( + name='hindlegL1', + id=26, + color=[255, 255, 255], + type='', + swap='hindlegR1'), + 27: + dict( + name='hindlegL2', + id=27, + color=[255, 255, 255], + type='', + swap='hindlegR2'), + 28: + dict( + name='hindlegL3', + id=28, + color=[255, 255, 255], + type='', + swap='hindlegR3'), + 29: + dict( + name='hindlegL4', + id=29, + color=[255, 255, 255], + type='', + swap='hindlegR4'), + 30: + dict( + name='wingL', id=30, color=[255, 255, 255], type='', swap='wingR'), + 31: + dict( + name='wingR', id=31, color=[255, 255, 255], type='', swap='wingL'), + }, + skeleton_info={ + 0: dict(link=('eyeL', 'head'), id=0, color=[255, 255, 255]), + 1: dict(link=('eyeR', 'head'), id=1, color=[255, 255, 255]), + 2: dict(link=('neck', 'head'), id=2, color=[255, 255, 255]), + 3: dict(link=('thorax', 'neck'), id=3, color=[255, 255, 255]), + 4: dict(link=('abdomen', 'thorax'), id=4, color=[255, 255, 255]), + 5: dict(link=('forelegR2', 'forelegR1'), id=5, color=[255, 255, 255]), + 6: dict(link=('forelegR3', 'forelegR2'), id=6, color=[255, 255, 255]), + 7: dict(link=('forelegR4', 'forelegR3'), id=7, color=[255, 255, 255]), + 8: dict(link=('midlegR2', 'midlegR1'), id=8, color=[255, 255, 255]), + 9: dict(link=('midlegR3', 'midlegR2'), id=9, color=[255, 255, 255]), + 10: dict(link=('midlegR4', 'midlegR3'), id=10, color=[255, 255, 255]), + 11: + dict(link=('hindlegR2', 'hindlegR1'), id=11, color=[255, 255, 255]), + 12: + dict(link=('hindlegR3', 'hindlegR2'), id=12, color=[255, 255, 255]), + 13: + dict(link=('hindlegR4', 'hindlegR3'), id=13, color=[255, 255, 255]), + 14: + dict(link=('forelegL2', 'forelegL1'), id=14, color=[255, 255, 255]), + 15: + dict(link=('forelegL3', 'forelegL2'), id=15, color=[255, 255, 255]), + 16: + dict(link=('forelegL4', 'forelegL3'), id=16, color=[255, 255, 255]), + 17: dict(link=('midlegL2', 'midlegL1'), id=17, color=[255, 255, 255]), + 18: dict(link=('midlegL3', 'midlegL2'), id=18, color=[255, 255, 255]), + 19: dict(link=('midlegL4', 'midlegL3'), id=19, color=[255, 255, 255]), + 20: + dict(link=('hindlegL2', 'hindlegL1'), id=20, color=[255, 255, 255]), + 21: + dict(link=('hindlegL3', 'hindlegL2'), id=21, color=[255, 255, 255]), + 22: + dict(link=('hindlegL4', 'hindlegL3'), id=22, color=[255, 255, 255]), + 23: dict(link=('wingL', 'neck'), id=23, color=[255, 255, 255]), + 24: dict(link=('wingR', 'neck'), id=24, color=[255, 255, 255]) + }, + joint_weights=[1.] * 32, + sigmas=[]) diff --git a/configs/_base_/datasets/freihand2d.py b/configs/_base_/datasets/freihand2d.py new file mode 100644 index 0000000000..8b960d10f3 --- /dev/null +++ b/configs/_base_/datasets/freihand2d.py @@ -0,0 +1,144 @@ +dataset_info = dict( + dataset_name='freihand', + paper_info=dict( + author='Zimmermann, Christian and Ceylan, Duygu and ' + 'Yang, Jimei and Russell, Bryan and ' + 'Argus, Max and Brox, Thomas', + title='Freihand: A dataset for markerless capture of hand pose ' + 'and shape from single rgb images', + container='Proceedings of the IEEE International ' + 'Conference on Computer Vision', + year='2019', + homepage='https://lmb.informatik.uni-freiburg.de/projects/freihand/', + ), + keypoint_info={ + 0: + dict(name='wrist', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='thumb1', id=1, color=[255, 128, 0], type='', swap=''), + 2: + dict(name='thumb2', id=2, color=[255, 128, 0], type='', swap=''), + 3: + dict(name='thumb3', id=3, color=[255, 128, 0], type='', swap=''), + 4: + dict(name='thumb4', id=4, color=[255, 128, 0], type='', swap=''), + 5: + dict( + name='forefinger1', id=5, color=[255, 153, 255], type='', swap=''), + 6: + dict( + name='forefinger2', id=6, color=[255, 153, 255], type='', swap=''), + 7: + dict( + name='forefinger3', id=7, color=[255, 153, 255], type='', swap=''), + 8: + dict( + name='forefinger4', id=8, color=[255, 153, 255], type='', swap=''), + 9: + dict( + name='middle_finger1', + id=9, + color=[102, 178, 255], + type='', + swap=''), + 10: + dict( + name='middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap=''), + 11: + dict( + name='middle_finger3', + id=11, + color=[102, 178, 255], + type='', + swap=''), + 12: + dict( + name='middle_finger4', + id=12, + color=[102, 178, 255], + type='', + swap=''), + 13: + dict( + name='ring_finger1', id=13, color=[255, 51, 51], type='', swap=''), + 14: + dict( + name='ring_finger2', id=14, color=[255, 51, 51], type='', swap=''), + 15: + dict( + name='ring_finger3', id=15, color=[255, 51, 51], type='', swap=''), + 16: + dict( + name='ring_finger4', id=16, color=[255, 51, 51], type='', swap=''), + 17: + dict(name='pinky_finger1', id=17, color=[0, 255, 0], type='', swap=''), + 18: + dict(name='pinky_finger2', id=18, color=[0, 255, 0], type='', swap=''), + 19: + dict(name='pinky_finger3', id=19, color=[0, 255, 0], type='', swap=''), + 20: + dict(name='pinky_finger4', id=20, color=[0, 255, 0], type='', swap='') + }, + skeleton_info={ + 0: + dict(link=('wrist', 'thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('thumb1', 'thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('thumb2', 'thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('thumb3', 'thumb4'), id=3, color=[255, 128, 0]), + 4: + dict(link=('wrist', 'forefinger1'), id=4, color=[255, 153, 255]), + 5: + dict(link=('forefinger1', 'forefinger2'), id=5, color=[255, 153, 255]), + 6: + dict(link=('forefinger2', 'forefinger3'), id=6, color=[255, 153, 255]), + 7: + dict(link=('forefinger3', 'forefinger4'), id=7, color=[255, 153, 255]), + 8: + dict(link=('wrist', 'middle_finger1'), id=8, color=[102, 178, 255]), + 9: + dict( + link=('middle_finger1', 'middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('middle_finger2', 'middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('middle_finger3', 'middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict(link=('wrist', 'ring_finger1'), id=12, color=[255, 51, 51]), + 13: + dict( + link=('ring_finger1', 'ring_finger2'), id=13, color=[255, 51, 51]), + 14: + dict( + link=('ring_finger2', 'ring_finger3'), id=14, color=[255, 51, 51]), + 15: + dict( + link=('ring_finger3', 'ring_finger4'), id=15, color=[255, 51, 51]), + 16: + dict(link=('wrist', 'pinky_finger1'), id=16, color=[0, 255, 0]), + 17: + dict( + link=('pinky_finger1', 'pinky_finger2'), id=17, color=[0, 255, 0]), + 18: + dict( + link=('pinky_finger2', 'pinky_finger3'), id=18, color=[0, 255, 0]), + 19: + dict( + link=('pinky_finger3', 'pinky_finger4'), id=19, color=[0, 255, 0]) + }, + joint_weights=[1.] * 21, + sigmas=[]) diff --git a/configs/_base_/datasets/h36m.py b/configs/_base_/datasets/h36m.py new file mode 100644 index 0000000000..68b7e50ad3 --- /dev/null +++ b/configs/_base_/datasets/h36m.py @@ -0,0 +1,151 @@ +dataset_info = dict( + dataset_name='h36m', + paper_info=dict( + author='Ionescu, Catalin and Papava, Dragos and ' + 'Olaru, Vlad and Sminchisescu, Cristian', + title='Human3.6M: Large Scale Datasets and Predictive ' + 'Methods for 3D Human Sensing in Natural Environments', + container='IEEE Transactions on Pattern Analysis and ' + 'Machine Intelligence', + year='2014', + homepage='http://vision.imar.ro/human3.6m/description.php', + ), + keypoint_info={ + 0: + dict(name='root', id=0, color=[255, 128, 0], type='lower', swap=''), + 1: + dict( + name='left_hip', + id=1, + color=[255, 128, 0], + type='lower', + swap='right_hip'), + 2: + dict( + name='left_knee', + id=2, + color=[255, 128, 0], + type='lower', + swap='right_knee'), + 3: + dict( + name='left_foot', + id=3, + color=[0, 255, 0], + type='lower', + swap='right_foot'), + 4: + dict( + name='right_hip', + id=4, + color=[0, 255, 0], + type='lower', + swap='left_hip'), + 5: + dict( + name='right_knee', + id=5, + color=[0, 255, 0], + type='lower', + swap='left_knee'), + 6: + dict( + name='right_foot', + id=6, + color=[51, 153, 255], + type='lower', + swap='left_foot'), + 7: + dict(name='spine', id=7, color=[51, 153, 255], type='upper', swap=''), + 8: + dict(name='thorax', id=8, color=[51, 153, 255], type='upper', swap=''), + 9: + dict( + name='neck_base', + id=9, + color=[51, 153, 255], + type='upper', + swap=''), + 10: + dict(name='head', id=10, color=[51, 153, 255], type='upper', swap=''), + 11: + dict( + name='left_shoulder', + id=11, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 12: + dict( + name='left_elbow', + id=12, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 13: + dict( + name='left_wrist', + id=13, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 14: + dict( + name='right_shoulder', + id=14, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 15: + dict( + name='right_elbow', + id=15, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 16: + dict( + name='right_wrist', + id=16, + color=[255, 128, 0], + type='upper', + swap='left_wrist') + }, + skeleton_info={ + 0: + dict(link=('root', 'left_hip'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_hip', 'left_knee'), id=1, color=[0, 255, 0]), + 2: + dict(link=('left_knee', 'left_foot'), id=2, color=[0, 255, 0]), + 3: + dict(link=('root', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('right_hip', 'right_knee'), id=4, color=[255, 128, 0]), + 5: + dict(link=('right_knee', 'right_foot'), id=5, color=[255, 128, 0]), + 6: + dict(link=('root', 'spine'), id=6, color=[51, 153, 255]), + 7: + dict(link=('spine', 'thorax'), id=7, color=[51, 153, 255]), + 8: + dict(link=('thorax', 'neck_base'), id=8, color=[51, 153, 255]), + 9: + dict(link=('neck_base', 'head'), id=9, color=[51, 153, 255]), + 10: + dict(link=('thorax', 'left_shoulder'), id=10, color=[0, 255, 0]), + 11: + dict(link=('left_shoulder', 'left_elbow'), id=11, color=[0, 255, 0]), + 12: + dict(link=('left_elbow', 'left_wrist'), id=12, color=[0, 255, 0]), + 13: + dict(link=('thorax', 'right_shoulder'), id=13, color=[255, 128, 0]), + 14: + dict( + link=('right_shoulder', 'right_elbow'), id=14, color=[255, 128, + 0]), + 15: + dict(link=('right_elbow', 'right_wrist'), id=15, color=[255, 128, 0]) + }, + joint_weights=[1.] * 17, + sigmas=[]) diff --git a/configs/_base_/datasets/horse10.py b/configs/_base_/datasets/horse10.py new file mode 100644 index 0000000000..a485bf191b --- /dev/null +++ b/configs/_base_/datasets/horse10.py @@ -0,0 +1,201 @@ +dataset_info = dict( + dataset_name='horse10', + paper_info=dict( + author='Mathis, Alexander and Biasi, Thomas and ' + 'Schneider, Steffen and ' + 'Yuksekgonul, Mert and Rogers, Byron and ' + 'Bethge, Matthias and ' + 'Mathis, Mackenzie W', + title='Pretraining boosts out-of-domain robustness ' + 'for pose estimation', + container='Proceedings of the IEEE/CVF Winter Conference on ' + 'Applications of Computer Vision', + year='2021', + homepage='http://www.mackenziemathislab.org/horse10', + ), + keypoint_info={ + 0: + dict(name='Nose', id=0, color=[255, 153, 255], type='upper', swap=''), + 1: + dict(name='Eye', id=1, color=[255, 153, 255], type='upper', swap=''), + 2: + dict( + name='Nearknee', + id=2, + color=[255, 102, 255], + type='upper', + swap=''), + 3: + dict( + name='Nearfrontfetlock', + id=3, + color=[255, 102, 255], + type='upper', + swap=''), + 4: + dict( + name='Nearfrontfoot', + id=4, + color=[255, 102, 255], + type='upper', + swap=''), + 5: + dict( + name='Offknee', id=5, color=[255, 102, 255], type='upper', + swap=''), + 6: + dict( + name='Offfrontfetlock', + id=6, + color=[255, 102, 255], + type='upper', + swap=''), + 7: + dict( + name='Offfrontfoot', + id=7, + color=[255, 102, 255], + type='upper', + swap=''), + 8: + dict( + name='Shoulder', + id=8, + color=[255, 153, 255], + type='upper', + swap=''), + 9: + dict( + name='Midshoulder', + id=9, + color=[255, 153, 255], + type='upper', + swap=''), + 10: + dict( + name='Elbow', id=10, color=[255, 153, 255], type='upper', swap=''), + 11: + dict( + name='Girth', id=11, color=[255, 153, 255], type='upper', swap=''), + 12: + dict( + name='Wither', id=12, color=[255, 153, 255], type='upper', + swap=''), + 13: + dict( + name='Nearhindhock', + id=13, + color=[255, 51, 255], + type='lower', + swap=''), + 14: + dict( + name='Nearhindfetlock', + id=14, + color=[255, 51, 255], + type='lower', + swap=''), + 15: + dict( + name='Nearhindfoot', + id=15, + color=[255, 51, 255], + type='lower', + swap=''), + 16: + dict(name='Hip', id=16, color=[255, 153, 255], type='lower', swap=''), + 17: + dict( + name='Stifle', id=17, color=[255, 153, 255], type='lower', + swap=''), + 18: + dict( + name='Offhindhock', + id=18, + color=[255, 51, 255], + type='lower', + swap=''), + 19: + dict( + name='Offhindfetlock', + id=19, + color=[255, 51, 255], + type='lower', + swap=''), + 20: + dict( + name='Offhindfoot', + id=20, + color=[255, 51, 255], + type='lower', + swap=''), + 21: + dict( + name='Ischium', + id=21, + color=[255, 153, 255], + type='lower', + swap='') + }, + skeleton_info={ + 0: + dict(link=('Nose', 'Eye'), id=0, color=[255, 153, 255]), + 1: + dict(link=('Eye', 'Wither'), id=1, color=[255, 153, 255]), + 2: + dict(link=('Wither', 'Hip'), id=2, color=[255, 153, 255]), + 3: + dict(link=('Hip', 'Ischium'), id=3, color=[255, 153, 255]), + 4: + dict(link=('Ischium', 'Stifle'), id=4, color=[255, 153, 255]), + 5: + dict(link=('Stifle', 'Girth'), id=5, color=[255, 153, 255]), + 6: + dict(link=('Girth', 'Elbow'), id=6, color=[255, 153, 255]), + 7: + dict(link=('Elbow', 'Shoulder'), id=7, color=[255, 153, 255]), + 8: + dict(link=('Shoulder', 'Midshoulder'), id=8, color=[255, 153, 255]), + 9: + dict(link=('Midshoulder', 'Wither'), id=9, color=[255, 153, 255]), + 10: + dict( + link=('Nearknee', 'Nearfrontfetlock'), + id=10, + color=[255, 102, 255]), + 11: + dict( + link=('Nearfrontfetlock', 'Nearfrontfoot'), + id=11, + color=[255, 102, 255]), + 12: + dict( + link=('Offknee', 'Offfrontfetlock'), id=12, color=[255, 102, 255]), + 13: + dict( + link=('Offfrontfetlock', 'Offfrontfoot'), + id=13, + color=[255, 102, 255]), + 14: + dict( + link=('Nearhindhock', 'Nearhindfetlock'), + id=14, + color=[255, 51, 255]), + 15: + dict( + link=('Nearhindfetlock', 'Nearhindfoot'), + id=15, + color=[255, 51, 255]), + 16: + dict( + link=('Offhindhock', 'Offhindfetlock'), + id=16, + color=[255, 51, 255]), + 17: + dict( + link=('Offhindfetlock', 'Offhindfoot'), + id=17, + color=[255, 51, 255]) + }, + joint_weights=[1.] * 22, + sigmas=[]) diff --git a/configs/_base_/datasets/interhand2d.py b/configs/_base_/datasets/interhand2d.py new file mode 100644 index 0000000000..0134f07de5 --- /dev/null +++ b/configs/_base_/datasets/interhand2d.py @@ -0,0 +1,142 @@ +dataset_info = dict( + dataset_name='interhand2d', + paper_info=dict( + author='Moon, Gyeongsik and Yu, Shoou-I and Wen, He and ' + 'Shiratori, Takaaki and Lee, Kyoung Mu', + title='InterHand2.6M: A dataset and baseline for 3D ' + 'interacting hand pose estimation from a single RGB image', + container='arXiv', + year='2020', + homepage='https://mks0601.github.io/InterHand2.6M/', + ), + keypoint_info={ + 0: + dict(name='thumb4', id=0, color=[255, 128, 0], type='', swap=''), + 1: + dict(name='thumb3', id=1, color=[255, 128, 0], type='', swap=''), + 2: + dict(name='thumb2', id=2, color=[255, 128, 0], type='', swap=''), + 3: + dict(name='thumb1', id=3, color=[255, 128, 0], type='', swap=''), + 4: + dict( + name='forefinger4', id=4, color=[255, 153, 255], type='', swap=''), + 5: + dict( + name='forefinger3', id=5, color=[255, 153, 255], type='', swap=''), + 6: + dict( + name='forefinger2', id=6, color=[255, 153, 255], type='', swap=''), + 7: + dict( + name='forefinger1', id=7, color=[255, 153, 255], type='', swap=''), + 8: + dict( + name='middle_finger4', + id=8, + color=[102, 178, 255], + type='', + swap=''), + 9: + dict( + name='middle_finger3', + id=9, + color=[102, 178, 255], + type='', + swap=''), + 10: + dict( + name='middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap=''), + 11: + dict( + name='middle_finger1', + id=11, + color=[102, 178, 255], + type='', + swap=''), + 12: + dict( + name='ring_finger4', id=12, color=[255, 51, 51], type='', swap=''), + 13: + dict( + name='ring_finger3', id=13, color=[255, 51, 51], type='', swap=''), + 14: + dict( + name='ring_finger2', id=14, color=[255, 51, 51], type='', swap=''), + 15: + dict( + name='ring_finger1', id=15, color=[255, 51, 51], type='', swap=''), + 16: + dict(name='pinky_finger4', id=16, color=[0, 255, 0], type='', swap=''), + 17: + dict(name='pinky_finger3', id=17, color=[0, 255, 0], type='', swap=''), + 18: + dict(name='pinky_finger2', id=18, color=[0, 255, 0], type='', swap=''), + 19: + dict(name='pinky_finger1', id=19, color=[0, 255, 0], type='', swap=''), + 20: + dict(name='wrist', id=20, color=[255, 255, 255], type='', swap='') + }, + skeleton_info={ + 0: + dict(link=('wrist', 'thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('thumb1', 'thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('thumb2', 'thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('thumb3', 'thumb4'), id=3, color=[255, 128, 0]), + 4: + dict(link=('wrist', 'forefinger1'), id=4, color=[255, 153, 255]), + 5: + dict(link=('forefinger1', 'forefinger2'), id=5, color=[255, 153, 255]), + 6: + dict(link=('forefinger2', 'forefinger3'), id=6, color=[255, 153, 255]), + 7: + dict(link=('forefinger3', 'forefinger4'), id=7, color=[255, 153, 255]), + 8: + dict(link=('wrist', 'middle_finger1'), id=8, color=[102, 178, 255]), + 9: + dict( + link=('middle_finger1', 'middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('middle_finger2', 'middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('middle_finger3', 'middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict(link=('wrist', 'ring_finger1'), id=12, color=[255, 51, 51]), + 13: + dict( + link=('ring_finger1', 'ring_finger2'), id=13, color=[255, 51, 51]), + 14: + dict( + link=('ring_finger2', 'ring_finger3'), id=14, color=[255, 51, 51]), + 15: + dict( + link=('ring_finger3', 'ring_finger4'), id=15, color=[255, 51, 51]), + 16: + dict(link=('wrist', 'pinky_finger1'), id=16, color=[0, 255, 0]), + 17: + dict( + link=('pinky_finger1', 'pinky_finger2'), id=17, color=[0, 255, 0]), + 18: + dict( + link=('pinky_finger2', 'pinky_finger3'), id=18, color=[0, 255, 0]), + 19: + dict( + link=('pinky_finger3', 'pinky_finger4'), id=19, color=[0, 255, 0]) + }, + joint_weights=[1.] * 21, + sigmas=[]) diff --git a/configs/_base_/datasets/interhand3d.py b/configs/_base_/datasets/interhand3d.py new file mode 100644 index 0000000000..e2bd8121c2 --- /dev/null +++ b/configs/_base_/datasets/interhand3d.py @@ -0,0 +1,487 @@ +dataset_info = dict( + dataset_name='interhand3d', + paper_info=dict( + author='Moon, Gyeongsik and Yu, Shoou-I and Wen, He and ' + 'Shiratori, Takaaki and Lee, Kyoung Mu', + title='InterHand2.6M: A dataset and baseline for 3D ' + 'interacting hand pose estimation from a single RGB image', + container='arXiv', + year='2020', + homepage='https://mks0601.github.io/InterHand2.6M/', + ), + keypoint_info={ + 0: + dict( + name='right_thumb4', + id=0, + color=[255, 128, 0], + type='', + swap='left_thumb4'), + 1: + dict( + name='right_thumb3', + id=1, + color=[255, 128, 0], + type='', + swap='left_thumb3'), + 2: + dict( + name='right_thumb2', + id=2, + color=[255, 128, 0], + type='', + swap='left_thumb2'), + 3: + dict( + name='right_thumb1', + id=3, + color=[255, 128, 0], + type='', + swap='left_thumb1'), + 4: + dict( + name='right_forefinger4', + id=4, + color=[255, 153, 255], + type='', + swap='left_forefinger4'), + 5: + dict( + name='right_forefinger3', + id=5, + color=[255, 153, 255], + type='', + swap='left_forefinger3'), + 6: + dict( + name='right_forefinger2', + id=6, + color=[255, 153, 255], + type='', + swap='left_forefinger2'), + 7: + dict( + name='right_forefinger1', + id=7, + color=[255, 153, 255], + type='', + swap='left_forefinger1'), + 8: + dict( + name='right_middle_finger4', + id=8, + color=[102, 178, 255], + type='', + swap='left_middle_finger4'), + 9: + dict( + name='right_middle_finger3', + id=9, + color=[102, 178, 255], + type='', + swap='left_middle_finger3'), + 10: + dict( + name='right_middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap='left_middle_finger2'), + 11: + dict( + name='right_middle_finger1', + id=11, + color=[102, 178, 255], + type='', + swap='left_middle_finger1'), + 12: + dict( + name='right_ring_finger4', + id=12, + color=[255, 51, 51], + type='', + swap='left_ring_finger4'), + 13: + dict( + name='right_ring_finger3', + id=13, + color=[255, 51, 51], + type='', + swap='left_ring_finger3'), + 14: + dict( + name='right_ring_finger2', + id=14, + color=[255, 51, 51], + type='', + swap='left_ring_finger2'), + 15: + dict( + name='right_ring_finger1', + id=15, + color=[255, 51, 51], + type='', + swap='left_ring_finger1'), + 16: + dict( + name='right_pinky_finger4', + id=16, + color=[0, 255, 0], + type='', + swap='left_pinky_finger4'), + 17: + dict( + name='right_pinky_finger3', + id=17, + color=[0, 255, 0], + type='', + swap='left_pinky_finger3'), + 18: + dict( + name='right_pinky_finger2', + id=18, + color=[0, 255, 0], + type='', + swap='left_pinky_finger2'), + 19: + dict( + name='right_pinky_finger1', + id=19, + color=[0, 255, 0], + type='', + swap='left_pinky_finger1'), + 20: + dict( + name='right_wrist', + id=20, + color=[255, 255, 255], + type='', + swap='left_wrist'), + 21: + dict( + name='left_thumb4', + id=21, + color=[255, 128, 0], + type='', + swap='right_thumb4'), + 22: + dict( + name='left_thumb3', + id=22, + color=[255, 128, 0], + type='', + swap='right_thumb3'), + 23: + dict( + name='left_thumb2', + id=23, + color=[255, 128, 0], + type='', + swap='right_thumb2'), + 24: + dict( + name='left_thumb1', + id=24, + color=[255, 128, 0], + type='', + swap='right_thumb1'), + 25: + dict( + name='left_forefinger4', + id=25, + color=[255, 153, 255], + type='', + swap='right_forefinger4'), + 26: + dict( + name='left_forefinger3', + id=26, + color=[255, 153, 255], + type='', + swap='right_forefinger3'), + 27: + dict( + name='left_forefinger2', + id=27, + color=[255, 153, 255], + type='', + swap='right_forefinger2'), + 28: + dict( + name='left_forefinger1', + id=28, + color=[255, 153, 255], + type='', + swap='right_forefinger1'), + 29: + dict( + name='left_middle_finger4', + id=29, + color=[102, 178, 255], + type='', + swap='right_middle_finger4'), + 30: + dict( + name='left_middle_finger3', + id=30, + color=[102, 178, 255], + type='', + swap='right_middle_finger3'), + 31: + dict( + name='left_middle_finger2', + id=31, + color=[102, 178, 255], + type='', + swap='right_middle_finger2'), + 32: + dict( + name='left_middle_finger1', + id=32, + color=[102, 178, 255], + type='', + swap='right_middle_finger1'), + 33: + dict( + name='left_ring_finger4', + id=33, + color=[255, 51, 51], + type='', + swap='right_ring_finger4'), + 34: + dict( + name='left_ring_finger3', + id=34, + color=[255, 51, 51], + type='', + swap='right_ring_finger3'), + 35: + dict( + name='left_ring_finger2', + id=35, + color=[255, 51, 51], + type='', + swap='right_ring_finger2'), + 36: + dict( + name='left_ring_finger1', + id=36, + color=[255, 51, 51], + type='', + swap='right_ring_finger1'), + 37: + dict( + name='left_pinky_finger4', + id=37, + color=[0, 255, 0], + type='', + swap='right_pinky_finger4'), + 38: + dict( + name='left_pinky_finger3', + id=38, + color=[0, 255, 0], + type='', + swap='right_pinky_finger3'), + 39: + dict( + name='left_pinky_finger2', + id=39, + color=[0, 255, 0], + type='', + swap='right_pinky_finger2'), + 40: + dict( + name='left_pinky_finger1', + id=40, + color=[0, 255, 0], + type='', + swap='right_pinky_finger1'), + 41: + dict( + name='left_wrist', + id=41, + color=[255, 255, 255], + type='', + swap='right_wrist'), + }, + skeleton_info={ + 0: + dict(link=('right_wrist', 'right_thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('right_thumb1', 'right_thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('right_thumb2', 'right_thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_thumb3', 'right_thumb4'), id=3, color=[255, 128, 0]), + 4: + dict( + link=('right_wrist', 'right_forefinger1'), + id=4, + color=[255, 153, 255]), + 5: + dict( + link=('right_forefinger1', 'right_forefinger2'), + id=5, + color=[255, 153, 255]), + 6: + dict( + link=('right_forefinger2', 'right_forefinger3'), + id=6, + color=[255, 153, 255]), + 7: + dict( + link=('right_forefinger3', 'right_forefinger4'), + id=7, + color=[255, 153, 255]), + 8: + dict( + link=('right_wrist', 'right_middle_finger1'), + id=8, + color=[102, 178, 255]), + 9: + dict( + link=('right_middle_finger1', 'right_middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('right_middle_finger2', 'right_middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('right_middle_finger3', 'right_middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict( + link=('right_wrist', 'right_ring_finger1'), + id=12, + color=[255, 51, 51]), + 13: + dict( + link=('right_ring_finger1', 'right_ring_finger2'), + id=13, + color=[255, 51, 51]), + 14: + dict( + link=('right_ring_finger2', 'right_ring_finger3'), + id=14, + color=[255, 51, 51]), + 15: + dict( + link=('right_ring_finger3', 'right_ring_finger4'), + id=15, + color=[255, 51, 51]), + 16: + dict( + link=('right_wrist', 'right_pinky_finger1'), + id=16, + color=[0, 255, 0]), + 17: + dict( + link=('right_pinky_finger1', 'right_pinky_finger2'), + id=17, + color=[0, 255, 0]), + 18: + dict( + link=('right_pinky_finger2', 'right_pinky_finger3'), + id=18, + color=[0, 255, 0]), + 19: + dict( + link=('right_pinky_finger3', 'right_pinky_finger4'), + id=19, + color=[0, 255, 0]), + 20: + dict(link=('left_wrist', 'left_thumb1'), id=20, color=[255, 128, 0]), + 21: + dict(link=('left_thumb1', 'left_thumb2'), id=21, color=[255, 128, 0]), + 22: + dict(link=('left_thumb2', 'left_thumb3'), id=22, color=[255, 128, 0]), + 23: + dict(link=('left_thumb3', 'left_thumb4'), id=23, color=[255, 128, 0]), + 24: + dict( + link=('left_wrist', 'left_forefinger1'), + id=24, + color=[255, 153, 255]), + 25: + dict( + link=('left_forefinger1', 'left_forefinger2'), + id=25, + color=[255, 153, 255]), + 26: + dict( + link=('left_forefinger2', 'left_forefinger3'), + id=26, + color=[255, 153, 255]), + 27: + dict( + link=('left_forefinger3', 'left_forefinger4'), + id=27, + color=[255, 153, 255]), + 28: + dict( + link=('left_wrist', 'left_middle_finger1'), + id=28, + color=[102, 178, 255]), + 29: + dict( + link=('left_middle_finger1', 'left_middle_finger2'), + id=29, + color=[102, 178, 255]), + 30: + dict( + link=('left_middle_finger2', 'left_middle_finger3'), + id=30, + color=[102, 178, 255]), + 31: + dict( + link=('left_middle_finger3', 'left_middle_finger4'), + id=31, + color=[102, 178, 255]), + 32: + dict( + link=('left_wrist', 'left_ring_finger1'), + id=32, + color=[255, 51, 51]), + 33: + dict( + link=('left_ring_finger1', 'left_ring_finger2'), + id=33, + color=[255, 51, 51]), + 34: + dict( + link=('left_ring_finger2', 'left_ring_finger3'), + id=34, + color=[255, 51, 51]), + 35: + dict( + link=('left_ring_finger3', 'left_ring_finger4'), + id=35, + color=[255, 51, 51]), + 36: + dict( + link=('left_wrist', 'left_pinky_finger1'), + id=36, + color=[0, 255, 0]), + 37: + dict( + link=('left_pinky_finger1', 'left_pinky_finger2'), + id=37, + color=[0, 255, 0]), + 38: + dict( + link=('left_pinky_finger2', 'left_pinky_finger3'), + id=38, + color=[0, 255, 0]), + 39: + dict( + link=('left_pinky_finger3', 'left_pinky_finger4'), + id=39, + color=[0, 255, 0]), + }, + joint_weights=[1.] * 42, + sigmas=[]) diff --git a/configs/_base_/datasets/jhmdb.py b/configs/_base_/datasets/jhmdb.py new file mode 100644 index 0000000000..1b37488498 --- /dev/null +++ b/configs/_base_/datasets/jhmdb.py @@ -0,0 +1,129 @@ +dataset_info = dict( + dataset_name='jhmdb', + paper_info=dict( + author='H. Jhuang and J. Gall and S. Zuffi and ' + 'C. Schmid and M. J. Black', + title='Towards understanding action recognition', + container='International Conf. on Computer Vision (ICCV)', + year='2013', + homepage='http://jhmdb.is.tue.mpg.de/dataset', + ), + keypoint_info={ + 0: + dict(name='neck', id=0, color=[255, 128, 0], type='upper', swap=''), + 1: + dict(name='belly', id=1, color=[255, 128, 0], type='upper', swap=''), + 2: + dict(name='head', id=2, color=[255, 128, 0], type='upper', swap=''), + 3: + dict( + name='right_shoulder', + id=3, + color=[0, 255, 0], + type='upper', + swap='left_shoulder'), + 4: + dict( + name='left_shoulder', + id=4, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 5: + dict( + name='right_hip', + id=5, + color=[0, 255, 0], + type='lower', + swap='left_hip'), + 6: + dict( + name='left_hip', + id=6, + color=[51, 153, 255], + type='lower', + swap='right_hip'), + 7: + dict( + name='right_elbow', + id=7, + color=[51, 153, 255], + type='upper', + swap='left_elbow'), + 8: + dict( + name='left_elbow', + id=8, + color=[51, 153, 255], + type='upper', + swap='right_elbow'), + 9: + dict( + name='right_knee', + id=9, + color=[51, 153, 255], + type='lower', + swap='left_knee'), + 10: + dict( + name='left_knee', + id=10, + color=[255, 128, 0], + type='lower', + swap='right_knee'), + 11: + dict( + name='right_wrist', + id=11, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 12: + dict( + name='left_wrist', + id=12, + color=[255, 128, 0], + type='upper', + swap='right_wrist'), + 13: + dict( + name='right_ankle', + id=13, + color=[0, 255, 0], + type='lower', + swap='left_ankle'), + 14: + dict( + name='left_ankle', + id=14, + color=[0, 255, 0], + type='lower', + swap='right_ankle') + }, + skeleton_info={ + 0: dict(link=('right_ankle', 'right_knee'), id=0, color=[255, 128, 0]), + 1: dict(link=('right_knee', 'right_hip'), id=1, color=[255, 128, 0]), + 2: dict(link=('right_hip', 'belly'), id=2, color=[255, 128, 0]), + 3: dict(link=('belly', 'left_hip'), id=3, color=[0, 255, 0]), + 4: dict(link=('left_hip', 'left_knee'), id=4, color=[0, 255, 0]), + 5: dict(link=('left_knee', 'left_ankle'), id=5, color=[0, 255, 0]), + 6: dict(link=('belly', 'neck'), id=6, color=[51, 153, 255]), + 7: dict(link=('neck', 'head'), id=7, color=[51, 153, 255]), + 8: dict(link=('neck', 'right_shoulder'), id=8, color=[255, 128, 0]), + 9: dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('right_elbow', 'right_wrist'), id=10, color=[255, 128, 0]), + 11: dict(link=('neck', 'left_shoulder'), id=11, color=[0, 255, 0]), + 12: + dict(link=('left_shoulder', 'left_elbow'), id=12, color=[0, 255, 0]), + 13: dict(link=('left_elbow', 'left_wrist'), id=13, color=[0, 255, 0]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.2, 1.2, 1.5, 1.5, 1.5, 1.5 + ], + # Adapted from COCO dataset. + sigmas=[ + 0.025, 0.107, 0.025, 0.079, 0.079, 0.107, 0.107, 0.072, 0.072, 0.087, + 0.087, 0.062, 0.062, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/locust.py b/configs/_base_/datasets/locust.py new file mode 100644 index 0000000000..db3fa15aa0 --- /dev/null +++ b/configs/_base_/datasets/locust.py @@ -0,0 +1,263 @@ +dataset_info = dict( + dataset_name='locust', + paper_info=dict( + author='Graving, Jacob M and Chae, Daniel and Naik, Hemal and ' + 'Li, Liang and Koger, Benjamin and Costelloe, Blair R and ' + 'Couzin, Iain D', + title='DeepPoseKit, a software toolkit for fast and robust ' + 'animal pose estimation using deep learning', + container='Elife', + year='2019', + homepage='https://github.com/jgraving/DeepPoseKit-Data', + ), + keypoint_info={ + 0: + dict(name='head', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='neck', id=1, color=[255, 255, 255], type='', swap=''), + 2: + dict(name='thorax', id=2, color=[255, 255, 255], type='', swap=''), + 3: + dict(name='abdomen1', id=3, color=[255, 255, 255], type='', swap=''), + 4: + dict(name='abdomen2', id=4, color=[255, 255, 255], type='', swap=''), + 5: + dict( + name='anttipL', + id=5, + color=[255, 255, 255], + type='', + swap='anttipR'), + 6: + dict( + name='antbaseL', + id=6, + color=[255, 255, 255], + type='', + swap='antbaseR'), + 7: + dict(name='eyeL', id=7, color=[255, 255, 255], type='', swap='eyeR'), + 8: + dict( + name='forelegL1', + id=8, + color=[255, 255, 255], + type='', + swap='forelegR1'), + 9: + dict( + name='forelegL2', + id=9, + color=[255, 255, 255], + type='', + swap='forelegR2'), + 10: + dict( + name='forelegL3', + id=10, + color=[255, 255, 255], + type='', + swap='forelegR3'), + 11: + dict( + name='forelegL4', + id=11, + color=[255, 255, 255], + type='', + swap='forelegR4'), + 12: + dict( + name='midlegL1', + id=12, + color=[255, 255, 255], + type='', + swap='midlegR1'), + 13: + dict( + name='midlegL2', + id=13, + color=[255, 255, 255], + type='', + swap='midlegR2'), + 14: + dict( + name='midlegL3', + id=14, + color=[255, 255, 255], + type='', + swap='midlegR3'), + 15: + dict( + name='midlegL4', + id=15, + color=[255, 255, 255], + type='', + swap='midlegR4'), + 16: + dict( + name='hindlegL1', + id=16, + color=[255, 255, 255], + type='', + swap='hindlegR1'), + 17: + dict( + name='hindlegL2', + id=17, + color=[255, 255, 255], + type='', + swap='hindlegR2'), + 18: + dict( + name='hindlegL3', + id=18, + color=[255, 255, 255], + type='', + swap='hindlegR3'), + 19: + dict( + name='hindlegL4', + id=19, + color=[255, 255, 255], + type='', + swap='hindlegR4'), + 20: + dict( + name='anttipR', + id=20, + color=[255, 255, 255], + type='', + swap='anttipL'), + 21: + dict( + name='antbaseR', + id=21, + color=[255, 255, 255], + type='', + swap='antbaseL'), + 22: + dict(name='eyeR', id=22, color=[255, 255, 255], type='', swap='eyeL'), + 23: + dict( + name='forelegR1', + id=23, + color=[255, 255, 255], + type='', + swap='forelegL1'), + 24: + dict( + name='forelegR2', + id=24, + color=[255, 255, 255], + type='', + swap='forelegL2'), + 25: + dict( + name='forelegR3', + id=25, + color=[255, 255, 255], + type='', + swap='forelegL3'), + 26: + dict( + name='forelegR4', + id=26, + color=[255, 255, 255], + type='', + swap='forelegL4'), + 27: + dict( + name='midlegR1', + id=27, + color=[255, 255, 255], + type='', + swap='midlegL1'), + 28: + dict( + name='midlegR2', + id=28, + color=[255, 255, 255], + type='', + swap='midlegL2'), + 29: + dict( + name='midlegR3', + id=29, + color=[255, 255, 255], + type='', + swap='midlegL3'), + 30: + dict( + name='midlegR4', + id=30, + color=[255, 255, 255], + type='', + swap='midlegL4'), + 31: + dict( + name='hindlegR1', + id=31, + color=[255, 255, 255], + type='', + swap='hindlegL1'), + 32: + dict( + name='hindlegR2', + id=32, + color=[255, 255, 255], + type='', + swap='hindlegL2'), + 33: + dict( + name='hindlegR3', + id=33, + color=[255, 255, 255], + type='', + swap='hindlegL3'), + 34: + dict( + name='hindlegR4', + id=34, + color=[255, 255, 255], + type='', + swap='hindlegL4') + }, + skeleton_info={ + 0: dict(link=('neck', 'head'), id=0, color=[255, 255, 255]), + 1: dict(link=('thorax', 'neck'), id=1, color=[255, 255, 255]), + 2: dict(link=('abdomen1', 'thorax'), id=2, color=[255, 255, 255]), + 3: dict(link=('abdomen2', 'abdomen1'), id=3, color=[255, 255, 255]), + 4: dict(link=('antbaseL', 'anttipL'), id=4, color=[255, 255, 255]), + 5: dict(link=('eyeL', 'antbaseL'), id=5, color=[255, 255, 255]), + 6: dict(link=('forelegL2', 'forelegL1'), id=6, color=[255, 255, 255]), + 7: dict(link=('forelegL3', 'forelegL2'), id=7, color=[255, 255, 255]), + 8: dict(link=('forelegL4', 'forelegL3'), id=8, color=[255, 255, 255]), + 9: dict(link=('midlegL2', 'midlegL1'), id=9, color=[255, 255, 255]), + 10: dict(link=('midlegL3', 'midlegL2'), id=10, color=[255, 255, 255]), + 11: dict(link=('midlegL4', 'midlegL3'), id=11, color=[255, 255, 255]), + 12: + dict(link=('hindlegL2', 'hindlegL1'), id=12, color=[255, 255, 255]), + 13: + dict(link=('hindlegL3', 'hindlegL2'), id=13, color=[255, 255, 255]), + 14: + dict(link=('hindlegL4', 'hindlegL3'), id=14, color=[255, 255, 255]), + 15: dict(link=('antbaseR', 'anttipR'), id=15, color=[255, 255, 255]), + 16: dict(link=('eyeR', 'antbaseR'), id=16, color=[255, 255, 255]), + 17: + dict(link=('forelegR2', 'forelegR1'), id=17, color=[255, 255, 255]), + 18: + dict(link=('forelegR3', 'forelegR2'), id=18, color=[255, 255, 255]), + 19: + dict(link=('forelegR4', 'forelegR3'), id=19, color=[255, 255, 255]), + 20: dict(link=('midlegR2', 'midlegR1'), id=20, color=[255, 255, 255]), + 21: dict(link=('midlegR3', 'midlegR2'), id=21, color=[255, 255, 255]), + 22: dict(link=('midlegR4', 'midlegR3'), id=22, color=[255, 255, 255]), + 23: + dict(link=('hindlegR2', 'hindlegR1'), id=23, color=[255, 255, 255]), + 24: + dict(link=('hindlegR3', 'hindlegR2'), id=24, color=[255, 255, 255]), + 25: + dict(link=('hindlegR4', 'hindlegR3'), id=25, color=[255, 255, 255]) + }, + joint_weights=[1.] * 35, + sigmas=[]) diff --git a/configs/_base_/datasets/macaque.py b/configs/_base_/datasets/macaque.py new file mode 100644 index 0000000000..12d2480fd1 --- /dev/null +++ b/configs/_base_/datasets/macaque.py @@ -0,0 +1,183 @@ +dataset_info = dict( + dataset_name='macaque', + paper_info=dict( + author='Labuguen, Rollyn and Matsumoto, Jumpei and ' + 'Negrete, Salvador and Nishimaru, Hiroshi and ' + 'Nishijo, Hisao and Takada, Masahiko and ' + 'Go, Yasuhiro and Inoue, Ken-ichi and Shibata, Tomohiro', + title='MacaquePose: A novel ‘in the wild’macaque monkey pose dataset ' + 'for markerless motion capture', + container='bioRxiv', + year='2020', + homepage='http://www.pri.kyoto-u.ac.jp/datasets/' + 'macaquepose/index.html', + ), + keypoint_info={ + 0: + dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), + 1: + dict( + name='left_eye', + id=1, + color=[51, 153, 255], + type='upper', + swap='right_eye'), + 2: + dict( + name='right_eye', + id=2, + color=[51, 153, 255], + type='upper', + swap='left_eye'), + 3: + dict( + name='left_ear', + id=3, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 4: + dict( + name='right_ear', + id=4, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='right_shoulder', + id=6, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 7: + dict( + name='left_elbow', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 8: + dict( + name='right_elbow', + id=8, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 9: + dict( + name='left_wrist', + id=9, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='right_hip', + id=12, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 13: + dict( + name='left_knee', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 14: + dict( + name='right_knee', + id=14, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 15: + dict( + name='left_ankle', + id=15, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 16: + dict( + name='right_ankle', + id=16, + color=[255, 128, 0], + type='lower', + swap='left_ankle') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('left_eye', 'right_eye'), id=12, color=[51, 153, 255]), + 13: + dict(link=('nose', 'left_eye'), id=13, color=[51, 153, 255]), + 14: + dict(link=('nose', 'right_eye'), id=14, color=[51, 153, 255]), + 15: + dict(link=('left_eye', 'left_ear'), id=15, color=[51, 153, 255]), + 16: + dict(link=('right_eye', 'right_ear'), id=16, color=[51, 153, 255]), + 17: + dict(link=('left_ear', 'left_shoulder'), id=17, color=[51, 153, 255]), + 18: + dict( + link=('right_ear', 'right_shoulder'), id=18, color=[51, 153, 255]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, 1.2, 1.5, + 1.5 + ], + sigmas=[ + 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, + 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/mhp.py b/configs/_base_/datasets/mhp.py new file mode 100644 index 0000000000..e16e37c79c --- /dev/null +++ b/configs/_base_/datasets/mhp.py @@ -0,0 +1,156 @@ +dataset_info = dict( + dataset_name='mhp', + paper_info=dict( + author='Zhao, Jian and Li, Jianshu and Cheng, Yu and ' + 'Sim, Terence and Yan, Shuicheng and Feng, Jiashi', + title='Understanding humans in crowded scenes: ' + 'Deep nested adversarial learning and a ' + 'new benchmark for multi-human parsing', + container='Proceedings of the 26th ACM ' + 'international conference on Multimedia', + year='2018', + homepage='https://lv-mhp.github.io/dataset', + ), + keypoint_info={ + 0: + dict( + name='right_ankle', + id=0, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 1: + dict( + name='right_knee', + id=1, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 2: + dict( + name='right_hip', + id=2, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 3: + dict( + name='left_hip', + id=3, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 4: + dict( + name='left_knee', + id=4, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 5: + dict( + name='left_ankle', + id=5, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 6: + dict(name='pelvis', id=6, color=[51, 153, 255], type='lower', swap=''), + 7: + dict(name='thorax', id=7, color=[51, 153, 255], type='upper', swap=''), + 8: + dict( + name='upper_neck', + id=8, + color=[51, 153, 255], + type='upper', + swap=''), + 9: + dict( + name='head_top', id=9, color=[51, 153, 255], type='upper', + swap=''), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='right_elbow', + id=11, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 12: + dict( + name='right_shoulder', + id=12, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 13: + dict( + name='left_shoulder', + id=13, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 14: + dict( + name='left_elbow', + id=14, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 15: + dict( + name='left_wrist', + id=15, + color=[0, 255, 0], + type='upper', + swap='right_wrist') + }, + skeleton_info={ + 0: + dict(link=('right_ankle', 'right_knee'), id=0, color=[255, 128, 0]), + 1: + dict(link=('right_knee', 'right_hip'), id=1, color=[255, 128, 0]), + 2: + dict(link=('right_hip', 'pelvis'), id=2, color=[255, 128, 0]), + 3: + dict(link=('pelvis', 'left_hip'), id=3, color=[0, 255, 0]), + 4: + dict(link=('left_hip', 'left_knee'), id=4, color=[0, 255, 0]), + 5: + dict(link=('left_knee', 'left_ankle'), id=5, color=[0, 255, 0]), + 6: + dict(link=('pelvis', 'thorax'), id=6, color=[51, 153, 255]), + 7: + dict(link=('thorax', 'upper_neck'), id=7, color=[51, 153, 255]), + 8: + dict(link=('upper_neck', 'head_top'), id=8, color=[51, 153, 255]), + 9: + dict(link=('upper_neck', 'right_shoulder'), id=9, color=[255, 128, 0]), + 10: + dict( + link=('right_shoulder', 'right_elbow'), id=10, color=[255, 128, + 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('upper_neck', 'left_shoulder'), id=12, color=[0, 255, 0]), + 13: + dict(link=('left_shoulder', 'left_elbow'), id=13, color=[0, 255, 0]), + 14: + dict(link=('left_elbow', 'left_wrist'), id=14, color=[0, 255, 0]) + }, + joint_weights=[ + 1.5, 1.2, 1., 1., 1.2, 1.5, 1., 1., 1., 1., 1.5, 1.2, 1., 1., 1.2, 1.5 + ], + # Adapted from COCO dataset. + sigmas=[ + 0.089, 0.083, 0.107, 0.107, 0.083, 0.089, 0.026, 0.026, 0.026, 0.026, + 0.062, 0.072, 0.179, 0.179, 0.072, 0.062 + ]) diff --git a/configs/_base_/datasets/mpi_inf_3dhp.py b/configs/_base_/datasets/mpi_inf_3dhp.py new file mode 100644 index 0000000000..ffd0a70297 --- /dev/null +++ b/configs/_base_/datasets/mpi_inf_3dhp.py @@ -0,0 +1,132 @@ +dataset_info = dict( + dataset_name='mpi_inf_3dhp', + paper_info=dict( + author='ehta, Dushyant and Rhodin, Helge and Casas, Dan and ' + 'Fua, Pascal and Sotnychenko, Oleksandr and Xu, Weipeng and ' + 'Theobalt, Christian', + title='Monocular 3D Human Pose Estimation In The Wild Using Improved ' + 'CNN Supervision', + container='2017 international conference on 3D vision (3DV)', + year='2017', + homepage='http://gvv.mpi-inf.mpg.de/3dhp-dataset', + ), + keypoint_info={ + 0: + dict( + name='head_top', id=0, color=[51, 153, 255], type='upper', + swap=''), + 1: + dict(name='neck', id=1, color=[51, 153, 255], type='upper', swap=''), + 2: + dict( + name='right_shoulder', + id=2, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 3: + dict( + name='right_elbow', + id=3, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 4: + dict( + name='right_wrist', + id=4, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='left_elbow', + id=6, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 7: + dict( + name='left_wrist', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 8: + dict( + name='right_hip', + id=8, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 9: + dict( + name='right_knee', + id=9, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 10: + dict( + name='right_ankle', + id=10, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='left_knee', + id=12, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 13: + dict( + name='left_ankle', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 14: + dict(name='root', id=14, color=[51, 153, 255], type='lower', swap=''), + 15: + dict(name='spine', id=15, color=[51, 153, 255], type='upper', swap=''), + 16: + dict(name='head', id=16, color=[51, 153, 255], type='upper', swap='') + }, + skeleton_info={ + 0: dict(link=('neck', 'right_shoulder'), id=0, color=[255, 128, 0]), + 1: dict( + link=('right_shoulder', 'right_elbow'), id=1, color=[255, 128, 0]), + 2: + dict(link=('right_elbow', 'right_wrist'), id=2, color=[255, 128, 0]), + 3: dict(link=('neck', 'left_shoulder'), id=3, color=[0, 255, 0]), + 4: dict(link=('left_shoulder', 'left_elbow'), id=4, color=[0, 255, 0]), + 5: dict(link=('left_elbow', 'left_wrist'), id=5, color=[0, 255, 0]), + 6: dict(link=('root', 'right_hip'), id=6, color=[255, 128, 0]), + 7: dict(link=('right_hip', 'right_knee'), id=7, color=[255, 128, 0]), + 8: dict(link=('right_knee', 'right_ankle'), id=8, color=[255, 128, 0]), + 9: dict(link=('root', 'left_hip'), id=9, color=[0, 255, 0]), + 10: dict(link=('left_hip', 'left_knee'), id=10, color=[0, 255, 0]), + 11: dict(link=('left_knee', 'left_ankle'), id=11, color=[0, 255, 0]), + 12: dict(link=('head_top', 'head'), id=12, color=[51, 153, 255]), + 13: dict(link=('head', 'neck'), id=13, color=[51, 153, 255]), + 14: dict(link=('neck', 'spine'), id=14, color=[51, 153, 255]), + 15: dict(link=('spine', 'root'), id=15, color=[51, 153, 255]) + }, + joint_weights=[1.] * 17, + sigmas=[]) diff --git a/configs/_base_/datasets/mpii.py b/configs/_base_/datasets/mpii.py new file mode 100644 index 0000000000..6c2a491c7b --- /dev/null +++ b/configs/_base_/datasets/mpii.py @@ -0,0 +1,155 @@ +dataset_info = dict( + dataset_name='mpii', + paper_info=dict( + author='Mykhaylo Andriluka and Leonid Pishchulin and ' + 'Peter Gehler and Schiele, Bernt', + title='2D Human Pose Estimation: New Benchmark and ' + 'State of the Art Analysis', + container='IEEE Conference on Computer Vision and ' + 'Pattern Recognition (CVPR)', + year='2014', + homepage='http://human-pose.mpi-inf.mpg.de/', + ), + keypoint_info={ + 0: + dict( + name='right_ankle', + id=0, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 1: + dict( + name='right_knee', + id=1, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 2: + dict( + name='right_hip', + id=2, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 3: + dict( + name='left_hip', + id=3, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 4: + dict( + name='left_knee', + id=4, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 5: + dict( + name='left_ankle', + id=5, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 6: + dict(name='pelvis', id=6, color=[51, 153, 255], type='lower', swap=''), + 7: + dict(name='thorax', id=7, color=[51, 153, 255], type='upper', swap=''), + 8: + dict( + name='upper_neck', + id=8, + color=[51, 153, 255], + type='upper', + swap=''), + 9: + dict( + name='head_top', id=9, color=[51, 153, 255], type='upper', + swap=''), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='right_elbow', + id=11, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 12: + dict( + name='right_shoulder', + id=12, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 13: + dict( + name='left_shoulder', + id=13, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 14: + dict( + name='left_elbow', + id=14, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 15: + dict( + name='left_wrist', + id=15, + color=[0, 255, 0], + type='upper', + swap='right_wrist') + }, + skeleton_info={ + 0: + dict(link=('right_ankle', 'right_knee'), id=0, color=[255, 128, 0]), + 1: + dict(link=('right_knee', 'right_hip'), id=1, color=[255, 128, 0]), + 2: + dict(link=('right_hip', 'pelvis'), id=2, color=[255, 128, 0]), + 3: + dict(link=('pelvis', 'left_hip'), id=3, color=[0, 255, 0]), + 4: + dict(link=('left_hip', 'left_knee'), id=4, color=[0, 255, 0]), + 5: + dict(link=('left_knee', 'left_ankle'), id=5, color=[0, 255, 0]), + 6: + dict(link=('pelvis', 'thorax'), id=6, color=[51, 153, 255]), + 7: + dict(link=('thorax', 'upper_neck'), id=7, color=[51, 153, 255]), + 8: + dict(link=('upper_neck', 'head_top'), id=8, color=[51, 153, 255]), + 9: + dict(link=('upper_neck', 'right_shoulder'), id=9, color=[255, 128, 0]), + 10: + dict( + link=('right_shoulder', 'right_elbow'), id=10, color=[255, 128, + 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('upper_neck', 'left_shoulder'), id=12, color=[0, 255, 0]), + 13: + dict(link=('left_shoulder', 'left_elbow'), id=13, color=[0, 255, 0]), + 14: + dict(link=('left_elbow', 'left_wrist'), id=14, color=[0, 255, 0]) + }, + joint_weights=[ + 1.5, 1.2, 1., 1., 1.2, 1.5, 1., 1., 1., 1., 1.5, 1.2, 1., 1., 1.2, 1.5 + ], + # Adapted from COCO dataset. + sigmas=[ + 0.089, 0.083, 0.107, 0.107, 0.083, 0.089, 0.026, 0.026, 0.026, 0.026, + 0.062, 0.072, 0.179, 0.179, 0.072, 0.062 + ]) diff --git a/configs/_base_/datasets/mpii_trb.py b/configs/_base_/datasets/mpii_trb.py new file mode 100644 index 0000000000..73940d4b48 --- /dev/null +++ b/configs/_base_/datasets/mpii_trb.py @@ -0,0 +1,380 @@ +dataset_info = dict( + dataset_name='mpii_trb', + paper_info=dict( + author='Duan, Haodong and Lin, Kwan-Yee and Jin, Sheng and ' + 'Liu, Wentao and Qian, Chen and Ouyang, Wanli', + title='TRB: A Novel Triplet Representation for ' + 'Understanding 2D Human Body', + container='Proceedings of the IEEE International ' + 'Conference on Computer Vision', + year='2019', + homepage='https://github.com/kennymckormick/' + 'Triplet-Representation-of-human-Body', + ), + keypoint_info={ + 0: + dict( + name='left_shoulder', + id=0, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 1: + dict( + name='right_shoulder', + id=1, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 2: + dict( + name='left_elbow', + id=2, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 3: + dict( + name='right_elbow', + id=3, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 4: + dict( + name='left_wrist', + id=4, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 5: + dict( + name='right_wrist', + id=5, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 6: + dict( + name='left_hip', + id=6, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 7: + dict( + name='right_hip', + id=7, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 8: + dict( + name='left_knee', + id=8, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 9: + dict( + name='right_knee', + id=9, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 10: + dict( + name='left_ankle', + id=10, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 11: + dict( + name='right_ankle', + id=11, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 12: + dict(name='head', id=12, color=[51, 153, 255], type='upper', swap=''), + 13: + dict(name='neck', id=13, color=[51, 153, 255], type='upper', swap=''), + 14: + dict( + name='right_neck', + id=14, + color=[255, 255, 255], + type='upper', + swap='left_neck'), + 15: + dict( + name='left_neck', + id=15, + color=[255, 255, 255], + type='upper', + swap='right_neck'), + 16: + dict( + name='medial_right_shoulder', + id=16, + color=[255, 255, 255], + type='upper', + swap='medial_left_shoulder'), + 17: + dict( + name='lateral_right_shoulder', + id=17, + color=[255, 255, 255], + type='upper', + swap='lateral_left_shoulder'), + 18: + dict( + name='medial_right_bow', + id=18, + color=[255, 255, 255], + type='upper', + swap='medial_left_bow'), + 19: + dict( + name='lateral_right_bow', + id=19, + color=[255, 255, 255], + type='upper', + swap='lateral_left_bow'), + 20: + dict( + name='medial_right_wrist', + id=20, + color=[255, 255, 255], + type='upper', + swap='medial_left_wrist'), + 21: + dict( + name='lateral_right_wrist', + id=21, + color=[255, 255, 255], + type='upper', + swap='lateral_left_wrist'), + 22: + dict( + name='medial_left_shoulder', + id=22, + color=[255, 255, 255], + type='upper', + swap='medial_right_shoulder'), + 23: + dict( + name='lateral_left_shoulder', + id=23, + color=[255, 255, 255], + type='upper', + swap='lateral_right_shoulder'), + 24: + dict( + name='medial_left_bow', + id=24, + color=[255, 255, 255], + type='upper', + swap='medial_right_bow'), + 25: + dict( + name='lateral_left_bow', + id=25, + color=[255, 255, 255], + type='upper', + swap='lateral_right_bow'), + 26: + dict( + name='medial_left_wrist', + id=26, + color=[255, 255, 255], + type='upper', + swap='medial_right_wrist'), + 27: + dict( + name='lateral_left_wrist', + id=27, + color=[255, 255, 255], + type='upper', + swap='lateral_right_wrist'), + 28: + dict( + name='medial_right_hip', + id=28, + color=[255, 255, 255], + type='lower', + swap='medial_left_hip'), + 29: + dict( + name='lateral_right_hip', + id=29, + color=[255, 255, 255], + type='lower', + swap='lateral_left_hip'), + 30: + dict( + name='medial_right_knee', + id=30, + color=[255, 255, 255], + type='lower', + swap='medial_left_knee'), + 31: + dict( + name='lateral_right_knee', + id=31, + color=[255, 255, 255], + type='lower', + swap='lateral_left_knee'), + 32: + dict( + name='medial_right_ankle', + id=32, + color=[255, 255, 255], + type='lower', + swap='medial_left_ankle'), + 33: + dict( + name='lateral_right_ankle', + id=33, + color=[255, 255, 255], + type='lower', + swap='lateral_left_ankle'), + 34: + dict( + name='medial_left_hip', + id=34, + color=[255, 255, 255], + type='lower', + swap='medial_right_hip'), + 35: + dict( + name='lateral_left_hip', + id=35, + color=[255, 255, 255], + type='lower', + swap='lateral_right_hip'), + 36: + dict( + name='medial_left_knee', + id=36, + color=[255, 255, 255], + type='lower', + swap='medial_right_knee'), + 37: + dict( + name='lateral_left_knee', + id=37, + color=[255, 255, 255], + type='lower', + swap='lateral_right_knee'), + 38: + dict( + name='medial_left_ankle', + id=38, + color=[255, 255, 255], + type='lower', + swap='medial_right_ankle'), + 39: + dict( + name='lateral_left_ankle', + id=39, + color=[255, 255, 255], + type='lower', + swap='lateral_right_ankle'), + }, + skeleton_info={ + 0: + dict(link=('head', 'neck'), id=0, color=[51, 153, 255]), + 1: + dict(link=('neck', 'left_shoulder'), id=1, color=[51, 153, 255]), + 2: + dict(link=('neck', 'right_shoulder'), id=2, color=[51, 153, 255]), + 3: + dict(link=('left_shoulder', 'left_elbow'), id=3, color=[0, 255, 0]), + 4: + dict( + link=('right_shoulder', 'right_elbow'), id=4, color=[255, 128, 0]), + 5: + dict(link=('left_elbow', 'left_wrist'), id=5, color=[0, 255, 0]), + 6: + dict(link=('right_elbow', 'right_wrist'), id=6, color=[255, 128, 0]), + 7: + dict(link=('left_shoulder', 'left_hip'), id=7, color=[51, 153, 255]), + 8: + dict(link=('right_shoulder', 'right_hip'), id=8, color=[51, 153, 255]), + 9: + dict(link=('left_hip', 'right_hip'), id=9, color=[51, 153, 255]), + 10: + dict(link=('left_hip', 'left_knee'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_hip', 'right_knee'), id=11, color=[255, 128, 0]), + 12: + dict(link=('left_knee', 'left_ankle'), id=12, color=[0, 255, 0]), + 13: + dict(link=('right_knee', 'right_ankle'), id=13, color=[255, 128, 0]), + 14: + dict(link=('right_neck', 'left_neck'), id=14, color=[255, 255, 255]), + 15: + dict( + link=('medial_right_shoulder', 'lateral_right_shoulder'), + id=15, + color=[255, 255, 255]), + 16: + dict( + link=('medial_right_bow', 'lateral_right_bow'), + id=16, + color=[255, 255, 255]), + 17: + dict( + link=('medial_right_wrist', 'lateral_right_wrist'), + id=17, + color=[255, 255, 255]), + 18: + dict( + link=('medial_left_shoulder', 'lateral_left_shoulder'), + id=18, + color=[255, 255, 255]), + 19: + dict( + link=('medial_left_bow', 'lateral_left_bow'), + id=19, + color=[255, 255, 255]), + 20: + dict( + link=('medial_left_wrist', 'lateral_left_wrist'), + id=20, + color=[255, 255, 255]), + 21: + dict( + link=('medial_right_hip', 'lateral_right_hip'), + id=21, + color=[255, 255, 255]), + 22: + dict( + link=('medial_right_knee', 'lateral_right_knee'), + id=22, + color=[255, 255, 255]), + 23: + dict( + link=('medial_right_ankle', 'lateral_right_ankle'), + id=23, + color=[255, 255, 255]), + 24: + dict( + link=('medial_left_hip', 'lateral_left_hip'), + id=24, + color=[255, 255, 255]), + 25: + dict( + link=('medial_left_knee', 'lateral_left_knee'), + id=25, + color=[255, 255, 255]), + 26: + dict( + link=('medial_left_ankle', 'lateral_left_ankle'), + id=26, + color=[255, 255, 255]) + }, + joint_weights=[1.] * 40, + sigmas=[]) diff --git a/configs/_base_/datasets/ochuman.py b/configs/_base_/datasets/ochuman.py new file mode 100644 index 0000000000..2ef20838fe --- /dev/null +++ b/configs/_base_/datasets/ochuman.py @@ -0,0 +1,181 @@ +dataset_info = dict( + dataset_name='ochuman', + paper_info=dict( + author='Zhang, Song-Hai and Li, Ruilong and Dong, Xin and ' + 'Rosin, Paul and Cai, Zixi and Han, Xi and ' + 'Yang, Dingcheng and Huang, Haozhi and Hu, Shi-Min', + title='Pose2seg: Detection free human instance segmentation', + container='Proceedings of the IEEE conference on computer ' + 'vision and pattern recognition', + year='2019', + homepage='https://github.com/liruilong940607/OCHumanApi', + ), + keypoint_info={ + 0: + dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), + 1: + dict( + name='left_eye', + id=1, + color=[51, 153, 255], + type='upper', + swap='right_eye'), + 2: + dict( + name='right_eye', + id=2, + color=[51, 153, 255], + type='upper', + swap='left_eye'), + 3: + dict( + name='left_ear', + id=3, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 4: + dict( + name='right_ear', + id=4, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='right_shoulder', + id=6, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 7: + dict( + name='left_elbow', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 8: + dict( + name='right_elbow', + id=8, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 9: + dict( + name='left_wrist', + id=9, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='right_hip', + id=12, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 13: + dict( + name='left_knee', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 14: + dict( + name='right_knee', + id=14, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 15: + dict( + name='left_ankle', + id=15, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 16: + dict( + name='right_ankle', + id=16, + color=[255, 128, 0], + type='lower', + swap='left_ankle') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('left_eye', 'right_eye'), id=12, color=[51, 153, 255]), + 13: + dict(link=('nose', 'left_eye'), id=13, color=[51, 153, 255]), + 14: + dict(link=('nose', 'right_eye'), id=14, color=[51, 153, 255]), + 15: + dict(link=('left_eye', 'left_ear'), id=15, color=[51, 153, 255]), + 16: + dict(link=('right_eye', 'right_ear'), id=16, color=[51, 153, 255]), + 17: + dict(link=('left_ear', 'left_shoulder'), id=17, color=[51, 153, 255]), + 18: + dict( + link=('right_ear', 'right_shoulder'), id=18, color=[51, 153, 255]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, 1.2, 1.5, + 1.5 + ], + sigmas=[ + 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, + 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/onehand10k.py b/configs/_base_/datasets/onehand10k.py new file mode 100644 index 0000000000..016770f14f --- /dev/null +++ b/configs/_base_/datasets/onehand10k.py @@ -0,0 +1,142 @@ +dataset_info = dict( + dataset_name='onehand10k', + paper_info=dict( + author='Wang, Yangang and Peng, Cong and Liu, Yebin', + title='Mask-pose cascaded cnn for 2d hand pose estimation ' + 'from single color image', + container='IEEE Transactions on Circuits and Systems ' + 'for Video Technology', + year='2018', + homepage='https://www.yangangwang.com/papers/WANG-MCC-2018-10.html', + ), + keypoint_info={ + 0: + dict(name='wrist', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='thumb1', id=1, color=[255, 128, 0], type='', swap=''), + 2: + dict(name='thumb2', id=2, color=[255, 128, 0], type='', swap=''), + 3: + dict(name='thumb3', id=3, color=[255, 128, 0], type='', swap=''), + 4: + dict(name='thumb4', id=4, color=[255, 128, 0], type='', swap=''), + 5: + dict( + name='forefinger1', id=5, color=[255, 153, 255], type='', swap=''), + 6: + dict( + name='forefinger2', id=6, color=[255, 153, 255], type='', swap=''), + 7: + dict( + name='forefinger3', id=7, color=[255, 153, 255], type='', swap=''), + 8: + dict( + name='forefinger4', id=8, color=[255, 153, 255], type='', swap=''), + 9: + dict( + name='middle_finger1', + id=9, + color=[102, 178, 255], + type='', + swap=''), + 10: + dict( + name='middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap=''), + 11: + dict( + name='middle_finger3', + id=11, + color=[102, 178, 255], + type='', + swap=''), + 12: + dict( + name='middle_finger4', + id=12, + color=[102, 178, 255], + type='', + swap=''), + 13: + dict( + name='ring_finger1', id=13, color=[255, 51, 51], type='', swap=''), + 14: + dict( + name='ring_finger2', id=14, color=[255, 51, 51], type='', swap=''), + 15: + dict( + name='ring_finger3', id=15, color=[255, 51, 51], type='', swap=''), + 16: + dict( + name='ring_finger4', id=16, color=[255, 51, 51], type='', swap=''), + 17: + dict(name='pinky_finger1', id=17, color=[0, 255, 0], type='', swap=''), + 18: + dict(name='pinky_finger2', id=18, color=[0, 255, 0], type='', swap=''), + 19: + dict(name='pinky_finger3', id=19, color=[0, 255, 0], type='', swap=''), + 20: + dict(name='pinky_finger4', id=20, color=[0, 255, 0], type='', swap='') + }, + skeleton_info={ + 0: + dict(link=('wrist', 'thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('thumb1', 'thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('thumb2', 'thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('thumb3', 'thumb4'), id=3, color=[255, 128, 0]), + 4: + dict(link=('wrist', 'forefinger1'), id=4, color=[255, 153, 255]), + 5: + dict(link=('forefinger1', 'forefinger2'), id=5, color=[255, 153, 255]), + 6: + dict(link=('forefinger2', 'forefinger3'), id=6, color=[255, 153, 255]), + 7: + dict(link=('forefinger3', 'forefinger4'), id=7, color=[255, 153, 255]), + 8: + dict(link=('wrist', 'middle_finger1'), id=8, color=[102, 178, 255]), + 9: + dict( + link=('middle_finger1', 'middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('middle_finger2', 'middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('middle_finger3', 'middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict(link=('wrist', 'ring_finger1'), id=12, color=[255, 51, 51]), + 13: + dict( + link=('ring_finger1', 'ring_finger2'), id=13, color=[255, 51, 51]), + 14: + dict( + link=('ring_finger2', 'ring_finger3'), id=14, color=[255, 51, 51]), + 15: + dict( + link=('ring_finger3', 'ring_finger4'), id=15, color=[255, 51, 51]), + 16: + dict(link=('wrist', 'pinky_finger1'), id=16, color=[0, 255, 0]), + 17: + dict( + link=('pinky_finger1', 'pinky_finger2'), id=17, color=[0, 255, 0]), + 18: + dict( + link=('pinky_finger2', 'pinky_finger3'), id=18, color=[0, 255, 0]), + 19: + dict( + link=('pinky_finger3', 'pinky_finger4'), id=19, color=[0, 255, 0]) + }, + joint_weights=[1.] * 21, + sigmas=[]) diff --git a/configs/_base_/datasets/panoptic_hand2d.py b/configs/_base_/datasets/panoptic_hand2d.py new file mode 100644 index 0000000000..7a65731ba8 --- /dev/null +++ b/configs/_base_/datasets/panoptic_hand2d.py @@ -0,0 +1,143 @@ +dataset_info = dict( + dataset_name='panoptic_hand2d', + paper_info=dict( + author='Simon, Tomas and Joo, Hanbyul and ' + 'Matthews, Iain and Sheikh, Yaser', + title='Hand keypoint detection in single images using ' + 'multiview bootstrapping', + container='Proceedings of the IEEE conference on ' + 'Computer Vision and Pattern Recognition', + year='2017', + homepage='http://domedb.perception.cs.cmu.edu/handdb.html', + ), + keypoint_info={ + 0: + dict(name='wrist', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='thumb1', id=1, color=[255, 128, 0], type='', swap=''), + 2: + dict(name='thumb2', id=2, color=[255, 128, 0], type='', swap=''), + 3: + dict(name='thumb3', id=3, color=[255, 128, 0], type='', swap=''), + 4: + dict(name='thumb4', id=4, color=[255, 128, 0], type='', swap=''), + 5: + dict( + name='forefinger1', id=5, color=[255, 153, 255], type='', swap=''), + 6: + dict( + name='forefinger2', id=6, color=[255, 153, 255], type='', swap=''), + 7: + dict( + name='forefinger3', id=7, color=[255, 153, 255], type='', swap=''), + 8: + dict( + name='forefinger4', id=8, color=[255, 153, 255], type='', swap=''), + 9: + dict( + name='middle_finger1', + id=9, + color=[102, 178, 255], + type='', + swap=''), + 10: + dict( + name='middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap=''), + 11: + dict( + name='middle_finger3', + id=11, + color=[102, 178, 255], + type='', + swap=''), + 12: + dict( + name='middle_finger4', + id=12, + color=[102, 178, 255], + type='', + swap=''), + 13: + dict( + name='ring_finger1', id=13, color=[255, 51, 51], type='', swap=''), + 14: + dict( + name='ring_finger2', id=14, color=[255, 51, 51], type='', swap=''), + 15: + dict( + name='ring_finger3', id=15, color=[255, 51, 51], type='', swap=''), + 16: + dict( + name='ring_finger4', id=16, color=[255, 51, 51], type='', swap=''), + 17: + dict(name='pinky_finger1', id=17, color=[0, 255, 0], type='', swap=''), + 18: + dict(name='pinky_finger2', id=18, color=[0, 255, 0], type='', swap=''), + 19: + dict(name='pinky_finger3', id=19, color=[0, 255, 0], type='', swap=''), + 20: + dict(name='pinky_finger4', id=20, color=[0, 255, 0], type='', swap='') + }, + skeleton_info={ + 0: + dict(link=('wrist', 'thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('thumb1', 'thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('thumb2', 'thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('thumb3', 'thumb4'), id=3, color=[255, 128, 0]), + 4: + dict(link=('wrist', 'forefinger1'), id=4, color=[255, 153, 255]), + 5: + dict(link=('forefinger1', 'forefinger2'), id=5, color=[255, 153, 255]), + 6: + dict(link=('forefinger2', 'forefinger3'), id=6, color=[255, 153, 255]), + 7: + dict(link=('forefinger3', 'forefinger4'), id=7, color=[255, 153, 255]), + 8: + dict(link=('wrist', 'middle_finger1'), id=8, color=[102, 178, 255]), + 9: + dict( + link=('middle_finger1', 'middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('middle_finger2', 'middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('middle_finger3', 'middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict(link=('wrist', 'ring_finger1'), id=12, color=[255, 51, 51]), + 13: + dict( + link=('ring_finger1', 'ring_finger2'), id=13, color=[255, 51, 51]), + 14: + dict( + link=('ring_finger2', 'ring_finger3'), id=14, color=[255, 51, 51]), + 15: + dict( + link=('ring_finger3', 'ring_finger4'), id=15, color=[255, 51, 51]), + 16: + dict(link=('wrist', 'pinky_finger1'), id=16, color=[0, 255, 0]), + 17: + dict( + link=('pinky_finger1', 'pinky_finger2'), id=17, color=[0, 255, 0]), + 18: + dict( + link=('pinky_finger2', 'pinky_finger3'), id=18, color=[0, 255, 0]), + 19: + dict( + link=('pinky_finger3', 'pinky_finger4'), id=19, color=[0, 255, 0]) + }, + joint_weights=[1.] * 21, + sigmas=[]) diff --git a/configs/_base_/datasets/posetrack18.py b/configs/_base_/datasets/posetrack18.py new file mode 100644 index 0000000000..5aefd1c97f --- /dev/null +++ b/configs/_base_/datasets/posetrack18.py @@ -0,0 +1,176 @@ +dataset_info = dict( + dataset_name='posetrack18', + paper_info=dict( + author='Andriluka, Mykhaylo and Iqbal, Umar and ' + 'Insafutdinov, Eldar and Pishchulin, Leonid and ' + 'Milan, Anton and Gall, Juergen and Schiele, Bernt', + title='Posetrack: A benchmark for human pose estimation and tracking', + container='Proceedings of the IEEE Conference on ' + 'Computer Vision and Pattern Recognition', + year='2018', + homepage='https://posetrack.net/users/download.php', + ), + keypoint_info={ + 0: + dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), + 1: + dict( + name='head_bottom', + id=1, + color=[51, 153, 255], + type='upper', + swap=''), + 2: + dict( + name='head_top', id=2, color=[51, 153, 255], type='upper', + swap=''), + 3: + dict( + name='left_ear', + id=3, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 4: + dict( + name='right_ear', + id=4, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='right_shoulder', + id=6, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 7: + dict( + name='left_elbow', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 8: + dict( + name='right_elbow', + id=8, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 9: + dict( + name='left_wrist', + id=9, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='right_hip', + id=12, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 13: + dict( + name='left_knee', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 14: + dict( + name='right_knee', + id=14, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 15: + dict( + name='left_ankle', + id=15, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 16: + dict( + name='right_ankle', + id=16, + color=[255, 128, 0], + type='lower', + swap='left_ankle') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('nose', 'head_bottom'), id=12, color=[51, 153, 255]), + 13: + dict(link=('nose', 'head_top'), id=13, color=[51, 153, 255]), + 14: + dict( + link=('head_bottom', 'left_shoulder'), id=14, color=[51, 153, + 255]), + 15: + dict( + link=('head_bottom', 'right_shoulder'), + id=15, + color=[51, 153, 255]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, 1.2, 1.5, + 1.5 + ], + sigmas=[ + 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, + 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/rhd2d.py b/configs/_base_/datasets/rhd2d.py new file mode 100644 index 0000000000..f48e637026 --- /dev/null +++ b/configs/_base_/datasets/rhd2d.py @@ -0,0 +1,141 @@ +dataset_info = dict( + dataset_name='rhd2d', + paper_info=dict( + author='Christian Zimmermann and Thomas Brox', + title='Learning to Estimate 3D Hand Pose from Single RGB Images', + container='arXiv', + year='2017', + homepage='https://lmb.informatik.uni-freiburg.de/resources/' + 'datasets/RenderedHandposeDataset.en.html', + ), + keypoint_info={ + 0: + dict(name='wrist', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='thumb1', id=1, color=[255, 128, 0], type='', swap=''), + 2: + dict(name='thumb2', id=2, color=[255, 128, 0], type='', swap=''), + 3: + dict(name='thumb3', id=3, color=[255, 128, 0], type='', swap=''), + 4: + dict(name='thumb4', id=4, color=[255, 128, 0], type='', swap=''), + 5: + dict( + name='forefinger1', id=5, color=[255, 153, 255], type='', swap=''), + 6: + dict( + name='forefinger2', id=6, color=[255, 153, 255], type='', swap=''), + 7: + dict( + name='forefinger3', id=7, color=[255, 153, 255], type='', swap=''), + 8: + dict( + name='forefinger4', id=8, color=[255, 153, 255], type='', swap=''), + 9: + dict( + name='middle_finger1', + id=9, + color=[102, 178, 255], + type='', + swap=''), + 10: + dict( + name='middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap=''), + 11: + dict( + name='middle_finger3', + id=11, + color=[102, 178, 255], + type='', + swap=''), + 12: + dict( + name='middle_finger4', + id=12, + color=[102, 178, 255], + type='', + swap=''), + 13: + dict( + name='ring_finger1', id=13, color=[255, 51, 51], type='', swap=''), + 14: + dict( + name='ring_finger2', id=14, color=[255, 51, 51], type='', swap=''), + 15: + dict( + name='ring_finger3', id=15, color=[255, 51, 51], type='', swap=''), + 16: + dict( + name='ring_finger4', id=16, color=[255, 51, 51], type='', swap=''), + 17: + dict(name='pinky_finger1', id=17, color=[0, 255, 0], type='', swap=''), + 18: + dict(name='pinky_finger2', id=18, color=[0, 255, 0], type='', swap=''), + 19: + dict(name='pinky_finger3', id=19, color=[0, 255, 0], type='', swap=''), + 20: + dict(name='pinky_finger4', id=20, color=[0, 255, 0], type='', swap='') + }, + skeleton_info={ + 0: + dict(link=('wrist', 'thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('thumb1', 'thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('thumb2', 'thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('thumb3', 'thumb4'), id=3, color=[255, 128, 0]), + 4: + dict(link=('wrist', 'forefinger1'), id=4, color=[255, 153, 255]), + 5: + dict(link=('forefinger1', 'forefinger2'), id=5, color=[255, 153, 255]), + 6: + dict(link=('forefinger2', 'forefinger3'), id=6, color=[255, 153, 255]), + 7: + dict(link=('forefinger3', 'forefinger4'), id=7, color=[255, 153, 255]), + 8: + dict(link=('wrist', 'middle_finger1'), id=8, color=[102, 178, 255]), + 9: + dict( + link=('middle_finger1', 'middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('middle_finger2', 'middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('middle_finger3', 'middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict(link=('wrist', 'ring_finger1'), id=12, color=[255, 51, 51]), + 13: + dict( + link=('ring_finger1', 'ring_finger2'), id=13, color=[255, 51, 51]), + 14: + dict( + link=('ring_finger2', 'ring_finger3'), id=14, color=[255, 51, 51]), + 15: + dict( + link=('ring_finger3', 'ring_finger4'), id=15, color=[255, 51, 51]), + 16: + dict(link=('wrist', 'pinky_finger1'), id=16, color=[0, 255, 0]), + 17: + dict( + link=('pinky_finger1', 'pinky_finger2'), id=17, color=[0, 255, 0]), + 18: + dict( + link=('pinky_finger2', 'pinky_finger3'), id=18, color=[0, 255, 0]), + 19: + dict( + link=('pinky_finger3', 'pinky_finger4'), id=19, color=[0, 255, 0]) + }, + joint_weights=[1.] * 21, + sigmas=[]) diff --git a/configs/_base_/datasets/wflw.py b/configs/_base_/datasets/wflw.py new file mode 100644 index 0000000000..bed6f56f30 --- /dev/null +++ b/configs/_base_/datasets/wflw.py @@ -0,0 +1,582 @@ +dataset_info = dict( + dataset_name='wflw', + paper_info=dict( + author='Wu, Wayne and Qian, Chen and Yang, Shuo and Wang, ' + 'Quan and Cai, Yici and Zhou, Qiang', + title='Look at boundary: A boundary-aware face alignment algorithm', + container='Proceedings of the IEEE conference on computer ' + 'vision and pattern recognition', + year='2018', + homepage='https://wywu.github.io/projects/LAB/WFLW.html', + ), + keypoint_info={ + 0: + dict( + name='kpt-0', id=0, color=[255, 255, 255], type='', swap='kpt-32'), + 1: + dict( + name='kpt-1', id=1, color=[255, 255, 255], type='', swap='kpt-31'), + 2: + dict( + name='kpt-2', id=2, color=[255, 255, 255], type='', swap='kpt-30'), + 3: + dict( + name='kpt-3', id=3, color=[255, 255, 255], type='', swap='kpt-29'), + 4: + dict( + name='kpt-4', id=4, color=[255, 255, 255], type='', swap='kpt-28'), + 5: + dict( + name='kpt-5', id=5, color=[255, 255, 255], type='', swap='kpt-27'), + 6: + dict( + name='kpt-6', id=6, color=[255, 255, 255], type='', swap='kpt-26'), + 7: + dict( + name='kpt-7', id=7, color=[255, 255, 255], type='', swap='kpt-25'), + 8: + dict( + name='kpt-8', id=8, color=[255, 255, 255], type='', swap='kpt-24'), + 9: + dict( + name='kpt-9', id=9, color=[255, 255, 255], type='', swap='kpt-23'), + 10: + dict( + name='kpt-10', + id=10, + color=[255, 255, 255], + type='', + swap='kpt-22'), + 11: + dict( + name='kpt-11', + id=11, + color=[255, 255, 255], + type='', + swap='kpt-21'), + 12: + dict( + name='kpt-12', + id=12, + color=[255, 255, 255], + type='', + swap='kpt-20'), + 13: + dict( + name='kpt-13', + id=13, + color=[255, 255, 255], + type='', + swap='kpt-19'), + 14: + dict( + name='kpt-14', + id=14, + color=[255, 255, 255], + type='', + swap='kpt-18'), + 15: + dict( + name='kpt-15', + id=15, + color=[255, 255, 255], + type='', + swap='kpt-17'), + 16: + dict(name='kpt-16', id=16, color=[255, 255, 255], type='', swap=''), + 17: + dict( + name='kpt-17', + id=17, + color=[255, 255, 255], + type='', + swap='kpt-15'), + 18: + dict( + name='kpt-18', + id=18, + color=[255, 255, 255], + type='', + swap='kpt-14'), + 19: + dict( + name='kpt-19', + id=19, + color=[255, 255, 255], + type='', + swap='kpt-13'), + 20: + dict( + name='kpt-20', + id=20, + color=[255, 255, 255], + type='', + swap='kpt-12'), + 21: + dict( + name='kpt-21', + id=21, + color=[255, 255, 255], + type='', + swap='kpt-11'), + 22: + dict( + name='kpt-22', + id=22, + color=[255, 255, 255], + type='', + swap='kpt-10'), + 23: + dict( + name='kpt-23', id=23, color=[255, 255, 255], type='', + swap='kpt-9'), + 24: + dict( + name='kpt-24', id=24, color=[255, 255, 255], type='', + swap='kpt-8'), + 25: + dict( + name='kpt-25', id=25, color=[255, 255, 255], type='', + swap='kpt-7'), + 26: + dict( + name='kpt-26', id=26, color=[255, 255, 255], type='', + swap='kpt-6'), + 27: + dict( + name='kpt-27', id=27, color=[255, 255, 255], type='', + swap='kpt-5'), + 28: + dict( + name='kpt-28', id=28, color=[255, 255, 255], type='', + swap='kpt-4'), + 29: + dict( + name='kpt-29', id=29, color=[255, 255, 255], type='', + swap='kpt-3'), + 30: + dict( + name='kpt-30', id=30, color=[255, 255, 255], type='', + swap='kpt-2'), + 31: + dict( + name='kpt-31', id=31, color=[255, 255, 255], type='', + swap='kpt-1'), + 32: + dict( + name='kpt-32', id=32, color=[255, 255, 255], type='', + swap='kpt-0'), + 33: + dict( + name='kpt-33', + id=33, + color=[255, 255, 255], + type='', + swap='kpt-46'), + 34: + dict( + name='kpt-34', + id=34, + color=[255, 255, 255], + type='', + swap='kpt-45'), + 35: + dict( + name='kpt-35', + id=35, + color=[255, 255, 255], + type='', + swap='kpt-44'), + 36: + dict( + name='kpt-36', + id=36, + color=[255, 255, 255], + type='', + swap='kpt-43'), + 37: + dict( + name='kpt-37', + id=37, + color=[255, 255, 255], + type='', + swap='kpt-42'), + 38: + dict( + name='kpt-38', + id=38, + color=[255, 255, 255], + type='', + swap='kpt-50'), + 39: + dict( + name='kpt-39', + id=39, + color=[255, 255, 255], + type='', + swap='kpt-49'), + 40: + dict( + name='kpt-40', + id=40, + color=[255, 255, 255], + type='', + swap='kpt-48'), + 41: + dict( + name='kpt-41', + id=41, + color=[255, 255, 255], + type='', + swap='kpt-47'), + 42: + dict( + name='kpt-42', + id=42, + color=[255, 255, 255], + type='', + swap='kpt-37'), + 43: + dict( + name='kpt-43', + id=43, + color=[255, 255, 255], + type='', + swap='kpt-36'), + 44: + dict( + name='kpt-44', + id=44, + color=[255, 255, 255], + type='', + swap='kpt-35'), + 45: + dict( + name='kpt-45', + id=45, + color=[255, 255, 255], + type='', + swap='kpt-34'), + 46: + dict( + name='kpt-46', + id=46, + color=[255, 255, 255], + type='', + swap='kpt-33'), + 47: + dict( + name='kpt-47', + id=47, + color=[255, 255, 255], + type='', + swap='kpt-41'), + 48: + dict( + name='kpt-48', + id=48, + color=[255, 255, 255], + type='', + swap='kpt-40'), + 49: + dict( + name='kpt-49', + id=49, + color=[255, 255, 255], + type='', + swap='kpt-39'), + 50: + dict( + name='kpt-50', + id=50, + color=[255, 255, 255], + type='', + swap='kpt-38'), + 51: + dict(name='kpt-51', id=51, color=[255, 255, 255], type='', swap=''), + 52: + dict(name='kpt-52', id=52, color=[255, 255, 255], type='', swap=''), + 53: + dict(name='kpt-53', id=53, color=[255, 255, 255], type='', swap=''), + 54: + dict(name='kpt-54', id=54, color=[255, 255, 255], type='', swap=''), + 55: + dict( + name='kpt-55', + id=55, + color=[255, 255, 255], + type='', + swap='kpt-59'), + 56: + dict( + name='kpt-56', + id=56, + color=[255, 255, 255], + type='', + swap='kpt-58'), + 57: + dict(name='kpt-57', id=57, color=[255, 255, 255], type='', swap=''), + 58: + dict( + name='kpt-58', + id=58, + color=[255, 255, 255], + type='', + swap='kpt-56'), + 59: + dict( + name='kpt-59', + id=59, + color=[255, 255, 255], + type='', + swap='kpt-55'), + 60: + dict( + name='kpt-60', + id=60, + color=[255, 255, 255], + type='', + swap='kpt-72'), + 61: + dict( + name='kpt-61', + id=61, + color=[255, 255, 255], + type='', + swap='kpt-71'), + 62: + dict( + name='kpt-62', + id=62, + color=[255, 255, 255], + type='', + swap='kpt-70'), + 63: + dict( + name='kpt-63', + id=63, + color=[255, 255, 255], + type='', + swap='kpt-69'), + 64: + dict( + name='kpt-64', + id=64, + color=[255, 255, 255], + type='', + swap='kpt-68'), + 65: + dict( + name='kpt-65', + id=65, + color=[255, 255, 255], + type='', + swap='kpt-75'), + 66: + dict( + name='kpt-66', + id=66, + color=[255, 255, 255], + type='', + swap='kpt-74'), + 67: + dict( + name='kpt-67', + id=67, + color=[255, 255, 255], + type='', + swap='kpt-73'), + 68: + dict( + name='kpt-68', + id=68, + color=[255, 255, 255], + type='', + swap='kpt-64'), + 69: + dict( + name='kpt-69', + id=69, + color=[255, 255, 255], + type='', + swap='kpt-63'), + 70: + dict( + name='kpt-70', + id=70, + color=[255, 255, 255], + type='', + swap='kpt-62'), + 71: + dict( + name='kpt-71', + id=71, + color=[255, 255, 255], + type='', + swap='kpt-61'), + 72: + dict( + name='kpt-72', + id=72, + color=[255, 255, 255], + type='', + swap='kpt-60'), + 73: + dict( + name='kpt-73', + id=73, + color=[255, 255, 255], + type='', + swap='kpt-67'), + 74: + dict( + name='kpt-74', + id=74, + color=[255, 255, 255], + type='', + swap='kpt-66'), + 75: + dict( + name='kpt-75', + id=75, + color=[255, 255, 255], + type='', + swap='kpt-65'), + 76: + dict( + name='kpt-76', + id=76, + color=[255, 255, 255], + type='', + swap='kpt-82'), + 77: + dict( + name='kpt-77', + id=77, + color=[255, 255, 255], + type='', + swap='kpt-81'), + 78: + dict( + name='kpt-78', + id=78, + color=[255, 255, 255], + type='', + swap='kpt-80'), + 79: + dict(name='kpt-79', id=79, color=[255, 255, 255], type='', swap=''), + 80: + dict( + name='kpt-80', + id=80, + color=[255, 255, 255], + type='', + swap='kpt-78'), + 81: + dict( + name='kpt-81', + id=81, + color=[255, 255, 255], + type='', + swap='kpt-77'), + 82: + dict( + name='kpt-82', + id=82, + color=[255, 255, 255], + type='', + swap='kpt-76'), + 83: + dict( + name='kpt-83', + id=83, + color=[255, 255, 255], + type='', + swap='kpt-87'), + 84: + dict( + name='kpt-84', + id=84, + color=[255, 255, 255], + type='', + swap='kpt-86'), + 85: + dict(name='kpt-85', id=85, color=[255, 255, 255], type='', swap=''), + 86: + dict( + name='kpt-86', + id=86, + color=[255, 255, 255], + type='', + swap='kpt-84'), + 87: + dict( + name='kpt-87', + id=87, + color=[255, 255, 255], + type='', + swap='kpt-83'), + 88: + dict( + name='kpt-88', + id=88, + color=[255, 255, 255], + type='', + swap='kpt-92'), + 89: + dict( + name='kpt-89', + id=89, + color=[255, 255, 255], + type='', + swap='kpt-91'), + 90: + dict(name='kpt-90', id=90, color=[255, 255, 255], type='', swap=''), + 91: + dict( + name='kpt-91', + id=91, + color=[255, 255, 255], + type='', + swap='kpt-89'), + 92: + dict( + name='kpt-92', + id=92, + color=[255, 255, 255], + type='', + swap='kpt-88'), + 93: + dict( + name='kpt-93', + id=93, + color=[255, 255, 255], + type='', + swap='kpt-95'), + 94: + dict(name='kpt-94', id=94, color=[255, 255, 255], type='', swap=''), + 95: + dict( + name='kpt-95', + id=95, + color=[255, 255, 255], + type='', + swap='kpt-93'), + 96: + dict( + name='kpt-96', + id=96, + color=[255, 255, 255], + type='', + swap='kpt-97'), + 97: + dict( + name='kpt-97', + id=97, + color=[255, 255, 255], + type='', + swap='kpt-96') + }, + skeleton_info={}, + joint_weights=[1.] * 98, + sigmas=[]) diff --git a/configs/_base_/datasets/zebra.py b/configs/_base_/datasets/zebra.py new file mode 100644 index 0000000000..eac71f796a --- /dev/null +++ b/configs/_base_/datasets/zebra.py @@ -0,0 +1,64 @@ +dataset_info = dict( + dataset_name='zebra', + paper_info=dict( + author='Graving, Jacob M and Chae, Daniel and Naik, Hemal and ' + 'Li, Liang and Koger, Benjamin and Costelloe, Blair R and ' + 'Couzin, Iain D', + title='DeepPoseKit, a software toolkit for fast and robust ' + 'animal pose estimation using deep learning', + container='Elife', + year='2019', + homepage='https://github.com/jgraving/DeepPoseKit-Data', + ), + keypoint_info={ + 0: + dict(name='snout', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='head', id=1, color=[255, 255, 255], type='', swap=''), + 2: + dict(name='neck', id=2, color=[255, 255, 255], type='', swap=''), + 3: + dict( + name='forelegL1', + id=3, + color=[255, 255, 255], + type='', + swap='forelegR1'), + 4: + dict( + name='forelegR1', + id=4, + color=[255, 255, 255], + type='', + swap='forelegL1'), + 5: + dict( + name='hindlegL1', + id=5, + color=[255, 255, 255], + type='', + swap='hindlegR1'), + 6: + dict( + name='hindlegR1', + id=6, + color=[255, 255, 255], + type='', + swap='hindlegL1'), + 7: + dict(name='tailbase', id=7, color=[255, 255, 255], type='', swap=''), + 8: + dict(name='tailtip', id=8, color=[255, 255, 255], type='', swap='') + }, + skeleton_info={ + 0: dict(link=('head', 'snout'), id=0, color=[255, 255, 255]), + 1: dict(link=('neck', 'head'), id=1, color=[255, 255, 255]), + 2: dict(link=('forelegL1', 'neck'), id=2, color=[255, 255, 255]), + 3: dict(link=('forelegR1', 'neck'), id=3, color=[255, 255, 255]), + 4: dict(link=('hindlegL1', 'tailbase'), id=4, color=[255, 255, 255]), + 5: dict(link=('hindlegR1', 'tailbase'), id=5, color=[255, 255, 255]), + 6: dict(link=('tailbase', 'neck'), id=6, color=[255, 255, 255]), + 7: dict(link=('tailtip', 'tailbase'), id=7, color=[255, 255, 255]) + }, + joint_weights=[1.] * 9, + sigmas=[]) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w32_animalpose_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w32_animalpose_256x256.py index ab3deee83b..c8c9436966 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w32_animalpose_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w32_animalpose_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/animalpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,17 +156,20 @@ ann_file=f'{data_root}/annotations/animalpose_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w48_animalpose_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w48_animalpose_256x256.py index 4943dcaabc..2e18c14d3e 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w48_animalpose_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w48_animalpose_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/animalpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,17 +156,20 @@ ann_file=f'{data_root}/annotations/animalpose_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res101_animalpose_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res101_animalpose_256x256.py index f32429c3cc..481f54ced8 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res101_animalpose_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res101_animalpose_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/animalpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/animalpose_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res152_animalpose_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res152_animalpose_256x256.py index 87a11fe5fe..7b08480ea1 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res152_animalpose_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res152_animalpose_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/animalpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/animalpose_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res50_animalpose_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res50_animalpose_256x256.py index 0bea6d5c2c..8cdd6d78c7 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res50_animalpose_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res50_animalpose_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/animalpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/animalpose_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w32_atrw_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w32_atrw_256x256.py index f127c043c6..abafd327c4 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w32_atrw_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w32_atrw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/atrw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -153,17 +154,20 @@ ann_file=f'{data_root}/annotations/keypoint_train.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w48_atrw_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w48_atrw_256x256.py index 8c0ed2e319..5c0e2ed714 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w48_atrw_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w48_atrw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/atrw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -153,17 +154,20 @@ ann_file=f'{data_root}/annotations/keypoint_train.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res101_atrw_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res101_atrw_256x256.py index 3ee70e1617..1d03e9bbd4 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res101_atrw_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res101_atrw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/atrw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/keypoint_train.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res152_atrw_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res152_atrw_256x256.py index 5fbc5876ef..8f93665e59 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res152_atrw_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res152_atrw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/atrw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/keypoint_train.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res50_atrw_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res50_atrw_256x256.py index cce387abd7..025c525599 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res50_atrw_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res50_atrw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/atrw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/keypoint_train.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res101_fly_192x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res101_fly_192x192.py index ceb502de57..2d71ced8fe 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res101_fly_192x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res101_fly_192x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/fly.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/fly_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res152_fly_192x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res152_fly_192x192.py index d80ed51584..78cbb47f82 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res152_fly_192x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res152_fly_192x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/fly.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/fly_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res50_fly_192x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res50_fly_192x192.py index 724683972d..e1b681040c 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res50_fly_192x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res50_fly_192x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/fly.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/fly_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split1.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split1.py index 3dbde93f9b..dc0e1dbbbe 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split1.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split1.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split2.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split2.py index fdca57788b..936afd64a2 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split2.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split2.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split3.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split3.py index f798c686a2..66b5ee7245 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split3.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split3.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split1.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split1.py index 8f2490169b..3c1c6b1a89 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split1.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split1.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split2.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split2.py index a97a524e63..60de123ecc 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split2.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split2.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split3.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split3.py index 47b5342f5b..f9b4f47600 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split3.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split3.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split1.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split1.py index 41731b9141..eb50cce3d4 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split1.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split1.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split2.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split2.py index 6b2bb2e28c..ebc810ca18 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split2.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split2.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split3.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split3.py index bb717c2a4a..aa58699097 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split3.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split3.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split1.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split1.py index d96291d2f6..4000f0fe28 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split1.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split1.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split2.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split2.py index a9cee84076..5cec7d9a96 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split2.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split2.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split3.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split3.py index 0dd4790a0a..4904f97af0 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split3.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split3.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split1.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split1.py index 5a6c6cb071..46e8c961eb 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split1.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split1.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split2.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split2.py index 633e2aea5e..a0984bc3ae 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split2.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split2.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split3.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split3.py index 8e8d3a301d..d12e031540 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split3.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split3.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res101_locust_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res101_locust_160x160.py index dfcc84a849..c6678451fb 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res101_locust_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res101_locust_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/locust.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/locust_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res152_locust_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res152_locust_160x160.py index 852b851e0a..72b55a5c69 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res152_locust_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res152_locust_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/locust.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/locust_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res50_locust_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res50_locust_160x160.py index cd74849458..0cccd07d2d 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res50_locust_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res50_locust_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/locust.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/locust_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w32_macaque_256x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w32_macaque_256x192.py index d65572eb19..ac0c548526 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w32_macaque_256x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w32_macaque_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/macaque.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,17 +156,20 @@ ann_file=f'{data_root}/annotations/macaque_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w48_macaque_256x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w48_macaque_256x192.py index 8800f10163..7f2ba1266a 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w48_macaque_256x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w48_macaque_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/macaque.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,17 +156,20 @@ ann_file=f'{data_root}/annotations/macaque_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res101_macaque_256x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res101_macaque_256x192.py index e9df523a28..e31f0f11cc 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res101_macaque_256x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res101_macaque_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/macaque.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/macaque_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res152_macaque_256x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res152_macaque_256x192.py index c9ce25d548..568892acd9 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res152_macaque_256x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res152_macaque_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/macaque.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/macaque_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res50_macaque_256x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res50_macaque_256x192.py index 7d44d88b0e..fb000dc9d8 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res50_macaque_256x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res50_macaque_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/macaque.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/macaque_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res101_zebra_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res101_zebra_160x160.py index fff21925c1..6944c5b714 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res101_zebra_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res101_zebra_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/zebra.py'] log_level = 'INFO' load_from = None resume_from = None @@ -107,17 +108,20 @@ ann_file=f'{data_root}/annotations/zebra_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res152_zebra_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res152_zebra_160x160.py index 2d5d4d5dd7..52ae4c60af 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res152_zebra_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res152_zebra_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/zebra.py'] log_level = 'INFO' load_from = None resume_from = None @@ -107,17 +108,20 @@ ann_file=f'{data_root}/annotations/zebra_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res50_zebra_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res50_zebra_160x160.py index fed6b690de..732de055eb 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res50_zebra_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res50_zebra_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/zebra.py'] log_level = 'INFO' load_from = None resume_from = None @@ -107,17 +108,20 @@ ann_file=f'{data_root}/annotations/zebra_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py index 495ae9bff1..1f2bfcb0b1 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,19 +182,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512_udp.py index 1895793f28..d49ae78e05 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -185,19 +186,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py index e6b10f09f6..90d000c023 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,19 +178,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py index 2b01151dab..f980017874 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512_udp.py index 56913e99cc..908ea59cac 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -185,17 +186,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py index 2bb702b6fe..401cf8dfbc 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640_udp.py index 705d4cb923..75f03fc8f4 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -185,17 +186,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py index b366d0b665..72d94c420d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512_udp.py index dddfbf606f..80c594a27d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -185,17 +186,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py index d259216291..ba4b42424d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512_udp.py index 485bd0ebab..c0644da9ba 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640.py index c73863d80c..73f93c6cd9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640_udp.py index e7e141f6ff..7ed66bd805 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py index 829e06e4e6..783473c20e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512_udp.py index fe0785f228..abeefb5337 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640.py index c63c7eb01d..4948c255ac 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640_udp.py index d288440396..41833162b1 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py index 43459dbe8f..5958849ab5 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py index b3be170515..956fe0beb9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_640x640.py index e71e834a42..9f18f155ef 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py index 285e4afbcc..319f6981f7 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_640x640.py index 7f4c73ba71..81223b3345 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py index 2694f17b9a..b3cd17510d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py index 1f257ee7a8..ae85c95e40 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py index 2c8240f112..0088725dab 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -180,17 +181,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512_udp.py index d3a852f5cc..9ac5220b00 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -184,17 +185,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640.py index be9c334c9b..2f96442298 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -180,17 +181,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640_udp.py index 3b998de93e..985ab8db1e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -184,17 +185,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512.py index 0db9210ce3..efbb279f25 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -180,17 +181,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py index 14621b354e..5934bb4dda 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -184,17 +185,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/mobilenetv2_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/mobilenetv2_crowdpose_512x512.py index a4bb482483..b1630dbb5b 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/mobilenetv2_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/mobilenetv2_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -145,17 +146,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res101_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res101_crowdpose_512x512.py index 11876dd46d..1ce0a0b4b1 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res101_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res101_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -145,17 +146,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res152_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res152_crowdpose_512x512.py index db131088f9..ab969959eb 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res152_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res152_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -145,17 +146,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res50_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res50_crowdpose_512x512.py index 632880f134..375f6c05f3 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res50_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res50_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/mhp/hrnet_w48_mhp_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/mhp/hrnet_w48_mhp_512x512.py index 0775a91ec2..dc880d198e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/mhp/hrnet_w48_mhp_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/mhp/hrnet_w48_mhp_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mhp.py'] log_level = 'INFO' load_from = None resume_from = None @@ -175,17 +176,20 @@ ann_file=f'{data_root}/annotations/mhp_train.json', img_prefix=f'{data_root}/train/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpMhpDataset', ann_file=f'{data_root}/annotations/mhp_val.json', img_prefix=f'{data_root}/val/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpMhpDataset', ann_file=f'{data_root}/annotations/mhp_val.json', img_prefix=f'{data_root}/val/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res101_coco_256x192.py index 00d9cb5f1e..74ce8cd1ec 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res152_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res152_coco_256x192.py index 7880391a84..18c88eb1f5 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res152_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res152_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res50_coco_256x192.py index 2d2b20fa49..8bbb1b87a4 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res101_mpii_256x256.py index 5aeb513207..4e548395e3 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -103,17 +104,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res152_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res152_mpii_256x256.py index aa023a15f8..224061f54e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res152_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res152_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -103,17 +104,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res50_mpii_256x256.py index 2408235a2e..991007b3cb 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -103,17 +104,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_256x192.py index cb20a4efc3..9e4ce8dcc8 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,19 +156,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_384x288.py index 750bb389d2..5740c5b21c 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,19 +156,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_256x192.py index fa2b96127f..f85a975698 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,19 +156,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_384x288.py index e88fc95422..75e0ea5529 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,19 +157,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_256x192.py index 05bbc69d00..093fa6a069 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,19 +125,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_384x288.py index 5294323e7c..738d2ab9d4 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,19 +125,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_256x192.py index cfc5d1fdc6..477281851a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,19 +125,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_384x288.py index 66e1d3bfc3..a3e6bdf80c 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,19 +125,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_256x192.py index 353c91904a..97b9e53c44 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,19 +124,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_384x288.py index 0933e2ecf2..14c31d7e5d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,19 +125,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xmspn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xmspn50_coco_256x192.py index 42be93d654..35a1f1f230 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xmspn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xmspn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -148,17 +149,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xrsn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xrsn50_coco_256x192.py index 3840fb4525..3ad4fbc682 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xrsn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xrsn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -148,17 +149,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xmspn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xmspn50_coco_256x192.py index fa630c4aff..477e83b839 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xmspn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xmspn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -148,17 +149,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xrsn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xrsn50_coco_256x192.py index e48fd6649d..ece37e5c38 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xrsn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xrsn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -148,17 +149,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/4xmspn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/4xmspn50_coco_256x192.py index 9e140ec6f9..fc3845d026 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/4xmspn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/4xmspn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -148,17 +149,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/alexnet_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/alexnet_coco_256x192.py index f5f29b58fb..4583c5fb80 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/alexnet_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/alexnet_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_256x192.py index 3c017b3bce..6b6625d176 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -133,17 +134,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_384x288.py index 6646589a82..060fdc1a50 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -133,17 +134,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_256x256.py index e840c519bc..23797d6c57 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -131,17 +132,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_384x384.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_384x384.py index cc698edac5..c0d785f976 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_384x384.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_384x384.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -131,17 +132,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192.py index 54e1dba6aa..cacab60c63 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_coarsedropout.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_coarsedropout.py index e8eccd9105..e1a2c144be 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_coarsedropout.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_coarsedropout.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -169,17 +170,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_dark.py index 21cc4612a5..c103a53657 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_gridmask.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_gridmask.py index abb3045786..15ae12132d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_gridmask.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_gridmask.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -166,17 +167,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py index 8d4f77dc89..162f26ec11 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -157,17 +158,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp.py index f1f20fa902..fd6d5fa65a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -163,17 +164,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp_regress.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp_regress.py index 71221ddbdf..42bf724cbd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp_regress.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp_regress.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -161,17 +162,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288.py index 3e3466a11d..0236490a52 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_dark.py index 9ca633d1ad..22a45a867c 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_udp.py index bf5fcd97b0..42db24e630 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -163,17 +164,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py index bf6cd4aa85..39ef9bb702 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_dark.py index b6a1854b88..25c76fc0fe 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_udp.py index 180776bf1b..29ae6aa325 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -163,17 +164,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288.py index 6ab94b8f1c..ebb3451e2b 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_dark.py index ec4b758c9f..43b90fc939 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_udp.py index d67741353c..acf41acbab 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -163,17 +164,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_256x192.py index c76a6578aa..0acd50567e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_384x288.py index 90336d75e9..b7b54f086f 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mspn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mspn50_coco_256x192.py index 841618de1a..b51bc38e2b 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mspn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mspn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192.py index 46bf2198d9..42a799216f 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192_dark.py index 739232bee5..b882e64840 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288.py index 5d243bb88f..c5e9724440 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288_dark.py index afc355dabc..58e5764ad1 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192.py index 92e82d85fc..53f5101b97 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192_dark.py index 1c8dbfdc51..730d4bf732 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288.py index 85db57c707..9bb930b564 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288_dark.py index f346f1395e..471e33b482 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192.py index 0ae10d05b0..15335311f0 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192_dark.py index 8c70a76ebb..c9f8591fdd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288.py index ec6e566f69..70cf289858 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288_dark.py index 5c64580f92..8a5462fc74 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_256x192.py index 08d811a9f4..2dcff4170a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_384x288.py index 143a2301fb..ce3713481b 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_256x192.py index 39d33149d3..c225058bb9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_384x288.py index 0c730a42b4..7d98e86898 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_256x192.py index c123ecbc8a..d46129eb56 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_384x288.py index 15bac1c580..5ad475496d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_256x192.py index 3cd1c8163b..19a82d6601 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_384x288.py index a7d44c8222..33f04c7037 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_256x192.py index 4478981920..910250c30f 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_384x288.py index 2e7e872b3c..292eda3aa2 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_256x192.py index 4ae859db2d..2e1b538f15 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_384x288.py index 3c1073bb91..f18e27c217 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_256x192.py index 10f1aad7e0..2015e8df09 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_384x288.py index cec2cac363..f7e3f9bb9a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_256x192.py index 4e528e8db5..9e4cb2b1e9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_384x288.py index ec9c4c8f5c..ffcb2856dd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_256x192.py index ce3751e91a..0ddbfc784d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_384x288.py index 1a886218d4..b98a26b80e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_256x192.py index aecd48c248..27dd7e7a4a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_384x288.py index 8c0b0e3ffc..679311e455 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn18_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn18_coco_256x192.py index dcee242dc2..c63cd97671 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn18_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn18_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn50_coco_256x192.py index eafab7b376..3b44dc9068 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_256x192.py index f7cbc95705..4f68a1da9b 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_384x288.py index bc1f590f1d..7026054367 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -126,17 +127,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_256x192.py index a5b8d65e2c..562e1b823d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -126,17 +127,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_384x288.py index 6839a6cd7e..094d0e1cf0 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_256x192.py index bd610c29ff..8be35283bd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_384x288.py index de42daf522..874cd6ad04 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_256x192.py index 279757c366..e8d3d46e2d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_384x288.py index ea8f5df338..47e2e51e6a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_256x192.py index c517cc4332..61174e8f95 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_384x288.py index c49bce448d..408749f810 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py index f7f99f1596..cb54862d54 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_384x288.py index 61ff286e1e..dd68c3e60e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_256x192.py index 383c6da29b..fbcccbb00a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_384x288.py index ece0900376..c38b3b5a8a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/vgg16_bn_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/vgg16_bn_coco_256x192.py index 9be176dc15..0fdfccc89d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/vgg16_bn_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/vgg16_bn_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_256x192.py index 8eed97e06c..b22b2f2aac 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,13 +156,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_384x288.py index 5584a15b7a..be4bffb78d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,13 +156,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_256x192.py index d07b6f5342..154dac8c34 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,13 +156,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_384x288.py index a1f15ba3e1..3e840fdc87 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,13 +156,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_256x192.py index ee99364430..3a24fd8ba9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_320x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_320x256.py index 0562d89fd7..0fb7a83884 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_320x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_320x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_384x288.py index cb78fcf24b..6632ef85f5 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_256x192.py index 433981b681..7be11894ec 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_384x288.py index 7e9e14b8cf..44a5db23c7 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_256x192.py index de941ad63c..d1674aa3b9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_384x288.py index 4c2ca5c3d9..50fbc32f37 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w32_h36m_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w32_h36m_256x256.py index 0f4e32be89..70ab83039e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w32_h36m_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w32_h36m_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotation_body2d/h36m_coco_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownH36MDataset', ann_file=f'{data_root}/annotation_body2d/h36m_coco_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownH36MDataset', ann_file=f'{data_root}/annotation_body2d/h36m_coco_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w48_h36m_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w48_h36m_256x256.py index a7c333722e..76f09ece1a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w48_h36m_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w48_h36m_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotation_body2d/h36m_coco_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownH36MDataset', ann_file=f'{data_root}/annotation_body2d/h36m_coco_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownH36MDataset', ann_file=f'{data_root}/annotation_body2d/h36m_coco_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub1_368x368.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub1_368x368.py index 50c69c28b4..1df25d3acc 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub1_368x368.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub1_368x368.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/cpm/cpm_mpii_368x368-116e62b8_20200822.pth' # noqa: E501 resume_from = None @@ -128,17 +129,20 @@ ann_file=f'{data_root}/annotations/Sub1_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub2_368x368.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub2_368x368.py index c56b582883..46056ca69a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub2_368x368.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub2_368x368.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/cpm/cpm_mpii_368x368-116e62b8_20200822.pth' # noqa: E501 resume_from = None @@ -128,17 +129,20 @@ ann_file=f'{data_root}/annotations/Sub2_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub3_368x368.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub3_368x368.py index 2ef2f3484f..b966816c86 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub3_368x368.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub3_368x368.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/cpm/cpm_mpii_368x368-116e62b8_20200822.pth' # noqa: E501 resume_from = None @@ -128,17 +129,20 @@ ann_file=f'{data_root}/annotations/Sub3_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub1_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub1_256x256.py index 5e2da1283e..306b322a55 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub1_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub1_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/Sub1_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub2_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub2_256x256.py index 6a8e2e3ca9..ee7510eb95 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub2_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub2_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/Sub2_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub3_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub3_256x256.py index 3c67b83a90..21a41a7c18 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub3_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub3_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/Sub3_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub1_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub1_256x256.py index fce9c42a2b..e193790728 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub1_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub1_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -120,17 +121,20 @@ ann_file=f'{data_root}/annotations/Sub1_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub2_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub2_256x256.py index f44b3b113b..9530a6c8b2 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub2_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub2_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -120,17 +121,20 @@ ann_file=f'{data_root}/annotations/Sub2_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub3_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub3_256x256.py index 3564635c4e..cdef4c576e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub3_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub3_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -120,17 +121,20 @@ ann_file=f'{data_root}/annotations/Sub3_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mhp/res50_mhp_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mhp/res50_mhp_256x192.py index efee344b0c..6eb2d6f78d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mhp/res50_mhp_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mhp/res50_mhp_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mhp.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/mhp_train.json', img_prefix=f'{data_root}/train/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMhpDataset', ann_file=f'{data_root}/annotations/mhp_val.json', img_prefix=f'{data_root}/val/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMhpDataset', ann_file=f'{data_root}/annotations/mhp_val.json', img_prefix=f'{data_root}/val/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/cpm_mpii_368x368.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/cpm_mpii_368x368.py index 0997cffa6a..eac8aef24a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/cpm_mpii_368x368.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/cpm_mpii_368x368.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -115,17 +116,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_256x256.py index 956c75c1c7..9ba4eaf773 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -112,17 +113,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_384x384.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_384x384.py index 400074da90..9dee55f044 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_384x384.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_384x384.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -112,17 +113,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256.py index a58a3d5814..bca6157c8e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -137,17 +138,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_dark.py index 9d7bd6082a..50091c6916 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -137,17 +138,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_udp.py index 27560113eb..d7432d41e3 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -144,17 +145,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256.py index 9529bc77a6..8d517d2f61 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -137,17 +138,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_dark.py index 4f87f56d32..d84814e6f7 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -137,17 +138,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_udp.py index b66aa84a2a..e247fdd94c 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -144,17 +145,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/mobilenetv2_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/mobilenetv2_mpii_256x256.py index d26de07847..779de11501 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/mobilenetv2_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/mobilenetv2_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res101_mpii_256x256.py index cd9b659b82..785afbbc74 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res152_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res152_mpii_256x256.py index 06ea3e0e55..d2a32eb8c2 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res152_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res152_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res50_mpii_256x256.py index 0d06451ecb..ca6b75b48a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d101_mpii_256x256.py index dfcd54cd81..8bf6fd67c5 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d152_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d152_mpii_256x256.py index c0e43d7468..057ab405f6 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d152_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d152_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d50_mpii_256x256.py index 6b2cda721d..ce89f62370 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext101_mpii_256x256.py index 48bf9d052b..15d3783f09 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext152_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext152_mpii_256x256.py index 2f2324dc3a..69edada2f9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext152_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext152_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext50_mpii_256x256.py index 7a845bc981..d4be2765b6 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet101_mpii_256x256.py index 7ddb304425..0a2cdd0071 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -107,17 +108,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet50_mpii_256x256.py index e3506681d7..87d80a1bd7 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -107,17 +108,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet101_mpii_256x256.py index a56bd28f23..d4f0573925 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet152_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet152_mpii_256x256.py index 41aca92d7f..88230f9702 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet152_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet152_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet50_mpii_256x256.py index 4589e119a3..e45f3c868f 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv1_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv1_mpii_256x256.py index 646431eb03..fe7bd0967e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv1_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv1_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv2_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv2_mpii_256x256.py index fa389f3e19..f4bd40976d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv2_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv2_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res101_mpii_trb_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res101_mpii_trb_256x256.py index 4ef306ab50..c1a6347b9e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res101_mpii_trb_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res101_mpii_trb_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii_trb.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,13 +107,15 @@ ann_file=f'{data_root}/annotations/mpii_trb_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res152_mpii_trb_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res152_mpii_trb_256x256.py index 215dcbdf01..4512aa8556 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res152_mpii_trb_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res152_mpii_trb_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii_trb.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,13 +107,15 @@ ann_file=f'{data_root}/annotations/mpii_trb_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res50_mpii_trb_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res50_mpii_trb_256x256.py index 3eb5d55635..ff5748f960 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res50_mpii_trb_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res50_mpii_trb_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii_trb.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,13 +107,15 @@ ann_file=f'{data_root}/annotations/mpii_trb_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_256x192.py index 0b414dca51..3a9b664d4e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_384x288.py index bd0026b81f..0ba576e9f6 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_256x192.py index a2c36552f8..a42895c1fd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py index 915767ff21..1ac546553e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_256x192.py index 317daf6069..eadae42911 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_384x288.py index 09169a3a9f..20abcec94c 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/hrnet_w32_posetrack18_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/hrnet_w32_posetrack18_256x192.py index 9a6e18187c..258c4d56dd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/hrnet_w32_posetrack18_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/hrnet_w32_posetrack18_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/posetrack18.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_coco_256x192-c78dce93_20200708.pth' # noqa: E501 resume_from = None @@ -157,17 +158,20 @@ ann_file=f'{data_root}/annotations/posetrack18_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownPoseTrack18Dataset', ann_file=f'{data_root}/annotations/posetrack18_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownPoseTrack18Dataset', ann_file=f'{data_root}/annotations/posetrack18_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/res50_posetrack18_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/res50_posetrack18_256x192.py index ae4a70a99b..2d048fbb12 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/res50_posetrack18_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/res50_posetrack18_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/posetrack18.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_coco_256x192-ec54d7f3_20200709.pth' # noqa: E501 resume_from = None @@ -127,17 +128,20 @@ ann_file=f'{data_root}/annotations/posetrack18_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownPoseTrack18Dataset', ann_file=f'{data_root}/annotations/posetrack18_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownPoseTrack18Dataset', ann_file=f'{data_root}/annotations/posetrack18_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_img/pose_lift/h36m/simplebaseline3d_h36m.py b/configs/body/3d_kpt_sview_rgb_img/pose_lift/h36m/simplebaseline3d_h36m.py index 86be4a983a..6fbf7fb77c 100644 --- a/configs/body/3d_kpt_sview_rgb_img/pose_lift/h36m/simplebaseline3d_h36m.py +++ b/configs/body/3d_kpt_sview_rgb_img/pose_lift/h36m/simplebaseline3d_h36m.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -170,17 +171,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_1frame_fullconv_supervised_cpn_ft.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_1frame_fullconv_supervised_cpn_ft.py index 32ceefe1f5..5497ddedf2 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_1frame_fullconv_supervised_cpn_ft.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_1frame_fullconv_supervised_cpn_ft.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -141,17 +142,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=train_data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised.py index b55ce3ebc7..c3294db992 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -127,17 +128,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised_cpn_ft.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised_cpn_ft.py index 7c07669102..8fd8e7e2ec 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised_cpn_ft.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised_cpn_ft.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -141,17 +142,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=train_data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised.py index 0a666a3914..74d1389265 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -197,23 +198,27 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=labeled_data_cfg, - pipeline=train_labeled_pipeline), + pipeline=train_labeled_pipeline, + dataset_info={{_base_.dataset_info}}), unlabeled_dataset=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=unlabeled_data_cfg, - pipeline=train_unlabeled_pipeline)), + pipeline=train_unlabeled_pipeline, + dataset_info={{_base_.dataset_info}})), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=val_data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised_cpn_ft.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised_cpn_ft.py index c22226d43a..6cafc7f459 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised_cpn_ft.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised_cpn_ft.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -203,23 +204,27 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=labeled_data_cfg, - pipeline=train_labeled_pipeline), + pipeline=train_labeled_pipeline, + dataset_info={{_base_.dataset_info}}), unlabeled_dataset=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=unlabeled_data_cfg, - pipeline=train_unlabeled_pipeline)), + pipeline=train_unlabeled_pipeline, + dataset_info={{_base_.dataset_info}})), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=val_data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_supervised.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_supervised.py index 6e3e8f552d..152b5392fc 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_supervised.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_supervised.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -127,17 +128,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_81frames_fullconv_supervised.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_81frames_fullconv_supervised.py index 17d028b32c..41e9be633f 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_81frames_fullconv_supervised.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_81frames_fullconv_supervised.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -127,17 +128,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_mesh_sview_rgb_img/hmr/mixed/res50_mixed_224x224.py b/configs/body/3d_mesh_sview_rgb_img/hmr/mixed/res50_mixed_224x224.py index 56f3e95aa5..d17f7d646c 100644 --- a/configs/body/3d_mesh_sview_rgb_img/hmr/mixed/res50_mixed_224x224.py +++ b/configs/body/3d_mesh_sview_rgb_img/hmr/mixed/res50_mixed_224x224.py @@ -144,7 +144,7 @@ ann_file='data/mesh_annotation_files/coco_2014_train.npz', img_prefix='data/coco', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline) ], partition=[0.35, 0.15, 0.1, 0.10, 0.10, 0.2]), adversarial_dataset=dict( diff --git a/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256.py index dbb26e1e84..6690798101 100644 --- a/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/wflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -105,17 +106,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_wflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256_wingloss.py b/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256_wingloss.py index 79ba642fa7..a966253c73 100644 --- a/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256_wingloss.py +++ b/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256_wingloss.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/wflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -105,17 +106,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_wflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256.py index 4f285627fa..6e8aa8bc42 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/300w.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_300w_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256_dark.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256_dark.py index 4caef7e4c4..083c7303b4 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256_dark.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/300w.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_300w_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/res50_300w_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/res50_300w_256x256.py index e6f7aede35..a171fbb4ff 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/res50_300w_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/res50_300w_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/300w.py'] log_level = 'INFO' load_from = None resume_from = None @@ -108,17 +109,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_300w_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256.py index 3734178e76..4a6df40b0c 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_aflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256_dark.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256_dark.py index eee4ec433f..284e3466ca 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256_dark.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_aflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/res50_aflw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/res50_aflw_256x256.py index bb974fbf82..e7917f73c9 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/res50_aflw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/res50_aflw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -108,17 +109,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_aflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256.py index 1601b8f163..1d34583ca3 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/cofw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/cofw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256_dark.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256_dark.py index 9d2cdce8d2..a6ddeead14 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256_dark.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/cofw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/cofw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/res50_cofw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/res50_cofw_256x256.py index 42b3fb43eb..de1c04d413 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/res50_cofw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/res50_cofw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/cofw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -108,17 +109,20 @@ ann_file=f'{data_root}/annotations/cofw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256.py index 71292fc148..3c415a80fc 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/wflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_wflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256_dark.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256_dark.py index 4cb7fd48aa..9a6991c5f1 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256_dark.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/wflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_wflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/res50_wflw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/res50_wflw_256x256.py index 067b5979a8..46d576cb6b 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/res50_wflw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/res50_wflw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/wflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -108,17 +109,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_wflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_full_256x192.py index 2c8fe53240..91de37272b 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_lower_256x192.py index e8d3b1ced8..2011865803 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_upper_256x192.py index bc31f8c4b0..587a39470e 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_full_256x192.py index a2461fdd88..447b6b4da8 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_lower_256x192.py index 689fea132f..6b1776d0e3 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_upper_256x192.py index 0c29882462..a45a555929 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_full_256x192.py index e623533bea..bc2d37fda7 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -121,19 +122,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_lower_256x192.py index 7cec1d2f26..cf04b9e2d4 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -121,19 +122,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_upper_256x192.py index 5cd37e7ca2..202af6a676 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -121,19 +122,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192.py index c4983d0c96..8dacb04bdd 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -151,19 +152,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192_udp.py index 0d436e2586..3a3563211d 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -158,19 +159,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192.py index 2a4fce0144..ed612c4b16 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -150,19 +151,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192_udp.py index 1e0d08a0f1..9834ab3727 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -157,19 +158,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192.py index dcd8732dc6..5466112fc0 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -151,19 +152,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192_udp.py index fe706b5aa6..ba5464ad53 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -158,19 +159,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192.py index 1a64d84f9e..5027a6120b 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -151,19 +152,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192_udp.py index 0adaa29301..0a30ac53bb 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -158,19 +159,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192.py index b136a5eb34..a61dcb3569 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -151,19 +152,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192_udp.py index a64e3ccc6c..92ca112efb 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -158,19 +159,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192.py index 7038ac5836..caaaa6151a 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -151,19 +152,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192_udp.py index d3750655b8..14f4ce06fa 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -158,19 +159,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_full_256x192.py index 306f9de239..cccf4455c0 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_lower_256x192.py index 35cd8f0888..64570f636d 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_upper_256x192.py index cef5afba07..b5de3bde3a 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_full_256x192.py index 0ed65aea09..af47f0c894 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_lower_256x192.py index 5b8e1f0f45..9a648ac41c 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_upper_256x192.py index be94c7bcd8..82ac1b9f29 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_full_256x192.py index 4bba927a2f..d8ad5bdf92 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_lower_256x192.py index 0b0d633f53..699d32d70e 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_upper_256x192.py index e6d71d3172..1cf0291468 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/deeppose/onehand10k/res50_onehand10k_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/deeppose/onehand10k/res50_onehand10k_256x256.py index 8b6c446c05..05bb789d1b 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/deeppose/onehand10k/res50_onehand10k_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/deeppose/onehand10k/res50_onehand10k_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -114,17 +115,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/deeppose/panoptic2d/res50_panoptic2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/deeppose/panoptic2d/res50_panoptic2d_256x256.py index d0684ff757..03d49a91a9 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/deeppose/panoptic2d/res50_panoptic2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/deeppose/panoptic2d/res50_panoptic2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -114,17 +115,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/deeppose/rhd2d/res50_rhd2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/deeppose/rhd2d/res50_rhd2d_256x256.py index d092c5daad..a5a69ba8c4 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/deeppose/rhd2d/res50_rhd2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/deeppose/rhd2d/res50_rhd2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -114,17 +115,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/freihand2d/res50_freihand2d_224x224.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/freihand2d/res50_freihand2d_224x224.py index afaa328541..9b67055be5 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/freihand2d/res50_freihand2d_224x224.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/freihand2d/res50_freihand2d_224x224.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/freihand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/freihand_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FreiHandDataset', ann_file=f'{data_root}/annotations/freihand_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FreiHandDataset', ann_file=f'{data_root}/annotations/freihand_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_all_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_all_256x256.py index ec9d687d8b..e1f2787b15 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_all_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_all_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/interhand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -118,7 +119,8 @@ 'InterHand2.6M_train_joint_3d.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/machine_annot/' @@ -129,7 +131,8 @@ 'InterHand2.6M_val_joint_3d.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/all/' @@ -140,5 +143,6 @@ 'InterHand2.6M_test_joint_3d.json', img_prefix=f'{data_root}/images/test/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_human_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_human_256x256.py index 51e485d541..fdd896bbd3 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_human_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_human_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/interhand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -118,7 +119,8 @@ 'InterHand2.6M_train_joint_3d.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/machine_annot/' @@ -129,7 +131,8 @@ 'InterHand2.6M_val_joint_3d.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/human_annot/' @@ -140,5 +143,6 @@ 'InterHand2.6M_test_joint_3d.json', img_prefix=f'{data_root}/images/test/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_machine_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_machine_256x256.py index 4514b63e21..ebdcddd375 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_machine_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_machine_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/interhand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -118,7 +119,8 @@ 'InterHand2.6M_train_joint_3d.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/machine_annot/' @@ -129,7 +131,8 @@ 'InterHand2.6M_val_joint_3d.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/machine_annot/' @@ -140,5 +143,6 @@ 'InterHand2.6M_test_joint_3d.json', img_prefix=f'{data_root}/images/test/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256.py index 4f414a494c..034accd786 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_dark.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_dark.py index bb50553e05..9d9a14b5e2 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_dark.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_udp.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_udp.py index 00706e554d..56c3cc6782 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_udp.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/mobilenetv2_onehand10k_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/mobilenetv2_onehand10k_256x256.py index d61caea9b2..f33a0e16e0 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/mobilenetv2_onehand10k_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/mobilenetv2_onehand10k_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -114,17 +115,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/res50_onehand10k_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/res50_onehand10k_256x256.py index f5ac1203bb..0737d6cef3 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/res50_onehand10k_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/res50_onehand10k_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256.py index b8e4b881d1..cc50a686e5 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_dark.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_dark.py index a4436ce350..547a67a2d9 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_dark.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_udp.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_udp.py index 90f72472a5..44ae3a5eb3 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_udp.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/mobilenetv2_panoptic2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/mobilenetv2_panoptic2d_256x256.py index c9e5af89c2..915f3578ef 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/mobilenetv2_panoptic2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/mobilenetv2_panoptic2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/res50_panoptic2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/res50_panoptic2d_256x256.py index 12ec07d17c..65c1b27f77 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/res50_panoptic2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/res50_panoptic2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256.py index 12c1caf6c2..559fdfb1b0 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_dark.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_dark.py index 44691cf2bb..df9aba8d8f 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_dark.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_udp.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_udp.py index 7eab109684..2f07afe087 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_udp.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/mobilenetv2_rhd2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/mobilenetv2_rhd2d_256x256.py index 5c65f6fb06..5d8d1b8f34 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/mobilenetv2_rhd2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/mobilenetv2_rhd2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_224x224.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_224x224.py index 14e1a40f57..5ad64b93b5 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_224x224.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_224x224.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_256x256.py index cb4a0180b3..c8601f0ec1 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/3d_kpt_sview_rgb_img/internet/interhand3d/res50_interhand3d_all_256x256.py b/configs/hand/3d_kpt_sview_rgb_img/internet/interhand3d/res50_interhand3d_all_256x256.py index 887ea88220..0b3f57af73 100644 --- a/configs/hand/3d_kpt_sview_rgb_img/internet/interhand3d/res50_interhand3d_all_256x256.py +++ b/configs/hand/3d_kpt_sview_rgb_img/internet/interhand3d/res50_interhand3d_all_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/interhand3d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -149,7 +150,8 @@ data_cfg=data_cfg, use_gt_root_depth=True, rootnet_result_file=None, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='InterHand3DDataset', ann_file=f'{data_root}/annotations/machine_annot/' @@ -162,7 +164,8 @@ data_cfg=data_cfg, use_gt_root_depth=True, rootnet_result_file=None, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='InterHand3DDataset', ann_file=f'{data_root}/annotations/all/' @@ -175,5 +178,6 @@ data_cfg=data_cfg, use_gt_root_depth=True, rootnet_result_file=None, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_512x512.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_512x512.py index c21b984dfd..03fbd6e772 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_512x512.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_640x640.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_640x640.py index bd93518bbf..18efe463b1 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_640x640.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_512x512.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_512x512.py index ff9df849a5..f5d16e84bc 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_512x512.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_640x640.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_640x640.py index 5026e82764..2f758b5b36 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_640x640.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_512x512.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_512x512.py index 7d78753481..79888ee8e9 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_512x512.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_640x640.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_640x640.py index 127017580c..8fc3e7ef97 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_640x640.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_512x512.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_512x512.py index c8554ba4f3..646eed201a 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_512x512.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py index 74e47ff36d..68be5a3d39 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192.py index ecefef3dfb..2fb53d27c8 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192_dark.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192_dark.py index ff7ad63545..d684564ef8 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192_dark.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288.py index dc0f938c1f..2e26b540b0 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288_dark.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288_dark.py index 4e8b0d64f2..8dc37c1a57 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288_dark.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192.py index 096759cfc0..9422ad5f1f 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192_dark.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192_dark.py index 6d33cdb645..7a5df9f531 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192_dark.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288.py index c96d43e87e..7a32f4d18c 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,17 +156,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py index 27161cd8d5..04ad898f34 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py index 09311278ed..b5de961635 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w48_coco_384x288_dark-741844ba_20200812.pth' # noqa: E501 resume_from = None @@ -153,17 +154,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_256x192.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_256x192.py index 99b161d1de..d62b402346 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_256x192.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_384x288.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_384x288.py index 11982eaf41..625fbe8b6e 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_384x288.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_256x192.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_256x192.py index 21a9d14769..1d1e3b4924 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_256x192.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_384x288.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_384x288.py index 7aeeb8aa9a..af07b1f580 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_384x288.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_256x192.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_256x192.py index d5bbcd04dd..6609984d7b 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_256x192.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_384x288.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_384x288.py index dfff72bd7e..fad985c203 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_384x288.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/demo/body3d_two_stage_img_demo.py b/demo/body3d_two_stage_img_demo.py index a035bf819c..d66ec8034b 100644 --- a/demo/body3d_two_stage_img_demo.py +++ b/demo/body3d_two_stage_img_demo.py @@ -1,6 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import os import os.path as osp +import warnings from argparse import ArgumentParser import mmcv @@ -11,6 +12,7 @@ inference_top_down_pose_model, vis_3d_pose_result) from mmpose.apis.inference import init_pose_model from mmpose.core import SimpleCamera +from mmpose.datasets import DatasetInfo def _keypoint_camera_to_world(keypoints, @@ -161,6 +163,16 @@ def main(): 'model is supported for the 1st stage (2D pose detection)' dataset = pose_det_model.cfg.data['test']['type'] + dataset_info = pose_det_model.cfg.data['test'].get( + 'dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) + img_keys = list(coco.imgs.keys()) for i in mmcv.track_iter_progress(range(len(img_keys))): @@ -185,6 +197,7 @@ def main(): bbox_thr=None, format='xywh', dataset=dataset, + dataset_info=dataset_info, return_heatmap=False, outputs=None) @@ -204,6 +217,14 @@ def main(): '"PoseLifter" model is supported for the 2nd stage ' \ '(2D-to-3D lifting)' dataset = pose_lift_model.cfg.data['test']['type'] + dataset_info = pose_lift_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) camera_params = None if args.camera_param_file is not None: @@ -218,6 +239,7 @@ def main(): pose_lift_model, pose_results_2d=[pose_det_results], dataset=dataset, + dataset_info=dataset_info, with_track_id=False) image_name = pose_det_results[0]['image_name'] @@ -266,6 +288,7 @@ def main(): pose_lift_model, result=pose_lift_results_vis, img=image_name, + dataset_info=dataset_info, out_file=out_file) diff --git a/demo/bottom_up_img_demo.py b/demo/bottom_up_img_demo.py index 195ade4180..4ecb16d409 100644 --- a/demo/bottom_up_img_demo.py +++ b/demo/bottom_up_img_demo.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser from xtcocotools.coco import COCO from mmpose.apis import (inference_bottom_up_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo def main(): @@ -60,7 +62,15 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] - assert (dataset == 'BottomUpCocoDataset') + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + assert (dataset == 'BottomUpCocoDataset') + else: + dataset_info = DatasetInfo(dataset_info) img_keys = list(coco.imgs.keys()) @@ -80,6 +90,8 @@ def main(): pose_results, returned_outputs = inference_bottom_up_pose_model( pose_model, image_name, + dataset=dataset, + dataset_info=dataset_info, pose_nms_thr=args.pose_nms_thr, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -98,6 +110,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=args.show, out_file=out_file) diff --git a/demo/bottom_up_pose_tracking_demo.py b/demo/bottom_up_pose_tracking_demo.py index f9cdfb98bd..055ec67e61 100644 --- a/demo/bottom_up_pose_tracking_demo.py +++ b/demo/bottom_up_pose_tracking_demo.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 from mmpose.apis import (get_track_id, inference_bottom_up_pose_model, init_pose_model, vis_pose_tracking_result) +from mmpose.datasets import DatasetInfo def main(): @@ -61,7 +63,15 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] - assert (dataset == 'BottomUpCocoDataset') + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + assert (dataset == 'BottomUpCocoDataset') + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) fps = None @@ -100,6 +110,8 @@ def main(): pose_results, returned_outputs = inference_bottom_up_pose_model( pose_model, img, + dataset=dataset, + dataset_info=dataset_info, pose_nms_thr=args.pose_nms_thr, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -122,6 +134,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/bottom_up_video_demo.py b/demo/bottom_up_video_demo.py index f877d2246a..392d95927e 100644 --- a/demo/bottom_up_video_demo.py +++ b/demo/bottom_up_video_demo.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 from mmpose.apis import (inference_bottom_up_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo def main(): @@ -53,7 +55,15 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] - assert (dataset == 'BottomUpCocoDataset') + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + assert (dataset == 'BottomUpCocoDataset') + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) @@ -87,6 +97,8 @@ def main(): pose_results, returned_outputs = inference_bottom_up_pose_model( pose_model, img, + dataset=dataset, + dataset_info=dataset_info, pose_nms_thr=args.pose_nms_thr, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -99,6 +111,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/face_img_demo.py b/demo/face_img_demo.py index ff22a83ee6..e94eb08cdb 100644 --- a/demo/face_img_demo.py +++ b/demo/face_img_demo.py @@ -1,9 +1,11 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo try: import face_recognition @@ -79,6 +81,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) image_name = os.path.join(args.img_root, args.img) @@ -102,6 +112,7 @@ def main(): bbox_thr=None, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -119,6 +130,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=args.show, out_file=out_file) diff --git a/demo/face_video_demo.py b/demo/face_video_demo.py index 543280196f..7135cc7ae9 100644 --- a/demo/face_video_demo.py +++ b/demo/face_video_demo.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo try: import face_recognition @@ -78,6 +80,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) assert cap.isOpened(), f'Faild to load video file {args.video_path}' @@ -121,6 +131,7 @@ def main(): bbox_thr=None, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -132,6 +143,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/top_down_img_demo.py b/demo/top_down_img_demo.py index 3aa87d96a2..da1697814f 100644 --- a/demo/top_down_img_demo.py +++ b/demo/top_down_img_demo.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser from xtcocotools.coco import COCO from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo def main(): @@ -58,6 +60,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) img_keys = list(coco.imgs.keys()) @@ -92,6 +102,7 @@ def main(): bbox_thr=None, format='xywh', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -106,6 +117,7 @@ def main(): image_name, pose_results, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, radius=args.radius, thickness=args.thickness, diff --git a/demo/top_down_img_demo_with_mmdet.py b/demo/top_down_img_demo_with_mmdet.py index 0ff74f8abf..742b53c099 100644 --- a/demo/top_down_img_demo_with_mmdet.py +++ b/demo/top_down_img_demo_with_mmdet.py @@ -4,6 +4,7 @@ from mmpose.apis import (inference_top_down_pose_model, init_pose_model, process_mmdet_results, vis_pose_result) +from mmpose.datasets import DatasetInfo try: from mmdet.apis import inference_detector, init_detector @@ -76,6 +77,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) image_name = os.path.join(args.img_root, args.img) @@ -100,6 +109,7 @@ def main(): bbox_thr=args.bbox_thr, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -115,6 +125,7 @@ def main(): image_name, pose_results, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, radius=args.radius, thickness=args.thickness, diff --git a/demo/top_down_pose_tracking_demo_with_mmdet.py b/demo/top_down_pose_tracking_demo_with_mmdet.py index d2ff1c48a3..9bc2fab63b 100644 --- a/demo/top_down_pose_tracking_demo_with_mmdet.py +++ b/demo/top_down_pose_tracking_demo_with_mmdet.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 @@ -7,6 +8,7 @@ from mmpose.apis import (get_track_id, inference_top_down_pose_model, init_pose_model, process_mmdet_results, vis_pose_tracking_result) +from mmpose.datasets import DatasetInfo try: from mmdet.apis import inference_detector, init_detector @@ -84,6 +86,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) fps = None @@ -134,6 +144,7 @@ def main(): bbox_thr=args.bbox_thr, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -155,6 +166,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/top_down_pose_tracking_demo_with_mmtracking.py b/demo/top_down_pose_tracking_demo_with_mmtracking.py index c400f94f69..0a1b3f577f 100644 --- a/demo/top_down_pose_tracking_demo_with_mmtracking.py +++ b/demo/top_down_pose_tracking_demo_with_mmtracking.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_tracking_result) +from mmpose.datasets import DatasetInfo try: from mmtrack.apis import inference_mot @@ -84,6 +86,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) assert cap.isOpened(), f'Faild to load video file {args.video_path}' @@ -130,6 +140,7 @@ def main(): bbox_thr=args.bbox_thr, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -141,6 +152,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/top_down_video_demo_full_frame_without_det.py b/demo/top_down_video_demo_full_frame_without_det.py index ec60499e95..fdadbff14b 100644 --- a/demo/top_down_video_demo_full_frame_without_det.py +++ b/demo/top_down_video_demo_full_frame_without_det.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 @@ -7,6 +8,7 @@ from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo def main(): @@ -51,6 +53,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) assert cap.isOpened(), f'Faild to load video file {args.video_path}' @@ -93,6 +103,7 @@ def main(): person_results, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -104,6 +115,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/top_down_video_demo_with_mmdet.py b/demo/top_down_video_demo_with_mmdet.py index ac1949b140..2491a36628 100644 --- a/demo/top_down_video_demo_with_mmdet.py +++ b/demo/top_down_video_demo_with_mmdet.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 from mmpose.apis import (inference_top_down_pose_model, init_pose_model, process_mmdet_results, vis_pose_result) +from mmpose.datasets import DatasetInfo try: from mmdet.apis import inference_detector, init_detector @@ -75,6 +77,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) assert cap.isOpened(), f'Faild to load video file {args.video_path}' @@ -119,6 +129,7 @@ def main(): bbox_thr=args.bbox_thr, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -128,6 +139,7 @@ def main(): img, pose_results, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, radius=args.radius, thickness=args.thickness, diff --git a/mmpose/apis/inference.py b/mmpose/apis/inference.py index f8a68d6f31..b5f90cc711 100644 --- a/mmpose/apis/inference.py +++ b/mmpose/apis/inference.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings import cv2 import mmcv @@ -146,7 +147,8 @@ def __call__(self, results): def _inference_single_pose_model(model, img_or_path, bboxes, - dataset, + dataset='TopDownCocoDataset', + dataset_info=None, return_heatmap=False): """Inference human bounding boxes. @@ -159,7 +161,8 @@ def _inference_single_pose_model(model, bboxes (list | np.ndarray): All bounding boxes (with scores), shaped (N, 4) or (N, 5). (left, top, width, height, [score]) where N is number of bounding boxes. - dataset (str): Dataset name. + dataset (str): Dataset name. Deprecated. + dataset_info (DatasetInfo): A class containing all dataset info. outputs (list[str] | tuple[str]): Names of layers whose output is to be returned, default: None @@ -179,94 +182,97 @@ def _inference_single_pose_model(model, assert len(bboxes[0]) in [4, 5] - flip_pairs = None - if dataset in ('TopDownCocoDataset', 'TopDownOCHumanDataset', - 'AnimalMacaqueDataset'): - flip_pairs = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], - [13, 14], [15, 16]] - elif dataset == 'TopDownCocoWholeBodyDataset': - body = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], - [15, 16]] - foot = [[17, 20], [18, 21], [19, 22]] - - face = [[23, 39], [24, 38], [25, 37], [26, 36], [27, 35], [28, 34], - [29, 33], [30, 32], [40, 49], [41, 48], [42, 47], [43, 46], - [44, 45], [54, 58], [55, 57], [59, 68], [60, 67], [61, 66], - [62, 65], [63, 70], [64, 69], [71, 77], [72, 76], [73, 75], - [78, 82], [79, 81], [83, 87], [84, 86], [88, 90]] - - hand = [[91, 112], [92, 113], [93, 114], [94, 115], [95, 116], - [96, 117], [97, 118], [98, 119], [99, 120], [100, 121], - [101, 122], [102, 123], [103, 124], [104, 125], [105, 126], - [106, 127], [107, 128], [108, 129], [109, 130], [110, 131], - [111, 132]] - flip_pairs = body + foot + face + hand - elif dataset == 'TopDownAicDataset': - flip_pairs = [[0, 3], [1, 4], [2, 5], [6, 9], [7, 10], [8, 11]] - elif dataset == 'TopDownMpiiDataset': - flip_pairs = [[0, 5], [1, 4], [2, 3], [10, 15], [11, 14], [12, 13]] - elif dataset == 'TopDownMpiiTrbDataset': - flip_pairs = [[0, 1], [2, 3], [4, 5], [6, 7], - [8, 9], [10, 11], [14, 15], [16, 22], [28, 34], [17, 23], - [29, 35], [18, 24], [30, 36], [19, 25], [31, - 37], [20, 26], - [32, 38], [21, 27], [33, 39]] - elif dataset == 'TopDownH36MDataset': - flip_pairs = [[1, 4], [2, 5], [3, 6], [11, 14], [12, 15], [13, 16]] - elif dataset in ('OneHand10KDataset', 'FreiHandDataset', 'PanopticDataset', - 'InterHand2DDataset'): - flip_pairs = [] - elif dataset in 'Face300WDataset': - flip_pairs = [[0, 16], [1, 15], [2, 14], [3, 13], [4, 12], [5, 11], - [6, 10], [7, 9], [17, 26], [18, 25], [19, 24], [20, 23], - [21, 22], [31, 35], [32, 34], [36, 45], [37, - 44], [38, 43], - [39, 42], [40, 47], [41, 46], [48, 54], [49, - 53], [50, 52], - [61, 63], [60, 64], [67, 65], [58, 56], [59, 55]] - - elif dataset in 'FaceAFLWDataset': - flip_pairs = [[0, 5], [1, 4], [2, 3], [6, 11], [7, 10], [8, 9], - [12, 14], [15, 17]] - - elif dataset in 'FaceCOFWDataset': - flip_pairs = [[0, 1], [4, 6], [2, 3], [5, 7], [8, 9], [10, 11], - [12, 14], [16, 17], [13, 15], [18, 19], [22, 23]] - - elif dataset in 'FaceWFLWDataset': - flip_pairs = [[0, 32], [1, 31], [2, 30], [3, 29], [4, 28], [5, 27], - [6, 26], [7, 25], [8, 24], [9, 23], [10, 22], [11, 21], - [12, 20], [13, 19], [14, 18], [15, 17], [33, - 46], [34, 45], - [35, 44], [36, 43], [37, 42], [38, 50], [39, - 49], [40, 48], - [41, 47], [60, 72], [61, 71], [62, 70], [63, - 69], [64, 68], - [65, 75], [66, 74], [67, 73], [55, 59], [56, - 58], [76, 82], - [77, 81], [78, 80], [87, 83], [86, 84], [88, 92], - [89, 91], [95, 93], [96, 97]] - - elif dataset in 'AnimalFlyDataset': - flip_pairs = [[1, 2], [6, 18], [7, 19], [8, 20], [9, 21], [10, 22], - [11, 23], [12, 24], [13, 25], [14, 26], [15, 27], - [16, 28], [17, 29], [30, 31]] - elif dataset in 'AnimalHorse10Dataset': - flip_pairs = [] - - elif dataset in 'AnimalLocustDataset': - flip_pairs = [[5, 20], [6, 21], [7, 22], [8, 23], [9, 24], [10, 25], - [11, 26], [12, 27], [13, 28], [14, 29], [15, 30], - [16, 31], [17, 32], [18, 33], [19, 34]] - - elif dataset in 'AnimalZebraDataset': - flip_pairs = [[3, 4], [5, 6]] - - elif dataset in 'AnimalPoseDataset': - flip_pairs = [[0, 1], [2, 3], [8, 9], [10, 11], [12, 13], [14, 15], - [16, 17], [18, 19]] + if dataset_info is not None: + dataset_name = dataset_info.dataset_name + flip_pairs = dataset_info.flip_pairs else: - raise NotImplementedError() + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # TODO: These will be removed in the later versions. + if dataset in ('TopDownCocoDataset', 'TopDownOCHumanDataset', + 'AnimalMacaqueDataset'): + flip_pairs = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], + [13, 14], [15, 16]] + elif dataset == 'TopDownCocoWholeBodyDataset': + body = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], + [13, 14], [15, 16]] + foot = [[17, 20], [18, 21], [19, 22]] + + face = [[23, 39], [24, 38], [25, 37], [26, 36], [27, 35], [28, 34], + [29, 33], [30, 32], [40, 49], [41, 48], [42, 47], [43, 46], + [44, 45], [54, 58], [55, 57], [59, 68], [60, 67], [61, 66], + [62, 65], [63, 70], [64, 69], [71, 77], [72, 76], [73, 75], + [78, 82], [79, 81], [83, 87], [84, 86], [88, 90]] + + hand = [[91, 112], [92, 113], [93, 114], [94, 115], [95, 116], + [96, 117], [97, 118], [98, 119], [99, 120], [100, 121], + [101, 122], [102, 123], [103, 124], [104, 125], [105, 126], + [106, 127], [107, 128], [108, 129], [109, 130], [110, 131], + [111, 132]] + flip_pairs = body + foot + face + hand + elif dataset == 'TopDownAicDataset': + flip_pairs = [[0, 3], [1, 4], [2, 5], [6, 9], [7, 10], [8, 11]] + elif dataset == 'TopDownMpiiDataset': + flip_pairs = [[0, 5], [1, 4], [2, 3], [10, 15], [11, 14], [12, 13]] + elif dataset == 'TopDownMpiiTrbDataset': + flip_pairs = [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11], + [14, 15], [16, 22], [28, 34], [17, 23], [29, 35], + [18, 24], [30, 36], [19, 25], [31, 37], [20, 26], + [32, 38], [21, 27], [33, 39]] + elif dataset in ('OneHand10KDataset', 'FreiHandDataset', + 'PanopticDataset', 'InterHand2DDataset'): + flip_pairs = [] + elif dataset in 'Face300WDataset': + flip_pairs = [[0, 16], [1, 15], [2, 14], [3, 13], [4, 12], [5, 11], + [6, 10], [7, 9], [17, 26], [18, 25], [19, 24], + [20, 23], [21, 22], [31, 35], [32, 34], [36, 45], + [37, 44], [38, 43], [39, 42], [40, 47], [41, 46], + [48, 54], [49, 53], [50, 52], [61, 63], [60, 64], + [67, 65], [58, 56], [59, 55]] + + elif dataset in 'FaceAFLWDataset': + flip_pairs = [[0, 5], [1, 4], [2, 3], [6, 11], [7, 10], [8, 9], + [12, 14], [15, 17]] + + elif dataset in 'FaceCOFWDataset': + flip_pairs = [[0, 1], [4, 6], [2, 3], [5, 7], [8, 9], [10, 11], + [12, 14], [16, 17], [13, 15], [18, 19], [22, 23]] + + elif dataset in 'FaceWFLWDataset': + flip_pairs = [[0, 32], [1, 31], [2, 30], [3, 29], [4, 28], [5, 27], + [6, 26], [7, 25], [8, 24], [9, 23], [10, 22], + [11, 21], [12, 20], [13, 19], [14, 18], [15, 17], + [33, 46], [34, 45], [35, 44], [36, 43], [37, 42], + [38, 50], [39, 49], [40, 48], [41, 47], [60, 72], + [61, 71], [62, 70], [63, 69], [64, 68], [65, 75], + [66, 74], [67, 73], [55, 59], [56, 58], [76, 82], + [77, 81], [78, 80], [87, 83], [86, 84], [88, 92], + [89, 91], [95, 93], [96, 97]] + + elif dataset in 'AnimalFlyDataset': + flip_pairs = [[1, 2], [6, 18], [7, 19], [8, 20], [9, 21], [10, 22], + [11, 23], [12, 24], [13, 25], [14, 26], [15, 27], + [16, 28], [17, 29], [30, 31]] + elif dataset in 'AnimalHorse10Dataset': + flip_pairs = [] + + elif dataset in 'AnimalLocustDataset': + flip_pairs = [[5, 20], [6, 21], [7, 22], [8, 23], [9, 24], + [10, 25], [11, 26], [12, 27], [13, 28], [14, 29], + [15, 30], [16, 31], [17, 32], [18, 33], [19, 34]] + + elif dataset in 'AnimalZebraDataset': + flip_pairs = [[3, 4], [5, 6]] + + elif dataset in 'AnimalPoseDataset': + flip_pairs = [[0, 1], [2, 3], [8, 9], [10, 11], [12, 13], [14, 15], + [16, 17], [18, 19]] + else: + raise NotImplementedError() + dataset_name = dataset batch_data = [] for bbox in bboxes: @@ -285,7 +291,7 @@ def _inference_single_pose_model(model, 'bbox_id': 0, # need to be assigned if batch_size > 1 'dataset': - dataset, + dataset_name, 'joints_3d': np.zeros((cfg.data_cfg.num_joints, 3), dtype=np.float32), 'joints_3d_visible': @@ -328,6 +334,7 @@ def inference_top_down_pose_model(model, bbox_thr=None, format='xywh', dataset='TopDownCocoDataset', + dataset_info=None, return_heatmap=False, outputs=None): """Inference a single image with a list of person bounding boxes. @@ -351,6 +358,8 @@ def inference_top_down_pose_model(model, 'xyxy' means (left, top, right, bottom), 'xywh' means (left, top, width, height). dataset (str): Dataset name, e.g. 'TopDownCocoDataset'. + It is deprecated. Please use dataset_info instead. + dataset_info (DatasetInfo): A class containing all dataset info. return_heatmap (bool) : Flag to return heatmap, default: False outputs (list(str) | tuple(str)) : Names of layers whose outputs need to be returned, default: None @@ -364,6 +373,13 @@ def inference_top_down_pose_model(model, Output feature maps from layers specified in `outputs`. Includes 'heatmap' if `return_heatmap` is True. """ + if dataset_info is None: + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # only two kinds of bbox format is supported. assert format in ['xyxy', 'xywh'] @@ -401,7 +417,8 @@ def inference_top_down_pose_model(model, model, img_or_path, bboxes_xywh, - dataset, + dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap) if return_heatmap: @@ -423,6 +440,8 @@ def inference_top_down_pose_model(model, def inference_bottom_up_pose_model(model, img_or_path, + dataset='BottomUpCocoDataset', + dataset_info=None, pose_nms_thr=0.9, return_heatmap=False, outputs=None): @@ -436,6 +455,9 @@ def inference_bottom_up_pose_model(model, Args: model (nn.Module): The loaded pose model. img_or_path (str| np.ndarray): Image filename or loaded image. + dataset (str): Dataset name, e.g. 'BottomUpCocoDataset'. + It is deprecated. Please use dataset_info instead. + dataset_info (DatasetInfo): A class containing all dataset info. pose_nms_thr (float): retain oks overlap < pose_nms_thr, default: 0.9. return_heatmap (bool) : Flag to return heatmap, default: False. outputs (list(str) | tuple(str)) : Names of layers whose outputs @@ -462,17 +484,27 @@ def inference_bottom_up_pose_model(model, ] + cfg.test_pipeline[1:] test_pipeline = Compose(test_pipeline) + if dataset_info is not None: + dataset_name = dataset_info.dataset_name + flip_index = dataset_info.flip_index + else: + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + assert (dataset == 'BottomUpCocoDataset') + dataset_name = dataset + flip_index = [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15] + # prepare data data = { 'img_or_path': img_or_path, - 'dataset': 'coco', + 'dataset': dataset_name, 'ann_info': { - 'image_size': - cfg.data_cfg['image_size'], - 'num_joints': - cfg.data_cfg['num_joints'], - 'flip_index': - [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15], + 'image_size': cfg.data_cfg['image_size'], + 'num_joints': cfg.data_cfg['num_joints'], + 'flip_index': flip_index, } } @@ -523,6 +555,7 @@ def vis_pose_result(model, kpt_score_thr=0.3, bbox_color='green', dataset='TopDownCocoDataset', + dataset_info=None, show=False, out_file=None): """Visualize the detection results on the image. @@ -539,214 +572,222 @@ def vis_pose_result(model, show (bool): Whether to show the image. Default True. out_file (str|None): The filename of the output visualization image. """ - if hasattr(model, 'module'): - model = model.module + if dataset_info is not None: + skeleton = dataset_info.skeleton + pose_kpt_color = dataset_info.pose_kpt_color + pose_link_color = dataset_info.pose_link_color + else: + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # TODO: These will be removed in the later versions. + palette = np.array([[255, 128, 0], [255, 153, 51], [255, 178, 102], + [230, 230, 0], [255, 153, 255], [153, 204, 255], + [255, 102, 255], [255, 51, 255], [102, 178, 255], + [51, 153, 255], [255, 153, 153], [255, 102, 102], + [255, 51, 51], [153, 255, 153], [102, 255, 102], + [51, 255, 51], [0, 255, 0], [0, 0, 255], + [255, 0, 0], [255, 255, 255]]) + + if dataset in ('TopDownCocoDataset', 'BottomUpCocoDataset', + 'TopDownOCHumanDataset', 'AnimalMacaqueDataset'): + # show the results + skeleton = [[15, 13], [13, 11], [16, 14], [14, 12], [11, 12], + [5, 11], [6, 12], [5, 6], [5, 7], [6, 8], [7, 9], + [8, 10], [1, 2], [0, 1], [0, 2], [1, 3], [2, 4], + [3, 5], [4, 6]] + + pose_link_color = palette[[ + 0, 0, 0, 0, 7, 7, 7, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16 + ]] + pose_kpt_color = palette[[ + 16, 16, 16, 16, 16, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0 + ]] - palette = np.array([[255, 128, 0], [255, 153, 51], [255, 178, 102], - [230, 230, 0], [255, 153, 255], [153, 204, 255], - [255, 102, 255], [255, 51, 255], [102, 178, 255], - [51, 153, 255], [255, 153, 153], [255, 102, 102], - [255, 51, 51], [153, 255, 153], [102, 255, 102], - [51, 255, 51], [0, 255, 0], [0, 0, 255], [255, 0, 0], - [255, 255, 255]]) - - if dataset in ('TopDownCocoDataset', 'BottomUpCocoDataset', - 'TopDownOCHumanDataset', 'AnimalMacaqueDataset'): - # show the results - skeleton = [[16, 14], [14, 12], [17, 15], [15, 13], [12, 13], [6, 12], - [7, 13], [6, 7], [6, 8], [7, 9], [8, 10], [9, 11], [2, 3], - [1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7]] - - pose_limb_color = palette[[ - 0, 0, 0, 0, 7, 7, 7, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16 - ]] - pose_kpt_color = palette[[ - 16, 16, 16, 16, 16, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0 - ]] - - elif dataset == 'TopDownCocoWholeBodyDataset': - # show the results - skeleton = [[16, 14], [14, 12], [17, 15], [15, 13], [12, 13], [6, 12], - [7, 13], [6, 7], [6, 8], [7, 9], [8, 10], [9, 11], [2, 3], - [1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [16, 18], - [16, 19], [16, 20], [17, 21], [17, 22], [17, 23], [92, 93], - [93, 94], [94, 95], [95, 96], [92, 97], [97, 98], [98, 99], - [99, 100], [92, 101], [101, 102], [102, 103], [103, 104], - [92, 105], [105, 106], [106, 107], [107, 108], [92, 109], - [109, 110], [110, 111], [111, 112], [113, 114], [114, 115], - [115, 116], [116, 117], [113, 118], [118, 119], [119, 120], - [120, 121], [113, 122], [122, 123], [123, 124], [124, 125], - [113, 126], [126, 127], [127, 128], [128, 129], [113, 130], - [130, 131], [131, 132], [132, 133]] - - pose_limb_color = palette[ - [0, 0, 0, 0, 7, 7, 7, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16] + - [16, 16, 16, 16, 16, 16] + [ + elif dataset == 'TopDownCocoWholeBodyDataset': + # show the results + skeleton = [[15, 13], [13, 11], [16, 14], [14, 12], [11, 12], + [5, 11], [6, 12], [5, 6], [5, 7], [6, 8], [7, 9], + [8, 10], [1, 2], [0, 1], [0, 2], + [1, 3], [2, 4], [3, 5], [4, 6], [15, 17], [15, 18], + [15, 19], [16, 20], [16, 21], [16, 22], [91, 92], + [92, 93], [93, 94], [94, 95], [91, 96], [96, 97], + [97, 98], [98, 99], [91, 100], [100, 101], [101, 102], + [102, 103], [91, 104], [104, 105], [105, 106], + [106, 107], [91, 108], [108, 109], [109, 110], + [110, 111], [112, 113], [113, 114], [114, 115], + [115, 116], [112, 117], [117, 118], [118, 119], + [119, 120], [112, 121], [121, 122], [122, 123], + [123, 124], [112, 125], [125, 126], [126, 127], + [127, 128], [112, 129], [129, 130], [130, 131], + [131, 132]] + + pose_link_color = palette[[ + 0, 0, 0, 0, 7, 7, 7, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16 + ] + [16, 16, 16, 16, 16, 16] + [ 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16 ] + [ 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16 ]] - pose_kpt_color = palette[ - [16, 16, 16, 16, 16, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0] + - [0, 0, 0, 0, 0, 0] + [19] * (68 + 42)] - - elif dataset == 'TopDownAicDataset': - skeleton = [[3, 2], [2, 1], [1, 14], [14, 4], [4, 5], [5, 6], [9, 8], - [8, 7], [7, 10], [10, 11], [11, 12], [13, 14], [1, 7], - [4, 10]] - - pose_limb_color = palette[[ - 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 0, 7, 7 - ]] - pose_kpt_color = palette[[ - 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 0, 0 - ]] - - elif dataset == 'TopDownMpiiDataset': - skeleton = [[1, 2], [2, 3], [3, 7], [7, 4], [4, 5], [5, 6], [7, 8], - [8, 9], [9, 10], [9, 13], [13, 12], [12, 11], [9, 14], - [14, 15], [15, 16]] - - pose_limb_color = palette[[ - 16, 16, 16, 16, 16, 16, 7, 7, 0, 9, 9, 9, 9, 9, 9 - ]] - pose_kpt_color = palette[[ - 16, 16, 16, 16, 16, 16, 7, 7, 0, 0, 9, 9, 9, 9, 9, 9 - ]] - - elif dataset == 'TopDownMpiiTrbDataset': - skeleton = [[13, 14], [14, 1], [14, 2], [1, 3], [2, 4], [3, 5], [4, 6], - [1, 7], [2, 8], [7, 8], [7, 9], [8, 10], [9, 11], [10, 12], - [15, 16], [17, 18], [19, 20], [21, 22], [23, 24], [25, 26], - [27, 28], [29, 30], [31, 32], [33, 34], [35, 36], [37, 38], - [39, 40]] - - pose_limb_color = palette[[16] * 14 + [19] * 13] - pose_kpt_color = palette[[16] * 14 + [0] * 26] - - elif dataset == 'TopDownH36MDataset': - skeleton = [[1, 2], [2, 3], [3, 4], [1, 5], [5, 6], [6, 7], [1, 8], - [8, 9], [9, 10], [10, 11], [9, 12], [12, 13], [13, 14], - [9, 15], [15, 16], [16, 17]] - - pose_kpt_color = palette[[ - 9, 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 - ]] - pose_limb_color = palette[[ - 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 - ]] - - elif dataset in ('OneHand10KDataset', 'FreiHandDataset', - 'PanopticDataset'): - skeleton = [[1, 2], [2, 3], [3, 4], [4, 5], [1, 6], [6, 7], [7, 8], - [8, 9], [1, 10], [10, 11], [11, 12], [12, 13], [1, 14], - [14, 15], [15, 16], [16, 17], [1, 18], [18, 19], [19, 20], - [20, 21]] - - pose_limb_color = palette[[ - 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16 - ]] - pose_kpt_color = palette[[ - 0, 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, - 16 - ]] - - elif dataset == 'InterHand2DDataset': - skeleton = [[1, 2], [2, 3], [3, 4], [5, 6], [6, 7], [7, 8], [9, 10], - [10, 11], [11, 12], [13, 14], [14, 15], [15, 16], [17, 18], - [18, 19], [19, 20], [4, 21], [8, 21], [12, 21], [16, 21], - [20, 21]] - - pose_limb_color = palette[[ - 0, 0, 0, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16, 0, 4, 8, 12, 16 - ]] - pose_kpt_color = palette[[ - 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16, - 0 - ]] - - elif dataset == 'Face300WDataset': - # show the results - skeleton = [] - - pose_limb_color = palette[[]] - pose_kpt_color = palette[[19] * 68] - kpt_score_thr = 0 - - elif dataset == 'FaceAFLWDataset': - # show the results - skeleton = [] - - pose_limb_color = palette[[]] - pose_kpt_color = palette[[19] * 19] - kpt_score_thr = 0 - - elif dataset == 'FaceCOFWDataset': - # show the results - skeleton = [] - - pose_limb_color = palette[[]] - pose_kpt_color = palette[[19] * 29] - kpt_score_thr = 0 - - elif dataset == 'FaceWFLWDataset': - # show the results - skeleton = [] - - pose_limb_color = palette[[]] - pose_kpt_color = palette[[19] * 98] - kpt_score_thr = 0 - - elif dataset == 'AnimalHorse10Dataset': - skeleton = [[1, 2], [2, 13], [13, 17], [17, 22], [22, 18], [18, 12], - [12, 11], [11, 9], [9, 10], [10, 13], [3, 4], [4, 5], - [6, 7], [7, 8], [14, 15], [15, 16], [19, 20], [20, 21]] - - pose_limb_color = palette[[4] * 10 + [6] * 2 + [6] * 2 + [7] * 2 + - [7] * 2] - pose_kpt_color = palette[[ - 4, 4, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 7, 7, 7, 4, 4, 7, 7, 7, 4 - ]] - - elif dataset == 'AnimalFlyDataset': - skeleton = [[2, 1], [3, 1], [4, 1], [5, 4], [6, 5], [8, 7], [9, 8], - [10, 9], [12, 11], [13, 12], [14, 13], [16, 15], [17, 16], - [18, 17], [20, 19], [21, 20], [22, 21], [24, 23], [25, 24], - [26, 25], [28, 27], [29, 28], [30, 29], [31, 4], [32, 4]] - - pose_limb_color = palette[[0] * 25] - pose_kpt_color = palette[[0] * 32] - - elif dataset == 'AnimalLocustDataset': - skeleton = [[2, 1], [3, 2], [4, 3], [5, 4], [7, 6], [8, 7], [10, 9], - [11, 10], [12, 11], [14, 13], [15, 14], [16, 15], [18, 17], - [19, 18], [20, 19], [22, 21], [23, 22], [25, 24], [26, 25], - [27, 26], [29, 28], [30, 29], [31, 30], [33, 32], [34, 33], - [35, 34]] - - pose_limb_color = palette[[0] * 26] - pose_kpt_color = palette[[0] * 35] - - elif dataset == 'AnimalZebraDataset': - skeleton = [[2, 1], [3, 2], [4, 3], [5, 3], [6, 8], [7, 8], [8, 3], - [9, 8]] - - pose_limb_color = palette[[0] * 8] - pose_kpt_color = palette[[0] * 9] - - elif dataset in 'AnimalPoseDataset': - skeleton = [[1, 2], [1, 3], [2, 4], [1, 5], [2, 5], [5, 6], [6, 8], - [7, 8], [6, 9], [9, 13], [13, 17], [6, 10], [10, 14], - [14, 18], [7, 11], [11, 15], [15, 19], [7, 12], [12, 16], - [16, 20]] - - pose_kpt_color = palette[[15] * 5 + [0] * 7 + [9] * 8] - pose_limb_color = palette[[15] * 5 + [0] * 3 + [0, 9, 9] * 4] + pose_kpt_color = palette[ + [16, 16, 16, 16, 16, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0] + + [0, 0, 0, 0, 0, 0] + [19] * (68 + 42)] - else: - raise NotImplementedError() + elif dataset == 'TopDownAicDataset': + skeleton = [[2, 1], [1, 0], [0, 13], [13, 3], [3, 4], [4, 5], + [8, 7], [7, 6], [6, 9], [9, 10], [10, 11], [12, 13], + [0, 6], [3, 9]] + + pose_link_color = palette[[ + 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 0, 7, 7 + ]] + pose_kpt_color = palette[[ + 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 0, 0 + ]] + + elif dataset == 'TopDownMpiiDataset': + skeleton = [[0, 1], [1, 2], [2, 6], [6, 3], [3, 4], [4, 5], [6, 7], + [7, 8], [8, 9], [8, 12], [12, 11], [11, 10], [8, 13], + [13, 14], [14, 15]] + + pose_link_color = palette[[ + 16, 16, 16, 16, 16, 16, 7, 7, 0, 9, 9, 9, 9, 9, 9 + ]] + pose_kpt_color = palette[[ + 16, 16, 16, 16, 16, 16, 7, 7, 0, 0, 9, 9, 9, 9, 9, 9 + ]] + + elif dataset == 'TopDownMpiiTrbDataset': + skeleton = [[12, 13], [13, 0], [13, 1], [0, 2], [1, 3], [2, 4], + [3, 5], [0, 6], [1, 7], [6, 7], [6, 8], [7, + 9], [8, 10], + [9, 11], [14, 15], [16, 17], [18, 19], [20, 21], + [22, 23], [24, 25], [26, 27], [28, 29], [30, 31], + [32, 33], [34, 35], [36, 37], [38, 39]] + + pose_link_color = palette[[16] * 14 + [19] * 13] + pose_kpt_color = palette[[16] * 14 + [0] * 26] + + elif dataset in ('OneHand10KDataset', 'FreiHandDataset', + 'PanopticDataset'): + skeleton = [[0, 1], [1, 2], [2, 3], [3, 4], [0, 5], [5, 6], [6, 7], + [7, 8], [0, 9], [9, 10], [10, 11], [11, 12], [0, 13], + [13, 14], [14, 15], [15, 16], [0, 17], [17, 18], + [18, 19], [19, 20]] + + pose_link_color = palette[[ + 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, + 16 + ]] + pose_kpt_color = palette[[ + 0, 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, + 16, 16 + ]] + + elif dataset == 'InterHand2DDataset': + skeleton = [[0, 1], [1, 2], [2, 3], [4, 5], [5, 6], [6, 7], [8, 9], + [9, 10], [10, 11], [12, 13], [13, 14], [14, 15], + [16, 17], [17, 18], [18, 19], [3, 20], [7, 20], + [11, 20], [15, 20], [19, 20]] + + pose_link_color = palette[[ + 0, 0, 0, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16, 0, 4, 8, 12, + 16 + ]] + pose_kpt_color = palette[[ + 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, + 16, 0 + ]] + + elif dataset == 'Face300WDataset': + # show the results + skeleton = [] + + pose_link_color = palette[[]] + pose_kpt_color = palette[[19] * 68] + kpt_score_thr = 0 + + elif dataset == 'FaceAFLWDataset': + # show the results + skeleton = [] + + pose_link_color = palette[[]] + pose_kpt_color = palette[[19] * 19] + kpt_score_thr = 0 + + elif dataset == 'FaceCOFWDataset': + # show the results + skeleton = [] + + pose_link_color = palette[[]] + pose_kpt_color = palette[[19] * 29] + kpt_score_thr = 0 + + elif dataset == 'FaceWFLWDataset': + # show the results + skeleton = [] + + pose_link_color = palette[[]] + pose_kpt_color = palette[[19] * 98] + kpt_score_thr = 0 + + elif dataset == 'AnimalHorse10Dataset': + skeleton = [[0, 1], [1, 12], [12, 16], [16, 21], [21, 17], + [17, 11], [11, 10], [10, 8], [8, 9], [9, 12], [2, 3], + [3, 4], [5, 6], [6, 7], [13, 14], [14, 15], [18, 19], + [19, 20]] + + pose_link_color = palette[[4] * 10 + [6] * 2 + [6] * 2 + [7] * 2 + + [7] * 2] + pose_kpt_color = palette[[ + 4, 4, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 7, 7, 7, 4, 4, 7, 7, 7, + 4 + ]] + + elif dataset == 'AnimalFlyDataset': + skeleton = [[1, 0], [2, 0], [3, 0], [4, 3], [5, 4], [7, 6], [8, 7], + [9, 8], [11, 10], [12, 11], [13, 12], [15, 14], + [16, 15], [17, 16], [19, 18], [20, 19], [21, 20], + [23, 22], [24, 23], [25, 24], [27, 26], [28, 27], + [29, 28], [30, 3], [31, 3]] + + pose_link_color = palette[[0] * 25] + pose_kpt_color = palette[[0] * 32] + + elif dataset == 'AnimalLocustDataset': + skeleton = [[1, 0], [2, 1], [3, 2], [4, 3], [6, 5], [7, 6], [9, 8], + [10, 9], [11, 10], [13, 12], [14, 13], [15, 14], + [17, 16], [18, 17], [19, 18], [21, 20], [22, 21], + [24, 23], [25, 24], [26, 25], [28, 27], [29, 28], + [30, 29], [32, 31], [33, 32], [34, 33]] + + pose_link_color = palette[[0] * 26] + pose_kpt_color = palette[[0] * 35] + + elif dataset == 'AnimalZebraDataset': + skeleton = [[1, 0], [2, 1], [3, 2], [4, 2], [5, 7], [6, 7], [7, 2], + [8, 7]] + + pose_link_color = palette[[0] * 8] + pose_kpt_color = palette[[0] * 9] + + elif dataset in 'AnimalPoseDataset': + skeleton = [[0, 1], [0, 2], [1, 3], [0, 4], [1, 4], [4, 5], [5, 7], + [6, 7], [5, 8], [8, 12], [12, 16], [5, 9], [9, 13], + [13, 17], [6, 10], [10, 14], [14, 18], [6, 11], + [11, 15], [15, 19]] + + pose_link_color = palette[[0] * 20] + pose_kpt_color = palette[[0] * 20] + else: + NotImplementedError() + + if hasattr(model, 'module'): + model = model.module img = model.show_result( img, @@ -755,36 +796,10 @@ def vis_pose_result(model, radius=radius, thickness=thickness, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, kpt_score_thr=kpt_score_thr, bbox_color=bbox_color, show=show, out_file=out_file) return img - - -def process_mmdet_results(mmdet_results, cat_id=1): - """Process mmdet results, and return a list of bboxes. - - Args: - mmdet_results (list|tuple): mmdet results. - cat_id (int): category id (default: 1 for human) - - Returns: - person_results (list): a list of detected bounding boxes - """ - if isinstance(mmdet_results, tuple): - det_results = mmdet_results[0] - else: - det_results = mmdet_results - - bboxes = det_results[cat_id - 1] - - person_results = [] - for bbox in bboxes: - person = {} - person['bbox'] = bbox - person_results.append(person) - - return person_results diff --git a/mmpose/apis/inference_3d.py b/mmpose/apis/inference_3d.py index f4a828e9fc..c0e93aa630 100644 --- a/mmpose/apis/inference_3d.py +++ b/mmpose/apis/inference_3d.py @@ -204,6 +204,7 @@ def _collate_pose_sequence(pose_results, with_track_id=True, target_frame=-1): def inference_pose_lifter_model(model, pose_results_2d, dataset, + dataset_info=None, with_track_id=True, image_size=None, norm_pose_2d=False): @@ -241,13 +242,23 @@ def inference_pose_lifter_model(model, cfg = model.cfg test_pipeline = Compose(cfg.test_pipeline) - flip_pairs = None - if dataset == 'Body3DH36MDataset': - flip_pairs = [[1, 4], [2, 5], [3, 6], [11, 14], [12, 15], [13, 16]] - bbox_center = np.array([[528, 427]], dtype=np.float32) - bbox_scale = 400 + if dataset_info is not None: + flip_pairs = dataset_info.flip_pairs + bbox_center = dataset_info.bbox_center + bbox_scale = dataset_info.bbox_scale else: - raise NotImplementedError() + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # TODO: These will be removed in the later versions. + if dataset == 'Body3DH36MDataset': + flip_pairs = [[1, 4], [2, 5], [3, 6], [11, 14], [12, 15], [13, 16]] + bbox_center = np.array([[528, 427]], dtype=np.float32) + bbox_scale = 400 + else: + raise NotImplementedError() target_idx = -1 if model.causal else len(pose_results_2d) // 2 pose_lifter_inputs = _gather_pose_lifter_inputs(pose_results_2d, @@ -340,6 +351,7 @@ def vis_3d_pose_result(model, radius=8, thickness=2, num_instances=-1, + dataset_info=None, show=False, out_file=None): """Visualize the 3D pose estimation results. @@ -348,68 +360,83 @@ def vis_3d_pose_result(model, model (nn.Module): The loaded model. result (list[dict]) """ - if hasattr(model, 'module'): - model = model.module - - palette = np.array([[255, 128, 0], [255, 153, 51], [255, 178, 102], - [230, 230, 0], [255, 153, 255], [153, 204, 255], - [255, 102, 255], [255, 51, 255], [102, 178, 255], - [51, 153, 255], [255, 153, 153], [255, 102, 102], - [255, 51, 51], [153, 255, 153], [102, 255, 102], - [51, 255, 51], [0, 255, 0], [0, 0, 255], [255, 0, 0], - [255, 255, 255]]) - - if dataset == 'Body3DH36MDataset': - skeleton = [[1, 2], [2, 3], [3, 4], [1, 5], [5, 6], [6, 7], [1, 8], - [8, 9], [9, 10], [10, 11], [9, 12], [12, 13], [13, 14], - [9, 15], [15, 16], [16, 17]] - - pose_kpt_color = palette[[ - 9, 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 - ]] - pose_limb_color = palette[[ - 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 - ]] - elif dataset == 'InterHand3DDataset': - skeleton = [[1, 2], [2, 3], [3, 4], [4, 21], [5, 6], [6, 7], [7, 8], - [8, 21], [9, 10], [10, 11], [11, 12], [12, 21], [13, 14], - [14, 15], [15, 16], [16, 21], [17, 18], [18, 19], [19, 20], - [20, 21], [22, 23], [23, 24], [24, 25], [25, 42], [26, 27], - [27, 28], [28, 29], [29, 42], [30, 31], [31, 32], [32, 33], - [33, 42], [34, 35], [35, 36], [36, 37], [37, 42], [38, 39], - [39, 40], [40, 41], [41, 42]] - - pose_kpt_color = [[14, 128, 250], [14, 128, 250], [14, 128, 250], - [14, 128, 250], [80, 127, 255], [80, 127, 255], - [80, 127, 255], [80, 127, 255], [71, 99, 255], - [71, 99, 255], [71, 99, 255], [71, 99, 255], - [0, 36, 255], [0, 36, 255], [0, 36, 255], - [0, 36, 255], [0, 0, 230], [0, 0, 230], [0, 0, 230], - [0, 0, 230], [0, 0, 139], [237, 149, 100], - [237, 149, 100], [237, 149, 100], [237, 149, 100], - [230, 128, 77], [230, 128, 77], [230, 128, 77], - [230, 128, 77], [255, 144, 30], [255, 144, 30], - [255, 144, 30], [255, 144, 30], [153, 51, 0], - [153, 51, 0], [153, 51, 0], [153, 51, 0], - [255, 51, 13], [255, 51, 13], [255, 51, 13], - [255, 51, 13], [103, 37, 8]] - - pose_limb_color = [[14, 128, 250], [14, 128, 250], [14, 128, 250], - [14, 128, 250], [80, 127, 255], [80, 127, 255], - [80, 127, 255], [80, 127, 255], [71, 99, 255], - [71, 99, 255], [71, 99, 255], [71, 99, 255], - [0, 36, 255], [0, 36, 255], [0, 36, 255], - [0, 36, 255], [0, 0, 230], [0, 0, 230], [0, 0, 230], - [0, 0, 230], [237, 149, 100], [237, 149, 100], - [237, 149, 100], [237, 149, 100], [230, 128, 77], - [230, 128, 77], [230, 128, 77], [230, 128, 77], - [255, 144, 30], [255, 144, 30], [255, 144, 30], - [255, 144, 30], [153, 51, 0], [153, 51, 0], - [153, 51, 0], [153, 51, 0], [255, 51, 13], - [255, 51, 13], [255, 51, 13], [255, 51, 13]] + if dataset_info is not None: + skeleton = dataset_info.skeleton + pose_kpt_color = dataset_info.pose_kpt_color + pose_link_color = dataset_info.pose_link_color else: - raise NotImplementedError + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # TODO: These will be removed in the later versions. + palette = np.array([[255, 128, 0], [255, 153, 51], [255, 178, 102], + [230, 230, 0], [255, 153, 255], [153, 204, 255], + [255, 102, 255], [255, 51, 255], [102, 178, 255], + [51, 153, 255], [255, 153, 153], [255, 102, 102], + [255, 51, 51], [153, 255, 153], [102, 255, 102], + [51, 255, 51], [0, 255, 0], [0, 0, 255], + [255, 0, 0], [255, 255, 255]]) + + if dataset == 'Body3DH36MDataset': + skeleton = [[0, 1], [1, 2], [2, 3], [0, 4], [4, 5], [5, 6], [0, 7], + [7, 8], [8, 9], [9, 10], [8, 11], [11, 12], [12, 13], + [8, 14], [14, 15], [15, 16]] + + pose_kpt_color = palette[[ + 9, 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 + ]] + pose_link_color = palette[[ + 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 + ]] + + elif dataset == 'InterHand3DDataset': + skeleton = [[0, 1], [1, 2], [2, 3], [3, 20], [4, 5], [5, 6], + [6, 7], [7, 20], [8, 9], [9, 10], [10, 11], [11, 20], + [12, 13], [13, 14], [14, 15], [15, 20], [16, 17], + [17, 18], [18, 19], [19, 20], [21, 22], [22, 23], + [23, 24], [24, 41], [25, 26], [26, 27], [27, 28], + [28, 41], [29, 30], [30, 31], [31, 32], [32, 41], + [33, 34], [34, 35], [35, 36], [36, 41], [37, 38], + [38, 39], [39, 40], [40, 41]] + + pose_kpt_color = [[14, 128, 250], [14, 128, 250], [14, 128, 250], + [14, 128, 250], [80, 127, 255], [80, 127, 255], + [80, 127, 255], [80, 127, 255], [71, 99, 255], + [71, 99, 255], [71, 99, 255], [71, 99, 255], + [0, 36, 255], [0, 36, 255], [0, 36, 255], + [0, 36, 255], [0, 0, 230], [0, 0, 230], + [0, 0, 230], [0, 0, 230], [0, 0, 139], + [237, 149, 100], [237, 149, 100], + [237, 149, 100], [237, 149, 100], [230, 128, 77], + [230, 128, 77], [230, 128, 77], [230, 128, 77], + [255, 144, 30], [255, 144, 30], [255, 144, 30], + [255, 144, 30], [153, 51, 0], [153, 51, 0], + [153, 51, 0], [153, 51, 0], [255, 51, 13], + [255, 51, 13], [255, 51, 13], [255, 51, 13], + [103, 37, 8]] + + pose_link_color = [[14, 128, 250], [14, 128, 250], [14, 128, 250], + [14, 128, 250], [80, 127, 255], [80, 127, 255], + [80, 127, 255], [80, 127, 255], [71, 99, 255], + [71, 99, 255], [71, 99, 255], [71, 99, 255], + [0, 36, 255], [0, 36, 255], [0, 36, 255], + [0, 36, 255], [0, 0, 230], [0, 0, 230], + [0, 0, 230], [0, 0, 230], [237, 149, 100], + [237, 149, 100], [237, 149, 100], + [237, 149, 100], [230, 128, 77], [230, 128, 77], + [230, 128, 77], [230, 128, 77], [255, 144, 30], + [255, 144, 30], [255, 144, 30], [255, 144, 30], + [153, 51, 0], [153, 51, 0], [153, 51, 0], + [153, 51, 0], [255, 51, 13], [255, 51, 13], + [255, 51, 13], [255, 51, 13]] + else: + raise NotImplementedError + + if hasattr(model, 'module'): + model = model.module img = model.show_result( result, @@ -418,7 +445,7 @@ def vis_3d_pose_result(model, radius=radius, thickness=thickness, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, num_instances=num_instances, show=show, out_file=out_file) @@ -581,180 +608,3 @@ def inference_interhand_3d_model(model, pose_results.append(pose_res) return pose_results - - -def inference_mesh_model(model, - img_or_path, - det_results, - bbox_thr=None, - format='xywh', - dataset='MeshH36MDataset'): - """Inference a single image with a list of bounding boxes. - - num_bboxes: N - num_keypoints: K - num_vertices: V - num_faces: F - - Args: - model (nn.Module): The loaded pose model. - img_or_path (str | np.ndarray): Image filename or loaded image. - det_results (List[dict]): The 2D bbox sequences stored in a list. - Each each element of the list is the bbox of one person, which - contains: - - "bbox" (ndarray[4 or 5]): The person bounding box, - which contains 4 box coordinates (and score). - bbox_thr: Threshold for bounding boxes. Only bboxes with higher scores - will be fed into the pose detector. If bbox_thr is None, ignore it. - format: bbox format ('xyxy' | 'xywh'). Default: 'xywh'. - 'xyxy' means (left, top, right, bottom), - 'xywh' means (left, top, width, height). - dataset (str): Dataset name. - - Returns: - List[dict]: 3D pose inference results. Each element is the result of - an instance, which contains: - - "bbox" (ndarray[4]): instance bounding bbox - - "center" (ndarray[2]): bbox center - - "scale" (ndarray[2]): bbox scale - - "keypoints_3d" (ndarray[K,3]): predicted 3D keypoints - - "camera" (ndarray[3]): camera parameters - - "vertices" (ndarray[V, 3]): predicted 3D vertices - - "faces" (ndarray[F, 3]): mesh faces - - If there is no valid instance, an empty list will be returned. - """ - - assert format in ['xyxy', 'xywh'] - - pose_results = [] - - if len(det_results) == 0: - return pose_results - - # Change for-loop preprocess each bbox to preprocess all bboxes at once. - bboxes = np.array([box['bbox'] for box in det_results]) - - # Select bboxes by score threshold - if bbox_thr is not None: - assert bboxes.shape[1] == 5 - valid_idx = np.where(bboxes[:, 4] > bbox_thr)[0] - bboxes = bboxes[valid_idx] - det_results = [det_results[i] for i in valid_idx] - - if format == 'xyxy': - bboxes_xyxy = bboxes - bboxes_xywh = _xyxy2xywh(bboxes) - else: - # format is already 'xywh' - bboxes_xywh = bboxes - bboxes_xyxy = _xywh2xyxy(bboxes) - - # if bbox_thr remove all bounding box - if len(bboxes_xywh) == 0: - return [] - - cfg = model.cfg - device = next(model.parameters()).device - - # build the data pipeline - channel_order = cfg.test_pipeline[0].get('channel_order', 'rgb') - test_pipeline = [LoadImage(channel_order=channel_order) - ] + cfg.test_pipeline[1:] - test_pipeline = Compose(test_pipeline) - - assert len(bboxes[0]) in [4, 5] - - if dataset == 'MeshH36MDataset': - flip_pairs = [[0, 5], [1, 4], [2, 3], [6, 11], [7, 10], [8, 9], - [20, 21], [22, 23]] - else: - raise NotImplementedError() - - batch_data = [] - for bbox in bboxes: - center, scale = _box2cs(cfg, bbox) - - # prepare data - data = { - 'img_or_path': - img_or_path, - 'center': - center, - 'scale': - scale, - 'rotation': - 0, - 'bbox_score': - bbox[4] if len(bbox) == 5 else 1, - 'dataset': - dataset, - 'joints_2d': - np.zeros((cfg.data_cfg.num_joints, 2), dtype=np.float32), - 'joints_2d_visible': - np.zeros((cfg.data_cfg.num_joints, 1), dtype=np.float32), - 'joints_3d': - np.zeros((cfg.data_cfg.num_joints, 3), dtype=np.float32), - 'joints_3d_visible': - np.zeros((cfg.data_cfg.num_joints, 3), dtype=np.float32), - 'pose': - np.zeros(72, dtype=np.float32), - 'beta': - np.zeros(10, dtype=np.float32), - 'has_smpl': - 0, - 'ann_info': { - 'image_size': np.array(cfg.data_cfg['image_size']), - 'num_joints': cfg.data_cfg['num_joints'], - 'flip_pairs': flip_pairs, - } - } - - data = test_pipeline(data) - batch_data.append(data) - - batch_data = collate(batch_data, samples_per_gpu=1) - - if next(model.parameters()).is_cuda: - # scatter not work so just move image to cuda device - batch_data['img'] = batch_data['img'].to(device) - # get all img_metas of each bounding box - batch_data['img_metas'] = [ - img_metas[0] for img_metas in batch_data['img_metas'].data - ] - - # forward the model - with torch.no_grad(): - preds = model( - img=batch_data['img'], - img_metas=batch_data['img_metas'], - return_loss=False, - return_vertices=True, - return_faces=True) - - for idx in range(len(det_results)): - pose_res = det_results[idx].copy() - pose_res['bbox'] = bboxes_xyxy[idx] - pose_res['center'] = batch_data['img_metas'][idx]['center'] - pose_res['scale'] = batch_data['img_metas'][idx]['scale'] - pose_res['keypoints_3d'] = preds['keypoints_3d'][idx] - pose_res['camera'] = preds['camera'][idx] - pose_res['vertices'] = preds['vertices'][idx] - pose_res['faces'] = preds['faces'] - pose_results.append(pose_res) - return pose_results - - -def vis_3d_mesh_result(model, result, img=None, show=False, out_file=None): - """Visualize the 3D mesh estimation results. - - Args: - model (nn.Module): The loaded model. - result (list[dict]) - """ - if hasattr(model, 'module'): - model = model.module - - img = model.show_result(result, img, show=show, out_file=out_file) - - return img diff --git a/mmpose/apis/inference_tracking.py b/mmpose/apis/inference_tracking.py index e0441ca787..ab340415e5 100644 --- a/mmpose/apis/inference_tracking.py +++ b/mmpose/apis/inference_tracking.py @@ -230,6 +230,7 @@ def vis_pose_tracking_result(model, thickness=1, kpt_score_thr=0.3, dataset='TopDownCocoDataset', + dataset_info=None, show=False, out_file=None): """Visualize the pose tracking results on the image. @@ -239,6 +240,8 @@ def vis_pose_tracking_result(model, img (str | np.ndarray): Image filename or loaded image. result (list[dict]): The results to draw over `img` (bbox_result, pose_result). + radius (int): Radius of circles. + thickness (int): Thickness of lines. kpt_score_thr (float): The threshold to visualize the keypoints. skeleton (list[tuple()]): Default None. show (bool): Whether to show the image. Default True. @@ -255,70 +258,86 @@ def vis_pose_tracking_result(model, [51, 255, 51], [0, 255, 0], [0, 0, 255], [255, 0, 0], [255, 255, 255]]) - if dataset in ('TopDownCocoDataset', 'BottomUpCocoDataset', - 'TopDownOCHumanDataset'): - kpt_num = 17 - skeleton = [[16, 14], [14, 12], [17, 15], [15, 13], [12, 13], [6, 12], - [7, 13], [6, 7], [6, 8], [7, 9], [8, 10], [9, 11], [2, 3], - [1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7]] - - elif dataset == 'TopDownCocoWholeBodyDataset': - kpt_num = 133 - skeleton = [[16, 14], [14, 12], [17, 15], [15, 13], [12, 13], [6, 12], - [7, 13], [6, 7], [6, 8], [7, 9], [8, 10], [9, 11], [2, 3], - [1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [16, 18], - [16, 19], [16, 20], [17, 21], [17, 22], [17, 23], [92, 93], - [93, 94], [94, 95], [95, 96], [92, 97], [97, 98], [98, 99], - [99, 100], [92, 101], [101, 102], [102, 103], [103, 104], - [92, 105], [105, 106], [106, 107], [107, 108], [92, 109], - [109, 110], [110, 111], [111, 112], [113, 114], [114, 115], - [115, 116], [116, 117], [113, 118], [118, 119], [119, 120], - [120, 121], [113, 122], [122, 123], [123, 124], [124, 125], - [113, 126], [126, 127], [127, 128], [128, 129], [113, 130], - [130, 131], [131, 132], [132, 133]] - - elif dataset == 'TopDownAicDataset': - kpt_num = 14 - skeleton = [[3, 2], [2, 1], [1, 14], [14, 4], [4, 5], [5, 6], [9, 8], - [8, 7], [7, 10], [10, 11], [11, 12], [13, 14], [1, 7], - [4, 10]] - - elif dataset == 'TopDownMpiiDataset': - kpt_num = 16 - skeleton = [[1, 2], [2, 3], [3, 7], [7, 4], [4, 5], [5, 6], [7, 8], - [8, 9], [9, 10], [9, 13], [13, 12], [12, 11], [9, 14], - [14, 15], [15, 16]] - - elif dataset in ('OneHand10KDataset', 'FreiHandDataset', - 'PanopticDataset'): - kpt_num = 21 - skeleton = [[1, 2], [2, 3], [3, 4], [4, 5], [1, 6], [6, 7], [7, 8], - [8, 9], [1, 10], [10, 11], [11, 12], [12, 13], [1, 14], - [14, 15], [15, 16], [16, 17], [1, 18], [18, 19], [19, 20], - [20, 21]] - - elif dataset == 'InterHand2DDataset': - kpt_num = 21 - skeleton = [[1, 2], [2, 3], [3, 4], [5, 6], [6, 7], [7, 8], [9, 10], - [10, 11], [11, 12], [13, 14], [14, 15], [15, 16], [17, 18], - [18, 19], [19, 20], [4, 21], [8, 21], [12, 21], [16, 21], - [20, 21]] + if dataset_info is None and dataset is not None: + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # TODO: These will be removed in the later versions. + if dataset in ('TopDownCocoDataset', 'BottomUpCocoDataset', + 'TopDownOCHumanDataset'): + kpt_num = 17 + skeleton = [[15, 13], [13, 11], [16, 14], [14, 12], [11, 12], + [5, 11], [6, 12], [5, 6], [5, 7], [6, 8], [7, 9], + [8, 10], [1, 2], [0, 1], [0, 2], [1, 3], [2, 4], + [3, 5], [4, 6]] + + elif dataset == 'TopDownCocoWholeBodyDataset': + kpt_num = 133 + skeleton = [[15, 13], [13, 11], [16, 14], [14, 12], [11, 12], + [5, 11], [6, 12], [5, 6], [5, 7], [6, 8], [7, 9], + [8, 10], [1, 2], [0, 1], [0, 2], + [1, 3], [2, 4], [3, 5], [4, 6], [15, 17], [15, 18], + [15, 19], [16, 20], [16, 21], [16, 22], [91, 92], + [92, 93], [93, 94], [94, 95], [91, 96], [96, 97], + [97, 98], [98, 99], [91, 100], [100, 101], [101, 102], + [102, 103], [91, 104], [104, 105], [105, 106], + [106, 107], [91, 108], [108, 109], [109, 110], + [110, 111], [112, 113], [113, 114], [114, 115], + [115, 116], [112, 117], [117, 118], [118, 119], + [119, 120], [112, 121], [121, 122], [122, 123], + [123, 124], [112, 125], [125, 126], [126, 127], + [127, 128], [112, 129], [129, 130], [130, 131], + [131, 132]] + radius = 1 + + elif dataset == 'TopDownAicDataset': + kpt_num = 14 + skeleton = [[2, 1], [1, 0], [0, 13], [13, 3], [3, 4], [4, 5], + [8, 7], [7, 6], [6, 9], [9, 10], [10, 11], [12, 13], + [0, 6], [3, 9]] + + elif dataset == 'TopDownMpiiDataset': + kpt_num = 16 + skeleton = [[0, 1], [1, 2], [2, 6], [6, 3], [3, 4], [4, 5], [6, 7], + [7, 8], [8, 9], [8, 12], [12, 11], [11, 10], [8, 13], + [13, 14], [14, 15]] + + elif dataset in ('OneHand10KDataset', 'FreiHandDataset', + 'PanopticDataset'): + kpt_num = 21 + skeleton = [[0, 1], [1, 2], [2, 3], [3, 4], [0, 5], [5, 6], [6, 7], + [7, 8], [0, 9], [9, 10], [10, 11], [11, 12], [0, 13], + [13, 14], [14, 15], [15, 16], [0, 17], [17, 18], + [18, 19], [19, 20]] + + elif dataset == 'InterHand2DDataset': + kpt_num = 21 + skeleton = [[0, 1], [1, 2], [2, 3], [4, 5], [5, 6], [6, 7], [8, 9], + [9, 10], [10, 11], [12, 13], [13, 14], [14, 15], + [16, 17], [17, 18], [18, 19], [3, 20], [7, 20], + [11, 20], [15, 20], [19, 20]] - else: - raise NotImplementedError() + else: + raise NotImplementedError() + + elif dataset_info is not None: + kpt_num = dataset_info.keypoint_num + skeleton = dataset_info.skeleton for res in result: track_id = res['track_id'] bbox_color = palette[track_id % len(palette)] pose_kpt_color = palette[[track_id % len(palette)] * kpt_num] - pose_limb_color = palette[[track_id % len(palette)] * len(skeleton)] + pose_link_color = palette[[track_id % len(palette)] * len(skeleton)] img = model.show_result( img, [res], skeleton, radius=radius, thickness=thickness, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, bbox_color=tuple(bbox_color.tolist()), kpt_score_thr=kpt_score_thr, show=show, diff --git a/mmpose/apis/train.py b/mmpose/apis/train.py index cd22fb0f4b..c191e0bfce 100644 --- a/mmpose/apis/train.py +++ b/mmpose/apis/train.py @@ -13,8 +13,9 @@ try: from mmcv.runner import Fp16OptimizerHook except ImportError: - warnings.warn('Fp16OptimizerHook from mmpose will be deprecated from ' - 'v0.15.0. Please install mmcv>=1.1.4') + warnings.warn( + 'Fp16OptimizerHook from mmpose will be deprecated from ' + 'v0.15.0. Please install mmcv>=1.1.4', DeprecationWarning) from mmpose.core import Fp16OptimizerHook diff --git a/mmpose/core/post_processing/one_euro_filter.py b/mmpose/core/post_processing/one_euro_filter.py index 614516f2ee..ab69c243b1 100644 --- a/mmpose/core/post_processing/one_euro_filter.py +++ b/mmpose/core/post_processing/one_euro_filter.py @@ -42,7 +42,7 @@ def __init__(self, self.beta = np.full(x0.shape, beta) self.d_cutoff = np.full(x0.shape, d_cutoff) # Previous values. - self.x_prev = x0.astype(float) + self.x_prev = x0.astype(np.float32) self.dx_prev = np.full(x0.shape, dx0) self.mask_prev = np.ma.masked_where(x0 <= 0, x0) self.realtime = True diff --git a/mmpose/core/visualization/image.py b/mmpose/core/visualization/image.py index a68839397d..dec9b0f0ae 100644 --- a/mmpose/core/visualization/image.py +++ b/mmpose/core/visualization/image.py @@ -100,11 +100,11 @@ def imshow_keypoints(img, skeleton=None, kpt_score_thr=0.3, pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, radius=4, thickness=1, show_keypoint_weight=False): - """Draw keypoints and limbs on an image. + """Draw keypoints and links on an image. Args: img (str or Tensor): The image to draw poses on. If an image array @@ -116,8 +116,8 @@ def imshow_keypoints(img, to be shown. Default: 0.3. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, the keypoint will not be drawn. - pose_limb_color (np.array[Mx3]): Color of M limbs. If None, the - limbs will not be drawn. + pose_link_color (np.array[Mx3]): Color of M links. If None, the + links will not be drawn. thickness (int): Thickness of lines. """ @@ -149,18 +149,18 @@ def imshow_keypoints(img, cv2.circle(img, (int(x_coord), int(y_coord)), radius, (int(r), int(g), int(b)), -1) - # draw limbs - if skeleton is not None and pose_limb_color is not None: - assert len(pose_limb_color) == len(skeleton) + # draw links + if skeleton is not None and pose_link_color is not None: + assert len(pose_link_color) == len(skeleton) for sk_id, sk in enumerate(skeleton): - pos1 = (int(kpts[sk[0] - 1, 0]), int(kpts[sk[0] - 1, 1])) - pos2 = (int(kpts[sk[1] - 1, 0]), int(kpts[sk[1] - 1, 1])) + pos1 = (int(kpts[sk[0], 0]), int(kpts[sk[0], 1])) + pos2 = (int(kpts[sk[1], 0]), int(kpts[sk[1], 1])) if (pos1[0] > 0 and pos1[0] < img_w and pos1[1] > 0 and pos1[1] < img_h and pos2[0] > 0 and pos2[0] < img_w and pos2[1] > 0 and pos2[1] < img_h - and kpts[sk[0] - 1, 2] > kpt_score_thr - and kpts[sk[1] - 1, 2] > kpt_score_thr): - r, g, b = pose_limb_color[sk_id] + and kpts[sk[0], 2] > kpt_score_thr + and kpts[sk[1], 2] > kpt_score_thr): + r, g, b = pose_link_color[sk_id] if show_keypoint_weight: img_copy = img.copy() X = (pos1[0], pos2[0]) @@ -178,10 +178,7 @@ def imshow_keypoints(img, cv2.fillConvexPoly(img_copy, polygon, (int(r), int(g), int(b))) transparency = max( - 0, - min( - 1, 0.5 * - (kpts[sk[0] - 1, 2] + kpts[sk[1] - 1, 2]))) + 0, min(1, 0.5 * (kpts[sk[0], 2] + kpts[sk[1], 2]))) cv2.addWeighted( img_copy, transparency, @@ -204,7 +201,7 @@ def imshow_keypoints_3d( img=None, skeleton=None, pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, vis_height=400, kpt_score_thr=0.3, num_instances=-1, @@ -214,7 +211,7 @@ def imshow_keypoints_3d( axis_dist=10.0, axis_elev=15.0, ): - """Draw 3D keypoints and limbs in 3D coordinates. + """Draw 3D keypoints and links in 3D coordinates. Args: pose_result (list[dict]): 3D pose results containing: @@ -225,11 +222,11 @@ def imshow_keypoints_3d( image and/or 2D pose. Note that the image should be given in BGR channel order. skeleton (list of [idx_i,idx_j]): Skeleton described by a list of - limbs, each is a pair of joint indices. + links, each is a pair of joint indices. pose_kpt_color (np.ndarray[Nx3]`): Color of N keypoints. If None, do not nddraw keypoints. - pose_limb_color (np.array[Mx3]): Color of M limbs. If None, do not - draw limbs. + pose_link_color (np.array[Mx3]): Color of M links. If None, do not + draw links. vis_height (int): The image hight of the visualization. The width will be N*vis_height depending on the number of visualized items. @@ -317,18 +314,18 @@ def imshow_keypoints_3d( color=_color[valid], ) - if not dummy and skeleton is not None and pose_limb_color is not None: - pose_limb_color = np.array(pose_limb_color) - assert len(pose_limb_color) == len(skeleton) - for limb, limb_color in zip(skeleton, pose_limb_color): - limb_indices = [_i - 1 for _i in limb] - xs_3d = kpts[limb_indices, 0] - ys_3d = kpts[limb_indices, 1] - zs_3d = kpts[limb_indices, 2] - kpt_score = kpts[limb_indices, 3] + if not dummy and skeleton is not None and pose_link_color is not None: + pose_link_color = np.array(pose_link_color) + assert len(pose_link_color) == len(skeleton) + for link, link_color in zip(skeleton, pose_link_color): + link_indices = [_i for _i in link] + xs_3d = kpts[link_indices, 0] + ys_3d = kpts[link_indices, 1] + zs_3d = kpts[link_indices, 2] + kpt_score = kpts[link_indices, 3] if kpt_score.min() > kpt_score_thr: # matplotlib uses RGB color in [0, 1] value range - _color = limb_color[::-1] / 255. + _color = link_color[::-1] / 255. ax.plot(xs_3d, ys_3d, zs_3d, color=_color, zdir='z') if 'title' in res: diff --git a/mmpose/datasets/__init__.py b/mmpose/datasets/__init__.py index 7e1d274632..f940aff5c4 100644 --- a/mmpose/datasets/__init__.py +++ b/mmpose/datasets/__init__.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. from .builder import DATASETS, PIPELINES, build_dataloader, build_dataset +from .dataset_info import DatasetInfo from .pipelines import Compose from .samplers import DistributedSampler @@ -31,5 +32,5 @@ 'Face300WDataset', 'AnimalHorse10Dataset', 'AnimalMacaqueDataset', 'AnimalFlyDataset', 'AnimalLocustDataset', 'AnimalZebraDataset', 'AnimalPoseDataset', 'build_dataloader', 'build_dataset', 'Compose', - 'DistributedSampler', 'DATASETS', 'PIPELINES' + 'DistributedSampler', 'DATASETS', 'PIPELINES', 'DatasetInfo' ] diff --git a/mmpose/datasets/dataset_info.py b/mmpose/datasets/dataset_info.py new file mode 100644 index 0000000000..3b9d32a482 --- /dev/null +++ b/mmpose/datasets/dataset_info.py @@ -0,0 +1,103 @@ +import numpy as np + + +class DatasetInfo: + + def __init__(self, dataset_info): + self.dataset_info = dataset_info + self.dataset_name = self.dataset_info['dataset_name'] + self.paper_info = self.dataset_info['paper_info'] + self.keypoint_info = self.dataset_info['keypoint_info'] + self.skeleton_info = self.dataset_info['skeleton_info'] + self.joint_weights = np.array( + self.dataset_info['joint_weights'], dtype=np.float32)[:, None] + + self.sigmas = np.array(self.dataset_info['sigmas']) + + self._parse_keypoint_info() + self._parse_skeleton_info() + + def _parse_skeleton_info(self): + """Parse skeleton info. + + - link_num (int): number of links. + - skeleton (list((2,))): list of links (id). + - skeleton_name (list((2,))): list of links (name). + - pose_link_color (np.ndarray): the color of the link for + visualization. + """ + self.link_num = len(self.skeleton_info.keys()) + self.pose_link_color = [] + + self.skeleton_name = [] + self.skeleton = [] + for skid in self.skeleton_info.keys(): + link = self.skeleton_info[skid]['link'] + self.skeleton_name.append(link) + self.skeleton.append([ + self.keypoint_name2id[link[0]], self.keypoint_name2id[link[1]] + ]) + self.pose_link_color.append(self.skeleton_info[skid].get( + 'color', [255, 128, 0])) + self.pose_link_color = np.array(self.pose_link_color) + + def _parse_keypoint_info(self): + """Parse keypoint info. + + - keypoint_num (int): number of keypoints. + - keypoint_id2name (dict): mapping keypoint id to keypoint name. + - keypoint_name2id (dict): mapping keypoint name to keypoint id. + - upper_body_ids (list): a list of keypoints that belong to the + upper body. + - lower_body_ids (list): a list of keypoints that belong to the + lower body. + - flip_index (list): list of flip index (id) + - flip_pairs (list((2,))): list of flip pairs (id) + - flip_index_name (list): list of flip index (name) + - flip_pairs_name (list((2,))): list of flip pairs (name) + - pose_kpt_color (np.ndarray): the color of the keypoint for + visualization. + """ + + self.keypoint_num = len(self.keypoint_info.keys()) + self.keypoint_id2name = {} + self.keypoint_name2id = {} + + self.pose_kpt_color = [] + self.upper_body_ids = [] + self.lower_body_ids = [] + + self.flip_index_name = [] + self.flip_pairs_name = [] + + for kid in self.keypoint_info.keys(): + + keypoint_name = self.keypoint_info[kid]['name'] + self.keypoint_id2name[kid] = keypoint_name + self.keypoint_name2id[keypoint_name] = kid + self.pose_kpt_color.append(self.keypoint_info[kid].get( + 'color', [255, 128, 0])) + + type = self.keypoint_info[kid].get('type', '') + if type == 'upper': + self.upper_body_ids.append(kid) + elif type == 'lower': + self.lower_body_ids.append(kid) + else: + pass + + swap_keypoint = self.keypoint_info[kid].get('swap', '') + if swap_keypoint == keypoint_name or swap_keypoint == '': + self.flip_index_name.append(keypoint_name) + else: + self.flip_index_name.append(swap_keypoint) + if [swap_keypoint, keypoint_name] not in self.flip_pairs_name: + self.flip_pairs_name.append([keypoint_name, swap_keypoint]) + + self.flip_pairs = [[ + self.keypoint_name2id[pair[0]], self.keypoint_name2id[pair[1]] + ] for pair in self.flip_pairs_name] + self.flip_index = [ + self.keypoint_name2id[name] for name in self.flip_index_name + ] + self.pose_kpt_color = np.array(self.pose_kpt_color) diff --git a/mmpose/datasets/datasets/_base_/__init__.py b/mmpose/datasets/datasets/_base_/__init__.py new file mode 100644 index 0000000000..e4d95360aa --- /dev/null +++ b/mmpose/datasets/datasets/_base_/__init__.py @@ -0,0 +1,12 @@ +from .kpt_2d_sview_rgb_img_bottom_up_dataset import \ + Kpt2dSviewRgbImgBottomUpDataset +from .kpt_2d_sview_rgb_img_top_down_dataset import \ + Kpt2dSviewRgbImgTopDownDataset +from .kpt_3d_sview_kpt_2d_dataset import Kpt3dSviewKpt2dDataset +from .kpt_3d_sview_rgb_img_top_down_dataset import \ + Kpt3dSviewRgbImgTopDownDataset + +__all__ = [ + 'Kpt2dSviewRgbImgTopDownDataset', 'Kpt3dSviewRgbImgTopDownDataset', + 'Kpt2dSviewRgbImgBottomUpDataset', 'Kpt3dSviewKpt2dDataset' +] diff --git a/mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_bottom_up_dataset.py b/mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_bottom_up_dataset.py new file mode 100644 index 0000000000..b67692c670 --- /dev/null +++ b/mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_bottom_up_dataset.py @@ -0,0 +1,188 @@ +import copy +from abc import ABCMeta, abstractmethod + +import numpy as np +import xtcocotools +from torch.utils.data import Dataset +from xtcocotools.coco import COCO + +from mmpose.datasets import DatasetInfo +from mmpose.datasets.pipelines import Compose + + +class Kpt2dSviewRgbImgBottomUpDataset(Dataset, metaclass=ABCMeta): + """Base class for bottom-up datasets. + + All datasets should subclass it. + All subclasses should overwrite: + Methods:`_get_single` + + Args: + ann_file (str): Path to the annotation file. + img_prefix (str): Path to a directory where images are held. + Default: None. + data_cfg (dict): config + pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. + coco_style (bool): Whether the annotation json is coco-style. + Default: True + test_mode (bool): Store True when building test or + validation dataset. Default: False. + """ + + def __init__(self, + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=None, + coco_style=True, + test_mode=False): + + self.image_info = {} + self.ann_info = {} + + self.ann_file = ann_file + self.img_prefix = img_prefix + self.pipeline = pipeline + self.test_mode = test_mode + + # bottom-up + self.base_size = data_cfg['base_size'] + self.base_sigma = data_cfg['base_sigma'] + self.int_sigma = False + + self.ann_info['image_size'] = np.array(data_cfg['image_size']) + self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) + self.ann_info['num_joints'] = data_cfg['num_joints'] + self.ann_info['num_scales'] = data_cfg['num_scales'] + self.ann_info['scale_aware_sigma'] = data_cfg['scale_aware_sigma'] + + self.ann_info['inference_channel'] = data_cfg['inference_channel'] + self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] + + self.use_nms = data_cfg.get('use_nms', False) + self.soft_nms = data_cfg.get('soft_nms', True) + self.oks_thr = data_cfg.get('oks_thr', 0.9) + + if dataset_info is None: + raise ValueError( + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.') + + dataset_info = DatasetInfo(dataset_info) + + assert self.ann_info['num_joints'] == dataset_info.keypoint_num + self.ann_info['flip_pairs'] = dataset_info.flip_pairs + self.ann_info['flip_index'] = dataset_info.flip_index + self.ann_info['upper_body_ids'] = dataset_info.upper_body_ids + self.ann_info['lower_body_ids'] = dataset_info.lower_body_ids + self.ann_info['joint_weights'] = dataset_info.joint_weights + self.ann_info['skeleton'] = dataset_info.skeleton + self.sigmas = dataset_info.sigmas + self.dataset_name = dataset_info.dataset_name + + if coco_style: + self.coco = COCO(ann_file) + if 'categories' in self.coco.dataset: + cats = [ + cat['name'] + for cat in self.coco.loadCats(self.coco.getCatIds()) + ] + self.classes = ['__background__'] + cats + self.num_classes = len(self.classes) + self._class_to_ind = dict( + zip(self.classes, range(self.num_classes))) + self._class_to_coco_ind = dict( + zip(cats, self.coco.getCatIds())) + self._coco_ind_to_class_ind = dict( + (self._class_to_coco_ind[cls], self._class_to_ind[cls]) + for cls in self.classes[1:]) + self.img_ids = self.coco.getImgIds() + if not test_mode: + self.img_ids = [ + img_id for img_id in self.img_ids if + len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 + ] + self.num_images = len(self.img_ids) + self.id2name, self.name2id = self._get_mapping_id_name( + self.coco.imgs) + + self.pipeline = Compose(self.pipeline) + + @staticmethod + def _get_mapping_id_name(imgs): + """ + Args: + imgs (dict): dict of image info. + + Returns: + tuple: Image name & id mapping dicts. + + - id2name (dict): Mapping image id to name. + - name2id (dict): Mapping image name to id. + """ + id2name = {} + name2id = {} + for image_id, image in imgs.items(): + file_name = image['file_name'] + id2name[image_id] = file_name + name2id[file_name] = image_id + + return id2name, name2id + + def _get_mask(self, anno, idx): + """Get ignore masks to mask out losses.""" + coco = self.coco + img_info = coco.loadImgs(self.img_ids[idx])[0] + + m = np.zeros((img_info['height'], img_info['width']), dtype=np.float32) + + for obj in anno: + if 'segmentation' in obj: + if obj['iscrowd']: + rle = xtcocotools.mask.frPyObjects(obj['segmentation'], + img_info['height'], + img_info['width']) + m += xtcocotools.mask.decode(rle) + elif obj['num_keypoints'] == 0: + rles = xtcocotools.mask.frPyObjects( + obj['segmentation'], img_info['height'], + img_info['width']) + for rle in rles: + m += xtcocotools.mask.decode(rle) + + return m < 0.5 + + @abstractmethod + def _get_single(self, idx): + """Get anno for a single image.""" + raise NotImplementedError + + @abstractmethod + def evaluate(self, cfg, outputs, res_folder, metric, *args, **kwargs): + """Evaluate keypoint results.""" + raise NotImplementedError + + def prepare_train_img(self, idx): + """Prepare image for training given the index.""" + results = copy.deepcopy(self._get_single(idx)) + results['ann_info'] = self.ann_info + return self.pipeline(results) + + def prepare_test_img(self, idx): + """Prepare image for testing given the index.""" + results = copy.deepcopy(self._get_single(idx)) + results['ann_info'] = self.ann_info + return self.pipeline(results) + + def __len__(self): + """Get dataset length.""" + return len(self.img_ids) + + def __getitem__(self, idx): + """Get the sample for either training or testing given index.""" + if self.test_mode: + return self.prepare_test_img(idx) + + return self.prepare_train_img(idx) diff --git a/mmpose/datasets/datasets/fashion/fashion_base_dataset.py b/mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_top_down_dataset.py similarity index 67% rename from mmpose/datasets/datasets/fashion/fashion_base_dataset.py rename to mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_top_down_dataset.py index fffd8040c3..77769b465f 100644 --- a/mmpose/datasets/datasets/fashion/fashion_base_dataset.py +++ b/mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_top_down_dataset.py @@ -8,12 +8,15 @@ from xtcocotools.coco import COCO from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, + keypoint_nme, keypoint_pck_accuracy) +from mmpose.datasets import DatasetInfo from mmpose.datasets.pipelines import Compose -class FashionBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for fashion landmark datasets. +class Kpt2dSviewRgbImgTopDownDataset(Dataset, metaclass=ABCMeta): + """Base class for keypoint 2D top-down pose estimation with single-view RGB + image as the input. All fashion datasets should subclass it. All subclasses should overwrite: @@ -25,6 +28,9 @@ class FashionBaseDataset(Dataset, metaclass=ABCMeta): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. + coco_style (bool): Whether the annotation json is coco-style. + Default: True test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -34,12 +40,14 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, + coco_style=True, test_mode=False): self.image_info = {} self.ann_info = {} - self.annotations_path = ann_file + self.ann_file = ann_file self.img_prefix = img_prefix self.pipeline = pipeline self.test_mode = test_mode @@ -48,16 +56,47 @@ def __init__(self, self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) self.ann_info['num_joints'] = data_cfg['num_joints'] - self.ann_info['flip_pairs'] = [] - self.ann_info['inference_channel'] = data_cfg['inference_channel'] self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - self.coco = COCO(ann_file) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) + if dataset_info is None: + raise ValueError( + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.') + + dataset_info = DatasetInfo(dataset_info) + + assert self.ann_info['num_joints'] == dataset_info.keypoint_num + self.ann_info['flip_pairs'] = dataset_info.flip_pairs + self.ann_info['flip_index'] = dataset_info.flip_index + self.ann_info['upper_body_ids'] = dataset_info.upper_body_ids + self.ann_info['lower_body_ids'] = dataset_info.lower_body_ids + self.ann_info['joint_weights'] = dataset_info.joint_weights + self.ann_info['skeleton'] = dataset_info.skeleton + self.sigmas = dataset_info.sigmas + self.dataset_name = dataset_info.dataset_name + + if coco_style: + self.coco = COCO(ann_file) + if 'categories' in self.coco.dataset: + cats = [ + cat['name'] + for cat in self.coco.loadCats(self.coco.getCatIds()) + ] + self.classes = ['__background__'] + cats + self.num_classes = len(self.classes) + self._class_to_ind = dict( + zip(self.classes, range(self.num_classes))) + self._class_to_coco_ind = dict( + zip(cats, self.coco.getCatIds())) + self._coco_ind_to_class_ind = dict( + (self._class_to_coco_ind[cls], self._class_to_ind[cls]) + for cls in self.classes[1:]) + self.img_ids = self.coco.getImgIds() + self.num_images = len(self.img_ids) + self.id2name, self.name2id = self._get_mapping_id_name( + self.coco.imgs) self.db = [] @@ -114,13 +153,26 @@ def _xywh2cs(self, x, y, w, h, padding=1.25): return center, scale + def _get_normalize_factor(self, gts, *args, **kwargs): + """Get the normalize factor. generally inter-ocular distance measured + as the Euclidean distance between the outer corners of the eyes is + used. This function should be overrided to measure NME. + + Args: + gts (np.ndarray[N, K, 2]): Groundtruth keypoint location. + + Return: + np.ndarray[N, 2]: normalized factor + """ + return np.ones([gts.shape[0], 2], dtype=np.float32) + @abstractmethod def _get_db(self): """Load dataset.""" raise NotImplementedError @abstractmethod - def evaluate(self, cfg, preds, output_dir, *args, **kwargs): + def evaluate(self, cfg, outputs, res_folder, metric, *args, **kwargs): """Evaluate keypoint results.""" raise NotImplementedError @@ -142,7 +194,7 @@ def _report_metric(self, Args: res_file (str): Json file stored prediction results. metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. + Options: 'PCK', 'PCKh', 'AUC', 'EPE', 'NME'. pck_thr (float): PCK threshold, default as 0.2. pckh_thr (float): PCKh threshold, default as 0.7. auc_nor (float): AUC normalization factor, default as 30 pixel. @@ -159,6 +211,7 @@ def _report_metric(self, outputs = [] gts = [] masks = [] + box_sizes = [] threshold_bbox = [] threshold_head_box = [] @@ -174,12 +227,14 @@ def _report_metric(self, head_box_thr = item['head_size'] threshold_head_box.append( np.array([head_box_thr, head_box_thr])) + box_sizes.append(item.get('box_size', 1)) outputs = np.array(outputs) gts = np.array(gts) masks = np.array(masks) threshold_bbox = np.array(threshold_bbox) threshold_head_box = np.array(threshold_head_box) + box_sizes = np.array(box_sizes).reshape([-1, 1]) if 'PCK' in metrics: _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, @@ -198,6 +253,12 @@ def _report_metric(self, if 'EPE' in metrics: info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) + if 'NME' in metrics: + normalize_factor = self._get_normalize_factor( + gts=gts, box_sizes=box_sizes) + info_str.append( + ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) + return info_str def __len__(self): diff --git a/mmpose/datasets/datasets/body3d/body3d_base_dataset.py b/mmpose/datasets/datasets/_base_/kpt_3d_sview_kpt_2d_dataset.py similarity index 87% rename from mmpose/datasets/datasets/body3d/body3d_base_dataset.py rename to mmpose/datasets/datasets/_base_/kpt_3d_sview_kpt_2d_dataset.py index edce69937e..f3e33975a5 100644 --- a/mmpose/datasets/datasets/body3d/body3d_base_dataset.py +++ b/mmpose/datasets/datasets/_base_/kpt_3d_sview_kpt_2d_dataset.py @@ -5,10 +5,11 @@ import numpy as np from torch.utils.data import Dataset +from mmpose.datasets import DatasetInfo from mmpose.datasets.pipelines import Compose -class Body3DBaseDataset(Dataset, metaclass=ABCMeta): +class Kpt3dSviewKpt2dDataset(Dataset, metaclass=ABCMeta): """Base class for 3D human pose datasets. Subclasses should consider overwriting following methods: @@ -36,6 +37,7 @@ class Body3DBaseDataset(Dataset, metaclass=ABCMeta): Default: False. pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -45,6 +47,7 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): self.ann_file = ann_file @@ -54,7 +57,25 @@ def __init__(self, self.test_mode = test_mode self.ann_info = {} + if dataset_info is None: + raise ValueError( + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.') + + dataset_info = DatasetInfo(dataset_info) + self.load_config(self.data_cfg) + + self.ann_info['num_joints'] = data_cfg['num_joints'] + 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 + self.ann_info['lower_body_ids'] = dataset_info.lower_body_ids + self.ann_info['joint_weights'] = dataset_info.joint_weights + self.ann_info['skeleton'] = dataset_info.skeleton + self.sigmas = dataset_info.sigmas + self.dataset_name = dataset_info.dataset_name + self.data_info = self.load_annotations() self.sample_indices = self.build_sample_indices() self.pipeline = Compose(pipeline) @@ -77,20 +98,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) diff --git a/mmpose/datasets/datasets/_base_/kpt_3d_sview_rgb_img_top_down_dataset.py b/mmpose/datasets/datasets/_base_/kpt_3d_sview_rgb_img_top_down_dataset.py new file mode 100644 index 0000000000..812effbe75 --- /dev/null +++ b/mmpose/datasets/datasets/_base_/kpt_3d_sview_rgb_img_top_down_dataset.py @@ -0,0 +1,256 @@ +import copy +from abc import ABCMeta, abstractmethod + +import json_tricks as json +import numpy as np +from torch.utils.data import Dataset +from xtcocotools.coco import COCO + +from mmpose.datasets import DatasetInfo +from mmpose.datasets.pipelines import Compose + + +class Kpt3dSviewRgbImgTopDownDataset(Dataset, metaclass=ABCMeta): + """Base class for keypoint 3D top-down pose estimation with single-view RGB + image as the input. + + All fashion datasets should subclass it. + All subclasses should overwrite: + Methods:`_get_db`, 'evaluate' + + Args: + ann_file (str): Path to the annotation file. + img_prefix (str): Path to a directory where images are held. + Default: None. + data_cfg (dict): config + pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. + coco_style (bool): Whether the annotation json is coco-style. + Default: True + test_mode (bool): Store True when building test or + validation dataset. Default: False. + """ + + def __init__(self, + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=None, + coco_style=True, + test_mode=False): + + self.image_info = {} + self.ann_info = {} + + self.ann_file = ann_file + self.img_prefix = img_prefix + self.pipeline = pipeline + self.test_mode = test_mode + + self.ann_info['image_size'] = np.array(data_cfg['image_size']) + self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) + self.ann_info['num_joints'] = data_cfg['num_joints'] + + self.ann_info['inference_channel'] = data_cfg['inference_channel'] + self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] + self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] + + if dataset_info is None: + raise ValueError( + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.') + + dataset_info = DatasetInfo(dataset_info) + + assert self.ann_info['num_joints'] == dataset_info.keypoint_num + self.ann_info['flip_pairs'] = dataset_info.flip_pairs + self.ann_info['flip_index'] = dataset_info.flip_index + self.ann_info['upper_body_ids'] = dataset_info.upper_body_ids + self.ann_info['lower_body_ids'] = dataset_info.lower_body_ids + self.ann_info['joint_weights'] = dataset_info.joint_weights + self.ann_info['skeleton'] = dataset_info.skeleton + self.sigmas = dataset_info.sigmas + self.dataset_name = dataset_info.dataset_name + + if coco_style: + self.coco = COCO(ann_file) + if 'categories' in self.coco.dataset: + cats = [ + cat['name'] + for cat in self.coco.loadCats(self.coco.getCatIds()) + ] + self.classes = ['__background__'] + cats + self.num_classes = len(self.classes) + self._class_to_ind = dict( + zip(self.classes, range(self.num_classes))) + self._class_to_coco_ind = dict( + zip(cats, self.coco.getCatIds())) + self._coco_ind_to_class_ind = dict( + (self._class_to_coco_ind[cls], self._class_to_ind[cls]) + for cls in self.classes[1:]) + self.img_ids = self.coco.getImgIds() + self.num_images = len(self.img_ids) + self.id2name, self.name2id = self._get_mapping_id_name( + self.coco.imgs) + + self.db = [] + + self.pipeline = Compose(self.pipeline) + + @staticmethod + def _cam2pixel(cam_coord, f, c): + """Transform the joints from their camera coordinates to their pixel + coordinates. + + Note: + N: number of joints + + Args: + cam_coord (ndarray[N, 3]): 3D joints coordinates + in the camera coordinate system + f (ndarray[2]): focal length of x and y axis + c (ndarray[2]): principal point of x and y axis + + Returns: + img_coord (ndarray[N, 3]): the coordinates (x, y, 0) + in the image plane. + """ + x = cam_coord[:, 0] / (cam_coord[:, 2] + 1e-8) * f[0] + c[0] + y = cam_coord[:, 1] / (cam_coord[:, 2] + 1e-8) * f[1] + c[1] + z = np.zeros_like(x) + img_coord = np.concatenate((x[:, None], y[:, None], z[:, None]), 1) + return img_coord + + @staticmethod + def _world2cam(world_coord, R, T): + """Transform the joints from their world coordinates to their camera + coordinates. + + Note: + N: number of joints + + Args: + world_coord (ndarray[3, N]): 3D joints coordinates + in the world coordinate system + R (ndarray[3, 3]): camera rotation matrix + T (ndarray[3, 1]): camera position (x, y, z) + + Returns: + cam_coord (ndarray[3, N]): 3D joints coordinates + in the camera coordinate system + """ + cam_coord = np.dot(R, world_coord - T) + return cam_coord + + @staticmethod + def _pixel2cam(pixel_coord, f, c): + """Transform the joints from their pixel coordinates to their camera + coordinates. + + Note: + N: number of joints + + Args: + pixel_coord (ndarray[N, 3]): 3D joints coordinates + in the pixel coordinate system + f (ndarray[2]): focal length of x and y axis + c (ndarray[2]): principal point of x and y axis + + Returns: + cam_coord (ndarray[N, 3]): 3D joints coordinates + in the camera coordinate system + """ + x = (pixel_coord[:, 0] - c[0]) / f[0] * pixel_coord[:, 2] + y = (pixel_coord[:, 1] - c[1]) / f[1] * pixel_coord[:, 2] + z = pixel_coord[:, 2] + cam_coord = np.concatenate((x[:, None], y[:, None], z[:, None]), 1) + return cam_coord + + @staticmethod + def _get_mapping_id_name(imgs): + """ + Args: + imgs (dict): dict of image info. + + Returns: + tuple: Image name & id mapping dicts. + + - id2name (dict): Mapping image id to name. + - name2id (dict): Mapping image name to id. + """ + id2name = {} + name2id = {} + for image_id, image in imgs.items(): + file_name = image['file_name'] + id2name[image_id] = file_name + name2id[file_name] = image_id + + return id2name, name2id + + def _xywh2cs(self, x, y, w, h, padding=1.25): + """This encodes bbox(x,y,w,h) into (center, scale) + + Args: + x, y, w, h (float): left, top, width and height + padding (float): bounding box padding factor + + Returns: + center (np.ndarray[float32](2,)): center of the bbox (x, y). + scale (np.ndarray[float32](2,)): scale of the bbox w & h. + """ + aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ + 'image_size'][1] + center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) + + if (not self.test_mode) and np.random.rand() < 0.3: + center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] + + if w > aspect_ratio * h: + h = w * 1.0 / aspect_ratio + elif w < aspect_ratio * h: + w = h * aspect_ratio + + # pixel std is 200.0 + scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) + # padding to include proper amount of context + scale = scale * padding + + return center, scale + + @abstractmethod + def _get_db(self): + """Load dataset.""" + raise NotImplementedError + + @abstractmethod + def evaluate(self, cfg, outputs, res_folder, metric, *args, **kwargs): + """Evaluate keypoint results.""" + raise NotImplementedError + + @staticmethod + def _write_keypoint_results(keypoints, res_file): + """Write results into a json file.""" + + with open(res_file, 'w') as f: + json.dump(keypoints, f, sort_keys=True, indent=4) + + def __len__(self): + """Get the size of the dataset.""" + return len(self.db) + + def __getitem__(self, idx): + """Get the sample given index.""" + results = copy.deepcopy(self.db[idx]) + results['ann_info'] = self.ann_info + return self.pipeline(results) + + def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): + """sort kpts and remove the repeated ones.""" + kpts = sorted(kpts, key=lambda x: x[key]) + num = len(kpts) + for i in range(num - 1, 0, -1): + if kpts[i][key] == kpts[i - 1][key]: + del kpts[i] + + return kpts diff --git a/mmpose/datasets/datasets/animal/animal_atrw_dataset.py b/mmpose/datasets/datasets/animal/animal_atrw_dataset.py index 066b907470..1b9b498530 100644 --- a/mmpose/datasets/datasets/animal/animal_atrw_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_atrw_dataset.py @@ -5,16 +5,16 @@ import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalATRWDataset(AnimalBaseDataset): +class AnimalATRWDataset(Kpt2dSviewRgbImgTopDownDataset): """ATRW dataset for animal pose estimation. `ATRW: A Benchmark for Amur Tiger Re-identification in the Wild' @@ -49,6 +49,7 @@ class AnimalATRWDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -58,58 +59,35 @@ def __init__(self, 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/atrw.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + 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) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] 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.ann_info['flip_pairs'] = [[0, 1], [3, 5], [4, 6], [7, 10], - [8, 11], [9, 12]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6) - self.ann_info['lower_body_ids'] = (7, 8, 9, 10, 11, 12, 13, 14) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # `ATRW: A Benchmark for Amur Tiger Re-identification in the Wild' - self.sigmas = np.array([ - 2.77, 8.23, 8.31, 2.02, 7.16, 2.63, 6.46, 3.02, 4.40, 3.16, 3.33, - 5.47, 2.63, 6.83, 5.39 - ]) / 100.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'atrw' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/animal/animal_base_dataset.py b/mmpose/datasets/datasets/animal/animal_base_dataset.py deleted file mode 100644 index 2ece2432ee..0000000000 --- a/mmpose/datasets/datasets/animal/animal_base_dataset.py +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright (c) OpenMMLab. All rights reserved. -import copy -from abc import ABCMeta, abstractmethod - -import json_tricks as json -import numpy as np -from torch.utils.data import Dataset -from xtcocotools.coco import COCO - -from mmpose.datasets.pipelines import Compose - - -class AnimalBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for animal datasets. - - All top-down datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_db` - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - - self.ann_info['flip_pairs'] = [] - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.coco = COCO(ann_file) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - - self.db = [] - - self.pipeline = Compose(self.pipeline) - - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - - def _xywh2cs(self, x, y, w, h, padding=1.25): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h - - Returns: - center (np.ndarray[float32](2,)): center of the bbox (x, y). - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * padding - - return center, scale - - @abstractmethod - def _get_db(self): - """Load dataset.""" - raise NotImplementedError - - @abstractmethod - def evaluate(self, cfg, preds, output_dir, *args, **kwargs): - """Evaluate keypoint results.""" - raise NotImplementedError - - @staticmethod - def _write_keypoint_results(keypoints, res_file): - """Write results into a json file.""" - - with open(res_file, 'w') as f: - json.dump(keypoints, f, sort_keys=True, indent=4) - - def __len__(self): - """Get the size of the dataset.""" - return len(self.db) - - def __getitem__(self, idx): - """Get the sample given index.""" - results = copy.deepcopy(self.db[idx]) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): - """sort kpts and remove the repeated ones.""" - kpts = sorted(kpts, key=lambda x: x[key]) - num = len(kpts) - for i in range(num - 1, 0, -1): - if kpts[i][key] == kpts[i - 1][key]: - del kpts[i] - - return kpts diff --git a/mmpose/datasets/datasets/animal/animal_fly_dataset.py b/mmpose/datasets/datasets/animal/animal_fly_dataset.py index 5e3a91781d..465c522e47 100644 --- a/mmpose/datasets/datasets/animal/animal_fly_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_fly_dataset.py @@ -1,18 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, - keypoint_pck_accuracy) from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalFlyDataset(AnimalBaseDataset): +class AnimalFlyDataset(Kpt2dSviewRgbImgTopDownDataset): """AnimalFlyDataset for animal pose estimation. `Fast animal pose estimation using deep neural networks' @@ -64,6 +63,7 @@ class AnimalFlyDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -73,22 +73,26 @@ def __init__(self, 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/fly.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 32 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[1, 2], [6, 18], [7, 19], [8, 20], - [9, 21], [10, 22], [11, 23], [12, 24], - [13, 25], [14, 26], [15, 27], [16, 28], - [17, 29], [30, 31]] - - self.dataset_name = 'fly' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -137,59 +141,6 @@ def _get_db(self): return gt_db - def _report_metric(self, res_file, metrics, pck_thr=0.2, auc_nor=30): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.2. - pckh_thr (float): PCKh threshold, default as 0.7. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'AUC' in metrics: - info_str.append(('AUC', keypoint_auc(outputs, gts, masks, - auc_nor))) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - def evaluate(self, outputs, res_folder, metric='PCK', **kwargs): """Evaluate Fly keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/animal/animal_horse10_dataset.py b/mmpose/datasets/datasets/animal/animal_horse10_dataset.py index d5cd227044..b46899fe7e 100644 --- a/mmpose/datasets/datasets/animal/animal_horse10_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_horse10_dataset.py @@ -1,18 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import (keypoint_nme, - keypoint_pck_accuracy) from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalHorse10Dataset(AnimalBaseDataset): +class AnimalHorse10Dataset(Kpt2dSviewRgbImgTopDownDataset): """AnimalHorse10Dataset for animal pose estimation. `Pretraining boosts out-of-domain robustness for pose estimation' @@ -53,6 +52,7 @@ class AnimalHorse10Dataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -62,17 +62,26 @@ def __init__(self, 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/horse10.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 22 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'horse10' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -136,50 +145,6 @@ def _get_normalize_factor(self, gts): gts[:, 0, :] - gts[:, 1, :], axis=1, keepdims=True) return np.tile(interocular, [1, 2]) - def _report_metric(self, res_file, metrics, pck_thr=0.3): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'NME'. - pck_thr (float): PCK threshold, default: 0.3. - - Returns: - dict: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - - normalize_factor = self._get_normalize_factor(gts) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - normalize_factor) - info_str.append(('PCK', pck)) - - if 'NME' in metrics: - info_str.append( - ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) - - return info_str - def evaluate(self, outputs, res_folder, metric='PCK', **kwargs): """Evaluate horse-10 keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/animal/animal_locust_dataset.py b/mmpose/datasets/datasets/animal/animal_locust_dataset.py index 779416ddf6..e8a3e95dda 100644 --- a/mmpose/datasets/datasets/animal/animal_locust_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_locust_dataset.py @@ -1,18 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, - keypoint_pck_accuracy) from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalLocustDataset(AnimalBaseDataset): +class AnimalLocustDataset(Kpt2dSviewRgbImgTopDownDataset): """AnimalLocustDataset for animal pose estimation. `DeepPoseKit, a software toolkit for fast and robust animal @@ -66,6 +65,7 @@ class AnimalLocustDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -75,22 +75,26 @@ def __init__(self, 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/locust.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 35 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[5, 20], [6, 21], [7, 22], [8, 23], - [9, 24], [10, 25], [11, 26], [12, 27], - [13, 28], [14, 29], [15, 30], [16, 31], - [17, 32], [18, 33], [19, 34]] - - self.dataset_name = 'locust' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -139,59 +143,6 @@ def _get_db(self): return gt_db - def _report_metric(self, res_file, metrics, pck_thr=0.2, auc_nor=30): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.2. - pckh_thr (float): PCKh threshold, default as 0.7. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'AUC' in metrics: - info_str.append(('AUC', keypoint_auc(outputs, gts, masks, - auc_nor))) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - def evaluate(self, outputs, res_folder, metric='PCK', **kwargs): """Evaluate Fly keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/animal/animal_macaque_dataset.py b/mmpose/datasets/datasets/animal/animal_macaque_dataset.py index 7666d88561..9ddf896634 100644 --- a/mmpose/datasets/datasets/animal/animal_macaque_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_macaque_dataset.py @@ -5,16 +5,16 @@ import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalMacaqueDataset(AnimalBaseDataset): +class AnimalMacaqueDataset(Kpt2dSviewRgbImgTopDownDataset): """MacaquePose dataset for animal pose estimation. `MacaquePose: A novel ‘in the wild’ macaque monkey pose dataset @@ -51,6 +51,7 @@ class AnimalMacaqueDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -60,62 +61,35 @@ def __init__(self, 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/macaque.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + 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) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] 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.ann_info['flip_pairs'] = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], - [11, 12], [13, 14], [15, 16]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) - self.ann_info['lower_body_ids'] = (11, 12, 13, 14, 15, 16) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, - 1.2, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/' - # 'pycocotools/cocoeval.py#L523' - self.sigmas = np.array([ - .26, .25, .25, .35, .35, .79, .79, .72, .72, .62, .62, 1.07, 1.07, - .87, .87, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'macaque' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/animal/animal_pose_dataset.py b/mmpose/datasets/datasets/animal/animal_pose_dataset.py index dd025fc0ac..8dcbfc4e1b 100644 --- a/mmpose/datasets/datasets/animal/animal_pose_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_pose_dataset.py @@ -5,16 +5,16 @@ import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalPoseDataset(AnimalBaseDataset): +class AnimalPoseDataset(Kpt2dSviewRgbImgTopDownDataset): """Animal-Pose dataset for animal pose estimation. `Cross-domain Adaptation For Animal Pose Estimation’ ICCV'2019 @@ -53,6 +53,7 @@ class AnimalPoseDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -62,64 +63,35 @@ def __init__(self, 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/animalpose.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + 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) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] 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.ann_info['flip_pairs'] = [[0, 1], [2, 3], [8, 9], [10, 11], - [12, 13], [14, 15], [16, 17], [18, 19]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 7, 8, 9, 12, 13, - 16, 17) - self.ann_info['lower_body_ids'] = (6, 10, 11, 14, 15, 18, 19) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.2, - 1.2, 1.5, 1.5, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # Note: The original paper did not provide enough information about - # the sigmas. We modified from 'https://github.com/cocodataset/' - # 'cocoapi/blob/master/PythonAPI/pycocotools/cocoeval.py#L523' - self.sigmas = np.array([ - .25, .25, .26, .35, .35, 1.0, 1.0, 1.0, 1.07, 1.07, 1.07, 1.07, - .87, .87, .87, .87, .89, .89, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'animalpose' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/animal/animal_zebra_dataset.py b/mmpose/datasets/datasets/animal/animal_zebra_dataset.py index 4efb646643..c4de9ee0ee 100644 --- a/mmpose/datasets/datasets/animal/animal_zebra_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_zebra_dataset.py @@ -1,18 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, - keypoint_pck_accuracy) from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalZebraDataset(AnimalBaseDataset): +class AnimalZebraDataset(Kpt2dSviewRgbImgTopDownDataset): """AnimalZebraDataset for animal pose estimation. `DeepPoseKit, a software toolkit for fast and robust animal @@ -40,6 +39,7 @@ class AnimalZebraDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -49,19 +49,26 @@ def __init__(self, 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/zebra.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 9 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[3, 4], [5, 6]] - - self.dataset_name = 'zebra' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -110,59 +117,6 @@ def _get_db(self): return gt_db - def _report_metric(self, res_file, metrics, pck_thr=0.2, auc_nor=30): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.2. - pckh_thr (float): PCKh threshold, default as 0.7. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'AUC' in metrics: - info_str.append(('AUC', keypoint_auc(outputs, gts, masks, - auc_nor))) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - def evaluate(self, outputs, res_folder, metric='PCK', **kwargs): """Evaluate Fly keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py b/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py index 2882518608..72d5d19358 100644 --- a/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py @@ -1,17 +1,19 @@ # Copyright (c) OpenMMLab. All rights reserved. import os.path as osp +import warnings from collections import OrderedDict, defaultdict import mmcv import numpy as np +from mmcv import Config from mmpose.core.evaluation import keypoint_mpjpe +from mmpose.datasets.datasets._base_ import Kpt3dSviewKpt2dDataset from ...builder import DATASETS -from .body3d_base_dataset import Body3DBaseDataset @DATASETS.register_module() -class Body3DH36MDataset(Body3DBaseDataset): +class Body3DH36MDataset(Kpt3dSviewKpt2dDataset): """Human3.6M dataset for 3D human pose estimation. `Human3.6M: Large Scale Datasets and Predictive Methods for 3D Human @@ -45,6 +47,7 @@ class Body3DH36MDataset(Body3DBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -64,6 +67,30 @@ class Body3DH36MDataset(Body3DBaseDataset): # metric ALLOWED_METRICS = {'mpjpe', 'p-mpjpe', 'n-mpjpe'} + 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/h36m.py') + dataset_info = cfg._cfg_dict['dataset_info'] + + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) + def load_config(self, data_cfg): super().load_config(data_cfg) # h36m specific attributes @@ -83,12 +110,7 @@ def load_config(self, data_cfg): # h36m specific annotation info ann_info = {} - ann_info['flip_pairs'] = [[1, 4], [2, 5], [3, 6], [11, 14], [12, 15], - [13, 16]] - ann_info['upper_body_ids'] = (0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) - ann_info['lower_body_ids'] = (1, 2, 3, 4, 5, 6) ann_info['use_different_joint_weights'] = False - # action filter actions = data_cfg.get('actions', '_all_') self.actions = set( diff --git a/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py b/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py index 8a513e489d..ade2e6e62c 100644 --- a/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py @@ -1,18 +1,20 @@ # Copyright (c) OpenMMLab. All rights reserved. import os.path as osp +import warnings from collections import OrderedDict, defaultdict import mmcv import numpy as np +from mmcv import Config from mmpose.core.evaluation import (keypoint_3d_auc, keypoint_3d_pck, keypoint_mpjpe) +from mmpose.datasets.datasets._base_ import Kpt3dSviewKpt2dDataset from ...builder import DATASETS -from .body3d_base_dataset import Body3DBaseDataset @DATASETS.register_module() -class Body3DMpiInf3dhpDataset(Body3DBaseDataset): +class Body3DMpiInf3dhpDataset(Kpt3dSviewKpt2dDataset): """MPI-INF-3DHP dataset for 3D human pose estimation. `Monocular 3D Human Pose Estimation In The Wild Using Improved CNN @@ -56,6 +58,7 @@ class Body3DMpiInf3dhpDataset(Body3DBaseDataset): - need_camera_param: Whether need camera parameters or not. Default: False. pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -77,6 +80,30 @@ class Body3DMpiInf3dhpDataset(Body3DBaseDataset): 'mpjpe', 'p-mpjpe', '3dpck', 'p-3dpck', '3dauc', 'p-3dauc' } + 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/mpi_inf_3dhp.py') + dataset_info = cfg._cfg_dict['dataset_info'] + + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) + def load_config(self, data_cfg): super().load_config(data_cfg) # mpi-inf-3dhp specific attributes @@ -96,10 +123,6 @@ def load_config(self, data_cfg): # mpi-inf-3dhp specific annotation info ann_info = {} - ann_info['flip_pairs'] = [[2, 5], [3, 6], [4, 7], [8, 11], [9, 12], - [10, 13]] - ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 14, 15, 16) - ann_info['lower_body_ids'] = (8, 9, 10, 11, 12, 13) ann_info['use_different_joint_weights'] = False self.ann_info.update(ann_info) diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py b/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py index ee99dcd260..f3cbd246e4 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py @@ -1,7 +1,8 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import json_tricks as json -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from mmpose.datasets.builder import DATASETS @@ -40,6 +41,7 @@ class BottomUpAicDataset(BottomUpCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -49,45 +51,26 @@ def __init__(self, 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/aic.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(BottomUpCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) - self.ann_info['flip_index'] = [ - 3, 4, 5, 0, 1, 2, 9, 10, 11, 6, 7, 8, 12, 13 - ] self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - self.sigmas = np.array([ - 0.01388152, 0.01515228, 0.01057665, 0.01417709, 0.01497891, - 0.01402144, 0.03909642, 0.03686941, 0.01981803, 0.03843971, - 0.03412318, 0.02415081, 0.01291456, 0.01236173 - ]) - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - if not test_mode: - self.img_ids = [ - img_id for img_id in self.img_ids - if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 - ] - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'aic' - print(f'=> num_images: {self.num_images}') def _do_python_keypoint_eval(self, res_file): diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py b/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py deleted file mode 100644 index f47400d6ac..0000000000 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) OpenMMLab. All rights reserved. -import copy - -import numpy as np -from torch.utils.data import Dataset - -from mmpose.datasets.pipelines import Compose - - -class BottomUpBaseDataset(Dataset): - """Base class for bottom-up datasets. - - All datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_single` - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - # bottom-up - self.base_size = data_cfg['base_size'] - self.base_sigma = data_cfg['base_sigma'] - self.int_sigma = False - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - self.ann_info['num_scales'] = data_cfg['num_scales'] - self.ann_info['scale_aware_sigma'] = data_cfg['scale_aware_sigma'] - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.use_nms = data_cfg.get('use_nms', False) - self.soft_nms = data_cfg.get('soft_nms', True) - self.oks_thr = data_cfg.get('oks_thr', 0.9) - - self.img_ids = [] - self.pipeline = Compose(self.pipeline) - - def __len__(self): - """Get dataset length.""" - return len(self.img_ids) - - def _get_single(self, idx): - """Get anno for a single image.""" - raise NotImplementedError - - def prepare_train_img(self, idx): - """Prepare image for training given the index.""" - results = copy.deepcopy(self._get_single(idx)) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def prepare_test_img(self, idx): - """Prepare image for testing given the index.""" - results = copy.deepcopy(self._get_single(idx)) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def get_flip_index_from_flip_pairs(self, flip_pairs): - flip_index = list(range(self.ann_info['num_joints'])) - for pair in flip_pairs: - flip_index[pair[1]], flip_index[pair[0]] = flip_index[ - pair[0]], flip_index[pair[1]] - return flip_index - - def __getitem__(self, idx): - """Get the sample for either training or testing given index.""" - if self.test_mode: - return self.prepare_test_img(idx) - - return self.prepare_train_img(idx) diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py b/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py index 6275402851..52e4c85b79 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py @@ -1,20 +1,20 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict, defaultdict import json_tricks as json import numpy as np -import xtcocotools -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from mmpose.core.post_processing import oks_nms, soft_oks_nms from mmpose.datasets.builder import DATASETS -from .bottom_up_base_dataset import BottomUpBaseDataset +from mmpose.datasets.datasets._base_ import Kpt2dSviewRgbImgBottomUpDataset @DATASETS.register_module() -class BottomUpCocoDataset(BottomUpBaseDataset): +class BottomUpCocoDataset(Kpt2dSviewRgbImgBottomUpDataset): """COCO dataset for bottom-up pose estimation. The dataset loads raw features and apply specified transforms @@ -46,6 +46,7 @@ class BottomUpCocoDataset(BottomUpBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -55,80 +56,28 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super().__init__(ann_file, img_prefix, data_cfg, pipeline, test_mode) - self.ann_info['flip_index'] = [ - 0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15 - ] + 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.py') + dataset_info = cfg._cfg_dict['dataset_info'] + + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, - 1.2, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # joint index starts from 1 - self.ann_info['skeleton'] = [[16, 14], [14, 12], [17, 15], [15, 13], - [12, 13], [6, 12], [7, 13], [6, 7], - [6, 8], [7, 9], [8, 10], [9, 11], [2, 3], - [1, 2], [1, 3], [2, 4], [3, 5], [4, 6], - [5, 7]] - - # 'https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/' - # 'pycocotools/cocoeval.py#L523' - self.sigmas = np.array([ - .26, .25, .25, .35, .35, .79, .79, .72, .72, .62, .62, 1.07, 1.07, - .87, .87, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - if not test_mode: - self.img_ids = [ - img_id for img_id in self.img_ids - if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 - ] - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'coco' - print(f'=> num_images: {self.num_images}') - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - def _get_single(self, idx): """Get anno for a single image. @@ -190,29 +139,6 @@ def _get_joints(self, anno): return joints - def _get_mask(self, anno, idx): - """Get ignore masks to mask out losses.""" - coco = self.coco - img_info = coco.loadImgs(self.img_ids[idx])[0] - - m = np.zeros((img_info['height'], img_info['width']), dtype=np.float32) - - for obj in anno: - if 'segmentation' in obj: - if obj['iscrowd']: - rle = xtcocotools.mask.frPyObjects(obj['segmentation'], - img_info['height'], - img_info['width']) - m += xtcocotools.mask.decode(rle) - elif obj['num_keypoints'] == 0: - rles = xtcocotools.mask.frPyObjects( - obj['segmentation'], img_info['height'], - img_info['width']) - for rle in rles: - m += xtcocotools.mask.decode(rle) - - return m < 0.5 - def evaluate(self, outputs, res_folder, metric='mAP', **kwargs): """Evaluate coco keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py b/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py index 3a7f0dbfca..5be8f6bf06 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py @@ -1,6 +1,8 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from mmpose.datasets.builder import DATASETS @@ -32,6 +34,7 @@ class BottomUpCocoWholeBodyDataset(BottomUpCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -41,18 +44,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super(BottomUpCocoDataset, - self).__init__(ann_file, img_prefix, data_cfg, pipeline, - test_mode) - self.ann_info['flip_pairs'] = self._make_flip_pairs() - self.ann_info['flip_index'] = self.get_flip_index_from_flip_pairs( - self.ann_info['flip_pairs']) + 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(BottomUpCocoDataset, self).__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) self.body_num = 17 self.foot_num = 6 @@ -60,84 +71,8 @@ def __init__(self, self.left_hand_num = 21 self.right_hand_num = 21 - # 'https://github.com/jin-s13/COCO-WholeBody/blob/master/' - # 'evaluation/myeval_wholebody.py#L170' - self.sigmas_body = [ - 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, - 0.062, 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 - ] - self.sigmas_foot = [0.068, 0.066, 0.066, 0.092, 0.094, 0.094] - self.sigmas_face = [ - 0.042, 0.043, 0.044, 0.043, 0.040, 0.035, 0.031, 0.025, 0.020, - 0.023, 0.029, 0.032, 0.037, 0.038, 0.043, 0.041, 0.045, 0.013, - 0.012, 0.011, 0.011, 0.012, 0.012, 0.011, 0.011, 0.013, 0.015, - 0.009, 0.007, 0.007, 0.007, 0.012, 0.009, 0.008, 0.016, 0.010, - 0.017, 0.011, 0.009, 0.011, 0.009, 0.007, 0.013, 0.008, 0.011, - 0.012, 0.010, 0.034, 0.008, 0.008, 0.009, 0.008, 0.008, 0.007, - 0.010, 0.008, 0.009, 0.009, 0.009, 0.007, 0.007, 0.008, 0.011, - 0.008, 0.008, 0.008, 0.01, 0.008 - ] - self.sigmas_lefthand = [ - 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, 0.035, - 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, - 0.019, 0.022, 0.031 - ] - self.sigmas_righthand = [ - 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, 0.035, - 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, - 0.019, 0.022, 0.031 - ] - - self.sigmas_wholebody = ( - self.sigmas_body + self.sigmas_foot + self.sigmas_face + - self.sigmas_lefthand + self.sigmas_righthand) - - self.sigmas = np.array(self.sigmas_wholebody) - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - if not test_mode: - self.img_ids = [ - img_id for img_id in self.img_ids - if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 - ] - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'coco_wholebody' - print(f'=> num_images: {self.num_images}') - @staticmethod - def _make_flip_pairs(): - body = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], - [15, 16]] - foot = [[17, 20], [18, 21], [19, 22]] - - face = [[23, 39], [24, 38], [25, 37], [26, 36], [27, 35], [28, 34], - [29, 33], [30, 32], [40, 49], [41, 48], [42, 47], [43, 46], - [44, 45], [54, 58], [55, 57], [59, 68], [60, 67], [61, 66], - [62, 65], [63, 70], [64, 69], [71, 77], [72, 76], [73, 75], - [78, 82], [79, 81], [83, 87], [84, 86], [88, 90]] - - hand = [[91, 112], [92, 113], [93, 114], [94, 115], [95, 116], - [96, 117], [97, 118], [98, 119], [99, 120], [100, 121], - [101, 122], [102, 123], [103, 124], [104, 125], [105, 126], - [106, 127], [107, 128], [108, 129], [109, 130], [110, 131], - [111, 132]] - - return body + foot + face + hand - def _get_joints(self, anno): """Get joints for all people in an image.""" num_people = len(anno) @@ -221,11 +156,16 @@ def _do_python_keypoint_eval(self, res_file): """Keypoint evaluation using COCOAPI.""" coco_det = self.coco.loadRes(res_file) + cuts = np.cumsum([ + 0, self.body_num, self.foot_num, self.face_num, self.left_hand_num, + self.right_hand_num + ]) + coco_eval = COCOeval( self.coco, coco_det, 'keypoints_body', - np.array(self.sigmas_body), + self.sigmas[cuts[0]:cuts[1]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -236,7 +176,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_foot', - np.array(self.sigmas_foot), + self.sigmas[cuts[1]:cuts[2]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -247,7 +187,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_face', - np.array(self.sigmas_face), + self.sigmas[cuts[2]:cuts[3]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -258,7 +198,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_lefthand', - np.array(self.sigmas_lefthand), + self.sigmas[cuts[3]:cuts[4]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -269,7 +209,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_righthand', - np.array(self.sigmas_righthand), + self.sigmas[cuts[4]:cuts[5]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -280,7 +220,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_wholebody', - np.array(self.sigmas_wholebody), + self.sigmas, use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py b/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py index fb4390ecea..acff96e70f 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py @@ -1,7 +1,8 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import json_tricks as json -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from mmpose.datasets.builder import DATASETS @@ -38,6 +39,7 @@ class BottomUpCrowdPoseDataset(BottomUpCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -47,51 +49,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super(BottomUpCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - self.ann_info['flip_index'] = [ - 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 12, 13 - ] + 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/crowdpose.py') + dataset_info = cfg._cfg_dict['dataset_info'] - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 0.2, 0.2, 0.2, 1.3, 1.5, 0.2, 1.3, 1.5, 0.2, 0.2, 0.5, 0.2, - 0.2, 0.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/Jeff-sjtu/CrowdPose/blob/master/crowdpose-api/' - # 'PythonAPI/crowdposetools/cocoeval.py#L224' - self.sigmas = np.array([ - .79, .79, .72, .72, .62, .62, 1.07, 1.07, .87, .87, .89, .89, .79, - .79 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - if not test_mode: - self.img_ids = [ - img_id for img_id in self.img_ids - if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 - ] - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'crowdpose' + super(BottomUpCocoDataset, self).__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) + self.ann_info['use_different_joint_weights'] = False print(f'=> num_images: {self.num_images}') def _do_python_keypoint_eval(self, res_file): diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py b/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py index 33e1a64391..2b09870867 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py @@ -1,7 +1,8 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import json_tricks as json -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from mmpose.datasets.builder import DATASETS @@ -46,6 +47,7 @@ class BottomUpMhpDataset(BottomUpCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -55,50 +57,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super(BottomUpCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - self.ann_info['flip_index'] = [ - 5, 4, 3, 2, 1, 0, 6, 7, 8, 9, 15, 14, 13, 12, 11, 10 - ] + 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/mhp.py') + dataset_info = cfg._cfg_dict['dataset_info'] - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1.5, 1.2, 1., 1., 1.2, 1.5, 1., 1., 1., 1., 1.5, 1.2, 1., 1., - 1.2, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # Adapted from COCO dataset - self.sigmas = np.array([ - .89, .83, 1.07, 1.07, .83, .89, .26, .26, .26, .26, .62, .72, 1.79, - 1.79, .72, .62 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - if not test_mode: - self.img_ids = [ - img_id for img_id in self.img_ids - if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 - ] - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'mhp' + super(BottomUpCocoDataset, self).__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) + self.ann_info['use_different_joint_weights'] = False print(f'=> num_images: {self.num_images}') def _do_python_keypoint_eval(self, res_file): diff --git a/mmpose/datasets/datasets/face/face_300w_dataset.py b/mmpose/datasets/datasets/face/face_300w_dataset.py index ece58a3c9d..f4095aa63a 100644 --- a/mmpose/datasets/datasets/face/face_300w_dataset.py +++ b/mmpose/datasets/datasets/face/face_300w_dataset.py @@ -1,17 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import keypoint_nme from mmpose.datasets.builder import DATASETS -from .face_base_dataset import FaceBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class Face300WDataset(FaceBaseDataset): +class Face300WDataset(Kpt2dSviewRgbImgTopDownDataset): """Face300W dataset for top-down face keypoint localization. `300 faces In-the-wild challenge: Database and results. @@ -29,6 +29,7 @@ class Face300WDataset(FaceBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -38,28 +39,27 @@ def __init__(self, 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/300w.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 68 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[0, 16], [1, 15], [2, 14], [3, 13], - [4, 12], [5, 11], [6, 10], [7, 9], - [17, 26], [18, 25], [19, 24], [20, 23], - [21, 22], [31, 35], [32, 34], [36, 45], - [37, 44], [38, 43], [39, 42], [40, 47], - [41, 46], [48, 54], [49, 53], [50, 52], - [61, 63], [60, 64], [67, 65], [58, 56], - [59, 55]] - - self.dataset_name = '300w' self.db = self._get_db() - print(f'=> num_images: {self.num_images}') print(f'=> load {len(self.db)} samples') @@ -108,7 +108,7 @@ def _get_db(self): return gt_db - def _get_normalize_factor(self, gts): + def _get_normalize_factor(self, gts, *args, **kwargs): """Get inter-ocular distance as the normalize factor, measured as the Euclidean distance between the outer corners of the eyes. @@ -123,43 +123,6 @@ def _get_normalize_factor(self, gts): gts[:, 36, :] - gts[:, 45, :], axis=1, keepdims=True) return np.tile(interocular, [1, 2]) - def _report_metric(self, res_file, metrics): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'NME'. - - Returns: - dict: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - - if 'NME' in metrics: - normalize_factor = self._get_normalize_factor(gts) - info_str.append( - ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) - - return info_str - def evaluate(self, outputs, res_folder, metric='NME', **kwargs): """Evaluate freihand keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/face/face_aflw_dataset.py b/mmpose/datasets/datasets/face/face_aflw_dataset.py index 53c6dd8dd2..072dd1929c 100644 --- a/mmpose/datasets/datasets/face/face_aflw_dataset.py +++ b/mmpose/datasets/datasets/face/face_aflw_dataset.py @@ -1,17 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import keypoint_nme from mmpose.datasets.builder import DATASETS -from .face_base_dataset import FaceBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class FaceAFLWDataset(FaceBaseDataset): +class FaceAFLWDataset(Kpt2dSviewRgbImgTopDownDataset): """Face AFLW dataset for top-down face keypoint localization. `Annotated Facial Landmarks in the Wild: A Large-scale, @@ -32,6 +32,7 @@ class FaceAFLWDataset(FaceBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -41,20 +42,26 @@ def __init__(self, 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/aflw.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 19 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[0, 5], [1, 4], [2, 3], [6, 11], - [7, 10], [8, 9], [12, 14], [15, 17]] - - self.dataset_name = 'aflw' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -110,7 +117,7 @@ def _get_db(self): return gt_db - def _get_normalize_factor(self, box_sizes): + def _get_normalize_factor(self, box_sizes, *args, **kwargs): """Get normalize factor for evaluation. Args: @@ -122,46 +129,6 @@ def _get_normalize_factor(self, box_sizes): return np.tile(box_sizes, [1, 2]) - def _report_metric(self, res_file, metrics): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'NME'. - - Returns: - dict: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - box_sizes = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - box_sizes.append(item['box_size']) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - box_sizes = np.array(box_sizes).reshape([-1, 1]) - - if 'NME' in metrics: - normalize_factor = self._get_normalize_factor(box_sizes) - info_str.append( - ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) - - return info_str - def evaluate(self, outputs, res_folder, metric='NME', **kwargs): """Evaluate freihand keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/face/face_base_dataset.py b/mmpose/datasets/datasets/face/face_base_dataset.py deleted file mode 100644 index e5304a65b4..0000000000 --- a/mmpose/datasets/datasets/face/face_base_dataset.py +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright (c) OpenMMLab. All rights reserved. -import copy -from abc import ABCMeta, abstractmethod - -import json_tricks as json -import numpy as np -from torch.utils.data import Dataset -from xtcocotools.coco import COCO - -from mmpose.datasets.pipelines import Compose - - -class FaceBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for face datasets. - - All face datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_db`, 'evaluate' - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - - self.ann_info['flip_pairs'] = None - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.coco = COCO(ann_file) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - - self.db = [] - - self.pipeline = Compose(self.pipeline) - - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - - def _xywh2cs(self, x, y, w, h, padding=1.25): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h - - Returns: - center (np.ndarray[float32](2,)): center of the bbox (x, y). - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * padding - - return center, scale - - @abstractmethod - def _get_db(self): - """Load dataset.""" - raise NotImplementedError - - @abstractmethod - def evaluate(self, cfg, preds, output_dir, *args, **kwargs): - """Evaluate keypoint results.""" - raise NotImplementedError - - @staticmethod - def _write_keypoint_results(keypoints, res_file): - """Write results into a json file.""" - - with open(res_file, 'w') as f: - json.dump(keypoints, f, sort_keys=True, indent=4) - - def __len__(self): - """Get the size of the dataset.""" - return len(self.db) - - def __getitem__(self, idx): - """Get the sample given index.""" - results = copy.deepcopy(self.db[idx]) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): - """sort kpts and remove the repeated ones.""" - kpts = sorted(kpts, key=lambda x: x[key]) - num = len(kpts) - for i in range(num - 1, 0, -1): - if kpts[i][key] == kpts[i - 1][key]: - del kpts[i] - - return kpts diff --git a/mmpose/datasets/datasets/face/face_cofw_dataset.py b/mmpose/datasets/datasets/face/face_cofw_dataset.py index 27a785d1a9..e9f691dc83 100644 --- a/mmpose/datasets/datasets/face/face_cofw_dataset.py +++ b/mmpose/datasets/datasets/face/face_cofw_dataset.py @@ -1,17 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import keypoint_nme from mmpose.datasets.builder import DATASETS -from .face_base_dataset import FaceBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class FaceCOFWDataset(FaceBaseDataset): +class FaceCOFWDataset(Kpt2dSviewRgbImgTopDownDataset): """Face COFW dataset for top-down face keypoint localization. `Robust face landmark estimation under occlusion. (ICCV) 2013`. @@ -28,6 +28,7 @@ class FaceCOFWDataset(FaceBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -37,21 +38,26 @@ def __init__(self, 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/cofw.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 29 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[0, 1], [4, 6], [2, 3], [5, 7], [8, 9], - [10, 11], [12, 14], [16, 17], [13, 15], - [18, 19], [22, 23]] - - self.dataset_name = 'cofw' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -103,7 +109,7 @@ def _get_db(self): return gt_db - def _get_normalize_factor(self, gts): + def _get_normalize_factor(self, gts, *args, **kwargs): """Get normalize factor for evaluation. Args: @@ -117,43 +123,6 @@ def _get_normalize_factor(self, gts): gts[:, 8, :] - gts[:, 9, :], axis=1, keepdims=True) return np.tile(interocular, [1, 2]) - def _report_metric(self, res_file, metrics): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'NME'. - - Returns: - dict: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - - if 'NME' in metrics: - normalize_factor = self._get_normalize_factor(gts) - info_str.append( - ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) - - return info_str - def evaluate(self, outputs, res_folder, metric='NME', **kwargs): """Evaluate freihand keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/face/face_wflw_dataset.py b/mmpose/datasets/datasets/face/face_wflw_dataset.py index 5138d0ba52..db0ecdc652 100644 --- a/mmpose/datasets/datasets/face/face_wflw_dataset.py +++ b/mmpose/datasets/datasets/face/face_wflw_dataset.py @@ -1,17 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import keypoint_nme from mmpose.datasets.builder import DATASETS -from .face_base_dataset import FaceBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class FaceWFLWDataset(FaceBaseDataset): +class FaceWFLWDataset(Kpt2dSviewRgbImgTopDownDataset): """Face WFLW dataset for top-down face keypoint localization. `Look at Boundary: A Boundary-Aware Face Alignment Algorithm. @@ -29,6 +29,7 @@ class FaceWFLWDataset(FaceBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -38,29 +39,26 @@ def __init__(self, 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/wflw.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 98 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[0, 32], [1, 31], [2, 30], [3, 29], - [4, 28], [5, 27], [6, 26], [7, 25], - [8, 24], [9, 23], [10, 22], [11, 21], - [12, 20], [13, 19], [14, 18], [15, 17], - [33, 46], [34, 45], [35, 44], [36, 43], - [37, 42], [38, 50], [39, 49], [40, 48], - [41, 47], [60, 72], [61, 71], [62, 70], - [63, 69], [64, 68], [65, 75], [66, 74], - [67, 73], [55, 59], [56, 58], [76, 82], - [77, 81], [78, 80], [87, 83], [86, 84], - [88, 92], [89, 91], [95, 93], [96, 97]] - - self.dataset_name = 'wflw' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -111,7 +109,7 @@ def _get_db(self): return gt_db - def _get_normalize_factor(self, gts): + def _get_normalize_factor(self, gts, *args, **kwargs): """Get normalize factor for evaluation. Args: @@ -125,43 +123,6 @@ def _get_normalize_factor(self, gts): gts[:, 60, :] - gts[:, 72, :], axis=1, keepdims=True) return np.tile(interocular, [1, 2]) - def _report_metric(self, res_file, metrics): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'NME'. - - Returns: - dict: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - - if 'NME' in metrics: - normalize_factor = self._get_normalize_factor(gts) - info_str.append( - ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) - - return info_str - def evaluate(self, outputs, res_folder, metric='NME', **kwargs): """Evaluate freihand keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/fashion/deepfashion_dataset.py b/mmpose/datasets/datasets/fashion/deepfashion_dataset.py index 5d1533c3eb..ff658fa71c 100644 --- a/mmpose/datasets/datasets/fashion/deepfashion_dataset.py +++ b/mmpose/datasets/datasets/fashion/deepfashion_dataset.py @@ -1,15 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .fashion_base_dataset import FashionBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class DeepFashionDataset(FashionBaseDataset): +class DeepFashionDataset(Kpt2dSviewRgbImgTopDownDataset): """DeepFashion dataset (full-body clothes) for fashion landmark detection. `DeepFashion: Powering Robust Clothes Recognition @@ -52,10 +54,9 @@ class DeepFashionDataset(FashionBaseDataset): ann_file (str): Path to the annotation file. img_prefix (str): Path to a directory where images are held. Default: None. - subset (str): The FLD dataset has 3 subsets, 'upper', 'lower', - and 'full', denoting different types of clothes. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -63,34 +64,45 @@ class DeepFashionDataset(FashionBaseDataset): def __init__(self, ann_file, img_prefix, - subset, data_cfg, pipeline, + subset='', + 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) + if subset != '': + warnings.warn( + 'subset is deprecated.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + if subset == 'upper': + cfg = Config.fromfile( + 'configs/_base_/datasets/deepfashion_upper.py') + dataset_info = cfg._cfg_dict['dataset_info'] + elif subset == 'lower': + cfg = Config.fromfile( + 'configs/_base_/datasets/deepfashion_lower.py') + dataset_info = cfg._cfg_dict['dataset_info'] + elif subset == 'full': + cfg = Config.fromfile( + 'configs/_base_/datasets/deepfashion_full.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - - if subset == 'upper': - assert self.ann_info['num_joints'] == 6 - self.ann_info['flip_pairs'] = [[0, 1], [2, 3], [4, 5]] - self.dataset_name = 'deepfashion_upper' - elif subset == 'lower': - assert self.ann_info['num_joints'] == 4 - self.ann_info['flip_pairs'] = [[0, 1], [2, 3]] - self.dataset_name = 'deepfashion_lower' - elif subset == 'full': - assert self.ann_info['num_joints'] == 8 - self.ann_info['flip_pairs'] = [[0, 1], [2, 3], [4, 5], [6, 7]] - self.dataset_name = 'deepfashion_full' - else: - NotImplementedError() + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - self.dataset_name = 'deepfashion_' + subset self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/hand/__init__.py b/mmpose/datasets/datasets/hand/__init__.py index 5d4d7ebef2..62c4e906d4 100644 --- a/mmpose/datasets/datasets/hand/__init__.py +++ b/mmpose/datasets/datasets/hand/__init__.py @@ -3,7 +3,7 @@ from .interhand2d_dataset import InterHand2DDataset from .interhand3d_dataset import InterHand3DDataset from .onehand10k_dataset import OneHand10KDataset -from .panoptic_dataset import PanopticDataset +from .panoptic_hand2d_dataset import PanopticDataset from .rhd2d_dataset import Rhd2DDataset __all__ = [ diff --git a/mmpose/datasets/datasets/hand/freihand_dataset.py b/mmpose/datasets/datasets/hand/freihand_dataset.py index f73e272407..d3a837b762 100644 --- a/mmpose/datasets/datasets/hand/freihand_dataset.py +++ b/mmpose/datasets/datasets/hand/freihand_dataset.py @@ -1,15 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class FreiHandDataset(HandBaseDataset): +class FreiHandDataset(Kpt2dSviewRgbImgTopDownDataset): """FreiHand dataset for top-down hand pose estimation. `FreiHAND: A Dataset for Markerless Capture of Hand Pose @@ -50,6 +52,7 @@ class FreiHandDataset(HandBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -59,17 +62,26 @@ def __init__(self, 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/freihand2d.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 21 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'freihand' self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/hand/hand_base_dataset.py b/mmpose/datasets/datasets/hand/hand_base_dataset.py deleted file mode 100644 index 2adc413b1b..0000000000 --- a/mmpose/datasets/datasets/hand/hand_base_dataset.py +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright (c) OpenMMLab. All rights reserved. -import copy -from abc import ABCMeta, abstractmethod - -import json_tricks as json -import numpy as np -from torch.utils.data import Dataset -from xtcocotools.coco import COCO - -from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, - keypoint_pck_accuracy) -from mmpose.datasets.pipelines import Compose - - -class HandBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for hand datasets. - - All hand datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_db`, 'evaluate' - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - - self.ann_info['flip_pairs'] = [] - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.coco = COCO(ann_file) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - - self.db = [] - - self.pipeline = Compose(self.pipeline) - - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - - def _xywh2cs(self, x, y, w, h, padding=1.25): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h - - Returns: - center (np.ndarray[float32](2,)): center of the bbox (x, y). - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * padding - - return center, scale - - @abstractmethod - def _get_db(self): - """Load dataset.""" - raise NotImplementedError - - @abstractmethod - def evaluate(self, cfg, preds, output_dir, *args, **kwargs): - """Evaluate keypoint results.""" - raise NotImplementedError - - @staticmethod - def _write_keypoint_results(keypoints, res_file): - """Write results into a json file.""" - - with open(res_file, 'w') as f: - json.dump(keypoints, f, sort_keys=True, indent=4) - - def _report_metric(self, - res_file, - metrics, - pck_thr=0.2, - pckh_thr=0.7, - auc_nor=30): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.2. - pckh_thr (float): PCKh threshold, default as 0.7. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - threshold_head_box = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - if 'PCKh' in metrics: - head_box_thr = item['head_size'] - threshold_head_box.append( - np.array([head_box_thr, head_box_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - threshold_head_box = np.array(threshold_head_box) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'PCKh' in metrics: - _, pckh, _ = keypoint_pck_accuracy(outputs, gts, masks, pckh_thr, - threshold_head_box) - info_str.append(('PCKh', pckh)) - - if 'AUC' in metrics: - info_str.append(('AUC', keypoint_auc(outputs, gts, masks, - auc_nor))) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - - def __len__(self): - """Get the size of the dataset.""" - return len(self.db) - - def __getitem__(self, idx): - """Get the sample given index.""" - results = copy.deepcopy(self.db[idx]) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): - """sort kpts and remove the repeated ones.""" - kpts = sorted(kpts, key=lambda x: x[key]) - num = len(kpts) - for i in range(num - 1, 0, -1): - if kpts[i][key] == kpts[i - 1][key]: - del kpts[i] - - return kpts diff --git a/mmpose/datasets/datasets/hand/interhand2d_dataset.py b/mmpose/datasets/datasets/hand/interhand2d_dataset.py index e3f45223cd..2a653c7a10 100644 --- a/mmpose/datasets/datasets/hand/interhand2d_dataset.py +++ b/mmpose/datasets/datasets/hand/interhand2d_dataset.py @@ -1,16 +1,18 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import json_tricks as json import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class InterHand2DDataset(HandBaseDataset): +class InterHand2DDataset(Kpt2dSviewRgbImgTopDownDataset): """InterHand2.6M 2D dataset for top-down hand pose estimation. `InterHand2.6M: A Dataset and Baseline for 3D Interacting Hand Pose @@ -47,10 +49,13 @@ class InterHand2DDataset(HandBaseDataset): Args: ann_file (str): Path to the annotation file. + camera_file (str): Path to the camera file. + joint_file (str): Path to the joint file. img_prefix (str): Path to a directory where images are held. Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (str): Store True when building test or validation dataset. Default: False. """ @@ -62,16 +67,26 @@ def __init__(self, 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/interhand2d.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 21 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'interhand2d' self.camera_file = camera_file self.joint_file = joint_file self.db = self._get_db() diff --git a/mmpose/datasets/datasets/hand/interhand3d_dataset.py b/mmpose/datasets/datasets/hand/interhand3d_dataset.py index fe73ea7880..348f27f6fb 100644 --- a/mmpose/datasets/datasets/hand/interhand3d_dataset.py +++ b/mmpose/datasets/datasets/hand/interhand3d_dataset.py @@ -1,17 +1,19 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import json_tricks as json import numpy as np +from mmcv import Config from mmpose.core.evaluation.top_down_eval import keypoint_epe from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from .._base_ import Kpt3dSviewRgbImgTopDownDataset @DATASETS.register_module() -class InterHand3DDataset(HandBaseDataset): +class InterHand3DDataset(Kpt3dSviewRgbImgTopDownDataset): """InterHand2.6M 3D dataset for top-down hand pose estimation. `InterHand2.6M: A Dataset and Baseline for 3D Interacting Hand Pose @@ -69,6 +71,8 @@ class InterHand3DDataset(HandBaseDataset): Args: ann_file (str): Path to the annotation file. + camera_file (str): Path to the camera file. + joint_file (str): Path to the joint file. img_prefix (str): Path to a directory where images are held. Default: None. data_cfg (dict): config @@ -76,6 +80,7 @@ class InterHand3DDataset(HandBaseDataset): use_gt_root_depth (bool): Using the ground truth depth of the wrist or given depth from rootnet_result_file. rootnet_result_file (str): Path to the wrist depth file. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (str): Store True when building test or validation dataset. Default: False. """ @@ -89,21 +94,31 @@ def __init__(self, pipeline, use_gt_root_depth=True, rootnet_result_file=None, + 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/interhand3d.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - self.ann_info['flip_pairs'] = [[i, 21 + i] for i in range(21)] + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) - self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 42 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) self.ann_info['heatmap3d_depth_bound'] = data_cfg[ 'heatmap3d_depth_bound'] self.ann_info['heatmap_size_root'] = data_cfg['heatmap_size_root'] self.ann_info['root_depth_bound'] = data_cfg['root_depth_bound'] + self.ann_info['use_different_joint_weights'] = False - self.dataset_name = 'interhand3d' self.camera_file = camera_file self.joint_file = joint_file @@ -117,75 +132,6 @@ def __init__(self, print(f'=> num_images: {self.num_images}') print(f'=> load {len(self.db)} samples') - @staticmethod - def _cam2pixel(cam_coord, f, c): - """Transform the joints from their camera coordinates to their pixel - coordinates. - - Note: - N: number of joints - - Args: - cam_coord (ndarray[N, 3]): 3D joints coordinates - in the camera coordinate system - f (ndarray[2]): focal length of x and y axis - c (ndarray[2]): principal point of x and y axis - - Returns: - img_coord (ndarray[N, 3]): the coordinates (x, y, 0) - in the image plane. - """ - x = cam_coord[:, 0] / (cam_coord[:, 2] + 1e-8) * f[0] + c[0] - y = cam_coord[:, 1] / (cam_coord[:, 2] + 1e-8) * f[1] + c[1] - z = np.zeros_like(x) - img_coord = np.concatenate((x[:, None], y[:, None], z[:, None]), 1) - return img_coord - - @staticmethod - def _world2cam(world_coord, R, T): - """Transform the joints from their world coordinates to their camera - coordinates. - - Note: - N: number of joints - - Args: - world_coord (ndarray[3, N]): 3D joints coordinates - in the world coordinate system - R (ndarray[3, 3]): camera rotation matrix - T (ndarray[3, 1]): camera position (x, y, z) - - Returns: - cam_coord (ndarray[3, N]): 3D joints coordinates - in the camera coordinate system - """ - cam_coord = np.dot(R, world_coord - T) - return cam_coord - - @staticmethod - def _pixel2cam(pixel_coord, f, c): - """Transform the joints from their pixel coordinates to their camera - coordinates. - - Note: - N: number of joints - - Args: - pixel_coord (ndarray[N, 3]): 3D joints coordinates - in the pixel coordinate system - f (ndarray[2]): focal length of x and y axis - c (ndarray[2]): principal point of x and y axis - - Returns: - cam_coord (ndarray[N, 3]): 3D joints coordinates - in the camera coordinate system - """ - x = (pixel_coord[:, 0] - c[0]) / f[0] * pixel_coord[:, 2] - y = (pixel_coord[:, 1] - c[1]) / f[1] * pixel_coord[:, 2] - z = pixel_coord[:, 2] - cam_coord = np.concatenate((x[:, None], y[:, None], z[:, None]), 1) - return cam_coord - @staticmethod def _encode_handtype(hand_type): if hand_type == 'right': diff --git a/mmpose/datasets/datasets/hand/onehand10k_dataset.py b/mmpose/datasets/datasets/hand/onehand10k_dataset.py index 8bd703a269..c24e487ec8 100644 --- a/mmpose/datasets/datasets/hand/onehand10k_dataset.py +++ b/mmpose/datasets/datasets/hand/onehand10k_dataset.py @@ -1,15 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class OneHand10KDataset(HandBaseDataset): +class OneHand10KDataset(Kpt2dSviewRgbImgTopDownDataset): """OneHand10K dataset for top-down hand pose estimation. `Mask-pose Cascaded CNN for 2D Hand Pose Estimation from @@ -50,6 +52,7 @@ class OneHand10KDataset(HandBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -59,17 +62,26 @@ def __init__(self, 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/onehand10k.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 21 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'onehand10k' self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/hand/panoptic_dataset.py b/mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py similarity index 86% rename from mmpose/datasets/datasets/hand/panoptic_dataset.py rename to mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py index dbbee41f42..478f0de1db 100644 --- a/mmpose/datasets/datasets/hand/panoptic_dataset.py +++ b/mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py @@ -1,15 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class PanopticDataset(HandBaseDataset): +class PanopticDataset(Kpt2dSviewRgbImgTopDownDataset): """Panoptic dataset for top-down hand pose estimation. `Hand Keypoint Detection in Single Images using Multiview @@ -50,6 +52,7 @@ class PanopticDataset(HandBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -59,17 +62,26 @@ def __init__(self, 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/panoptic_hand2d.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 21 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'panoptic' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -95,9 +107,9 @@ def _get_db(self): joints_3d[:, :2] = keypoints[:, :2] joints_3d_visible[:, :2] = np.minimum(1, keypoints[:, 2:3]) - # the bbox is the tightest bbox enclosing keypoints - # the paper use 2.2bbox as input - # we use 1.76bbox(2.2 * 0.8) as input + # The bbox is the tightest bbox enclosing keypoints. + # The paper uses 2.2 bbox as the input, while + # we use 1.76 (2.2 * 0.8) bbox as the input. center, scale = self._xywh2cs(*obj['bbox'][:4], 1.76) image_file = os.path.join(self.img_prefix, diff --git a/mmpose/datasets/datasets/hand/rhd2d_dataset.py b/mmpose/datasets/datasets/hand/rhd2d_dataset.py index 314445c6a6..c0becb0c11 100644 --- a/mmpose/datasets/datasets/hand/rhd2d_dataset.py +++ b/mmpose/datasets/datasets/hand/rhd2d_dataset.py @@ -1,15 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class Rhd2DDataset(HandBaseDataset): +class Rhd2DDataset(Kpt2dSviewRgbImgTopDownDataset): """Rendered Handpose Dataset for top-down hand pose estimation. `Learning to Estimate 3D Hand Pose from Single RGB Images' ICCV'2017 @@ -49,6 +51,7 @@ class Rhd2DDataset(HandBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -58,17 +61,26 @@ def __init__(self, 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/rhd2d.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 21 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'rhd2d' self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/mesh/mesh_base_dataset.py b/mmpose/datasets/datasets/mesh/mesh_base_dataset.py index 06756eaed9..79c8a8ac90 100644 --- a/mmpose/datasets/datasets/mesh/mesh_base_dataset.py +++ b/mmpose/datasets/datasets/mesh/mesh_base_dataset.py @@ -38,7 +38,7 @@ def __init__(self, self.image_info = {} self.ann_info = {} - self.annotations_path = ann_file + self.ann_file = ann_file self.img_prefix = img_prefix self.pipeline = pipeline self.test_mode = test_mode diff --git a/mmpose/datasets/datasets/mesh/mosh_dataset.py b/mmpose/datasets/datasets/mesh/mosh_dataset.py index 5dce0793b1..3185265e7d 100644 --- a/mmpose/datasets/datasets/mesh/mosh_dataset.py +++ b/mmpose/datasets/datasets/mesh/mosh_dataset.py @@ -25,7 +25,7 @@ class MoshDataset(Dataset, metaclass=ABCMeta): def __init__(self, ann_file, pipeline, test_mode=False): - self.annotations_path = ann_file + self.ann_file = ann_file self.pipeline = pipeline self.test_mode = test_mode diff --git a/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py b/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py index 245f6a93ba..a0df5c0912 100644 --- a/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py @@ -1,8 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import warnings -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ...builder import DATASETS @@ -41,6 +40,7 @@ class TopDownAicDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -50,61 +50,35 @@ def __init__(self, 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/aic.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + 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) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] 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.ann_info['flip_pairs'] = [[0, 3], [1, 4], [2, 5], [6, 9], [7, 10], - [8, 11]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 12, 13) - self.ann_info['lower_body_ids'] = (6, 7, 8, 9, 10, 11) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/AIChallenger/AI_Challenger_2017/blob/master/' - # 'Evaluation/keypoint_eval/keypoint_eval.py#L50' - # delta = 2 x sigma - self.sigmas = np.array([ - 0.01388152, 0.01515228, 0.01057665, 0.01417709, 0.01497891, - 0.01402144, 0.03909642, 0.03686941, 0.01981803, 0.03843971, - 0.03412318, 0.02415081, 0.01291456, 0.01236173 - ]) - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'aic' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/top_down/topdown_base_dataset.py b/mmpose/datasets/datasets/top_down/topdown_base_dataset.py deleted file mode 100644 index edc008c5b6..0000000000 --- a/mmpose/datasets/datasets/top_down/topdown_base_dataset.py +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) OpenMMLab. All rights reserved. -import copy -from abc import ABCMeta, abstractmethod - -import numpy as np -from torch.utils.data import Dataset - -from mmpose.datasets.pipelines import Compose - - -class TopDownBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for top-down datasets. - - All top-down datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_db` - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - - self.ann_info['flip_pairs'] = None - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.db = [] - self.pipeline = Compose(self.pipeline) - - @abstractmethod - def _get_db(self): - """Load dataset.""" - raise NotImplementedError - - @abstractmethod - def evaluate(self, cfg, preds, output_dir, *args, **kwargs): - """Evaluate keypoint results.""" - raise NotImplementedError - - def __len__(self): - """Get the size of the dataset.""" - return len(self.db) - - def __getitem__(self, idx): - """Get the sample given index.""" - results = copy.deepcopy(self.db[idx]) - results['ann_info'] = self.ann_info - return self.pipeline(results) diff --git a/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py b/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py index 92b51340fa..299035edf5 100644 --- a/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py @@ -5,16 +5,16 @@ import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .topdown_base_dataset import TopDownBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class TopDownCocoDataset(TopDownBaseDataset): +class TopDownCocoDataset(Kpt2dSviewRgbImgTopDownDataset): """CocoDataset dataset for top-down pose estimation. `Microsoft COCO: Common Objects in Context' ECCV'2014 @@ -50,6 +50,7 @@ class TopDownCocoDataset(TopDownBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -59,88 +60,40 @@ def __init__(self, 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.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + 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) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] 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.ann_info['flip_pairs'] = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], - [11, 12], [13, 14], [15, 16]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) - self.ann_info['lower_body_ids'] = (11, 12, 13, 14, 15, 16) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, - 1.2, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/' - # 'pycocotools/cocoeval.py#L523' - self.sigmas = np.array([ - .26, .25, .25, .35, .35, .79, .79, .72, .72, .62, .62, 1.07, 1.07, - .87, .87, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'coco' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') print(f'=> load {len(self.db)} samples') - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - def _get_db(self): """Load dataset.""" if (not self.test_mode) or self.use_gt_bbox: @@ -226,37 +179,6 @@ def _load_coco_keypoint_annotation_kernel(self, img_id): return rec - def _xywh2cs(self, x, y, w, h): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h - - Returns: - tuple: A tuple containing center and scale. - - - center (np.ndarray[float32](2,)): center of the bbox (x, y). - - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * 1.25 - - return center, scale - def _load_coco_person_detection_results(self): """Load coco person detection results.""" num_joints = self.ann_info['num_joints'] diff --git a/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py b/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py index 29eb8311de..6910279f3a 100644 --- a/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py @@ -3,7 +3,7 @@ import warnings import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ...builder import DATASETS @@ -35,6 +35,7 @@ class TopDownCocoWholeBodyDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -44,32 +45,35 @@ def __init__(self, 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, test_mode=test_mode) + 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) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] 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.ann_info['flip_pairs'] = self._make_flip_pairs() - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) - self.ann_info['lower_body_ids'] = (11, 12, 13, 14, 15, 16) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) self.body_num = 17 self.foot_num = 6 @@ -77,82 +81,11 @@ def __init__(self, self.left_hand_num = 21 self.right_hand_num = 21 - # 'https://github.com/jin-s13/COCO-WholeBody/blob/master/' - # 'evaluation/myeval_wholebody.py#L170' - self.sigmas_body = [ - 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, - 0.062, 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 - ] - self.sigmas_foot = [0.068, 0.066, 0.066, 0.092, 0.094, 0.094] - self.sigmas_face = [ - 0.042, 0.043, 0.044, 0.043, 0.040, 0.035, 0.031, 0.025, 0.020, - 0.023, 0.029, 0.032, 0.037, 0.038, 0.043, 0.041, 0.045, 0.013, - 0.012, 0.011, 0.011, 0.012, 0.012, 0.011, 0.011, 0.013, 0.015, - 0.009, 0.007, 0.007, 0.007, 0.012, 0.009, 0.008, 0.016, 0.010, - 0.017, 0.011, 0.009, 0.011, 0.009, 0.007, 0.013, 0.008, 0.011, - 0.012, 0.010, 0.034, 0.008, 0.008, 0.009, 0.008, 0.008, 0.007, - 0.010, 0.008, 0.009, 0.009, 0.009, 0.007, 0.007, 0.008, 0.011, - 0.008, 0.008, 0.008, 0.01, 0.008 - ] - self.sigmas_lefthand = [ - 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, 0.035, - 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, - 0.019, 0.022, 0.031 - ] - self.sigmas_righthand = [ - 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, 0.035, - 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, - 0.019, 0.022, 0.031 - ] - - self.sigmas_wholebody = ( - self.sigmas_body + self.sigmas_foot + self.sigmas_face + - self.sigmas_lefthand + self.sigmas_righthand) - - self.sigmas = np.array(self.sigmas_wholebody) - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'coco_wholebody' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') print(f'=> load {len(self.db)} samples') - @staticmethod - def _make_flip_pairs(): - body = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], - [15, 16]] - foot = [[17, 20], [18, 21], [19, 22]] - - face = [[23, 39], [24, 38], [25, 37], [26, 36], [27, 35], [28, 34], - [29, 33], [30, 32], [40, 49], [41, 48], [42, 47], [43, 46], - [44, 45], [54, 58], [55, 57], [59, 68], [60, 67], [61, 66], - [62, 65], [63, 70], [64, 69], [71, 77], [72, 76], [73, 75], - [78, 82], [79, 81], [83, 87], [84, 86], [88, 90]] - - hand = [[91, 112], [92, 113], [93, 114], [94, 115], [95, 116], - [96, 117], [97, 118], [98, 119], [99, 120], [100, 121], - [101, 122], [102, 123], [103, 124], [104, 125], [105, 126], - [106, 127], [107, 128], [108, 129], [109, 130], [110, 131], - [111, 132]] - - return body + foot + face + hand - def _load_coco_keypoint_annotation_kernel(self, img_id): """load annotation from COCOAPI. @@ -257,11 +190,16 @@ def _do_python_keypoint_eval(self, res_file): """Keypoint evaluation using COCOAPI.""" coco_det = self.coco.loadRes(res_file) + cuts = np.cumsum([ + 0, self.body_num, self.foot_num, self.face_num, self.left_hand_num, + self.right_hand_num + ]) + coco_eval = COCOeval( self.coco, coco_det, 'keypoints_body', - np.array(self.sigmas_body), + self.sigmas[cuts[0]:cuts[1]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -272,7 +210,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_foot', - np.array(self.sigmas_foot), + self.sigmas[cuts[1]:cuts[2]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -283,7 +221,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_face', - np.array(self.sigmas_face), + self.sigmas[cuts[2]:cuts[3]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -294,7 +232,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_lefthand', - np.array(self.sigmas_lefthand), + self.sigmas[cuts[3]:cuts[4]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -305,7 +243,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_righthand', - np.array(self.sigmas_righthand), + self.sigmas[cuts[4]:cuts[5]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -316,7 +254,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_wholebody', - np.array(self.sigmas_wholebody), + self.sigmas, use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() diff --git a/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py b/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py index 0c8134fb35..200a08ecf1 100644 --- a/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py @@ -1,8 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import warnings -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ...builder import DATASETS @@ -39,6 +38,7 @@ class TopDownCrowdPoseDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -48,67 +48,35 @@ def __init__(self, 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/crowdpose.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + 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) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] 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.ann_info['flip_pairs'] = [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], - [10, 11]] - - self.ann_info['joint_to_joint'] = {} - for pair in self.ann_info['flip_pairs']: - self.ann_info['joint_to_joint'][pair[0]] = pair[1] - self.ann_info['joint_to_joint'][pair[1]] = pair[0] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 12, 13) - self.ann_info['lower_body_ids'] = (6, 7, 8, 9, 10, 11) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 0.2, 0.2, 0.2, 1.3, 1.5, 0.2, 1.3, 1.5, 0.2, 0.2, 0.5, 0.2, - 0.2, 0.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/Jeff-sjtu/CrowdPose/blob/master/crowdpose-api/' - # 'PythonAPI/crowdposetools/cocoeval.py#L224' - self.sigmas = np.array([ - .79, .79, .72, .72, .62, .62, 1.07, 1.07, .87, .87, .89, .89, .79, - .79 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'crowdpose' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py b/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py index d167c5113d..ef060b1c04 100644 --- a/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py @@ -1,19 +1,18 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import (keypoint_epe, - keypoint_pck_accuracy) from ...builder import DATASETS -from .topdown_base_dataset import TopDownBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class TopDownH36MDataset(TopDownBaseDataset): +class TopDownH36MDataset(Kpt2dSviewRgbImgTopDownDataset): """Human3.6M dataset for top-down 2D pose estimation. `Human3.6M: Large Scale Datasets and Predictive Methods for 3D Human @@ -46,6 +45,7 @@ class TopDownH36MDataset(TopDownBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -55,83 +55,31 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super(TopDownH36MDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - assert self.ann_info['num_joints'] == 17 + 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/h36m.py') + dataset_info = cfg._cfg_dict['dataset_info'] + + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) - self.ann_info['flip_pairs'] = [[1, 4], [2, 5], [3, 6], [11, 14], - [12, 15], [13, 16]] - self.ann_info['upper_body_ids'] = (0, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16) - self.ann_info['lower_body_ids'] = (1, 2, 3, 4, 5, 6) self.ann_info['use_different_joint_weights'] = False - - self.ann_info['joint_weights'] = np.ones( - (self.ann_info['num_joints'], 1), dtype=np.float32) - - self.coco = COCO(ann_file) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - - self.dataset_name = 'h36m' self.db = self._get_db() print(f'=> num_images: {self.num_images}') print(f'=> load {len(self.db)} samples') - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - - def _xywh2cs(self, x, y, w, h, padding=1.): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h - - Returns: - center (np.ndarray[float32](2,)): center of the bbox (x, y). - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * padding - - return center, scale - def _get_db(self): """Load dataset.""" gt_db = [] @@ -237,64 +185,6 @@ def evaluate(self, outputs, res_folder, metric, **kwargs): return name_value - def _report_metric(self, res_file, metrics, pck_thr=0.05): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.05. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - - def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): - """sort kpts and remove the repeated ones.""" - kpts = sorted(kpts, key=lambda x: x[key]) - num = len(kpts) - for i in range(num - 1, 0, -1): - if kpts[i][key] == kpts[i - 1][key]: - del kpts[i] - - return kpts - @staticmethod def _write_keypoint_results(keypoints, res_file): """Write results into a json file.""" diff --git a/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py index a38fa33e94..7db086b246 100644 --- a/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py @@ -5,7 +5,7 @@ import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from mmpose.core.evaluation.top_down_eval import keypoint_pck_accuracy from ...builder import DATASETS @@ -46,6 +46,7 @@ class TopDownJhmdbDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -55,60 +56,34 @@ def __init__(self, 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/jhmdb.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + 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) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] 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.ann_info['flip_pairs'] = [[3, 4], [5, 6], [7, 8], [9, 10], - [9, 10], [11, 12], [13, 14]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 7, 8, 11, 12) - self.ann_info['lower_body_ids'] = (5, 6, 9, 10, 13, 14) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.2, 1.2, 1.5, 1.5, 1.5, - 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # Adapted from COCO dataset - self.sigmas = np.array([ - .25, 1.07, .25, .79, .79, 1.07, 1.07, .72, .72, .87, .87, .62, .62, - .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'jhmdb' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py index cd6d5ada16..148963768b 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py @@ -1,8 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import warnings -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ...builder import DATASETS @@ -52,6 +51,7 @@ class TopDownMhpDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -61,9 +61,24 @@ def __init__(self, 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/mhp.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + 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'] @@ -78,45 +93,8 @@ def __init__(self, self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.bbox_thr = data_cfg['bbox_thr'] - - self.ann_info['flip_pairs'] = [[0, 5], [1, 4], [2, 3], [10, 15], - [11, 14], [12, 13]] - - self.ann_info['upper_body_ids'] = (7, 8, 9, 10, 11, 12, 13, 14, 15) - self.ann_info['lower_body_ids'] = (0, 1, 2, 3, 4, 5, 6) self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1.5, 1.2, 1., 1., 1.2, 1.5, 1., 1., 1., 1., 1.5, 1.2, 1., 1., - 1.2, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # Adapted from COCO dataset. - self.sigmas = np.array([ - .89, .83, 1.07, 1.07, .83, .89, .26, .26, .26, .26, .62, .72, 1.79, - 1.79, .72, .62 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'mhp' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py index e1fbfcc6bf..1f58c0b151 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py @@ -1,17 +1,19 @@ # Copyright (c) OpenMMLab. All rights reserved. import json import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from scipy.io import loadmat, savemat from ...builder import DATASETS -from .topdown_base_dataset import TopDownBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class TopDownMpiiDataset(TopDownBaseDataset): +class TopDownMpiiDataset(Kpt2dSviewRgbImgTopDownDataset): """MPII Dataset for top-down pose estimation. `2D Human Pose Estimation: New Benchmark and State of the Art Analysis' @@ -46,6 +48,7 @@ class TopDownMpiiDataset(TopDownBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -55,23 +58,25 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - - self.ann_file = ann_file - self.ann_info['flip_pairs'] = [[0, 5], [1, 4], [2, 3], [10, 15], - [11, 14], [12, 13]] - self.ann_info['upper_body_ids'] = (7, 8, 9, 10, 11, 12, 13, 14, 15) - self.ann_info['lower_body_ids'] = (0, 1, 2, 3, 4, 5, 6) - self.ann_info['use_different_joint_weights'] = 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/mpii.py') + dataset_info = cfg._cfg_dict['dataset_info'] - assert self.ann_info['num_joints'] == 16 - self.ann_info['joint_weights'] = np.ones( - (self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'mpii' + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + coco_style=False, + test_mode=test_mode) self.db = self._get_db() self.image_set = set(x['image_file'] for x in self.db) @@ -90,8 +95,8 @@ def _get_db(self): for a in anno: image_name = a['image'] - center = np.array(a['center'], dtype=float) - scale = np.array([a['scale'], a['scale']], dtype=float) + center = np.array(a['center'], dtype=np.float32) + scale = np.array([a['scale'], a['scale']], dtype=np.float32) # Adjust center/scale slightly to avoid cropping limbs if center[0] != -1: diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py index c8e79da08d..9bf9dcb32c 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py @@ -2,17 +2,19 @@ import copy as cp import os import os.path as osp +import warnings from collections import OrderedDict import json_tricks as json import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .topdown_base_dataset import TopDownBaseDataset +from .._base_ import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class TopDownMpiiTrbDataset(TopDownBaseDataset): +class TopDownMpiiTrbDataset(Kpt2dSviewRgbImgTopDownDataset): """MPII-TRB Dataset dataset for top-down pose estimation. `TRB: A Novel Triplet Representation for Understanding 2D Human Body` @@ -72,6 +74,7 @@ class TopDownMpiiTrbDataset(TopDownBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -81,30 +84,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - - # flip_pairs in MPII-TRB - self.ann_info['flip_pairs'] = [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], - [10, 11], [14, 15], [16, 22], [28, 34], - [17, 23], [29, 35], [18, 24], [30, 36], - [19, 25], [31, 37], [20, 26], [32, 38], - [21, 27], [33, 39]] + 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/mpii_trb.py') + dataset_info = cfg._cfg_dict['dataset_info'] - self.ann_info['upper_body_ids'] = [0, 1, 2, 3, 4, 5, 12, 13] - self.ann_info['lower_body_ids'] = [6, 7, 8, 9, 10, 11] - self.ann_info['upper_body_ids'].extend(list(range(14, 28))) - self.ann_info['lower_body_ids'].extend(list(range(28, 40))) + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - - assert self.ann_info['num_joints'] == 40 - self.ann_info['joint_weights'] = np.ones( - (self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'mpii_trb' self.db = self._get_db(ann_file) self.image_set = set(x['image_file'] for x in self.db) self.num_images = len(self.image_set) diff --git a/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py b/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py index 5c66447ef1..0392f67415 100644 --- a/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py @@ -1,8 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import warnings -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from ...builder import DATASETS from .topdown_coco_dataset import TopDownCocoDataset @@ -48,6 +47,7 @@ class TopDownOCHumanDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -57,62 +57,35 @@ def __init__(self, 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/ochuman.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + 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) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] 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.ann_info['flip_pairs'] = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], - [11, 12], [13, 14], [15, 16]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) - self.ann_info['lower_body_ids'] = (11, 12, 13, 14, 15, 16) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, - 1.2, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/liruilong940607/Pose2Seg/blob/' - # '64fcc5e0ee7b85c32f4be2771ce810a41b9fcb38/test.py#L50' - self.sigmas = np.array([ - .26, .25, .25, .35, .35, .79, .79, .72, .72, .62, .62, 1.07, 1.07, - .87, .87, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'ochuman' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py b/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py index 13ad86e782..c2b7af6271 100644 --- a/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py @@ -6,9 +6,9 @@ import json_tricks as json import numpy as np +from mmcv import Config from poseval import eval_helpers from poseval.evaluateAP import evaluateAP -from xtcocotools.coco import COCO from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS @@ -51,6 +51,7 @@ class TopDownPoseTrack18Dataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -60,61 +61,35 @@ def __init__(self, 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/posetrack18.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + 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) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] 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.ann_info['flip_pairs'] = [[3, 4], [5, 6], [7, 8], [9, 10], - [11, 12], [13, 14], [15, 16]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) - self.ann_info['lower_body_ids'] = (11, 12, 13, 14, 15, 16) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, - 1.2, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # Adapted from COCO dataset - self.sigmas = np.array([ - .26, .25, .25, .35, .35, .79, .79, .72, .72, .62, .62, 1.07, 1.07, - .87, .87, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'posetrack18' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -152,8 +127,8 @@ def evaluate(self, outputs, res_folder, metric='mAP', **kwargs): pred_folder = osp.join(res_folder, 'preds') os.makedirs(pred_folder, exist_ok=True) gt_folder = osp.join( - osp.dirname(self.annotations_path), - osp.splitext(self.annotations_path.split('_')[-1])[0]) + osp.dirname(self.ann_file), + osp.splitext(self.ann_file.split('_')[-1])[0]) kpts = defaultdict(list) diff --git a/mmpose/datasets/pipelines/bottom_up_transform.py b/mmpose/datasets/pipelines/bottom_up_transform.py index f556bd866c..2a8e4fd797 100644 --- a/mmpose/datasets/pipelines/bottom_up_transform.py +++ b/mmpose/datasets/pipelines/bottom_up_transform.py @@ -118,9 +118,9 @@ def _resize_align_multi_scale_udp(image, input_size, current_scale, min_scale): trans = get_warp_matrix( theta=0, - size_input=np.array(scale, dtype=float), - size_dst=np.array(size_resized, dtype=float) - 1.0, - size_target=np.array(scale, dtype=float)) + size_input=np.array(scale, dtype=np.float32), + size_dst=np.array(size_resized, dtype=np.float32) - 1.0, + size_target=np.array(scale, dtype=np.float32)) image_resized = cv2.warpAffine( image.copy(), trans, size_resized, flags=cv2.INTER_LINEAR) @@ -458,8 +458,8 @@ def __call__(self, results): theta=aug_rot, size_input=center * 2.0, size_dst=np.array( - (_output_size, _output_size), dtype=float) - 1.0, - size_target=np.array((scale, scale), dtype=float)) + (_output_size, _output_size), dtype=np.float32) - 1.0, + size_target=np.array((scale, scale), dtype=np.float32)) mask[i] = cv2.warpAffine( (mask[i] * 255).astype(np.uint8), trans, (int(_output_size), int(_output_size)), @@ -473,8 +473,9 @@ def __call__(self, results): theta=aug_rot, size_input=center * 2.0, size_dst=np.array( - (self.input_size, self.input_size), dtype=float) - 1.0, - size_target=np.array((scale, scale), dtype=float)) + (self.input_size, self.input_size), dtype=np.float32) - + 1.0, + size_target=np.array((scale, scale), dtype=np.float32)) image = cv2.warpAffine( image, mat_input, (int(self.input_size), int(self.input_size)), diff --git a/mmpose/deprecated.py b/mmpose/deprecated.py index 11937b2a34..03e3425a85 100644 --- a/mmpose/deprecated.py +++ b/mmpose/deprecated.py @@ -2,7 +2,7 @@ import warnings from .datasets.builder import DATASETS -from .datasets.datasets.top_down.topdown_base_dataset import TopDownBaseDataset +from .datasets.datasets._base_ import Kpt2dSviewRgbImgTopDownDataset from .models.builder import HEADS, POSENETS from .models.detectors import AssociativeEmbedding from .models.heads import (AEHigherResolutionHead, AESimpleHead, @@ -13,7 +13,7 @@ @DATASETS.register_module() -class TopDownFreiHandDataset(TopDownBaseDataset): +class TopDownFreiHandDataset(Kpt2dSviewRgbImgTopDownDataset): """Deprecated TopDownFreiHandDataset.""" def __init__(self, *args, **kwargs): @@ -30,7 +30,7 @@ def evaluate(self, cfg, preds, output_dir, *args, **kwargs): @DATASETS.register_module() -class TopDownOneHand10KDataset(TopDownBaseDataset): +class TopDownOneHand10KDataset(Kpt2dSviewRgbImgTopDownDataset): """Deprecated TopDownOneHand10KDataset.""" def __init__(self, *args, **kwargs): @@ -47,7 +47,7 @@ def evaluate(self, cfg, preds, output_dir, *args, **kwargs): @DATASETS.register_module() -class TopDownPanopticDataset(TopDownBaseDataset): +class TopDownPanopticDataset(Kpt2dSviewRgbImgTopDownDataset): """Deprecated TopDownPanopticDataset.""" def __init__(self, *args, **kwargs): diff --git a/mmpose/models/detectors/associative_embedding.py b/mmpose/models/detectors/associative_embedding.py index a3bbec98e2..690159055e 100644 --- a/mmpose/models/detectors/associative_embedding.py +++ b/mmpose/models/detectors/associative_embedding.py @@ -306,7 +306,7 @@ def show_result(self, kpt_score_thr=0.3, bbox_color=None, pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, radius=4, thickness=1, font_scale=0.5, @@ -322,12 +322,13 @@ def show_result(self, result (list[dict]): The results to draw over `img` (bbox_result, pose_result). skeleton (list[list]): The connection of keypoints. + skeleton is 0-based indexing. kpt_score_thr (float, optional): Minimum score of keypoints to be shown. Default: 0.3. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Color of M limbs. - If None, do not draw limbs. + pose_link_color (np.array[Mx3]): Color of M links. + If None, do not draw links. radius (int): Radius of circles. thickness (int): Thickness of lines. font_scale (float): Font scales of texts. @@ -353,7 +354,7 @@ def show_result(self, pose_result.append(res['keypoints']) imshow_keypoints(img, pose_result, skeleton, kpt_score_thr, - pose_kpt_color, pose_limb_color, radius, thickness) + pose_kpt_color, pose_link_color, radius, thickness) if show: imshow(img, win_name, wait_time) diff --git a/mmpose/models/detectors/interhand_3d.py b/mmpose/models/detectors/interhand_3d.py index 444cb3c6b1..5ea1eca069 100644 --- a/mmpose/models/detectors/interhand_3d.py +++ b/mmpose/models/detectors/interhand_3d.py @@ -109,7 +109,7 @@ def show_result(self, bbox_color='green', thickness=2, pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, vis_height=400, num_instances=-1, win_name='', @@ -128,7 +128,7 @@ def show_result(self, - "title" (str): title for the subplot img (str or Tensor): Optional. The image to visualize 2D inputs on. skeleton (list of [idx_i,idx_j]): Skeleton described by a list of - limbs, each is a pair of joint indices. + links, each is a pair of joint indices. kpt_score_thr (float, optional): Minimum score of keypoints to be shown. Default: 0.3. radius (int): Radius of circles. @@ -136,7 +136,7 @@ def show_result(self, thickness (int): Thickness of lines. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Color of M limbs. + pose_link_color (np.array[Mx3]): Color of M limbs. If None, do not draw limbs. vis_height (int): The image hight of the visualization. The width will be N*vis_height depending on the number of visualized @@ -196,7 +196,7 @@ def show_result(self, skeleton, kpt_score_thr=kpt_score_thr, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, radius=radius, thickness=thickness) img = mmcv.imrescale(img, scale=vis_height / img.shape[0]) @@ -206,7 +206,7 @@ def show_result(self, img, skeleton, pose_kpt_color, - pose_limb_color, + pose_link_color, vis_height, axis_limit=300, axis_azimuth=-115, diff --git a/mmpose/models/detectors/pose_lifter.py b/mmpose/models/detectors/pose_lifter.py index 141cf5a3db..b30b7cffd5 100644 --- a/mmpose/models/detectors/pose_lifter.py +++ b/mmpose/models/detectors/pose_lifter.py @@ -4,7 +4,7 @@ import mmcv import numpy as np -from mmpose.core import imshow_bboxes, imshow_keypoints, imshow_keypoints_3d +from mmpose.core import imshow_keypoints, imshow_keypoints_3d from .. import builder from ..builder import POSENETS from .base import BasePose @@ -290,11 +290,10 @@ def show_result(self, img=None, skeleton=None, pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, radius=8, thickness=2, vis_height=400, - num_instances=-1, win_name='', show=False, wait_time=0, @@ -311,20 +310,16 @@ def show_result(self, - "title" (str): title for the subplot img (str or Tensor): Optional. The image to visualize 2D inputs on. skeleton (list of [idx_i,idx_j]): Skeleton described by a list of - limbs, each is a pair of joint indices. + links, each is a pair of joint indices. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Color of M limbs. - If None, do not draw limbs. + pose_link_color (np.array[Mx3]): Color of M links. + If None, do not draw links. radius (int): Radius of circles. thickness (int): Thickness of lines. vis_height (int): The image hight of the visualization. The width will be N*vis_height depending on the number of visualized items. - num_instances (int): Number of instances to be shown in 3D. If - smaller than 0, all the instances in the pose_result will be - shown. Otherwise, pad or truncate the pose_result to a length - of num_instances. win_name (str): The window name. wait_time (int): Value of waitKey param. Default: 0. @@ -374,7 +369,7 @@ def show_result(self, skeleton, kpt_score_thr=0.3, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, radius=radius, thickness=thickness) img = mmcv.imrescale(img, scale=vis_height / img.shape[0]) @@ -384,7 +379,7 @@ def show_result(self, img, skeleton, pose_kpt_color, - pose_limb_color, + pose_link_color, vis_height, num_instances=num_instances) diff --git a/mmpose/models/detectors/top_down.py b/mmpose/models/detectors/top_down.py index a037288bed..b371265347 100644 --- a/mmpose/models/detectors/top_down.py +++ b/mmpose/models/detectors/top_down.py @@ -222,7 +222,7 @@ def show_result(self, kpt_score_thr=0.3, bbox_color='green', pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, text_color='white', radius=4, thickness=1, @@ -240,13 +240,14 @@ def show_result(self, result (list[dict]): The results to draw over `img` (bbox_result, pose_result). skeleton (list[list]): The connection of keypoints. + skeleton is 0-based indexing. kpt_score_thr (float, optional): Minimum score of keypoints to be shown. Default: 0.3. bbox_color (str or tuple or :obj:`Color`): Color of bbox lines. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Color of M limbs. - If None, do not draw limbs. + pose_link_color (np.array[Mx3]): Color of M links. + If None, do not draw links. text_color (str or tuple or :obj:`Color`): Color of texts. radius (int): Radius of circles. thickness (int): Thickness of lines. @@ -290,7 +291,7 @@ def show_result(self, show=False) imshow_keypoints(img, pose_result, skeleton, kpt_score_thr, - pose_kpt_color, pose_limb_color, radius, + pose_kpt_color, pose_link_color, radius, thickness) if show: diff --git a/tests/test_datasets/test_animal_dataset.py b/tests/test_datasets/test_animal_dataset.py index f46c03475a..0bd263b2fe 100644 --- a/tests/test_datasets/test_animal_dataset.py +++ b/tests/test_datasets/test_animal_dataset.py @@ -99,6 +99,7 @@ def test_animal_horse10_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'horse10' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 3 _ = custom_dataset[0] @@ -154,6 +155,7 @@ def test_animal_fly_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'fly' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -210,6 +212,7 @@ def test_animal_locust_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'locust' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -259,6 +262,7 @@ def test_animal_zebra_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'zebra' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -316,6 +320,7 @@ def test_animal_ATRW_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'atrw' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -375,6 +380,7 @@ def test_animal_Macaque_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'macaque' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -438,6 +444,7 @@ def test_animalpose_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'animalpose' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] diff --git a/tests/test_datasets/test_body3d_dataset.py b/tests/test_datasets/test_body3d_dataset.py index 27d25ba6ce..002aa09a53 100644 --- a/tests/test_datasets/test_body3d_dataset.py +++ b/tests/test_datasets/test_body3d_dataset.py @@ -37,6 +37,7 @@ def test_body3d_h36m_dataset(): pipeline=[], test_mode=True) + assert custom_dataset.dataset_name == 'h36m' assert custom_dataset.test_mode is True _ = custom_dataset[0] @@ -152,6 +153,7 @@ def test_body3d_semi_supervision_dataset(): dataset_class = DATASETS.get(dataset) custom_dataset = dataset_class(labeled_dataset, unlabeled_dataset) item = custom_dataset[0] + assert custom_dataset.labeled_dataset.dataset_name == 'h36m' assert 'unlabeled_input' in item.keys() unlabeled_dataset = build_dataset(unlabeled_dataset) diff --git a/tests/test_datasets/test_bottom_up_dataset.py b/tests/test_datasets/test_bottom_up_dataset.py index 02365e9b2f..3ec3a4ea5d 100644 --- a/tests/test_datasets/test_bottom_up_dataset.py +++ b/tests/test_datasets/test_bottom_up_dataset.py @@ -85,9 +85,9 @@ def test_bottom_up_COCO_dataset(): pipeline=[], test_mode=True) + assert custom_dataset.dataset_name == 'coco' assert custom_dataset.num_images == 4 _ = custom_dataset[0] - assert custom_dataset.dataset_name == 'coco' outputs = convert_coco_to_output(custom_dataset.coco) with tempfile.TemporaryDirectory() as tmpdir: @@ -136,11 +136,12 @@ def test_bottom_up_CrowdPose_dataset(): pipeline=[], test_mode=True) + assert custom_dataset.dataset_name == 'crowdpose' + image_id = 103319 assert image_id in custom_dataset.img_ids assert len(custom_dataset.img_ids) == 2 _ = custom_dataset[0] - assert custom_dataset.dataset_name == 'crowdpose' outputs = convert_coco_to_output(custom_dataset.coco) with tempfile.TemporaryDirectory() as tmpdir: @@ -191,11 +192,12 @@ def test_bottom_up_MHP_dataset(): pipeline=[], test_mode=True) + assert custom_dataset.dataset_name == 'mhp' + image_id = 2889 assert image_id in custom_dataset.img_ids assert len(custom_dataset.img_ids) == 2 _ = custom_dataset[0] - assert custom_dataset.dataset_name == 'mhp' outputs = convert_coco_to_output(custom_dataset.coco) with tempfile.TemporaryDirectory() as tmpdir: @@ -245,6 +247,8 @@ def test_bottom_up_AIC_dataset(): pipeline=[], test_mode=True) + assert custom_dataset.dataset_name == 'aic' + image_id = 1 assert image_id in custom_dataset.img_ids assert len(custom_dataset.img_ids) == 3 diff --git a/tests/test_datasets/test_dataset_info.py b/tests/test_datasets/test_dataset_info.py new file mode 100644 index 0000000000..4438e9aee8 --- /dev/null +++ b/tests/test_datasets/test_dataset_info.py @@ -0,0 +1,76 @@ +from mmpose.datasets import DatasetInfo + + +def test_dataset_info(): + dataset_info = dict( + dataset_name='zebra', + paper_info=dict( + author='Graving, Jacob M and Chae, Daniel and Naik, Hemal and ' + 'Li, Liang and Koger, Benjamin and Costelloe, Blair R and ' + 'Couzin, Iain D', + title='DeepPoseKit, a software toolkit for fast and robust ' + 'animal pose estimation using deep learning', + container='Elife', + year='2019', + homepage='https://github.com/jgraving/DeepPoseKit-Data', + ), + keypoint_info={ + 0: + dict(name='snout', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='head', id=1, color=[255, 255, 255], type='', swap=''), + 2: + dict(name='neck', id=2, color=[255, 255, 255], type='', swap=''), + 3: + dict( + name='forelegL1', + id=3, + color=[255, 255, 255], + type='', + swap='forelegR1'), + 4: + dict( + name='forelegR1', + id=4, + color=[255, 255, 255], + type='', + swap='forelegL1'), + 5: + dict( + name='hindlegL1', + id=5, + color=[255, 255, 255], + type='', + swap='hindlegR1'), + 6: + dict( + name='hindlegR1', + id=6, + color=[255, 255, 255], + type='', + swap='hindlegL1'), + 7: + dict( + name='tailbase', id=7, color=[255, 255, 255], type='', + swap=''), + 8: + dict( + name='tailtip', id=8, color=[255, 255, 255], type='', swap='') + }, + skeleton_info={ + 0: dict(link=('head', 'snout'), id=0, color=[255, 255, 255]), + 1: dict(link=('neck', 'head'), id=1, color=[255, 255, 255]), + 2: dict(link=('forelegL1', 'neck'), id=2, color=[255, 255, 255]), + 3: dict(link=('forelegR1', 'neck'), id=3, color=[255, 255, 255]), + 4: + dict(link=('hindlegL1', 'tailbase'), id=4, color=[255, 255, 255]), + 5: + dict(link=('hindlegR1', 'tailbase'), id=5, color=[255, 255, 255]), + 6: dict(link=('tailbase', 'neck'), id=6, color=[255, 255, 255]), + 7: dict(link=('tailtip', 'tailbase'), id=7, color=[255, 255, 255]) + }, + joint_weights=[1.] * 9, + sigmas=[]) + + dataset_info = DatasetInfo(dataset_info) + assert dataset_info.keypoint_num == len(dataset_info.flip_index) diff --git a/tests/test_datasets/test_face_dataset.py b/tests/test_datasets/test_face_dataset.py index 730357489c..adde24977d 100644 --- a/tests/test_datasets/test_face_dataset.py +++ b/tests/test_datasets/test_face_dataset.py @@ -97,6 +97,7 @@ def test_face_300W_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == '300w' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -148,6 +149,7 @@ def test_face_AFLW_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'aflw' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -199,6 +201,60 @@ def test_face_WFLW_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'wflw' + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['NME']) + assert_almost_equal(infos['NME'], 0.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_face_COFW_dataset(): + dataset = 'FaceCOFWDataset' + # test Face COFW datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=29, + dataset_joints=29, + dataset_channel=[ + list(range(29)), + ], + inference_channel=list(range(29))) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + _ = dataset_class( + ann_file='tests/data/cofw/test_cofw.json', + img_prefix='tests/data/cofw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + custom_dataset = dataset_class( + ann_file='tests/data/cofw/test_cofw.json', + img_prefix='tests/data/cofw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.dataset_name == 'cofw' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] diff --git a/tests/test_datasets/test_hand_dataset.py b/tests/test_datasets/test_hand_dataset.py index de0bc2c664..f773e84710 100644 --- a/tests/test_datasets/test_hand_dataset.py +++ b/tests/test_datasets/test_hand_dataset.py @@ -95,6 +95,7 @@ def test_top_down_OneHand10K_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'onehand10k' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 4 _ = custom_dataset[0] @@ -151,6 +152,7 @@ def test_top_down_FreiHand_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'freihand' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 8 _ = custom_dataset[0] @@ -207,6 +209,7 @@ def test_top_down_RHD_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'rhd2d' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 3 _ = custom_dataset[0] @@ -263,6 +266,7 @@ def test_top_down_Panoptic_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'panoptic_hand2d' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 4 _ = custom_dataset[0] @@ -324,6 +328,7 @@ def test_top_down_InterHand2D_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'interhand2d' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 4 assert len(custom_dataset.db) == 6 @@ -392,6 +397,7 @@ def test_top_down_InterHand3D_dataset(): pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'interhand3d' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 4 assert len(custom_dataset.db) == 4 diff --git a/tests/test_visualization.py b/tests/test_visualization.py index 88caa76941..0f6e36732d 100644 --- a/tests/test_visualization.py +++ b/tests/test_visualization.py @@ -13,15 +13,15 @@ def test_imshow_keypoints(): img = np.zeros((100, 100, 3), dtype=np.uint8) kpts = np.array([[1, 1, 1], [10, 10, 1]], dtype=np.float32) pose_result = [kpts] - skeleton = [[1, 2]] + skeleton = [[0, 1]] pose_kpt_color = [(127, 127, 127)] * len(kpts) - pose_limb_color = [(127, 127, 127)] * len(skeleton) + pose_link_color = [(127, 127, 127)] * len(skeleton) img_vis_2d = imshow_keypoints( img, pose_result, skeleton=skeleton, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, show_keypoint_weight=True) # 3D keypoint @@ -32,7 +32,7 @@ def test_imshow_keypoints(): img=img_vis_2d, skeleton=skeleton, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, vis_height=400) From d1a643badbd4b994a55a747ac6ae9f37916d204d Mon Sep 17 00:00:00 2001 From: ly015 Date: Mon, 23 Aug 2021 11:34:18 +0800 Subject: [PATCH 11/19] fix lint --- mmpose/apis/inference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmpose/apis/inference.py b/mmpose/apis/inference.py index b5f90cc711..33f760218a 100644 --- a/mmpose/apis/inference.py +++ b/mmpose/apis/inference.py @@ -161,7 +161,7 @@ def _inference_single_pose_model(model, bboxes (list | np.ndarray): All bounding boxes (with scores), shaped (N, 4) or (N, 5). (left, top, width, height, [score]) where N is number of bounding boxes. - dataset (str): Dataset name. Deprecated. + dataset (str): Dataset name. Deprecated. dataset_info (DatasetInfo): A class containing all dataset info. outputs (list[str] | tuple[str]): Names of layers whose output is to be returned, default: None From b38add46ebebbb2e493dd5516f3b3d7d05423e0c Mon Sep 17 00:00:00 2001 From: ly015 Date: Mon, 23 Aug 2021 15:07:49 +0800 Subject: [PATCH 12/19] * fix wrongly modified parts in previous rebase * fix lint --- demo/top_down_img_demo_with_mmdet.py | 1 + mmpose/apis/inference.py | 25 ++++ mmpose/apis/inference_3d.py | 173 +++++++++++++++++++++++++ mmpose/models/detectors/pose_lifter.py | 7 +- 4 files changed, 202 insertions(+), 4 deletions(-) diff --git a/demo/top_down_img_demo_with_mmdet.py b/demo/top_down_img_demo_with_mmdet.py index 742b53c099..227f44b2cf 100644 --- a/demo/top_down_img_demo_with_mmdet.py +++ b/demo/top_down_img_demo_with_mmdet.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser from mmpose.apis import (inference_top_down_pose_model, init_pose_model, diff --git a/mmpose/apis/inference.py b/mmpose/apis/inference.py index 33f760218a..827087824a 100644 --- a/mmpose/apis/inference.py +++ b/mmpose/apis/inference.py @@ -803,3 +803,28 @@ def vis_pose_result(model, out_file=out_file) return img + + +def process_mmdet_results(mmdet_results, cat_id=1): + """Process mmdet results, and return a list of bboxes. + + Args: + mmdet_results (list|tuple): mmdet results. + cat_id (int): category id (default: 1 for human) + Returns: + person_results (list): a list of detected bounding boxes + """ + if isinstance(mmdet_results, tuple): + det_results = mmdet_results[0] + else: + det_results = mmdet_results + + bboxes = det_results[cat_id - 1] + + person_results = [] + for bbox in bboxes: + person = {} + person['bbox'] = bbox + person_results.append(person) + + return person_results diff --git a/mmpose/apis/inference_3d.py b/mmpose/apis/inference_3d.py index c0e93aa630..9ccbf37780 100644 --- a/mmpose/apis/inference_3d.py +++ b/mmpose/apis/inference_3d.py @@ -608,3 +608,176 @@ def inference_interhand_3d_model(model, pose_results.append(pose_res) return pose_results + + +def inference_mesh_model(model, + img_or_path, + det_results, + bbox_thr=None, + format='xywh', + dataset='MeshH36MDataset'): + """Inference a single image with a list of bounding boxes. + num_bboxes: N + num_keypoints: K + num_vertices: V + num_faces: F + Args: + model (nn.Module): The loaded pose model. + img_or_path (str | np.ndarray): Image filename or loaded image. + det_results (List[dict]): The 2D bbox sequences stored in a list. + Each each element of the list is the bbox of one person, which + contains: + - "bbox" (ndarray[4 or 5]): The person bounding box, + which contains 4 box coordinates (and score). + bbox_thr: Threshold for bounding boxes. Only bboxes with higher scores + will be fed into the pose detector. If bbox_thr is None, ignore it. + format: bbox format ('xyxy' | 'xywh'). Default: 'xywh'. + 'xyxy' means (left, top, right, bottom), + 'xywh' means (left, top, width, height). + dataset (str): Dataset name. + Returns: + List[dict]: 3D pose inference results. Each element is the result of + an instance, which contains: + - "bbox" (ndarray[4]): instance bounding bbox + - "center" (ndarray[2]): bbox center + - "scale" (ndarray[2]): bbox scale + - "keypoints_3d" (ndarray[K,3]): predicted 3D keypoints + - "camera" (ndarray[3]): camera parameters + - "vertices" (ndarray[V, 3]): predicted 3D vertices + - "faces" (ndarray[F, 3]): mesh faces + If there is no valid instance, an empty list will be returned. + """ + + assert format in ['xyxy', 'xywh'] + + pose_results = [] + + if len(det_results) == 0: + return pose_results + + # Change for-loop preprocess each bbox to preprocess all bboxes at once. + bboxes = np.array([box['bbox'] for box in det_results]) + + # Select bboxes by score threshold + if bbox_thr is not None: + assert bboxes.shape[1] == 5 + valid_idx = np.where(bboxes[:, 4] > bbox_thr)[0] + bboxes = bboxes[valid_idx] + det_results = [det_results[i] for i in valid_idx] + + if format == 'xyxy': + bboxes_xyxy = bboxes + bboxes_xywh = _xyxy2xywh(bboxes) + else: + # format is already 'xywh' + bboxes_xywh = bboxes + bboxes_xyxy = _xywh2xyxy(bboxes) + + # if bbox_thr remove all bounding box + if len(bboxes_xywh) == 0: + return [] + + cfg = model.cfg + device = next(model.parameters()).device + + # build the data pipeline + channel_order = cfg.test_pipeline[0].get('channel_order', 'rgb') + test_pipeline = [LoadImage(channel_order=channel_order) + ] + cfg.test_pipeline[1:] + test_pipeline = Compose(test_pipeline) + + assert len(bboxes[0]) in [4, 5] + + if dataset == 'MeshH36MDataset': + flip_pairs = [[0, 5], [1, 4], [2, 3], [6, 11], [7, 10], [8, 9], + [20, 21], [22, 23]] + else: + raise NotImplementedError() + + batch_data = [] + for bbox in bboxes: + center, scale = _box2cs(cfg, bbox) + + # prepare data + data = { + 'img_or_path': + img_or_path, + 'center': + center, + 'scale': + scale, + 'rotation': + 0, + 'bbox_score': + bbox[4] if len(bbox) == 5 else 1, + 'dataset': + dataset, + 'joints_2d': + np.zeros((cfg.data_cfg.num_joints, 2), dtype=np.float32), + 'joints_2d_visible': + np.zeros((cfg.data_cfg.num_joints, 1), dtype=np.float32), + 'joints_3d': + np.zeros((cfg.data_cfg.num_joints, 3), dtype=np.float32), + 'joints_3d_visible': + np.zeros((cfg.data_cfg.num_joints, 3), dtype=np.float32), + 'pose': + np.zeros(72, dtype=np.float32), + 'beta': + np.zeros(10, dtype=np.float32), + 'has_smpl': + 0, + 'ann_info': { + 'image_size': np.array(cfg.data_cfg['image_size']), + 'num_joints': cfg.data_cfg['num_joints'], + 'flip_pairs': flip_pairs, + } + } + + data = test_pipeline(data) + batch_data.append(data) + + batch_data = collate(batch_data, samples_per_gpu=1) + + if next(model.parameters()).is_cuda: + # scatter not work so just move image to cuda device + batch_data['img'] = batch_data['img'].to(device) + # get all img_metas of each bounding box + batch_data['img_metas'] = [ + img_metas[0] for img_metas in batch_data['img_metas'].data + ] + + # forward the model + with torch.no_grad(): + preds = model( + img=batch_data['img'], + img_metas=batch_data['img_metas'], + return_loss=False, + return_vertices=True, + return_faces=True) + + for idx in range(len(det_results)): + pose_res = det_results[idx].copy() + pose_res['bbox'] = bboxes_xyxy[idx] + pose_res['center'] = batch_data['img_metas'][idx]['center'] + pose_res['scale'] = batch_data['img_metas'][idx]['scale'] + pose_res['keypoints_3d'] = preds['keypoints_3d'][idx] + pose_res['camera'] = preds['camera'][idx] + pose_res['vertices'] = preds['vertices'][idx] + pose_res['faces'] = preds['faces'] + pose_results.append(pose_res) + return pose_results + + +def vis_3d_mesh_result(model, result, img=None, show=False, out_file=None): + """Visualize the 3D mesh estimation results. + + Args: + model (nn.Module): The loaded model. + result (list[dict]) + """ + if hasattr(model, 'module'): + model = model.module + + img = model.show_result(result, img, show=show, out_file=out_file) + + return img diff --git a/mmpose/models/detectors/pose_lifter.py b/mmpose/models/detectors/pose_lifter.py index b30b7cffd5..2f3617eb75 100644 --- a/mmpose/models/detectors/pose_lifter.py +++ b/mmpose/models/detectors/pose_lifter.py @@ -4,7 +4,7 @@ import mmcv import numpy as np -from mmpose.core import imshow_keypoints, imshow_keypoints_3d +from mmpose.core import imshow_bboxes, imshow_keypoints, imshow_keypoints_3d from .. import builder from ..builder import POSENETS from .base import BasePose @@ -260,9 +260,7 @@ def forward_test(self, input, metas, **kwargs): return results def forward_dummy(self, input): - """Used for computing network FLOPs. - - See ``tools/get_flops.py``. + """Used for computing network FLOPs. See ``tools/get_flops.py``. Args: input (torch.Tensor): Input pose @@ -294,6 +292,7 @@ def show_result(self, radius=8, thickness=2, vis_height=400, + num_instances=-1, win_name='', show=False, wait_time=0, From a74df879b9ba97587aef8db476a0d73078601472 Mon Sep 17 00:00:00 2001 From: ly015 Date: Wed, 25 Aug 2021 11:41:23 +0800 Subject: [PATCH 13/19] rename datasets/_base_ as datasets/base --- mmpose/datasets/datasets/animal/animal_atrw_dataset.py | 2 +- mmpose/datasets/datasets/animal/animal_fly_dataset.py | 2 +- mmpose/datasets/datasets/animal/animal_horse10_dataset.py | 2 +- mmpose/datasets/datasets/animal/animal_locust_dataset.py | 2 +- mmpose/datasets/datasets/animal/animal_macaque_dataset.py | 2 +- mmpose/datasets/datasets/animal/animal_pose_dataset.py | 2 +- mmpose/datasets/datasets/animal/animal_zebra_dataset.py | 2 +- mmpose/datasets/datasets/{_base_ => base}/__init__.py | 0 .../{_base_ => base}/kpt_2d_sview_rgb_img_bottom_up_dataset.py | 0 .../{_base_ => base}/kpt_2d_sview_rgb_img_top_down_dataset.py | 0 .../datasets/{_base_ => base}/kpt_3d_sview_kpt_2d_dataset.py | 0 .../{_base_ => base}/kpt_3d_sview_rgb_img_top_down_dataset.py | 0 mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py | 2 +- mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py | 2 +- mmpose/datasets/datasets/bottom_up/bottom_up_coco.py | 2 +- mmpose/datasets/datasets/face/face_300w_dataset.py | 2 +- mmpose/datasets/datasets/face/face_aflw_dataset.py | 2 +- mmpose/datasets/datasets/face/face_cofw_dataset.py | 2 +- mmpose/datasets/datasets/face/face_wflw_dataset.py | 2 +- mmpose/datasets/datasets/fashion/deepfashion_dataset.py | 2 +- mmpose/datasets/datasets/hand/freihand_dataset.py | 2 +- mmpose/datasets/datasets/hand/interhand2d_dataset.py | 2 +- mmpose/datasets/datasets/hand/interhand3d_dataset.py | 2 +- mmpose/datasets/datasets/hand/onehand10k_dataset.py | 2 +- mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py | 2 +- mmpose/datasets/datasets/hand/rhd2d_dataset.py | 2 +- mmpose/datasets/datasets/top_down/topdown_coco_dataset.py | 2 +- mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py | 2 +- mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py | 2 +- mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py | 2 +- mmpose/deprecated.py | 2 +- 31 files changed, 26 insertions(+), 26 deletions(-) rename mmpose/datasets/datasets/{_base_ => base}/__init__.py (100%) rename mmpose/datasets/datasets/{_base_ => base}/kpt_2d_sview_rgb_img_bottom_up_dataset.py (100%) rename mmpose/datasets/datasets/{_base_ => base}/kpt_2d_sview_rgb_img_top_down_dataset.py (100%) rename mmpose/datasets/datasets/{_base_ => base}/kpt_3d_sview_kpt_2d_dataset.py (100%) rename mmpose/datasets/datasets/{_base_ => base}/kpt_3d_sview_rgb_img_top_down_dataset.py (100%) diff --git a/mmpose/datasets/datasets/animal/animal_atrw_dataset.py b/mmpose/datasets/datasets/animal/animal_atrw_dataset.py index 1b9b498530..a4f3e1cc1f 100644 --- a/mmpose/datasets/datasets/animal/animal_atrw_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_atrw_dataset.py @@ -10,7 +10,7 @@ from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/animal/animal_fly_dataset.py b/mmpose/datasets/datasets/animal/animal_fly_dataset.py index 465c522e47..6a08ed91e5 100644 --- a/mmpose/datasets/datasets/animal/animal_fly_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_fly_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from ...builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/animal/animal_horse10_dataset.py b/mmpose/datasets/datasets/animal/animal_horse10_dataset.py index b46899fe7e..2c8b8ddd22 100644 --- a/mmpose/datasets/datasets/animal/animal_horse10_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_horse10_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from ...builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/animal/animal_locust_dataset.py b/mmpose/datasets/datasets/animal/animal_locust_dataset.py index e8a3e95dda..c0aacb3636 100644 --- a/mmpose/datasets/datasets/animal/animal_locust_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_locust_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from ...builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/animal/animal_macaque_dataset.py b/mmpose/datasets/datasets/animal/animal_macaque_dataset.py index 9ddf896634..abe5f21872 100644 --- a/mmpose/datasets/datasets/animal/animal_macaque_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_macaque_dataset.py @@ -10,7 +10,7 @@ from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/animal/animal_pose_dataset.py b/mmpose/datasets/datasets/animal/animal_pose_dataset.py index 8dcbfc4e1b..2765365ede 100644 --- a/mmpose/datasets/datasets/animal/animal_pose_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_pose_dataset.py @@ -10,7 +10,7 @@ from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/animal/animal_zebra_dataset.py b/mmpose/datasets/datasets/animal/animal_zebra_dataset.py index c4de9ee0ee..75619f6b14 100644 --- a/mmpose/datasets/datasets/animal/animal_zebra_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_zebra_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from ...builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/_base_/__init__.py b/mmpose/datasets/datasets/base/__init__.py similarity index 100% rename from mmpose/datasets/datasets/_base_/__init__.py rename to mmpose/datasets/datasets/base/__init__.py diff --git a/mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_bottom_up_dataset.py b/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_bottom_up_dataset.py similarity index 100% rename from mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_bottom_up_dataset.py rename to mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_bottom_up_dataset.py diff --git a/mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_top_down_dataset.py b/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_top_down_dataset.py similarity index 100% rename from mmpose/datasets/datasets/_base_/kpt_2d_sview_rgb_img_top_down_dataset.py rename to mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_top_down_dataset.py 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 similarity index 100% rename from mmpose/datasets/datasets/_base_/kpt_3d_sview_kpt_2d_dataset.py rename to mmpose/datasets/datasets/base/kpt_3d_sview_kpt_2d_dataset.py diff --git a/mmpose/datasets/datasets/_base_/kpt_3d_sview_rgb_img_top_down_dataset.py b/mmpose/datasets/datasets/base/kpt_3d_sview_rgb_img_top_down_dataset.py similarity index 100% rename from mmpose/datasets/datasets/_base_/kpt_3d_sview_rgb_img_top_down_dataset.py rename to mmpose/datasets/datasets/base/kpt_3d_sview_rgb_img_top_down_dataset.py diff --git a/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py b/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py index 72d5d19358..9e2e01bee4 100644 --- a/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py @@ -8,7 +8,7 @@ from mmcv import Config from mmpose.core.evaluation import keypoint_mpjpe -from mmpose.datasets.datasets._base_ import Kpt3dSviewKpt2dDataset +from mmpose.datasets.datasets.base import Kpt3dSviewKpt2dDataset from ...builder import DATASETS diff --git a/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py b/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py index ade2e6e62c..97cb757621 100644 --- a/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py @@ -9,7 +9,7 @@ from mmpose.core.evaluation import (keypoint_3d_auc, keypoint_3d_pck, keypoint_mpjpe) -from mmpose.datasets.datasets._base_ import Kpt3dSviewKpt2dDataset +from mmpose.datasets.datasets.base import Kpt3dSviewKpt2dDataset from ...builder import DATASETS diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py b/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py index 52e4c85b79..a33c983a49 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py @@ -10,7 +10,7 @@ from mmpose.core.post_processing import oks_nms, soft_oks_nms from mmpose.datasets.builder import DATASETS -from mmpose.datasets.datasets._base_ import Kpt2dSviewRgbImgBottomUpDataset +from mmpose.datasets.datasets.base import Kpt2dSviewRgbImgBottomUpDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/face/face_300w_dataset.py b/mmpose/datasets/datasets/face/face_300w_dataset.py index f4095aa63a..0b06fa723f 100644 --- a/mmpose/datasets/datasets/face/face_300w_dataset.py +++ b/mmpose/datasets/datasets/face/face_300w_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/face/face_aflw_dataset.py b/mmpose/datasets/datasets/face/face_aflw_dataset.py index 072dd1929c..6e9834aba4 100644 --- a/mmpose/datasets/datasets/face/face_aflw_dataset.py +++ b/mmpose/datasets/datasets/face/face_aflw_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/face/face_cofw_dataset.py b/mmpose/datasets/datasets/face/face_cofw_dataset.py index e9f691dc83..e8f1120265 100644 --- a/mmpose/datasets/datasets/face/face_cofw_dataset.py +++ b/mmpose/datasets/datasets/face/face_cofw_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/face/face_wflw_dataset.py b/mmpose/datasets/datasets/face/face_wflw_dataset.py index db0ecdc652..ac03a24760 100644 --- a/mmpose/datasets/datasets/face/face_wflw_dataset.py +++ b/mmpose/datasets/datasets/face/face_wflw_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/fashion/deepfashion_dataset.py b/mmpose/datasets/datasets/fashion/deepfashion_dataset.py index ff658fa71c..63433287e8 100644 --- a/mmpose/datasets/datasets/fashion/deepfashion_dataset.py +++ b/mmpose/datasets/datasets/fashion/deepfashion_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/hand/freihand_dataset.py b/mmpose/datasets/datasets/hand/freihand_dataset.py index d3a837b762..781db91ea3 100644 --- a/mmpose/datasets/datasets/hand/freihand_dataset.py +++ b/mmpose/datasets/datasets/hand/freihand_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/hand/interhand2d_dataset.py b/mmpose/datasets/datasets/hand/interhand2d_dataset.py index 2a653c7a10..208dd73980 100644 --- a/mmpose/datasets/datasets/hand/interhand2d_dataset.py +++ b/mmpose/datasets/datasets/hand/interhand2d_dataset.py @@ -8,7 +8,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/hand/interhand3d_dataset.py b/mmpose/datasets/datasets/hand/interhand3d_dataset.py index 348f27f6fb..2f506a600d 100644 --- a/mmpose/datasets/datasets/hand/interhand3d_dataset.py +++ b/mmpose/datasets/datasets/hand/interhand3d_dataset.py @@ -9,7 +9,7 @@ from mmpose.core.evaluation.top_down_eval import keypoint_epe from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt3dSviewRgbImgTopDownDataset +from ..base import Kpt3dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/hand/onehand10k_dataset.py b/mmpose/datasets/datasets/hand/onehand10k_dataset.py index c24e487ec8..19a3cefe89 100644 --- a/mmpose/datasets/datasets/hand/onehand10k_dataset.py +++ b/mmpose/datasets/datasets/hand/onehand10k_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py b/mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py index 478f0de1db..2c3e1922b6 100644 --- a/mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py +++ b/mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/hand/rhd2d_dataset.py b/mmpose/datasets/datasets/hand/rhd2d_dataset.py index c0becb0c11..a887acc603 100644 --- a/mmpose/datasets/datasets/hand/rhd2d_dataset.py +++ b/mmpose/datasets/datasets/hand/rhd2d_dataset.py @@ -7,7 +7,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py b/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py index 299035edf5..a285258709 100644 --- a/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py @@ -10,7 +10,7 @@ from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py b/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py index ef060b1c04..0e652e323e 100644 --- a/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py @@ -8,7 +8,7 @@ from mmcv import Config from ...builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py index 1f58c0b151..a5e6f6bf39 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py @@ -9,7 +9,7 @@ from scipy.io import loadmat, savemat from ...builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py index 9bf9dcb32c..978f12b787 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py @@ -10,7 +10,7 @@ from mmcv import Config from mmpose.datasets.builder import DATASETS -from .._base_ import Kpt2dSviewRgbImgTopDownDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() diff --git a/mmpose/deprecated.py b/mmpose/deprecated.py index 03e3425a85..b930901722 100644 --- a/mmpose/deprecated.py +++ b/mmpose/deprecated.py @@ -2,7 +2,7 @@ import warnings from .datasets.builder import DATASETS -from .datasets.datasets._base_ import Kpt2dSviewRgbImgTopDownDataset +from .datasets.datasets.base import Kpt2dSviewRgbImgTopDownDataset from .models.builder import HEADS, POSENETS from .models.detectors import AssociativeEmbedding from .models.heads import (AEHigherResolutionHead, AESimpleHead, From c39b07f4995e7efc3ff75e5f63768042ae3c162c Mon Sep 17 00:00:00 2001 From: ly015 Date: Wed, 25 Aug 2021 13:39:36 +0800 Subject: [PATCH 14/19] resolve compatibility of pose_limb_color --- mmpose/core/visualization/image.py | 15 ++++++++++++++- mmpose/models/detectors/associative_embedding.py | 14 +++++++++++++- mmpose/models/detectors/interhand_3d.py | 16 +++++++++++++++- mmpose/models/detectors/pose_lifter.py | 14 +++++++++++++- mmpose/models/detectors/top_down.py | 14 +++++++++++++- 5 files changed, 68 insertions(+), 5 deletions(-) diff --git a/mmpose/core/visualization/image.py b/mmpose/core/visualization/image.py index dec9b0f0ae..cb3daac4af 100644 --- a/mmpose/core/visualization/image.py +++ b/mmpose/core/visualization/image.py @@ -103,7 +103,8 @@ def imshow_keypoints(img, pose_link_color=None, radius=4, thickness=1, - show_keypoint_weight=False): + show_keypoint_weight=False, + pose_limb_color=None): """Draw keypoints and links on an image. Args: @@ -116,11 +117,23 @@ def imshow_keypoints(img, to be shown. Default: 0.3. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, the keypoint will not be drawn. + pose_limb_color (np.array[Mx3]): Deprecated (see `pose_link_color). + Color of M links. If None, the links will not be drawn. pose_link_color (np.array[Mx3]): Color of M links. If None, the links will not be drawn. thickness (int): Thickness of lines. """ + # TODO: These will be removed in the later versions. + if pose_limb_color is not None: + warnings.warn( + 'pose_limb_color is deprecated.' + 'Please use pose_link_color instead.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + if pose_link_color is None: + pose_link_color = pose_limb_color + img = mmcv.imread(img) img_h, img_w, _ = img.shape diff --git a/mmpose/models/detectors/associative_embedding.py b/mmpose/models/detectors/associative_embedding.py index 690159055e..e4230e808e 100644 --- a/mmpose/models/detectors/associative_embedding.py +++ b/mmpose/models/detectors/associative_embedding.py @@ -314,7 +314,8 @@ def show_result(self, show=False, show_keypoint_weight=False, wait_time=0, - out_file=None): + out_file=None, + pose_limb_color=None): """Draw `result` over `img`. Args: @@ -327,6 +328,7 @@ def show_result(self, to be shown. Default: 0.3. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. + pose_limb_color (np.array[Mx3]): Deprecated (see `pose_link_color). pose_link_color (np.array[Mx3]): Color of M links. If None, do not draw links. radius (int): Radius of circles. @@ -345,6 +347,16 @@ def show_result(self, Tensor: Visualized image only if not `show` or `out_file` """ + # TODO: These will be removed in the later versions. + if pose_limb_color is not None: + warnings.warn( + 'pose_limb_color is deprecated.' + 'Please use pose_link_color instead.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for ' + 'details.', DeprecationWarning) + if pose_link_color is None: + pose_link_color = pose_limb_color + img = mmcv.imread(img) img = img.copy() img_h, img_w, _ = img.shape diff --git a/mmpose/models/detectors/interhand_3d.py b/mmpose/models/detectors/interhand_3d.py index 5ea1eca069..c8d76cd05f 100644 --- a/mmpose/models/detectors/interhand_3d.py +++ b/mmpose/models/detectors/interhand_3d.py @@ -1,4 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import mmcv import numpy as np @@ -115,7 +117,8 @@ def show_result(self, win_name='', show=False, wait_time=0, - out_file=None): + out_file=None, + pose_limb_color=None): """Visualize 3D pose estimation results. Args: @@ -136,6 +139,7 @@ def show_result(self, thickness (int): Thickness of lines. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. + pose_limb_color (np.array[Mx3]): Deprecated (see `pose_link_color). pose_link_color (np.array[Mx3]): Color of M limbs. If None, do not draw limbs. vis_height (int): The image hight of the visualization. The width @@ -156,6 +160,16 @@ def show_result(self, Tensor: Visualized img, only if not `show` or `out_file`. """ + # TODO: These will be removed in the later versions. + if pose_limb_color is not None: + warnings.warn( + 'pose_limb_color is deprecated.' + 'Please use pose_link_color instead.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for ' + 'details.', DeprecationWarning) + if pose_link_color is None: + pose_link_color = pose_limb_color + if num_instances < 0: assert len(result) > 0 result = sorted(result, key=lambda x: x.get('track_id', 0)) diff --git a/mmpose/models/detectors/pose_lifter.py b/mmpose/models/detectors/pose_lifter.py index 2f3617eb75..6b0170de7c 100644 --- a/mmpose/models/detectors/pose_lifter.py +++ b/mmpose/models/detectors/pose_lifter.py @@ -296,7 +296,8 @@ def show_result(self, win_name='', show=False, wait_time=0, - out_file=None): + out_file=None, + pose_limb_color=None): """Visualize 3D pose estimation results. Args: @@ -312,6 +313,7 @@ def show_result(self, links, each is a pair of joint indices. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. + pose_limb_color (np.array[Mx3]): Deprecated (see `pose_link_color). pose_link_color (np.array[Mx3]): Color of M links. If None, do not draw links. radius (int): Radius of circles. @@ -329,6 +331,16 @@ def show_result(self, Tensor: Visualized img, only if not `show` or `out_file`. """ + # TODO: These will be removed in the later versions. + if pose_limb_color is not None: + warnings.warn( + 'pose_limb_color is deprecated.' + 'Please use pose_link_color instead.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for ' + 'details.', DeprecationWarning) + if pose_link_color is None: + pose_link_color = pose_limb_color + if num_instances < 0: assert len(result) > 0 result = sorted(result, key=lambda x: x.get('track_id', 1e4)) diff --git a/mmpose/models/detectors/top_down.py b/mmpose/models/detectors/top_down.py index b371265347..14ece6e555 100644 --- a/mmpose/models/detectors/top_down.py +++ b/mmpose/models/detectors/top_down.py @@ -232,7 +232,8 @@ def show_result(self, show=False, show_keypoint_weight=False, wait_time=0, - out_file=None): + out_file=None, + pose_limb_color=None): """Draw `result` over `img`. Args: @@ -246,6 +247,7 @@ def show_result(self, bbox_color (str or tuple or :obj:`Color`): Color of bbox lines. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. + pose_limb_color (np.array[Mx3]): Deprecated (see `pose_link_color). pose_link_color (np.array[Mx3]): Color of M links. If None, do not draw links. text_color (str or tuple or :obj:`Color`): Color of texts. @@ -265,6 +267,16 @@ def show_result(self, Tensor: Visualized img, only if not `show` or `out_file`. """ + # TODO: These will be removed in the later versions. + if pose_limb_color is not None: + warnings.warn( + 'pose_limb_color is deprecated.' + 'Please use pose_link_color instead.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for ' + 'details.', DeprecationWarning) + if pose_link_color is None: + pose_link_color = pose_limb_color + img = mmcv.imread(img) img = img.copy() From eb929ea08745e0744cf6d7ecc69acd3cb6dfddf1 Mon Sep 17 00:00:00 2001 From: ly015 Date: Wed, 25 Aug 2021 14:12:26 +0800 Subject: [PATCH 15/19] Add dummy dataset base classes with old names for compatibility --- .../datasets/animal/animal_base_dataset.py | 15 +++++++++++ .../datasets/body3d/body3d_base_dataset.py | 15 +++++++++++ .../bottom_up/bottom_up_base_dataset.py | 13 ++++++++++ .../datasets/face/face_base_dataset.py | 15 +++++++++++ .../datasets/fashion/fashion_fase_dataset.py | 15 +++++++++++ .../datasets/hand/hand_base_dataset.py | 15 +++++++++++ .../datasets/top_down/topdown_base_dataset.py | 15 +++++++++++ .../test_dataset_compatibility.py | 25 +++++++++++++++++++ 8 files changed, 128 insertions(+) create mode 100644 mmpose/datasets/datasets/animal/animal_base_dataset.py create mode 100644 mmpose/datasets/datasets/body3d/body3d_base_dataset.py create mode 100644 mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py create mode 100644 mmpose/datasets/datasets/face/face_base_dataset.py create mode 100644 mmpose/datasets/datasets/fashion/fashion_fase_dataset.py create mode 100644 mmpose/datasets/datasets/hand/hand_base_dataset.py create mode 100644 mmpose/datasets/datasets/top_down/topdown_base_dataset.py create mode 100644 tests/test_backward_compatibility/test_dataset_compatibility.py diff --git a/mmpose/datasets/datasets/animal/animal_base_dataset.py b/mmpose/datasets/datasets/animal/animal_base_dataset.py new file mode 100644 index 0000000000..bf153fda78 --- /dev/null +++ b/mmpose/datasets/datasets/animal/animal_base_dataset.py @@ -0,0 +1,15 @@ +from abc import ABCMeta + +from torch.utils.data import Dataset + + +class AnimalBaseDataset(Dataset, metaclass=ABCMeta): + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgTopDownDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'AnimalBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgTopDownDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/body3d/body3d_base_dataset.py b/mmpose/datasets/datasets/body3d/body3d_base_dataset.py new file mode 100644 index 0000000000..b946f5fded --- /dev/null +++ b/mmpose/datasets/datasets/body3d/body3d_base_dataset.py @@ -0,0 +1,15 @@ +from abc import ABCMeta + +from torch.utils.data import Dataset + + +class Body3DBaseDataset(Dataset, metaclass=ABCMeta): + """This class has been deprecated and replaced by + Kpt3dSviewKpt2dDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'Body3DBaseDataset has been replaced by ' + 'Kpt3dSviewKpt2dDataset' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py b/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py new file mode 100644 index 0000000000..2e2d14066a --- /dev/null +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py @@ -0,0 +1,13 @@ +from torch.utils.data import Dataset + + +class BottomUpBaseDataset(Dataset): + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgBottomUpDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'BottomUpBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgBottomUpDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/face/face_base_dataset.py b/mmpose/datasets/datasets/face/face_base_dataset.py new file mode 100644 index 0000000000..9606ce5000 --- /dev/null +++ b/mmpose/datasets/datasets/face/face_base_dataset.py @@ -0,0 +1,15 @@ +from abc import ABCMeta + +from torch.utils.data import Dataset + + +class FaceBaseDataset(Dataset, metaclass=ABCMeta): + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgTopDownDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'FaceBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgTopDownDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/fashion/fashion_fase_dataset.py b/mmpose/datasets/datasets/fashion/fashion_fase_dataset.py new file mode 100644 index 0000000000..a8a4cd2ca4 --- /dev/null +++ b/mmpose/datasets/datasets/fashion/fashion_fase_dataset.py @@ -0,0 +1,15 @@ +from abc import ABCMeta + +from torch.utils.data import Dataset + + +class FashionBaseDataset(Dataset, metaclass=ABCMeta): + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgTopDownDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'FashionBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgTopDownDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/hand/hand_base_dataset.py b/mmpose/datasets/datasets/hand/hand_base_dataset.py new file mode 100644 index 0000000000..ec0443cdd3 --- /dev/null +++ b/mmpose/datasets/datasets/hand/hand_base_dataset.py @@ -0,0 +1,15 @@ +from abc import ABCMeta + +from torch.utils.data import Dataset + + +class HandBaseDataset(Dataset, metaclass=ABCMeta): + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgTopDownDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'HandBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgTopDownDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/top_down/topdown_base_dataset.py b/mmpose/datasets/datasets/top_down/topdown_base_dataset.py new file mode 100644 index 0000000000..4b400e11aa --- /dev/null +++ b/mmpose/datasets/datasets/top_down/topdown_base_dataset.py @@ -0,0 +1,15 @@ +from abc import ABCMeta + +from torch.utils.data import Dataset + + +class TopDownBaseDataset(Dataset, metaclass=ABCMeta): + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgTopDownDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'TopDownBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgTopDownDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/tests/test_backward_compatibility/test_dataset_compatibility.py b/tests/test_backward_compatibility/test_dataset_compatibility.py new file mode 100644 index 0000000000..94c6a4f479 --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_compatibility.py @@ -0,0 +1,25 @@ +import pytest + +from mmpose.datasets.datasets.animal.animal_base_dataset import \ + AnimalBaseDataset +from mmpose.datasets.datasets.bottom_up.bottom_up_base_dataset import \ + BottomUpBaseDataset +from mmpose.datasets.datasets.face.face_base_dataset import FaceBaseDataset +from mmpose.datasets.datasets.fashion.fashion_fase_dataset import \ + FashionBaseDataset +from mmpose.datasets.datasets.hand.hand_base_dataset import HandBaseDataset +from mmpose.datasets.datasets.top_down.topdown_base_dataset import \ + TopDownBaseDataset + + +@pytest.mark.parametrize('BaseDataset', + (AnimalBaseDataset, BottomUpBaseDataset, + FaceBaseDataset, FashionBaseDataset, HandBaseDataset, + TopDownBaseDataset)) +def test_dataset_base_class(BaseDataset): + with pytest.raises(ImportError): + + class Dataset(BaseDataset): + pass + + _ = Dataset() From acf30277d11e6b755b411f84eb4ec347a885e14d Mon Sep 17 00:00:00 2001 From: ly015 Date: Wed, 25 Aug 2021 22:13:06 +0800 Subject: [PATCH 16/19] * Rewrite relative unittest based on dataset_info * Add bc-breaking test for functions related to dataset_info * Rename DatasetInfo.dataset_info as DatasetInfo._dataset_info * Fix dataset_info of h36m dataset --- configs/_base_/datasets/h36m.py | 3 +- mmpose/apis/inference_3d.py | 10 +- mmpose/datasets/dataset_info.py | 18 +- tests/test_apis/test_inference.py | 64 ++++--- tests/test_apis/test_inference_3d.py | 43 ++--- tests/test_apis/test_inference_tracking.py | 44 +++-- .../test_dataset_compatibility.py | 25 --- .../test_dataset_info_compatibility.py | 162 ++++++++++++++++++ tests/test_datasets/test_animal_dataset.py | 29 ++++ 9 files changed, 295 insertions(+), 103 deletions(-) delete mode 100644 tests/test_backward_compatibility/test_dataset_compatibility.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility.py diff --git a/configs/_base_/datasets/h36m.py b/configs/_base_/datasets/h36m.py index 68b7e50ad3..914258d5b3 100644 --- a/configs/_base_/datasets/h36m.py +++ b/configs/_base_/datasets/h36m.py @@ -148,4 +148,5 @@ dict(link=('right_elbow', 'right_wrist'), id=15, color=[255, 128, 0]) }, joint_weights=[1.] * 17, - sigmas=[]) + sigmas=[], + stats_info=dict(bbox_center=(528., 427.), bbox_scale=400.)) diff --git a/mmpose/apis/inference_3d.py b/mmpose/apis/inference_3d.py index 9ccbf37780..57a475a644 100644 --- a/mmpose/apis/inference_3d.py +++ b/mmpose/apis/inference_3d.py @@ -203,7 +203,7 @@ def _collate_pose_sequence(pose_results, with_track_id=True, target_frame=-1): def inference_pose_lifter_model(model, pose_results_2d, - dataset, + dataset=None, dataset_info=None, with_track_id=True, image_size=None, @@ -244,8 +244,9 @@ def inference_pose_lifter_model(model, if dataset_info is not None: flip_pairs = dataset_info.flip_pairs - bbox_center = dataset_info.bbox_center - bbox_scale = dataset_info.bbox_scale + assert 'stats_info' in dataset_info._dataset_info + bbox_center = dataset_info._dataset_info['stats_info']['bbox_center'] + bbox_scale = dataset_info._dataset_info['stats_info']['bbox_scale'] else: warnings.warn( 'dataset is deprecated.' @@ -282,6 +283,7 @@ def inference_pose_lifter_model(model, else: input_2d_visible = np.ones((T, K, 1), dtype=np.float32) + # TODO: Will be removed in the later versions # Dummy 3D input # This is for compatibility with configs in mmpose<=v0.14.0, where a # 3D input is required to generate denormalization parameters. This @@ -347,11 +349,11 @@ def vis_3d_pose_result(model, result, img=None, dataset='Body3DH36MDataset', + dataset_info=None, kpt_score_thr=0.3, radius=8, thickness=2, num_instances=-1, - dataset_info=None, show=False, out_file=None): """Visualize the 3D pose estimation results. diff --git a/mmpose/datasets/dataset_info.py b/mmpose/datasets/dataset_info.py index 3b9d32a482..ea13bc5a7e 100644 --- a/mmpose/datasets/dataset_info.py +++ b/mmpose/datasets/dataset_info.py @@ -4,21 +4,21 @@ class DatasetInfo: def __init__(self, dataset_info): - self.dataset_info = dataset_info - self.dataset_name = self.dataset_info['dataset_name'] - self.paper_info = self.dataset_info['paper_info'] - self.keypoint_info = self.dataset_info['keypoint_info'] - self.skeleton_info = self.dataset_info['skeleton_info'] + self._dataset_info = dataset_info + self.dataset_name = self._dataset_info['dataset_name'] + self.paper_info = self._dataset_info['paper_info'] + self.keypoint_info = self._dataset_info['keypoint_info'] + self.skeleton_info = self._dataset_info['skeleton_info'] self.joint_weights = np.array( - self.dataset_info['joint_weights'], dtype=np.float32)[:, None] + self._dataset_info['joint_weights'], dtype=np.float32)[:, None] - self.sigmas = np.array(self.dataset_info['sigmas']) + self.sigmas = np.array(self._dataset_info['sigmas']) self._parse_keypoint_info() self._parse_skeleton_info() def _parse_skeleton_info(self): - """Parse skeleton info. + """Parse skeleton information. - link_num (int): number of links. - skeleton (list((2,))): list of links (id). @@ -42,7 +42,7 @@ def _parse_skeleton_info(self): self.pose_link_color = np.array(self.pose_link_color) def _parse_keypoint_info(self): - """Parse keypoint info. + """Parse keypoint information. - keypoint_num (int): number of keypoints. - keypoint_id2name (dict): mapping keypoint id to keypoint name. diff --git a/tests/test_apis/test_inference.py b/tests/test_apis/test_inference.py index 9754a15cf1..17d1c7b8bc 100644 --- a/tests/test_apis/test_inference.py +++ b/tests/test_apis/test_inference.py @@ -1,10 +1,10 @@ # Copyright (c) OpenMMLab. All rights reserved. import numpy as np -import pytest from mmpose.apis import (inference_bottom_up_pose_model, inference_top_down_pose_model, init_pose_model, process_mmdet_results, vis_pose_result) +from mmpose.datasets import DatasetInfo def test_top_down_demo(): @@ -16,14 +16,21 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/coco/000000000785.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) person_result = [] person_result.append({'bbox': [50, 50, 50, 100]}) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( - pose_model, image_name, person_result, format='xywh') + pose_model, + image_name, + person_result, + format='xywh', + dataset_info=dataset_info) # show the results - vis_pose_result(pose_model, image_name, pose_results) + vis_pose_result( + pose_model, image_name, pose_results, dataset_info=dataset_info) # AIC demo pose_model = init_pose_model( @@ -32,16 +39,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/aic/054d9ce9201beffc76e5ff2169d2af2f027002ca.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='TopDownAicDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='TopDownAicDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # OneHand10K demo # build the pose model from a config file and a checkpoint file @@ -51,16 +60,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/onehand10k/9.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='OneHand10KDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='OneHand10KDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # InterHand2DDataset demo # build the pose model from a config file and a checkpoint file @@ -70,16 +81,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/interhand2.6m/image2017.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='InterHand2DDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='InterHand2DDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # Face300WDataset demo # build the pose model from a config file and a checkpoint file @@ -89,16 +102,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/300w/indoor_020.png' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='Face300WDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='Face300WDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # FaceAFLWDataset demo # build the pose model from a config file and a checkpoint file @@ -108,16 +123,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/aflw/image04476.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='FaceAFLWDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='FaceAFLWDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # FaceCOFWDataset demo # build the pose model from a config file and a checkpoint file @@ -127,24 +144,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/cofw/001766.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='FaceCOFWDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='FaceCOFWDataset') - - with pytest.raises(NotImplementedError): - pose_results, _ = inference_top_down_pose_model( - pose_model, - image_name, - person_result, - format='xywh', - dataset='test') + pose_model, image_name, pose_results, dataset_info=dataset_info) def test_bottom_up_demo(): @@ -157,12 +168,15 @@ def test_bottom_up_demo(): device='cpu') image_name = 'tests/data/coco/000000000785.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) - pose_results, _ = inference_bottom_up_pose_model(pose_model, image_name) + pose_results, _ = inference_bottom_up_pose_model( + pose_model, image_name, dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='BottomUpCocoDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) def test_process_mmdet_results(): diff --git a/tests/test_apis/test_inference_3d.py b/tests/test_apis/test_inference_3d.py index 02928f91c9..1265b2a840 100644 --- a/tests/test_apis/test_inference_3d.py +++ b/tests/test_apis/test_inference_3d.py @@ -12,7 +12,7 @@ inference_mesh_model, inference_pose_lifter_model, init_pose_model, vis_3d_mesh_result, vis_3d_pose_result) -from mmpose.models import build_posenet +from mmpose.datasets.dataset_info import DatasetInfo def test_pose_lifter_demo(): @@ -32,16 +32,22 @@ def test_pose_lifter_demo(): pose_results_2d = [[pose_det_result]] - dataset = pose_model.cfg.data['test']['type'] + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) pose_results_2d = extract_pose_sequence( pose_results_2d, frame_idx=0, causal=False, seq_len=1, step=1) _ = inference_pose_lifter_model( - pose_model, pose_results_2d, dataset, with_track_id=False) + pose_model, + pose_results_2d, + dataset_info=dataset_info, + with_track_id=False) pose_lift_results = inference_pose_lifter_model( - pose_model, pose_results_2d, dataset, with_track_id=True) + pose_model, + pose_results_2d, + dataset_info=dataset_info, + with_track_id=True) for res in pose_lift_results: res['title'] = 'title' @@ -49,20 +55,19 @@ def test_pose_lifter_demo(): pose_model, pose_lift_results, img=pose_results_2d[0][0]['image_name'], - dataset=dataset) + dataset_info=dataset_info) # test special cases # Empty 2D results _ = inference_pose_lifter_model( - pose_model, [[]], dataset, with_track_id=False) + pose_model, [[]], dataset_info=dataset_info, with_track_id=False) if torch.cuda.is_available(): _ = inference_pose_lifter_model( - pose_model.cuda(), pose_results_2d, dataset, with_track_id=False) - - with pytest.raises(NotImplementedError): - _ = inference_pose_lifter_model( - pose_model, pose_results_2d, dataset='test') + pose_model.cuda(), + pose_results_2d, + dataset_info=dataset_info, + with_track_id=False) # test videopose3d pose_model = init_pose_model( @@ -93,7 +98,7 @@ def test_pose_lifter_demo(): pose_results_2d = [[pose_det_result_0], [pose_det_result_1], [pose_det_result_2]] - dataset = pose_model.cfg.data['test']['type'] + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) seq_len = pose_model.cfg.test_data_cfg.seq_len pose_results_2d_seq = extract_pose_sequence( @@ -102,7 +107,7 @@ def test_pose_lifter_demo(): pose_lift_results = inference_pose_lifter_model( pose_model, pose_results_2d_seq, - dataset, + dataset_info=dataset_info, with_track_id=True, image_size=[1000, 1000], norm_pose_2d=True) @@ -113,7 +118,8 @@ def test_pose_lifter_demo(): pose_model, pose_lift_results, img=pose_results_2d[0][0]['image_name'], - dataset=dataset) + dataset_info=dataset_info, + ) def test_interhand3d_demo(): @@ -133,6 +139,7 @@ def test_interhand3d_demo(): } det_results = [det_result] dataset = pose_model.cfg.data['test']['type'] + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) pose_results = inference_interhand_3d_model( pose_model, image_name, det_results, dataset=dataset) @@ -144,7 +151,7 @@ def test_interhand3d_demo(): pose_model, result=pose_results, img=det_results[0]['image_name'], - dataset=dataset, + dataset_info=dataset_info, ) # test special cases @@ -163,7 +170,6 @@ def test_interhand3d_demo(): def test_body_mesh_demo(): # H36M demo - device = 'cpu' config = 'configs/body/3d_mesh_sview_rgb_img/hmr' \ '/mixed/res50_mixed_224x224.py' config = mmcv.Config.fromfile(config) @@ -177,12 +183,9 @@ def test_body_mesh_demo(): tmpdir, 'test_joint_regressor.npy') # generate weight file for SMPL model. generate_smpl_weight_file(tmpdir) - pose_model = build_posenet(config.model) + pose_model = init_pose_model(config, device='cpu') assert pose_model is not None, 'Fail to build pose model' - pose_model.cfg = config - pose_model.to(device) - pose_model.eval() image_name = 'tests/data/h36m/S1_Directions_1.54138969_000001.jpg' det_result = { diff --git a/tests/test_apis/test_inference_tracking.py b/tests/test_apis/test_inference_tracking.py index 080f2bdf6e..1ef62b771a 100644 --- a/tests/test_apis/test_inference_tracking.py +++ b/tests/test_apis/test_inference_tracking.py @@ -1,9 +1,8 @@ # Copyright (c) OpenMMLab. All rights reserved. -import pytest - from mmpose.apis import (get_track_id, inference_bottom_up_pose_model, inference_top_down_pose_model, init_pose_model, vis_pose_tracking_result) +from mmpose.datasets.dataset_info import DatasetInfo def test_top_down_pose_tracking_demo(): @@ -15,15 +14,20 @@ def test_top_down_pose_tracking_demo(): None, device='cpu') image_name = 'tests/data/coco/000000000785.jpg' - + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) person_result = [{'bbox': [50, 50, 50, 100]}] # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( - pose_model, image_name, person_result, format='xywh') + pose_model, + image_name, + person_result, + format='xywh', + dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, [], next_id=0) # show the results - vis_pose_tracking_result(pose_model, image_name, pose_results) + vis_pose_tracking_result( + pose_model, image_name, pose_results, dataset_info=dataset_info) pose_results_last = pose_results # AIC demo @@ -33,13 +37,14 @@ def test_top_down_pose_tracking_demo(): None, device='cpu') image_name = 'tests/data/aic/054d9ce9201beffc76e5ff2169d2af2f027002ca.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='TopDownAicDataset') + dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, pose_results_last, next_id) for pose_result in pose_results: @@ -49,7 +54,7 @@ def test_top_down_pose_tracking_demo(): # show the results vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='TopDownAicDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # OneHand10K demo # build the pose model from a config file and a checkpoint file @@ -59,6 +64,7 @@ def test_top_down_pose_tracking_demo(): None, device='cpu') image_name = 'tests/data/onehand10k/9.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, @@ -66,12 +72,12 @@ def test_top_down_pose_tracking_demo(): 'bbox': [10, 10, 30, 30] }], format='xywh', - dataset='OneHand10KDataset') + dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, pose_results_last, next_id) # show the results vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='OneHand10KDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # InterHand2D demo pose_model = init_pose_model( @@ -80,6 +86,7 @@ def test_top_down_pose_tracking_demo(): None, device='cpu') image_name = 'tests/data/interhand2.6m/image2017.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, @@ -87,11 +94,11 @@ def test_top_down_pose_tracking_demo(): 'bbox': [50, 50, 0, 0] }], format='xywh', - dataset='InterHand2DDataset') + dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, [], next_id=0) # show the results vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='InterHand2DDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) pose_results_last = pose_results # MPII demo @@ -101,6 +108,7 @@ def test_top_down_pose_tracking_demo(): None, device='cpu') image_name = 'tests/data/mpii/004645041.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, @@ -108,16 +116,12 @@ def test_top_down_pose_tracking_demo(): 'bbox': [50, 50, 0, 0] }], format='xywh', - dataset='TopDownMpiiDataset') + dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, pose_results_last, next_id) # show the results vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='TopDownMpiiDataset') - - with pytest.raises(NotImplementedError): - vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='test') + pose_model, image_name, pose_results, dataset_info=dataset_info) def test_bottom_up_pose_tracking_demo(): @@ -130,14 +134,16 @@ def test_bottom_up_pose_tracking_demo(): device='cpu') image_name = 'tests/data/coco/000000000785.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) - pose_results, _ = inference_bottom_up_pose_model(pose_model, image_name) + pose_results, _ = inference_bottom_up_pose_model( + pose_model, image_name, dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, [], next_id=0) # show the results vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='BottomUpCocoDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) pose_results_last = pose_results diff --git a/tests/test_backward_compatibility/test_dataset_compatibility.py b/tests/test_backward_compatibility/test_dataset_compatibility.py deleted file mode 100644 index 94c6a4f479..0000000000 --- a/tests/test_backward_compatibility/test_dataset_compatibility.py +++ /dev/null @@ -1,25 +0,0 @@ -import pytest - -from mmpose.datasets.datasets.animal.animal_base_dataset import \ - AnimalBaseDataset -from mmpose.datasets.datasets.bottom_up.bottom_up_base_dataset import \ - BottomUpBaseDataset -from mmpose.datasets.datasets.face.face_base_dataset import FaceBaseDataset -from mmpose.datasets.datasets.fashion.fashion_fase_dataset import \ - FashionBaseDataset -from mmpose.datasets.datasets.hand.hand_base_dataset import HandBaseDataset -from mmpose.datasets.datasets.top_down.topdown_base_dataset import \ - TopDownBaseDataset - - -@pytest.mark.parametrize('BaseDataset', - (AnimalBaseDataset, BottomUpBaseDataset, - FaceBaseDataset, FashionBaseDataset, HandBaseDataset, - TopDownBaseDataset)) -def test_dataset_base_class(BaseDataset): - with pytest.raises(ImportError): - - class Dataset(BaseDataset): - pass - - _ = Dataset() diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility.py b/tests/test_backward_compatibility/test_dataset_info_compatibility.py new file mode 100644 index 0000000000..e1b8c5ebaf --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility.py @@ -0,0 +1,162 @@ +import numpy as np +import pytest + +from mmpose.apis import (extract_pose_sequence, get_track_id, + inference_bottom_up_pose_model, + inference_pose_lifter_model, + inference_top_down_pose_model, init_pose_model, + vis_3d_pose_result, vis_pose_result, + vis_pose_tracking_result) +from mmpose.datasets.datasets.animal.animal_base_dataset import \ + AnimalBaseDataset +from mmpose.datasets.datasets.bottom_up.bottom_up_base_dataset import \ + BottomUpBaseDataset +from mmpose.datasets.datasets.face.face_base_dataset import FaceBaseDataset +from mmpose.datasets.datasets.fashion.fashion_fase_dataset import \ + FashionBaseDataset +from mmpose.datasets.datasets.hand.hand_base_dataset import HandBaseDataset +from mmpose.datasets.datasets.top_down.topdown_base_dataset import \ + TopDownBaseDataset + + +@pytest.mark.parametrize('BaseDataset', + (AnimalBaseDataset, BottomUpBaseDataset, + FaceBaseDataset, FashionBaseDataset, HandBaseDataset, + TopDownBaseDataset)) +def test_dataset_base_class(BaseDataset): + with pytest.raises(ImportError): + + class Dataset(BaseDataset): + pass + + _ = Dataset() + + +def test_inference_without_dataset_info(): + # Top down + pose_model = init_pose_model( + 'configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/' + 'coco/res50_coco_256x192.py', + None, + device='cpu') + image_name = 'tests/data/coco/000000000785.jpg' + + person_result = [] + person_result.append({'bbox': [50, 50, 50, 100]}) + + with pytest.warns(DeprecationWarning): + pose_results, _ = inference_top_down_pose_model( + pose_model, image_name, person_result, format='xywh') + + with pytest.warns(DeprecationWarning): + vis_pose_result(pose_model, image_name, pose_results) + + with pytest.raises(NotImplementedError): + with pytest.warns(DeprecationWarning): + pose_results, _ = inference_top_down_pose_model( + pose_model, + image_name, + person_result, + format='xywh', + dataset='test') + + # Bottom up + pose_model = init_pose_model( + 'configs/body/2d_kpt_sview_rgb_img/associative_embedding/' + 'coco/res50_coco_512x512.py', + None, + device='cpu') + + image_name = 'tests/data/coco/000000000785.jpg' + with pytest.warns(DeprecationWarning): + pose_results, _ = inference_bottom_up_pose_model( + pose_model, image_name) + with pytest.warns(DeprecationWarning): + vis_pose_result(pose_model, image_name, pose_results) + + # Top down tracking + pose_model = init_pose_model( + 'configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/' + 'coco/res50_coco_256x192.py', + None, + device='cpu') + image_name = 'tests/data/coco/000000000785.jpg' + person_result = [{'bbox': [50, 50, 50, 100]}] + + with pytest.warns(DeprecationWarning): + pose_results, _ = inference_top_down_pose_model( + pose_model, image_name, person_result, format='xywh') + + pose_results, _ = get_track_id(pose_results, [], next_id=0) + + with pytest.warns(DeprecationWarning): + vis_pose_tracking_result(pose_model, image_name, pose_results) + + with pytest.raises(NotImplementedError): + with pytest.warns(DeprecationWarning): + vis_pose_tracking_result( + pose_model, image_name, pose_results, dataset='test') + + # Bottom up tracking + pose_model = init_pose_model( + 'configs/body/2d_kpt_sview_rgb_img/associative_embedding/' + 'coco/res50_coco_512x512.py', + None, + device='cpu') + + image_name = 'tests/data/coco/000000000785.jpg' + with pytest.warns(DeprecationWarning): + pose_results, _ = inference_bottom_up_pose_model( + pose_model, image_name) + + pose_results, next_id = get_track_id(pose_results, [], next_id=0) + + with pytest.warns(DeprecationWarning): + vis_pose_tracking_result( + pose_model, + image_name, + pose_results, + dataset='BottomUpCocoDataset') + + # Pose lifting + pose_model = init_pose_model( + 'configs/body/3d_kpt_sview_rgb_img/pose_lift/' + 'h36m/simplebaseline3d_h36m.py', + None, + device='cpu') + + pose_det_result = { + 'keypoints': np.zeros((17, 3)), + 'bbox': [50, 50, 50, 50], + 'track_id': 0, + 'image_name': 'tests/data/h36m/S1_Directions_1.54138969_000001.jpg', + } + + pose_results_2d = [[pose_det_result]] + + dataset = pose_model.cfg.data['test']['type'] + + pose_results_2d = extract_pose_sequence( + pose_results_2d, frame_idx=0, causal=False, seq_len=1, step=1) + + with pytest.warns(DeprecationWarning): + _ = inference_pose_lifter_model( + pose_model, pose_results_2d, dataset, with_track_id=False) + + with pytest.warns(DeprecationWarning): + pose_lift_results = inference_pose_lifter_model( + pose_model, pose_results_2d, dataset, with_track_id=True) + + for res in pose_lift_results: + res['title'] = 'title' + with pytest.warns(DeprecationWarning): + vis_3d_pose_result( + pose_model, + pose_lift_results, + img=pose_results_2d[0][0]['image_name'], + dataset=dataset) + + with pytest.raises(NotImplementedError): + with pytest.warns(DeprecationWarning): + _ = inference_pose_lifter_model( + pose_model, pose_results_2d, dataset='test') diff --git a/tests/test_datasets/test_animal_dataset.py b/tests/test_datasets/test_animal_dataset.py index 0bd263b2fe..34c84928db 100644 --- a/tests/test_datasets/test_animal_dataset.py +++ b/tests/test_datasets/test_animal_dataset.py @@ -4,6 +4,7 @@ import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal from mmpose.datasets import DATASETS @@ -61,6 +62,8 @@ def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): def test_animal_horse10_dataset(): dataset = 'AnimalHorse10Dataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/horse10.py').dataset_info channel_cfg = dict( num_output_channels=22, @@ -89,6 +92,7 @@ def test_animal_horse10_dataset(): ann_file='tests/data/horse10/test_horse10.json', img_prefix='tests/data/horse10/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -96,6 +100,7 @@ def test_animal_horse10_dataset(): ann_file='tests/data/horse10/test_horse10.json', img_prefix='tests/data/horse10/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) @@ -116,6 +121,8 @@ def test_animal_horse10_dataset(): def test_animal_fly_dataset(): dataset = 'AnimalFlyDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/fly.py').dataset_info channel_cfg = dict( num_output_channels=32, @@ -145,6 +152,7 @@ def test_animal_fly_dataset(): ann_file='tests/data/fly/test_fly.json', img_prefix='tests/data/fly/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -152,6 +160,7 @@ def test_animal_fly_dataset(): ann_file='tests/data/fly/test_fly.json', img_prefix='tests/data/fly/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) @@ -172,6 +181,8 @@ def test_animal_fly_dataset(): def test_animal_locust_dataset(): dataset = 'AnimalLocustDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/locust.py').dataset_info channel_cfg = dict( num_output_channels=35, @@ -202,6 +213,7 @@ def test_animal_locust_dataset(): ann_file='tests/data/locust/test_locust.json', img_prefix='tests/data/locust/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -209,6 +221,7 @@ def test_animal_locust_dataset(): ann_file='tests/data/locust/test_locust.json', img_prefix='tests/data/locust/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) @@ -229,6 +242,8 @@ def test_animal_locust_dataset(): def test_animal_zebra_dataset(): dataset = 'AnimalZebraDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/zebra.py').dataset_info channel_cfg = dict( num_output_channels=9, @@ -252,6 +267,7 @@ def test_animal_zebra_dataset(): ann_file='tests/data/zebra/test_zebra.json', img_prefix='tests/data/zebra/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -259,6 +275,7 @@ def test_animal_zebra_dataset(): ann_file='tests/data/zebra/test_zebra.json', img_prefix='tests/data/zebra/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) @@ -279,6 +296,8 @@ def test_animal_zebra_dataset(): def test_animal_ATRW_dataset(): dataset = 'AnimalATRWDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/atrw.py').dataset_info channel_cfg = dict( num_output_channels=15, @@ -310,6 +329,7 @@ def test_animal_ATRW_dataset(): ann_file='tests/data/atrw/test_atrw.json', img_prefix='tests/data/atrw/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -317,6 +337,7 @@ def test_animal_ATRW_dataset(): ann_file='tests/data/atrw/test_atrw.json', img_prefix='tests/data/atrw/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) @@ -337,6 +358,8 @@ def test_animal_ATRW_dataset(): def test_animal_Macaque_dataset(): dataset = 'AnimalMacaqueDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/macaque.py').dataset_info channel_cfg = dict( num_output_channels=17, @@ -370,6 +393,7 @@ def test_animal_Macaque_dataset(): ann_file='tests/data/macaque/test_macaque.json', img_prefix='tests/data/macaque/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -377,6 +401,7 @@ def test_animal_Macaque_dataset(): ann_file='tests/data/macaque/test_macaque.json', img_prefix='tests/data/macaque/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) @@ -397,6 +422,8 @@ def test_animal_Macaque_dataset(): def test_animalpose_dataset(): dataset = 'AnimalPoseDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/animalpose.py').dataset_info channel_cfg = dict( num_output_channels=20, @@ -434,6 +461,7 @@ def test_animalpose_dataset(): ann_file='tests/data/animalpose/test_animalpose.json', img_prefix='tests/data/animalpose/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -441,6 +469,7 @@ def test_animalpose_dataset(): ann_file='tests/data/animalpose/test_animalpose.json', img_prefix='tests/data/animalpose/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) From 102ba8571c0f0c1217b6a20107b1740677b5e4f2 Mon Sep 17 00:00:00 2001 From: ly015 Date: Thu, 26 Aug 2021 16:08:12 +0800 Subject: [PATCH 17/19] Handle breaking change pose_limb_color -> pose_link_color --- mmpose/core/visualization/image.py | 17 +-- .../models/detectors/associative_embedding.py | 18 +-- mmpose/models/detectors/interhand_3d.py | 20 +--- mmpose/models/detectors/pose_lifter.py | 18 +-- mmpose/models/detectors/top_down.py | 18 +-- tests/test_datasets/test_animal_dataset.py | 51 +-------- tests/test_datasets/test_body3d_dataset.py | 23 +++- tests/test_datasets/test_bottom_up_dataset.py | 21 ++++ tests/test_datasets/test_face_dataset.py | 68 +++--------- tests/test_datasets/test_fashion_dataset.py | 55 +-------- tests/test_datasets/test_hand_dataset.py | 78 ++++++------- tests/test_datasets/test_top_down_dataset.py | 104 +++++++++--------- tests/test_eval_hook.py | 5 +- tests/utils/data_utils.py | 46 ++++++++ 14 files changed, 217 insertions(+), 325 deletions(-) create mode 100644 tests/utils/data_utils.py diff --git a/mmpose/core/visualization/image.py b/mmpose/core/visualization/image.py index cb3daac4af..3a957928ce 100644 --- a/mmpose/core/visualization/image.py +++ b/mmpose/core/visualization/image.py @@ -8,6 +8,7 @@ import numpy as np import trimesh from matplotlib import pyplot as plt +from mmcv.utils.misc import deprecated_api_warning from mmcv.visualization.color import color_val try: @@ -95,6 +96,7 @@ def imshow_bboxes(img, return img +@deprecated_api_warning({'pose_limb_color': 'pose_link_color'}) def imshow_keypoints(img, pose_result, skeleton=None, @@ -103,8 +105,7 @@ def imshow_keypoints(img, pose_link_color=None, radius=4, thickness=1, - show_keypoint_weight=False, - pose_limb_color=None): + show_keypoint_weight=False): """Draw keypoints and links on an image. Args: @@ -117,23 +118,11 @@ def imshow_keypoints(img, to be shown. Default: 0.3. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, the keypoint will not be drawn. - pose_limb_color (np.array[Mx3]): Deprecated (see `pose_link_color). - Color of M links. If None, the links will not be drawn. pose_link_color (np.array[Mx3]): Color of M links. If None, the links will not be drawn. thickness (int): Thickness of lines. """ - # TODO: These will be removed in the later versions. - if pose_limb_color is not None: - warnings.warn( - 'pose_limb_color is deprecated.' - 'Please use pose_link_color instead.' - 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', - DeprecationWarning) - if pose_link_color is None: - pose_link_color = pose_limb_color - img = mmcv.imread(img) img_h, img_w, _ = img.shape diff --git a/mmpose/models/detectors/associative_embedding.py b/mmpose/models/detectors/associative_embedding.py index e4230e808e..19a6c09c15 100644 --- a/mmpose/models/detectors/associative_embedding.py +++ b/mmpose/models/detectors/associative_embedding.py @@ -4,6 +4,7 @@ import mmcv import torch from mmcv.image import imwrite +from mmcv.utils.misc import deprecated_api_warning from mmcv.visualization.image import imshow from mmpose.core.evaluation import (aggregate_results, get_group_preds, @@ -299,6 +300,8 @@ def forward_test(self, img, img_metas, return_heatmap=False, **kwargs): return result + @deprecated_api_warning({'pose_limb_color': 'pose_link_color'}, + cls_name='AssociativeEmbedding') def show_result(self, img, result, @@ -314,8 +317,7 @@ def show_result(self, show=False, show_keypoint_weight=False, wait_time=0, - out_file=None, - pose_limb_color=None): + out_file=None): """Draw `result` over `img`. Args: @@ -328,7 +330,6 @@ def show_result(self, to be shown. Default: 0.3. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Deprecated (see `pose_link_color). pose_link_color (np.array[Mx3]): Color of M links. If None, do not draw links. radius (int): Radius of circles. @@ -346,17 +347,6 @@ def show_result(self, Returns: Tensor: Visualized image only if not `show` or `out_file` """ - - # TODO: These will be removed in the later versions. - if pose_limb_color is not None: - warnings.warn( - 'pose_limb_color is deprecated.' - 'Please use pose_link_color instead.' - 'Check https://github.com/open-mmlab/mmpose/pull/663 for ' - 'details.', DeprecationWarning) - if pose_link_color is None: - pose_link_color = pose_limb_color - img = mmcv.imread(img) img = img.copy() img_h, img_w, _ = img.shape diff --git a/mmpose/models/detectors/interhand_3d.py b/mmpose/models/detectors/interhand_3d.py index c8d76cd05f..fab393c9b4 100644 --- a/mmpose/models/detectors/interhand_3d.py +++ b/mmpose/models/detectors/interhand_3d.py @@ -1,8 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. -import warnings - import mmcv import numpy as np +from mmcv.utils.misc import deprecated_api_warning from mmpose.core import imshow_keypoints, imshow_keypoints_3d from ..builder import POSENETS @@ -102,6 +101,8 @@ def forward_test(self, img, img_metas, **kwargs): result = {} return result + @deprecated_api_warning({'pose_limb_color': 'pose_link_color'}, + cls_name='Interhand3D') def show_result(self, result, img=None, @@ -117,8 +118,7 @@ def show_result(self, win_name='', show=False, wait_time=0, - out_file=None, - pose_limb_color=None): + out_file=None): """Visualize 3D pose estimation results. Args: @@ -139,7 +139,6 @@ def show_result(self, thickness (int): Thickness of lines. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Deprecated (see `pose_link_color). pose_link_color (np.array[Mx3]): Color of M limbs. If None, do not draw limbs. vis_height (int): The image hight of the visualization. The width @@ -159,17 +158,6 @@ def show_result(self, Returns: Tensor: Visualized img, only if not `show` or `out_file`. """ - - # TODO: These will be removed in the later versions. - if pose_limb_color is not None: - warnings.warn( - 'pose_limb_color is deprecated.' - 'Please use pose_link_color instead.' - 'Check https://github.com/open-mmlab/mmpose/pull/663 for ' - 'details.', DeprecationWarning) - if pose_link_color is None: - pose_link_color = pose_limb_color - if num_instances < 0: assert len(result) > 0 result = sorted(result, key=lambda x: x.get('track_id', 0)) diff --git a/mmpose/models/detectors/pose_lifter.py b/mmpose/models/detectors/pose_lifter.py index 6b0170de7c..49c1a5a05c 100644 --- a/mmpose/models/detectors/pose_lifter.py +++ b/mmpose/models/detectors/pose_lifter.py @@ -3,6 +3,7 @@ import mmcv import numpy as np +from mmcv.utils.misc import deprecated_api_warning from mmpose.core import imshow_bboxes, imshow_keypoints, imshow_keypoints_3d from .. import builder @@ -283,6 +284,8 @@ def forward_dummy(self, input): return output + @deprecated_api_warning({'pose_limb_color': 'pose_link_color'}, + cls_name='PoseLifter') def show_result(self, result, img=None, @@ -296,8 +299,7 @@ def show_result(self, win_name='', show=False, wait_time=0, - out_file=None, - pose_limb_color=None): + out_file=None): """Visualize 3D pose estimation results. Args: @@ -313,7 +315,6 @@ def show_result(self, links, each is a pair of joint indices. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Deprecated (see `pose_link_color). pose_link_color (np.array[Mx3]): Color of M links. If None, do not draw links. radius (int): Radius of circles. @@ -330,17 +331,6 @@ def show_result(self, Returns: Tensor: Visualized img, only if not `show` or `out_file`. """ - - # TODO: These will be removed in the later versions. - if pose_limb_color is not None: - warnings.warn( - 'pose_limb_color is deprecated.' - 'Please use pose_link_color instead.' - 'Check https://github.com/open-mmlab/mmpose/pull/663 for ' - 'details.', DeprecationWarning) - if pose_link_color is None: - pose_link_color = pose_limb_color - if num_instances < 0: assert len(result) > 0 result = sorted(result, key=lambda x: x.get('track_id', 1e4)) diff --git a/mmpose/models/detectors/top_down.py b/mmpose/models/detectors/top_down.py index 14ece6e555..6f1dc39a48 100644 --- a/mmpose/models/detectors/top_down.py +++ b/mmpose/models/detectors/top_down.py @@ -4,6 +4,7 @@ import mmcv import numpy as np from mmcv.image import imwrite +from mmcv.utils.misc import deprecated_api_warning from mmcv.visualization.image import imshow from mmpose.core import imshow_bboxes, imshow_keypoints @@ -215,6 +216,8 @@ def forward_dummy(self, img): output = self.keypoint_head(output) return output + @deprecated_api_warning({'pose_limb_color': 'pose_link_color'}, + cls_name='TopDown') def show_result(self, img, result, @@ -232,8 +235,7 @@ def show_result(self, show=False, show_keypoint_weight=False, wait_time=0, - out_file=None, - pose_limb_color=None): + out_file=None): """Draw `result` over `img`. Args: @@ -247,7 +249,6 @@ def show_result(self, bbox_color (str or tuple or :obj:`Color`): Color of bbox lines. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Deprecated (see `pose_link_color). pose_link_color (np.array[Mx3]): Color of M links. If None, do not draw links. text_color (str or tuple or :obj:`Color`): Color of texts. @@ -266,17 +267,6 @@ def show_result(self, Returns: Tensor: Visualized img, only if not `show` or `out_file`. """ - - # TODO: These will be removed in the later versions. - if pose_limb_color is not None: - warnings.warn( - 'pose_limb_color is deprecated.' - 'Please use pose_link_color instead.' - 'Check https://github.com/open-mmlab/mmpose/pull/663 for ' - 'details.', DeprecationWarning) - if pose_link_color is None: - pose_link_color = pose_limb_color - img = mmcv.imread(img) img = img.copy() diff --git a/tests/test_datasets/test_animal_dataset.py b/tests/test_datasets/test_animal_dataset.py index 34c84928db..1ba83c019b 100644 --- a/tests/test_datasets/test_animal_dataset.py +++ b/tests/test_datasets/test_animal_dataset.py @@ -2,63 +2,14 @@ import copy import tempfile -import numpy as np import pytest from mmcv import Config from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output from mmpose.datasets import DATASETS -def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): - outputs = [] - len_db = len(db) - for i in range(0, len_db, batch_size): - if is_3d: - keypoints = np.stack([ - db[j]['joints_3d'].reshape((-1, 3)) - for j in range(i, min(i + batch_size, len_db)) - ]) - else: - keypoints = np.stack([ - np.hstack([ - db[j]['joints_3d'].reshape((-1, 3))[:, :2], - db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] - ]) for j in range(i, min(i + batch_size, len_db)) - ]) - image_paths = [ - db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) - ] - bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack([ - np.array([ - db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], - db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 - ], - dtype=np.float32) - for j in range(i, min(i + batch_size, len_db)) - ]) - - output = {} - output['preds'] = keypoints - output['boxes'] = box - output['image_paths'] = image_paths - output['output_heatmap'] = None - output['bbox_ids'] = bbox_ids - - if keys is not None: - keys = keys if isinstance(keys, list) else [keys] - for key in keys: - output[key] = [ - db[j][key] for j in range(i, min(i + batch_size, len_db)) - ] - - outputs.append(output) - - return outputs - - def test_animal_horse10_dataset(): dataset = 'AnimalHorse10Dataset' dataset_class = DATASETS.get(dataset) diff --git a/tests/test_datasets/test_body3d_dataset.py b/tests/test_datasets/test_body3d_dataset.py index 002aa09a53..561133695c 100644 --- a/tests/test_datasets/test_body3d_dataset.py +++ b/tests/test_datasets/test_body3d_dataset.py @@ -2,6 +2,7 @@ import tempfile import numpy as np +from mmcv import Config from mmpose.datasets import DATASETS from mmpose.datasets.builder import build_dataset @@ -11,6 +12,8 @@ def test_body3d_h36m_dataset(): # Test Human3.6M dataset dataset = 'Body3DH36MDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/h36m.py').dataset_info # test single-frame input data_cfg = dict( @@ -27,6 +30,7 @@ def test_body3d_h36m_dataset(): ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=data_cfg, + dataset_info=dataset_info, pipeline=[], test_mode=False) @@ -34,6 +38,7 @@ def test_body3d_h36m_dataset(): ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=data_cfg, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -72,6 +77,7 @@ def test_body3d_h36m_dataset(): ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=data_cfg, + dataset_info=dataset_info, pipeline=[], test_mode=False) @@ -79,6 +85,7 @@ def test_body3d_h36m_dataset(): ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=data_cfg, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -103,6 +110,8 @@ def test_body3d_h36m_dataset(): def test_body3d_semi_supervision_dataset(): # Test Body3d Semi-supervision Dataset + dataset_info = Config.fromfile( + 'configs/_base_/datasets/h36m.py').dataset_info # load labeled dataset labeled_data_cfg = dict( @@ -116,11 +125,12 @@ def test_body3d_semi_supervision_dataset(): subjects=['S1'], need_camera_param=True, camera_param_file='tests/data/h36m/cameras.pkl') - labeled_dataset = dict( + labeled_dataset_cfg = dict( type='Body3DH36MDataset', ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=labeled_data_cfg, + dataset_info=dataset_info, pipeline=[]) # load unlabled data @@ -135,11 +145,12 @@ def test_body3d_semi_supervision_dataset(): need_camera_param=True, camera_param_file='tests/data/h36m/cameras.pkl', need_2d_label=True) - unlabeled_dataset = dict( + unlabeled_dataset_cfg = dict( type='Body3DH36MDataset', ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=unlabeled_data_cfg, + dataset_info=dataset_info, pipeline=[ dict( type='Collect', @@ -151,12 +162,12 @@ def test_body3d_semi_supervision_dataset(): # combine labeled and unlabeled dataset to form a new dataset dataset = 'Body3DSemiSupervisionDataset' dataset_class = DATASETS.get(dataset) - custom_dataset = dataset_class(labeled_dataset, unlabeled_dataset) + custom_dataset = dataset_class(labeled_dataset_cfg, unlabeled_dataset_cfg) item = custom_dataset[0] assert custom_dataset.labeled_dataset.dataset_name == 'h36m' assert 'unlabeled_input' in item.keys() - unlabeled_dataset = build_dataset(unlabeled_dataset) + unlabeled_dataset = build_dataset(unlabeled_dataset_cfg) assert len(unlabeled_dataset) == len(custom_dataset) @@ -164,6 +175,8 @@ def test_body3d_mpi_inf_3dhp_dataset(): # Test MPI-INF-3DHP dataset dataset = 'Body3DMpiInf3dhpDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/mpi_inf_3dhp.py').dataset_info # Test single-frame input on trainset single_frame_train_data_cfg = dict( @@ -226,6 +239,7 @@ def test_body3d_mpi_inf_3dhp_dataset(): img_prefix='tests/data/mpi_inf_3dhp', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -233,6 +247,7 @@ def test_body3d_mpi_inf_3dhp_dataset(): img_prefix='tests/data/mpi_inf_3dhp', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True diff --git a/tests/test_datasets/test_bottom_up_dataset.py b/tests/test_datasets/test_bottom_up_dataset.py index 3ec3a4ea5d..29149c29f5 100644 --- a/tests/test_datasets/test_bottom_up_dataset.py +++ b/tests/test_datasets/test_bottom_up_dataset.py @@ -3,6 +3,7 @@ import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal from mmpose.datasets import DATASETS @@ -47,6 +48,8 @@ def convert_coco_to_output(coco, is_wholebody=False): def test_bottom_up_COCO_dataset(): dataset = 'BottomUpCocoDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/coco.py').dataset_info # test COCO datasets dataset_class = DATASETS.get(dataset) @@ -76,6 +79,7 @@ def test_bottom_up_COCO_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -83,6 +87,7 @@ def test_bottom_up_COCO_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.dataset_name == 'coco' @@ -100,6 +105,8 @@ def test_bottom_up_COCO_dataset(): def test_bottom_up_CrowdPose_dataset(): dataset = 'BottomUpCrowdPoseDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/crowdpose.py').dataset_info # test CrowdPose datasets dataset_class = DATASETS.get(dataset) @@ -127,6 +134,7 @@ def test_bottom_up_CrowdPose_dataset(): img_prefix='tests/data/crowdpose/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -134,6 +142,7 @@ def test_bottom_up_CrowdPose_dataset(): img_prefix='tests/data/crowdpose/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.dataset_name == 'crowdpose' @@ -154,6 +163,8 @@ def test_bottom_up_CrowdPose_dataset(): def test_bottom_up_MHP_dataset(): dataset = 'BottomUpMhpDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/mhp.py').dataset_info # test MHP datasets dataset_class = DATASETS.get(dataset) @@ -183,6 +194,7 @@ def test_bottom_up_MHP_dataset(): img_prefix='tests/data/mhp/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -190,6 +202,7 @@ def test_bottom_up_MHP_dataset(): img_prefix='tests/data/mhp/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.dataset_name == 'mhp' @@ -210,6 +223,8 @@ def test_bottom_up_MHP_dataset(): def test_bottom_up_AIC_dataset(): dataset = 'BottomUpAicDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/aic.py').dataset_info # test MHP datasets dataset_class = DATASETS.get(dataset) @@ -238,6 +253,7 @@ def test_bottom_up_AIC_dataset(): img_prefix='tests/data/aic/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -245,6 +261,7 @@ def test_bottom_up_AIC_dataset(): img_prefix='tests/data/aic/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.dataset_name == 'aic' @@ -265,6 +282,8 @@ def test_bottom_up_AIC_dataset(): def test_bottom_up_COCO_wholebody_dataset(): dataset = 'BottomUpCocoWholeBodyDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/coco_wholebody.py').dataset_info # test COCO-wholebody datasets dataset_class = DATASETS.get(dataset) @@ -293,6 +312,7 @@ def test_bottom_up_COCO_wholebody_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -300,6 +320,7 @@ def test_bottom_up_COCO_wholebody_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True diff --git a/tests/test_datasets/test_face_dataset.py b/tests/test_datasets/test_face_dataset.py index adde24977d..f99b1c1fca 100644 --- a/tests/test_datasets/test_face_dataset.py +++ b/tests/test_datasets/test_face_dataset.py @@ -3,64 +3,18 @@ import tempfile from unittest.mock import MagicMock -import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output from mmpose.datasets import DATASETS -def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): - outputs = [] - len_db = len(db) - for i in range(0, len_db, batch_size): - if is_3d: - keypoints = np.stack([ - db[j]['joints_3d'].reshape((-1, 3)) - for j in range(i, min(i + batch_size, len_db)) - ]) - else: - keypoints = np.stack([ - np.hstack([ - db[j]['joints_3d'].reshape((-1, 3))[:, :2], - db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] - ]) for j in range(i, min(i + batch_size, len_db)) - ]) - image_paths = [ - db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) - ] - bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack([ - np.array([ - db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], - db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 - ], - dtype=np.float32) - for j in range(i, min(i + batch_size, len_db)) - ]) - - output = {} - output['preds'] = keypoints - output['boxes'] = box - output['image_paths'] = image_paths - output['output_heatmap'] = None - output['bbox_ids'] = bbox_ids - - if keys is not None: - keys = keys if isinstance(keys, list) else [keys] - for key in keys: - output[key] = [ - db[j][key] for j in range(i, min(i + batch_size, len_db)) - ] - - outputs.append(output) - - return outputs - - def test_face_300W_dataset(): dataset = 'Face300WDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/300w.py').dataset_info # test Face 300W datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -88,6 +42,7 @@ def test_face_300W_dataset(): img_prefix='tests/data/300w/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -95,6 +50,7 @@ def test_face_300W_dataset(): img_prefix='tests/data/300w/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) assert custom_dataset.dataset_name == '300w' @@ -113,6 +69,8 @@ def test_face_300W_dataset(): def test_face_AFLW_dataset(): dataset = 'FaceAFLWDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/aflw.py').dataset_info # test Face AFLW datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -140,6 +98,7 @@ def test_face_AFLW_dataset(): img_prefix='tests/data/aflw/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -147,6 +106,7 @@ def test_face_AFLW_dataset(): img_prefix='tests/data/aflw/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) assert custom_dataset.dataset_name == 'aflw' @@ -165,6 +125,8 @@ def test_face_AFLW_dataset(): def test_face_WFLW_dataset(): dataset = 'FaceWFLWDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/wflw.py').dataset_info # test Face WFLW datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -192,6 +154,7 @@ def test_face_WFLW_dataset(): img_prefix='tests/data/wflw/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -199,6 +162,7 @@ def test_face_WFLW_dataset(): img_prefix='tests/data/wflw/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) assert custom_dataset.dataset_name == 'wflw' @@ -218,6 +182,8 @@ def test_face_WFLW_dataset(): def test_face_COFW_dataset(): dataset = 'FaceCOFWDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/cofw.py').dataset_info # test Face COFW datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -245,6 +211,7 @@ def test_face_COFW_dataset(): img_prefix='tests/data/cofw/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -252,6 +219,7 @@ def test_face_COFW_dataset(): img_prefix='tests/data/cofw/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) assert custom_dataset.dataset_name == 'cofw' diff --git a/tests/test_datasets/test_fashion_dataset.py b/tests/test_datasets/test_fashion_dataset.py index 8cc04162a2..6fd0ec6aae 100644 --- a/tests/test_datasets/test_fashion_dataset.py +++ b/tests/test_datasets/test_fashion_dataset.py @@ -2,64 +2,18 @@ import tempfile from unittest.mock import MagicMock -import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output from mmpose.datasets import DATASETS -def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): - outputs = [] - len_db = len(db) - for i in range(0, len_db, batch_size): - if is_3d: - keypoints = np.stack([ - db[j]['joints_3d'].reshape((-1, 3)) - for j in range(i, min(i + batch_size, len_db)) - ]) - else: - keypoints = np.stack([ - np.hstack([ - db[j]['joints_3d'].reshape((-1, 3))[:, :2], - db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] - ]) for j in range(i, min(i + batch_size, len_db)) - ]) - image_paths = [ - db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) - ] - bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack([ - np.array([ - db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], - db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 - ], - dtype=np.float32) - for j in range(i, min(i + batch_size, len_db)) - ]) - - output = {} - output['preds'] = keypoints - output['boxes'] = box - output['image_paths'] = image_paths - output['output_heatmap'] = None - output['bbox_ids'] = bbox_ids - - if keys is not None: - keys = keys if isinstance(keys, list) else [keys] - for key in keys: - output[key] = [ - db[j][key] for j in range(i, min(i + batch_size, len_db)) - ] - - outputs.append(output) - - return outputs - - def test_deepfashion_dataset(): dataset = 'DeepFashionDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/deepfashion_full.py').dataset_info # test JHMDB datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -96,6 +50,7 @@ def test_deepfashion_dataset(): subset='full', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True diff --git a/tests/test_datasets/test_hand_dataset.py b/tests/test_datasets/test_hand_dataset.py index f773e84710..0ba10efc8e 100644 --- a/tests/test_datasets/test_hand_dataset.py +++ b/tests/test_datasets/test_hand_dataset.py @@ -2,60 +2,19 @@ import copy import tempfile -import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output from mmpose.datasets import DATASETS -def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): - outputs = [] - len_db = len(db) - for i in range(0, len_db, batch_size): - keypoints_dim = 3 if is_3d else 2 - keypoints = np.stack([ - np.hstack([ - db[j]['joints_3d'].reshape((-1, 3))[:, :keypoints_dim], - db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] - ]) for j in range(i, min(i + batch_size, len_db)) - ]) - - image_paths = [ - db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) - ] - bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack([ - np.array([ - db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], - db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 - ], - dtype=np.float32) - for j in range(i, min(i + batch_size, len_db)) - ]) - - output = {} - output['preds'] = keypoints - output['boxes'] = box - output['image_paths'] = image_paths - output['output_heatmap'] = None - output['bbox_ids'] = bbox_ids - - if keys is not None: - keys = keys if isinstance(keys, list) else [keys] - for key in keys: - output[key] = [ - db[j][key] for j in range(i, min(i + batch_size, len_db)) - ] - - outputs.append(output) - - return outputs - - def test_top_down_OneHand10K_dataset(): dataset = 'OneHand10KDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/onehand10k.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -86,6 +45,7 @@ def test_top_down_OneHand10K_dataset(): img_prefix='tests/data/onehand10k/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -93,6 +53,7 @@ def test_top_down_OneHand10K_dataset(): img_prefix='tests/data/onehand10k/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) assert custom_dataset.dataset_name == 'onehand10k' @@ -113,6 +74,9 @@ def test_top_down_OneHand10K_dataset(): def test_top_down_FreiHand_dataset(): dataset = 'FreiHandDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/freihand2d.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -143,6 +107,7 @@ def test_top_down_FreiHand_dataset(): img_prefix='tests/data/freihand/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -150,6 +115,7 @@ def test_top_down_FreiHand_dataset(): img_prefix='tests/data/freihand/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) assert custom_dataset.dataset_name == 'freihand' @@ -170,6 +136,9 @@ def test_top_down_FreiHand_dataset(): def test_top_down_RHD_dataset(): dataset = 'Rhd2DDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/rhd2d.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -200,6 +169,7 @@ def test_top_down_RHD_dataset(): img_prefix='tests/data/rhd/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -207,6 +177,7 @@ def test_top_down_RHD_dataset(): img_prefix='tests/data/rhd/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) assert custom_dataset.dataset_name == 'rhd2d' @@ -227,6 +198,9 @@ def test_top_down_RHD_dataset(): def test_top_down_Panoptic_dataset(): dataset = 'PanopticDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/panoptic_hand2d.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -257,6 +231,7 @@ def test_top_down_Panoptic_dataset(): img_prefix='tests/data/panoptic/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -264,6 +239,7 @@ def test_top_down_Panoptic_dataset(): img_prefix='tests/data/panoptic/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) assert custom_dataset.dataset_name == 'panoptic_hand2d' @@ -285,6 +261,9 @@ def test_top_down_Panoptic_dataset(): def test_top_down_InterHand2D_dataset(): dataset = 'InterHand2DDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/interhand2d.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -317,6 +296,7 @@ def test_top_down_InterHand2D_dataset(): img_prefix='tests/data/interhand2.6m/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -326,6 +306,7 @@ def test_top_down_InterHand2D_dataset(): img_prefix='tests/data/interhand2.6m/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) assert custom_dataset.dataset_name == 'interhand2d' @@ -349,6 +330,9 @@ def test_top_down_InterHand2D_dataset(): def test_top_down_InterHand3D_dataset(): dataset = 'InterHand3DDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/interhand3d.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -386,6 +370,7 @@ def test_top_down_InterHand3D_dataset(): img_prefix='tests/data/interhand2.6m/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -395,6 +380,7 @@ def test_top_down_InterHand3D_dataset(): img_prefix='tests/data/interhand2.6m/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) assert custom_dataset.dataset_name == 'interhand3d' diff --git a/tests/test_datasets/test_top_down_dataset.py b/tests/test_datasets/test_top_down_dataset.py index 7b05db61ff..52cfb55f5f 100644 --- a/tests/test_datasets/test_top_down_dataset.py +++ b/tests/test_datasets/test_top_down_dataset.py @@ -3,64 +3,18 @@ import tempfile from unittest.mock import MagicMock -import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output from mmpose.datasets import DATASETS -def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): - outputs = [] - len_db = len(db) - for i in range(0, len_db, batch_size): - if is_3d: - keypoints = np.stack([ - db[j]['joints_3d'].reshape((-1, 3)) - for j in range(i, min(i + batch_size, len_db)) - ]) - else: - keypoints = np.stack([ - np.hstack([ - db[j]['joints_3d'].reshape((-1, 3))[:, :2], - db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] - ]) for j in range(i, min(i + batch_size, len_db)) - ]) - image_paths = [ - db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) - ] - bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack([ - np.array([ - db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], - db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 - ], - dtype=np.float32) - for j in range(i, min(i + batch_size, len_db)) - ]) - - output = {} - output['preds'] = keypoints - output['boxes'] = box - output['image_paths'] = image_paths - output['output_heatmap'] = None - output['bbox_ids'] = bbox_ids - - if keys is not None: - keys = keys if isinstance(keys, list) else [keys] - for key in keys: - output[key] = [ - db[j][key] for j in range(i, min(i + batch_size, len_db)) - ] - - outputs.append(output) - - return outputs - - def test_top_down_COCO_dataset(): dataset = 'TopDownCocoDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/coco.py').dataset_info # test COCO datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -99,6 +53,7 @@ def test_top_down_COCO_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -106,6 +61,7 @@ def test_top_down_COCO_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -114,6 +70,7 @@ def test_top_down_COCO_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -135,6 +92,8 @@ def test_top_down_COCO_dataset(): def test_top_down_MHP_dataset(): dataset = 'TopDownMhpDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/mhp.py').dataset_info # test MHP datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -177,6 +136,7 @@ def test_top_down_MHP_dataset(): img_prefix='tests/data/mhp/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) # Test gt bbox @@ -185,6 +145,7 @@ def test_top_down_MHP_dataset(): img_prefix='tests/data/mhp/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -192,6 +153,7 @@ def test_top_down_MHP_dataset(): img_prefix='tests/data/mhp/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -213,6 +175,8 @@ def test_top_down_MHP_dataset(): def test_top_down_PoseTrack18_dataset(): dataset = 'TopDownPoseTrack18Dataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/posetrack18.py').dataset_info # test PoseTrack datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -252,6 +216,7 @@ def test_top_down_PoseTrack18_dataset(): img_prefix='tests/data/posetrack18/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -259,6 +224,7 @@ def test_top_down_PoseTrack18_dataset(): img_prefix='tests/data/posetrack18/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -267,6 +233,7 @@ def test_top_down_PoseTrack18_dataset(): img_prefix='tests/data/posetrack18/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -280,6 +247,8 @@ def test_top_down_PoseTrack18_dataset(): def test_top_down_CrowdPose_dataset(): dataset = 'TopDownCrowdPoseDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/crowdpose.py').dataset_info # test CrowdPose datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -316,6 +285,7 @@ def test_top_down_CrowdPose_dataset(): img_prefix='tests/data/crowdpose/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -323,6 +293,7 @@ def test_top_down_CrowdPose_dataset(): img_prefix='tests/data/crowdpose/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -331,6 +302,7 @@ def test_top_down_CrowdPose_dataset(): img_prefix='tests/data/crowdpose/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -352,6 +324,8 @@ def test_top_down_CrowdPose_dataset(): def test_top_down_COCO_wholebody_dataset(): dataset = 'TopDownCocoWholeBodyDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/coco_wholebody.py').dataset_info # test COCO datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -388,6 +362,7 @@ def test_top_down_COCO_wholebody_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -395,6 +370,7 @@ def test_top_down_COCO_wholebody_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -403,6 +379,7 @@ def test_top_down_COCO_wholebody_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -424,6 +401,8 @@ def test_top_down_COCO_wholebody_dataset(): def test_top_down_OCHuman_dataset(): dataset = 'TopDownOCHumanDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/ochuman.py').dataset_info # test OCHuman datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -464,6 +443,7 @@ def test_top_down_OCHuman_dataset(): img_prefix='tests/data/ochuman/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) # Test gt bbox @@ -472,6 +452,7 @@ def test_top_down_OCHuman_dataset(): img_prefix='tests/data/ochuman/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -493,6 +474,8 @@ def test_top_down_OCHuman_dataset(): def test_top_down_MPII_dataset(): dataset = 'TopDownMpiiDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/mpii.py').dataset_info # test COCO datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -523,7 +506,9 @@ def test_top_down_MPII_dataset(): ann_file='tests/data/mpii/test_mpii.json', img_prefix='tests/data/mpii/', data_cfg=data_cfg_copy, - pipeline=[]) + pipeline=[], + dataset_info=dataset_info, + ) assert len(custom_dataset) == 5 assert custom_dataset.dataset_name == 'mpii' @@ -532,6 +517,8 @@ def test_top_down_MPII_dataset(): def test_top_down_MPII_TRB_dataset(): dataset = 'TopDownMpiiTrbDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/mpii_trb.py').dataset_info # test MPII TRB datasets dataset_class = DATASETS.get(dataset) @@ -555,6 +542,7 @@ def test_top_down_MPII_TRB_dataset(): img_prefix='tests/data/mpii/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -562,6 +550,7 @@ def test_top_down_MPII_TRB_dataset(): img_prefix='tests/data/mpii/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -571,6 +560,8 @@ def test_top_down_MPII_TRB_dataset(): def test_top_down_AIC_dataset(): dataset = 'TopDownAicDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/aic.py').dataset_info # test AIC datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -608,6 +599,7 @@ def test_top_down_AIC_dataset(): img_prefix='tests/data/aic/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -615,6 +607,7 @@ def test_top_down_AIC_dataset(): img_prefix='tests/data/aic/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -623,6 +616,7 @@ def test_top_down_AIC_dataset(): img_prefix='tests/data/aic/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -644,6 +638,8 @@ def test_top_down_AIC_dataset(): def test_top_down_JHMDB_dataset(): dataset = 'TopDownJhmdbDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/jhmdb.py').dataset_info # test JHMDB datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -681,6 +677,7 @@ def test_top_down_JHMDB_dataset(): img_prefix='tests/data/jhmdb/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -688,6 +685,7 @@ def test_top_down_JHMDB_dataset(): img_prefix='tests/data/jhmdb/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -696,6 +694,7 @@ def test_top_down_JHMDB_dataset(): img_prefix='tests/data/jhmdb/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -720,6 +719,8 @@ def test_top_down_JHMDB_dataset(): def test_top_down_h36m_dataset(): dataset = 'TopDownH36MDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/h36m.py').dataset_info # test AIC datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -749,6 +750,7 @@ def test_top_down_h36m_dataset(): img_prefix='tests/data/h36m/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True diff --git a/tests/test_eval_hook.py b/tests/test_eval_hook.py index 4a933dc6be..f472541c95 100644 --- a/tests/test_eval_hook.py +++ b/tests/test_eval_hook.py @@ -143,10 +143,11 @@ def test_eval_hook(EvalHookCls): batch_processor=None, optimizer=optimizer, work_dir=tmpdir, - logger=logger) + logger=logger, + max_epochs=8) runner.register_checkpoint_hook(dict(interval=1)) runner.register_hook(eval_hook) - runner.run([loader], [('train', 1)], 8) + runner.run([loader], [('train', 1)]) real_path = osp.join(tmpdir, 'best_acc_epoch_4.pth') diff --git a/tests/utils/data_utils.py b/tests/utils/data_utils.py new file mode 100644 index 0000000000..96ed4c1652 --- /dev/null +++ b/tests/utils/data_utils.py @@ -0,0 +1,46 @@ +import numpy as np + + +def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): + outputs = [] + len_db = len(db) + for i in range(0, len_db, batch_size): + keypoints_dim = 3 if is_3d else 2 + keypoints = np.stack([ + np.hstack([ + db[j]['joints_3d'].reshape((-1, 3))[:, :keypoints_dim], + db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] + ]) for j in range(i, min(i + batch_size, len_db)) + ]) + + image_paths = [ + db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) + ] + bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] + box = np.stack([ + np.array([ + db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], + db[j]['scale'][1], + db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 + ], + dtype=np.float32) + for j in range(i, min(i + batch_size, len_db)) + ]) + + output = {} + output['preds'] = keypoints + output['boxes'] = box + output['image_paths'] = image_paths + output['output_heatmap'] = None + output['bbox_ids'] = bbox_ids + + if keys is not None: + keys = keys if isinstance(keys, list) else [keys] + for key in keys: + output[key] = [ + db[j][key] for j in range(i, min(i + batch_size, len_db)) + ] + + outputs.append(output) + + return outputs From c74e7a57086f26366d83dd0c98d39b2538650193 Mon Sep 17 00:00:00 2001 From: ly015 Date: Fri, 27 Aug 2021 18:26:44 +0800 Subject: [PATCH 18/19] add unittest for old-fashioned dataset initialization without dataset_info --- .../test_animal_dataset.py | 415 ++++++++++ .../test_body3d_dataset.py | 266 +++++++ .../test_bottom_up_dataset.py | 325 ++++++++ .../test_deprecated_dataset_base.py | 27 + .../test_face_dataset.py | 170 ++++ .../test_fashion_dataset.py | 69 ++ .../test_hand_dataset.py | 388 +++++++++ .../test_inference.py} | 23 - .../test_top_down_dataset.py | 745 ++++++++++++++++++ 9 files changed, 2405 insertions(+), 23 deletions(-) create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset.py rename tests/test_backward_compatibility/{test_dataset_info_compatibility.py => test_dataset_info_compatibility/test_inference.py} (83%) create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset.py diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset.py new file mode 100644 index 0000000000..e3cfa9647d --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset.py @@ -0,0 +1,415 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +import tempfile + +import pytest +from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output + +from mmpose.datasets import DATASETS + + +def test_animal_horse10_dataset(): + dataset = 'AnimalHorse10Dataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=22, + dataset_joints=22, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 21 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 21 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/horse10/test_horse10.json', + img_prefix='tests/data/horse10/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/horse10/test_horse10.json', + img_prefix='tests/data/horse10/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 3 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + assert_almost_equal(infos['PCK'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_animal_fly_dataset(): + dataset = 'AnimalFlyDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=32, + dataset_joints=32, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 + ]) + + data_cfg = dict( + image_size=[192, 192], + heatmap_size=[48, 48], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/fly/test_fly.json', + img_prefix='tests/data/fly/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/fly/test_fly.json', + img_prefix='tests/data/fly/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + assert_almost_equal(infos['PCK'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_animal_locust_dataset(): + dataset = 'AnimalLocustDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=35, + dataset_joints=35, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 + ]) + + data_cfg = dict( + image_size=[160, 160], + heatmap_size=[40, 40], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/locust/test_locust.json', + img_prefix='tests/data/locust/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/locust/test_locust.json', + img_prefix='tests/data/locust/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + assert_almost_equal(infos['PCK'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_animal_zebra_dataset(): + dataset = 'AnimalZebraDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=9, + dataset_joints=9, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8]) + + data_cfg = dict( + image_size=[160, 160], + heatmap_size=[40, 40], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/zebra/test_zebra.json', + img_prefix='tests/data/zebra/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/zebra/test_zebra.json', + img_prefix='tests/data/zebra/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + assert_almost_equal(infos['PCK'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_animal_ATRW_dataset(): + dataset = 'AnimalATRWDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=15, + dataset_joints=15, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='', + ) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/atrw/test_atrw.json', + img_prefix='tests/data/atrw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/atrw/test_atrw.json', + img_prefix='tests/data/atrw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + + +def test_animal_Macaque_dataset(): + dataset = 'AnimalMacaqueDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=17, + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 + ]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='', + ) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/macaque/test_macaque.json', + img_prefix='tests/data/macaque/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/macaque/test_macaque.json', + img_prefix='tests/data/macaque/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + + +def test_animalpose_dataset(): + dataset = 'AnimalPoseDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=20, + dataset_joints=20, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='', + ) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/animalpose/test_animalpose.json', + img_prefix='tests/data/animalpose/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/animalpose/test_animalpose.json', + img_prefix='tests/data/animalpose/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset.py new file mode 100644 index 0000000000..f0faf097a4 --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset.py @@ -0,0 +1,266 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import tempfile + +import numpy as np +import pytest + +from mmpose.datasets import DATASETS +from mmpose.datasets.builder import build_dataset + + +def test_body3d_h36m_dataset(): + # Test Human3.6M dataset + dataset = 'Body3DH36MDataset' + dataset_class = DATASETS.get(dataset) + + # test single-frame input + data_cfg = dict( + num_joints=17, + seq_len=1, + seq_frame_interval=1, + joint_2d_src='pipeline', + joint_2d_det_file=None, + causal=False, + need_camera_param=True, + camera_param_file='tests/data/h36m/cameras.pkl') + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + _ = custom_dataset[0] + + with tempfile.TemporaryDirectory() as tmpdir: + outputs = [] + for result in custom_dataset: + outputs.append({ + 'preds': result['target'][None, ...], + 'target_image_paths': [result['target_image_path']], + }) + + metrics = ['mpjpe', 'p-mpjpe', 'n-mpjpe'] + infos = custom_dataset.evaluate(outputs, tmpdir, metrics) + + np.testing.assert_almost_equal(infos['MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['P-MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['N-MPJPE'], 0.0) + + # test multi-frame input with joint_2d_src = 'detection' + data_cfg = dict( + num_joints=17, + seq_len=27, + seq_frame_interval=1, + causal=True, + temporal_padding=True, + joint_2d_src='detection', + joint_2d_det_file='tests/data/h36m/test_h36m_2d_detection.npy', + need_camera_param=True, + camera_param_file='tests/data/h36m/cameras.pkl') + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + _ = custom_dataset[0] + + with tempfile.TemporaryDirectory() as tmpdir: + outputs = [] + for result in custom_dataset: + outputs.append({ + 'preds': result['target'][None, ...], + 'target_image_paths': [result['target_image_path']], + }) + + metrics = ['mpjpe', 'p-mpjpe', 'n-mpjpe'] + infos = custom_dataset.evaluate(outputs, tmpdir, metrics) + + np.testing.assert_almost_equal(infos['MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['P-MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['N-MPJPE'], 0.0) + + +def test_body3d_semi_supervision_dataset(): + # Test Body3d Semi-supervision Dataset + + # load labeled dataset + labeled_data_cfg = dict( + num_joints=17, + seq_len=27, + seq_frame_interval=1, + causall=False, + temporal_padding=True, + joint_2d_src='gt', + subset=1, + subjects=['S1'], + need_camera_param=True, + camera_param_file='tests/data/h36m/cameras.pkl') + labeled_dataset = dict( + type='Body3DH36MDataset', + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=labeled_data_cfg, + pipeline=[]) + + # load unlabled data + unlabeled_data_cfg = dict( + num_joints=17, + seq_len=27, + seq_frame_interval=1, + causal=False, + temporal_padding=True, + joint_2d_src='gt', + subjects=['S5', 'S7', 'S8'], + need_camera_param=True, + camera_param_file='tests/data/h36m/cameras.pkl', + need_2d_label=True) + unlabeled_dataset = dict( + type='Body3DH36MDataset', + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=unlabeled_data_cfg, + pipeline=[ + dict( + type='Collect', + keys=[('input_2d', 'unlabeled_input')], + meta_name='metas', + meta_keys=[]) + ]) + + # combine labeled and unlabeled dataset to form a new dataset + dataset = 'Body3DSemiSupervisionDataset' + dataset_class = DATASETS.get(dataset) + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class(labeled_dataset, unlabeled_dataset) + item = custom_dataset[0] + assert 'unlabeled_input' in item.keys() + + unlabeled_dataset = build_dataset(unlabeled_dataset) + assert len(unlabeled_dataset) == len(custom_dataset) + + +def test_body3d_mpi_inf_3dhp_dataset(): + # Test MPI-INF-3DHP dataset + dataset = 'Body3DMpiInf3dhpDataset' + dataset_class = DATASETS.get(dataset) + + # Test single-frame input on trainset + single_frame_train_data_cfg = dict( + num_joints=17, + seq_len=1, + seq_frame_interval=1, + joint_2d_src='pipeline', + joint_2d_det_file=None, + causal=False, + need_camera_param=True, + camera_param_file='tests/data/mpi_inf_3dhp/cameras_train.pkl') + + # Test single-frame input on testset + single_frame_test_data_cfg = dict( + num_joints=17, + seq_len=1, + seq_frame_interval=1, + joint_2d_src='gt', + joint_2d_det_file=None, + causal=False, + need_camera_param=True, + camera_param_file='tests/data/mpi_inf_3dhp/cameras_test.pkl') + + # Test multi-frame input on trainset + multi_frame_train_data_cfg = dict( + num_joints=17, + seq_len=27, + seq_frame_interval=1, + joint_2d_src='gt', + joint_2d_det_file=None, + causal=True, + temporal_padding=True, + need_camera_param=True, + camera_param_file='tests/data/mpi_inf_3dhp/cameras_train.pkl') + + # Test multi-frame input on testset + multi_frame_test_data_cfg = dict( + num_joints=17, + seq_len=27, + seq_frame_interval=1, + joint_2d_src='pipeline', + joint_2d_det_file=None, + causal=False, + temporal_padding=True, + need_camera_param=True, + camera_param_file='tests/data/mpi_inf_3dhp/cameras_test.pkl') + + ann_files = [ + 'tests/data/mpi_inf_3dhp/test_3dhp_train.npz', + 'tests/data/mpi_inf_3dhp/test_3dhp_test.npz' + ] * 2 + data_cfgs = [ + single_frame_train_data_cfg, single_frame_test_data_cfg, + multi_frame_train_data_cfg, multi_frame_test_data_cfg + ] + + for ann_file, data_cfg in zip(ann_files, data_cfgs): + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file=ann_file, + img_prefix='tests/data/mpi_inf_3dhp', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file=ann_file, + img_prefix='tests/data/mpi_inf_3dhp', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + _ = custom_dataset[0] + + with tempfile.TemporaryDirectory() as tmpdir: + outputs = [] + for result in custom_dataset: + outputs.append({ + 'preds': + result['target'][None, ...], + 'target_image_paths': [result['target_image_path']], + }) + + metrics = [ + 'mpjpe', 'p-mpjpe', '3dpck', 'p-3dpck', '3dauc', 'p-3dauc' + ] + infos = custom_dataset.evaluate(outputs, tmpdir, metrics) + + np.testing.assert_almost_equal(infos['MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['P-MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['3DPCK'], 100.) + np.testing.assert_almost_equal(infos['P-3DPCK'], 100.) + np.testing.assert_almost_equal(infos['3DAUC'], 30 / 31 * 100) + np.testing.assert_almost_equal(infos['P-3DAUC'], 30 / 31 * 100) diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset.py new file mode 100644 index 0000000000..86969843bf --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset.py @@ -0,0 +1,325 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import tempfile + +import numpy as np +import pytest +from numpy.testing import assert_almost_equal + +from mmpose.datasets import DATASETS + + +def convert_coco_to_output(coco, is_wholebody=False): + outputs = [] + for img_id in coco.getImgIds(): + preds = [] + scores = [] + image = coco.imgs[img_id] + ann_ids = coco.getAnnIds(img_id) + for ann_id in ann_ids: + obj = coco.anns[ann_id] + if is_wholebody: + keypoints = np.array(obj['keypoints'] + obj['foot_kpts'] + + obj['face_kpts'] + obj['lefthand_kpts'] + + obj['righthand_kpts']).reshape(-1, 3) + else: + keypoints = np.array(obj['keypoints']).reshape((-1, 3)) + K = keypoints.shape[0] + if sum(keypoints[:, 2]) == 0: + continue + preds.append( + np.concatenate((keypoints[:, :2], np.ones( + [K, 1]), np.ones([K, 1]) * ann_id), + axis=1)) + scores.append(1) + image_paths = [] + image_paths.append(image['file_name']) + + output = {} + output['preds'] = np.stack(preds) + output['scores'] = scores + output['image_paths'] = image_paths + output['output_heatmap'] = None + + outputs.append(output) + + return outputs + + +def test_bottom_up_COCO_dataset(): + dataset = 'BottomUpCocoDataset' + # test COCO datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 + ]) + + data_cfg = dict( + image_size=512, + base_size=256, + base_sigma=2, + heatmap_size=[128, 256], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + num_scales=2, + scale_aware_sigma=False, + use_nms=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/coco/test_coco.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.num_images == 4 + _ = custom_dataset[0] + assert custom_dataset.dataset_name == 'coco' + + outputs = convert_coco_to_output(custom_dataset.coco) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_bottom_up_CrowdPose_dataset(): + dataset = 'BottomUpCrowdPoseDataset' + # test CrowdPose datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=14, + dataset_joints=14, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) + + data_cfg = dict( + image_size=512, + base_size=256, + base_sigma=2, + heatmap_size=[128, 256], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + num_scales=2, + scale_aware_sigma=False) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/crowdpose/test_crowdpose.json', + img_prefix='tests/data/crowdpose/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/crowdpose/test_crowdpose.json', + img_prefix='tests/data/crowdpose/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + image_id = 103319 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 2 + _ = custom_dataset[0] + assert custom_dataset.dataset_name == 'crowdpose' + + outputs = convert_coco_to_output(custom_dataset.coco) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_bottom_up_MHP_dataset(): + dataset = 'BottomUpMhpDataset' + # test MHP datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + dataset_joints=16, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + ]) + + data_cfg = dict( + image_size=512, + base_size=256, + base_sigma=2, + heatmap_size=[128], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + num_scales=1, + scale_aware_sigma=False, + ) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/mhp/test_mhp.json', + img_prefix='tests/data/mhp/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/mhp/test_mhp.json', + img_prefix='tests/data/mhp/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + image_id = 2889 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 2 + _ = custom_dataset[0] + assert custom_dataset.dataset_name == 'mhp' + + outputs = convert_coco_to_output(custom_dataset.coco) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_bottom_up_AIC_dataset(): + dataset = 'BottomUpAicDataset' + # test MHP datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=14, + dataset_joints=14, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) + + data_cfg = dict( + image_size=512, + base_size=256, + base_sigma=2, + heatmap_size=[128], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + num_scales=1, + scale_aware_sigma=False, + ) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/aic/test_aic.json', + img_prefix='tests/data/aic/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/aic/test_aic.json', + img_prefix='tests/data/aic/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + image_id = 1 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 3 + _ = custom_dataset[0] + + outputs = convert_coco_to_output(custom_dataset.coco) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_bottom_up_COCO_wholebody_dataset(): + dataset = 'BottomUpCocoWholeBodyDataset' + # test COCO-wholebody datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=133, + dataset_joints=133, + dataset_channel=[ + list(range(133)), + ], + inference_channel=list(range(133))) + + data_cfg = dict( + image_size=512, + base_size=256, + base_sigma=2, + heatmap_size=[128, 256], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + num_scales=2, + scale_aware_sigma=False, + ) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco_wholebody.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/coco/test_coco_wholebody.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'coco_wholebody' + + image_id = 785 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 4 + _ = custom_dataset[0] + + outputs = convert_coco_to_output(custom_dataset.coco, is_wholebody=True) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py new file mode 100644 index 0000000000..d883c81023 --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py @@ -0,0 +1,27 @@ +import pytest + +from mmpose.datasets.datasets.animal.animal_base_dataset import \ + AnimalBaseDataset +from mmpose.datasets.datasets.body3d.body3d_base_dataset import \ + Body3DBaseDataset +from mmpose.datasets.datasets.bottom_up.bottom_up_base_dataset import \ + BottomUpBaseDataset +from mmpose.datasets.datasets.face.face_base_dataset import FaceBaseDataset +from mmpose.datasets.datasets.fashion.fashion_fase_dataset import \ + FashionBaseDataset +from mmpose.datasets.datasets.hand.hand_base_dataset import HandBaseDataset +from mmpose.datasets.datasets.top_down.topdown_base_dataset import \ + TopDownBaseDataset + + +@pytest.mark.parametrize('BaseDataset', + (AnimalBaseDataset, BottomUpBaseDataset, + FaceBaseDataset, FashionBaseDataset, HandBaseDataset, + TopDownBaseDataset, Body3DBaseDataset)) +def test_dataset_base_class(BaseDataset): + with pytest.raises(ImportError): + + class Dataset(BaseDataset): + pass + + _ = Dataset() diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset.py new file mode 100644 index 0000000000..acc201c23e --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset.py @@ -0,0 +1,170 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +import tempfile +from unittest.mock import MagicMock + +import pytest +from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output + +from mmpose.datasets import DATASETS + + +def test_face_300W_dataset(): + dataset = 'Face300WDataset' + # test Face 300W datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=68, + dataset_joints=68, + dataset_channel=[ + list(range(68)), + ], + inference_channel=list(range(68))) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/300w/test_300w.json', + img_prefix='tests/data/300w/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/300w/test_300w.json', + img_prefix='tests/data/300w/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['NME']) + assert_almost_equal(infos['NME'], 0.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_face_AFLW_dataset(): + dataset = 'FaceAFLWDataset' + # test Face AFLW datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=19, + dataset_joints=19, + dataset_channel=[ + list(range(19)), + ], + inference_channel=list(range(19))) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/aflw/test_aflw.json', + img_prefix='tests/data/aflw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/aflw/test_aflw.json', + img_prefix='tests/data/aflw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['NME']) + assert_almost_equal(infos['NME'], 0.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_face_WFLW_dataset(): + dataset = 'FaceWFLWDataset' + # test Face WFLW datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=98, + dataset_joints=98, + dataset_channel=[ + list(range(98)), + ], + inference_channel=list(range(98))) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/wflw/test_wflw.json', + img_prefix='tests/data/wflw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/wflw/test_wflw.json', + img_prefix='tests/data/wflw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['NME']) + assert_almost_equal(infos['NME'], 0.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset.py new file mode 100644 index 0000000000..f440e9ead2 --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset.py @@ -0,0 +1,69 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import tempfile +from unittest.mock import MagicMock + +import pytest +from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output + +from mmpose.datasets import DATASETS + + +def test_deepfashion_dataset(): + dataset = 'DeepFashionDataset' + # test JHMDB datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=8, + dataset_joints=8, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + image_thr=0.0, + bbox_file='') + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/fld/test_fld.json', + img_prefix='tests/data/fld/', + subset='full', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'deepfashion_full' + + image_id = 128 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK', 'EPE', 'AUC']) + assert_almost_equal(infos['PCK'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset.py new file mode 100644 index 0000000000..1de369d66d --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset.py @@ -0,0 +1,388 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +import tempfile + +import pytest +from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output + +from mmpose.datasets import DATASETS + + +def test_top_down_OneHand10K_dataset(): + dataset = 'OneHand10KDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=21, + dataset_joints=21, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/onehand10k/test_onehand10k.json', + img_prefix='tests/data/onehand10k/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/onehand10k/test_onehand10k.json', + img_prefix='tests/data/onehand10k/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 4 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK', 'EPE', 'AUC']) + assert_almost_equal(infos['PCK'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_FreiHand_dataset(): + dataset = 'FreiHandDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=21, + dataset_joints=21, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20 + ]) + + data_cfg = dict( + image_size=[224, 224], + heatmap_size=[56, 56], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/freihand/test_freihand.json', + img_prefix='tests/data/freihand/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/freihand/test_freihand.json', + img_prefix='tests/data/freihand/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 8 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK', 'EPE', 'AUC']) + assert_almost_equal(infos['PCK'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_RHD_dataset(): + dataset = 'Rhd2DDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=21, + dataset_joints=21, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/rhd/test_rhd.json', + img_prefix='tests/data/rhd/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/rhd/test_rhd.json', + img_prefix='tests/data/rhd/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 3 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK', 'EPE', 'AUC']) + assert_almost_equal(infos['PCK'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_Panoptic_dataset(): + dataset = 'PanopticDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=21, + dataset_joints=21, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/panoptic/test_panoptic.json', + img_prefix='tests/data/panoptic/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/panoptic/test_panoptic.json', + img_prefix='tests/data/panoptic/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 4 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, + ['PCKh', 'EPE', 'AUC']) + assert_almost_equal(infos['PCKh'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_InterHand2D_dataset(): + dataset = 'InterHand2DDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=21, + dataset_joints=21, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/interhand2.6m/test_interhand2.6m_data.json', + camera_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_camera.json', + joint_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_joint_3d.json', + img_prefix='tests/data/interhand2.6m/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/interhand2.6m/test_interhand2.6m_data.json', + camera_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_camera.json', + joint_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_joint_3d.json', + img_prefix='tests/data/interhand2.6m/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 4 + assert len(custom_dataset.db) == 6 + + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK', 'EPE', 'AUC']) + print(infos, flush=True) + assert_almost_equal(infos['PCK'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_InterHand3D_dataset(): + dataset = 'InterHand3DDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=42, + dataset_joints=42, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64, 64], + heatmap3d_depth_bound=400.0, + heatmap_size_root=64, + root_depth_bound=400.0, + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/interhand2.6m/test_interhand2.6m_data.json', + camera_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_camera.json', + joint_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_joint_3d.json', + img_prefix='tests/data/interhand2.6m/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/interhand2.6m/test_interhand2.6m_data.json', + camera_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_camera.json', + joint_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_joint_3d.json', + img_prefix='tests/data/interhand2.6m/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 4 + assert len(custom_dataset.db) == 4 + + _ = custom_dataset[0] + + outputs = convert_db_to_output( + custom_dataset.db, keys=['rel_root_depth', 'hand_type'], is_3d=True) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, + ['MRRPE', 'MPJPE', 'Handedness_acc']) + assert_almost_equal(infos['MRRPE'], 0.0, decimal=5) + assert_almost_equal(infos['MPJPE_all'], 0.0, decimal=5) + assert_almost_equal(infos['MPJPE_single'], 0.0, decimal=5) + assert_almost_equal(infos['MPJPE_interacting'], 0.0, decimal=5) + assert_almost_equal(infos['Handedness_acc'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference.py similarity index 83% rename from tests/test_backward_compatibility/test_dataset_info_compatibility.py rename to tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference.py index e1b8c5ebaf..333dc87419 100644 --- a/tests/test_backward_compatibility/test_dataset_info_compatibility.py +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference.py @@ -7,29 +7,6 @@ inference_top_down_pose_model, init_pose_model, vis_3d_pose_result, vis_pose_result, vis_pose_tracking_result) -from mmpose.datasets.datasets.animal.animal_base_dataset import \ - AnimalBaseDataset -from mmpose.datasets.datasets.bottom_up.bottom_up_base_dataset import \ - BottomUpBaseDataset -from mmpose.datasets.datasets.face.face_base_dataset import FaceBaseDataset -from mmpose.datasets.datasets.fashion.fashion_fase_dataset import \ - FashionBaseDataset -from mmpose.datasets.datasets.hand.hand_base_dataset import HandBaseDataset -from mmpose.datasets.datasets.top_down.topdown_base_dataset import \ - TopDownBaseDataset - - -@pytest.mark.parametrize('BaseDataset', - (AnimalBaseDataset, BottomUpBaseDataset, - FaceBaseDataset, FashionBaseDataset, HandBaseDataset, - TopDownBaseDataset)) -def test_dataset_base_class(BaseDataset): - with pytest.raises(ImportError): - - class Dataset(BaseDataset): - pass - - _ = Dataset() def test_inference_without_dataset_info(): diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset.py new file mode 100644 index 0000000000..fe65626d35 --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset.py @@ -0,0 +1,745 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +import tempfile +from unittest.mock import MagicMock + +import pytest +from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output + +from mmpose.datasets import DATASETS + + +def test_top_down_COCO_dataset(): + dataset = 'TopDownCocoDataset' + # test COCO datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=17, + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 + ]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='tests/data/coco/test_coco_det_AP_H_56.json', + ) + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/coco/test_coco.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'coco' + + image_id = 785 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 4 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_MHP_dataset(): + dataset = 'TopDownMhpDataset' + # test MHP datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=16, + dataset_joints=16, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + ]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + bbox_thr=1.0, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='', + ) + + # Test det bbox + with pytest.raises(AssertionError): + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/mhp/test_mhp.json', + img_prefix='tests/data/mhp/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/mhp/test_mhp.json', + img_prefix='tests/data/mhp/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/mhp/test_mhp.json', + img_prefix='tests/data/mhp/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'mhp' + + image_id = 2889 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_PoseTrack18_dataset(): + dataset = 'TopDownPoseTrack18Dataset' + # test PoseTrack datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=17, + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 + ]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='tests/data/posetrack18/' + 'test_posetrack18_human_detections.json', + ) + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/posetrack18/test_posetrack18.json', + img_prefix='tests/data/posetrack18/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/posetrack18/test_posetrack18.json', + img_prefix='tests/data/posetrack18/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/posetrack18/test_posetrack18.json', + img_prefix='tests/data/posetrack18/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'posetrack18' + + image_id = 10128340000 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 3 + _ = custom_dataset[0] + + +def test_top_down_CrowdPose_dataset(): + dataset = 'TopDownCrowdPoseDataset' + # test CrowdPose datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=14, + dataset_joints=14, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='tests/data/crowdpose/test_crowdpose_det_AP_40.json', + ) + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/crowdpose/test_crowdpose.json', + img_prefix='tests/data/crowdpose/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/crowdpose/test_crowdpose.json', + img_prefix='tests/data/crowdpose/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/crowdpose/test_crowdpose.json', + img_prefix='tests/data/crowdpose/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'crowdpose' + + image_id = 103319 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_COCO_wholebody_dataset(): + dataset = 'TopDownCocoWholeBodyDataset' + # test COCO datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=133, + dataset_joints=133, + dataset_channel=[ + list(range(133)), + ], + inference_channel=list(range(133))) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='tests/data/coco/test_coco_det_AP_H_56.json', + ) + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco_wholebody.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco_wholebody.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/coco/test_coco_wholebody.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'coco_wholebody' + + image_id = 785 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 4 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_OCHuman_dataset(): + dataset = 'TopDownOCHumanDataset' + # test OCHuman datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=17, + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 + ]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='', + ) + + with pytest.raises(AssertionError): + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/ochuman/test_ochuman.json', + img_prefix='tests/data/ochuman/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/ochuman/test_ochuman.json', + img_prefix='tests/data/ochuman/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'ochuman' + + image_id = 1 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 3 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_MPII_dataset(): + dataset = 'TopDownMpiiDataset' + # test COCO datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=16, + dataset_joints=16, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + ) + + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/mpii/test_mpii.json', + img_prefix='tests/data/mpii/', + data_cfg=data_cfg_copy, + pipeline=[]) + + assert len(custom_dataset) == 5 + assert custom_dataset.dataset_name == 'mpii' + _ = custom_dataset[0] + + +def test_top_down_MPII_TRB_dataset(): + dataset = 'TopDownMpiiTrbDataset' + # test MPII TRB datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=40, + dataset_joints=40, + dataset_channel=[list(range(40))], + inference_channel=list(range(40))) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/mpii/test_mpii_trb.json', + img_prefix='tests/data/mpii/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/mpii/test_mpii_trb.json', + img_prefix='tests/data/mpii/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'mpii_trb' + _ = custom_dataset[0] + + +def test_top_down_AIC_dataset(): + dataset = 'TopDownAicDataset' + # test AIC datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=14, + dataset_joints=14, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='') + + with pytest.raises(AssertionError): + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/aic/test_aic.json', + img_prefix='tests/data/aic/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/aic/test_aic.json', + img_prefix='tests/data/aic/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/aic/test_aic.json', + img_prefix='tests/data/aic/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'aic' + + image_id = 1 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 3 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_JHMDB_dataset(): + dataset = 'TopDownJhmdbDataset' + # test JHMDB datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=15, + dataset_joints=15, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='') + + with pytest.raises(AssertionError): + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/jhmdb/test_jhmdb_sub1.json', + img_prefix='tests/data/jhmdb/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/jhmdb/test_jhmdb_sub1.json', + img_prefix='tests/data/jhmdb/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/jhmdb/test_jhmdb_sub1.json', + img_prefix='tests/data/jhmdb/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'jhmdb' + + image_id = 2290001 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 3 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + assert_almost_equal(infos['Mean PCK'], 1.0) + + infos = custom_dataset.evaluate(outputs, tmpdir, ['tPCK']) + assert_almost_equal(infos['Mean tPCK'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_h36m_dataset(): + dataset = 'TopDownH36MDataset' + # test AIC datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=17, + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/h36m/h36m_coco.json', + img_prefix='tests/data/h36m/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'h36m' + + image_id = 1 + assert image_id in custom_dataset.img_ids + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'EPE') + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'AUC') From 45b37033cc616d0819ac62f4acefc1c443112ca0 Mon Sep 17 00:00:00 2001 From: ly015 Date: Fri, 27 Aug 2021 18:41:40 +0800 Subject: [PATCH 19/19] resolve naming conflict in unittests --- mmpose/apis/inference_3d.py | 2 ++ mmpose/datasets/dataset_info.py | 1 + .../datasets/animal/animal_base_dataset.py | 1 + mmpose/datasets/datasets/base/__init__.py | 1 + .../kpt_2d_sview_rgb_img_bottom_up_dataset.py | 1 + .../kpt_3d_sview_rgb_img_top_down_dataset.py | 1 + .../datasets/body3d/body3d_base_dataset.py | 1 + .../bottom_up/bottom_up_base_dataset.py | 1 + .../datasets/face/face_base_dataset.py | 1 + .../datasets/fashion/fashion_fase_dataset.py | 1 + .../datasets/hand/hand_base_dataset.py | 1 + .../datasets/top_down/topdown_base_dataset.py | 1 + ...y => test_animal_dataset_compatibility.py} | 14 ++++++------ ...y => test_body3d_dataset_compatibility.py} | 6 ++--- ...> test_bottom_up_dataset_compatibility.py} | 10 ++++----- .../test_deprecated_dataset_base.py | 1 + ....py => test_face_dataset_compatibility.py} | 6 ++--- ... => test_fashion_dataset_compatibility.py} | 2 +- ....py => test_hand_dataset_compatibility.py} | 12 +++++----- ...nce.py => test_inference_compatibility.py} | 1 + ...=> test_top_down_dataset_compatibility.py} | 22 +++++++++---------- tests/test_datasets/test_dataset_info.py | 1 + tests/utils/data_utils.py | 1 + 23 files changed, 53 insertions(+), 36 deletions(-) rename tests/test_backward_compatibility/test_dataset_info_compatibility/{test_animal_dataset.py => test_animal_dataset_compatibility.py} (97%) rename tests/test_backward_compatibility/test_dataset_info_compatibility/{test_body3d_dataset.py => test_body3d_dataset_compatibility.py} (98%) rename tests/test_backward_compatibility/test_dataset_info_compatibility/{test_bottom_up_dataset.py => test_bottom_up_dataset_compatibility.py} (97%) rename tests/test_backward_compatibility/test_dataset_info_compatibility/{test_face_dataset.py => test_face_dataset_compatibility.py} (97%) rename tests/test_backward_compatibility/test_dataset_info_compatibility/{test_fashion_dataset.py => test_fashion_dataset_compatibility.py} (97%) rename tests/test_backward_compatibility/test_dataset_info_compatibility/{test_hand_dataset.py => test_hand_dataset_compatibility.py} (97%) rename tests/test_backward_compatibility/test_dataset_info_compatibility/{test_inference.py => test_inference_compatibility.py} (98%) rename tests/test_backward_compatibility/test_dataset_info_compatibility/{test_top_down_dataset.py => test_top_down_dataset_compatibility.py} (97%) diff --git a/mmpose/apis/inference_3d.py b/mmpose/apis/inference_3d.py index 57a475a644..c670a1fd6b 100644 --- a/mmpose/apis/inference_3d.py +++ b/mmpose/apis/inference_3d.py @@ -1,4 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import numpy as np import torch from mmcv.parallel import collate, scatter diff --git a/mmpose/datasets/dataset_info.py b/mmpose/datasets/dataset_info.py index ea13bc5a7e..ef0d62e430 100644 --- a/mmpose/datasets/dataset_info.py +++ b/mmpose/datasets/dataset_info.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np diff --git a/mmpose/datasets/datasets/animal/animal_base_dataset.py b/mmpose/datasets/datasets/animal/animal_base_dataset.py index bf153fda78..e191882f34 100644 --- a/mmpose/datasets/datasets/animal/animal_base_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta from torch.utils.data import Dataset diff --git a/mmpose/datasets/datasets/base/__init__.py b/mmpose/datasets/datasets/base/__init__.py index e4d95360aa..dfa6c98ad6 100644 --- a/mmpose/datasets/datasets/base/__init__.py +++ b/mmpose/datasets/datasets/base/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from .kpt_2d_sview_rgb_img_bottom_up_dataset import \ Kpt2dSviewRgbImgBottomUpDataset from .kpt_2d_sview_rgb_img_top_down_dataset import \ diff --git a/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_bottom_up_dataset.py b/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_bottom_up_dataset.py index b67692c670..65a05ad853 100644 --- a/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_bottom_up_dataset.py +++ b/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_bottom_up_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy from abc import ABCMeta, abstractmethod diff --git a/mmpose/datasets/datasets/base/kpt_3d_sview_rgb_img_top_down_dataset.py b/mmpose/datasets/datasets/base/kpt_3d_sview_rgb_img_top_down_dataset.py index 812effbe75..ad067131ec 100644 --- a/mmpose/datasets/datasets/base/kpt_3d_sview_rgb_img_top_down_dataset.py +++ b/mmpose/datasets/datasets/base/kpt_3d_sview_rgb_img_top_down_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import copy from abc import ABCMeta, abstractmethod diff --git a/mmpose/datasets/datasets/body3d/body3d_base_dataset.py b/mmpose/datasets/datasets/body3d/body3d_base_dataset.py index b946f5fded..10c29232cf 100644 --- a/mmpose/datasets/datasets/body3d/body3d_base_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta from torch.utils.data import Dataset diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py b/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py index 2e2d14066a..6a2fea5d34 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from torch.utils.data import Dataset diff --git a/mmpose/datasets/datasets/face/face_base_dataset.py b/mmpose/datasets/datasets/face/face_base_dataset.py index 9606ce5000..466fabbfcb 100644 --- a/mmpose/datasets/datasets/face/face_base_dataset.py +++ b/mmpose/datasets/datasets/face/face_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta from torch.utils.data import Dataset diff --git a/mmpose/datasets/datasets/fashion/fashion_fase_dataset.py b/mmpose/datasets/datasets/fashion/fashion_fase_dataset.py index a8a4cd2ca4..d4e5860a47 100644 --- a/mmpose/datasets/datasets/fashion/fashion_fase_dataset.py +++ b/mmpose/datasets/datasets/fashion/fashion_fase_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta from torch.utils.data import Dataset diff --git a/mmpose/datasets/datasets/hand/hand_base_dataset.py b/mmpose/datasets/datasets/hand/hand_base_dataset.py index ec0443cdd3..fd20846d40 100644 --- a/mmpose/datasets/datasets/hand/hand_base_dataset.py +++ b/mmpose/datasets/datasets/hand/hand_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta from torch.utils.data import Dataset diff --git a/mmpose/datasets/datasets/top_down/topdown_base_dataset.py b/mmpose/datasets/datasets/top_down/topdown_base_dataset.py index 4b400e11aa..dc99576716 100644 --- a/mmpose/datasets/datasets/top_down/topdown_base_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_base_dataset.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta from torch.utils.data import Dataset diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset_compatibility.py similarity index 97% rename from tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset.py rename to tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset_compatibility.py index e3cfa9647d..c4479f0219 100644 --- a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset.py +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset_compatibility.py @@ -9,7 +9,7 @@ from mmpose.datasets import DATASETS -def test_animal_horse10_dataset(): +def test_animal_horse10_dataset_compatibility(): dataset = 'AnimalHorse10Dataset' dataset_class = DATASETS.get(dataset) @@ -65,7 +65,7 @@ def test_animal_horse10_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_animal_fly_dataset(): +def test_animal_fly_dataset_compatibility(): dataset = 'AnimalFlyDataset' dataset_class = DATASETS.get(dataset) @@ -122,7 +122,7 @@ def test_animal_fly_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_animal_locust_dataset(): +def test_animal_locust_dataset_compatibility(): dataset = 'AnimalLocustDataset' dataset_class = DATASETS.get(dataset) @@ -180,7 +180,7 @@ def test_animal_locust_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_animal_zebra_dataset(): +def test_animal_zebra_dataset_compatibility(): dataset = 'AnimalZebraDataset' dataset_class = DATASETS.get(dataset) @@ -231,7 +231,7 @@ def test_animal_zebra_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_animal_ATRW_dataset(): +def test_animal_ATRW_dataset_compatibility(): dataset = 'AnimalATRWDataset' dataset_class = DATASETS.get(dataset) @@ -290,7 +290,7 @@ def test_animal_ATRW_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) -def test_animal_Macaque_dataset(): +def test_animal_Macaque_dataset_compatibility(): dataset = 'AnimalMacaqueDataset' dataset_class = DATASETS.get(dataset) @@ -350,7 +350,7 @@ def test_animal_Macaque_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) -def test_animalpose_dataset(): +def test_animalpose_dataset_compatibility(): dataset = 'AnimalPoseDataset' dataset_class = DATASETS.get(dataset) diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset_compatibility.py similarity index 98% rename from tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset.py rename to tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset_compatibility.py index f0faf097a4..a7e4b71067 100644 --- a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset.py +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset_compatibility.py @@ -8,7 +8,7 @@ from mmpose.datasets.builder import build_dataset -def test_body3d_h36m_dataset(): +def test_body3d_h36m_dataset_compatibility(): # Test Human3.6M dataset dataset = 'Body3DH36MDataset' dataset_class = DATASETS.get(dataset) @@ -105,7 +105,7 @@ def test_body3d_h36m_dataset(): np.testing.assert_almost_equal(infos['N-MPJPE'], 0.0) -def test_body3d_semi_supervision_dataset(): +def test_body3d_semi_supervision_dataset_compatibility(): # Test Body3d Semi-supervision Dataset # load labeled dataset @@ -164,7 +164,7 @@ def test_body3d_semi_supervision_dataset(): assert len(unlabeled_dataset) == len(custom_dataset) -def test_body3d_mpi_inf_3dhp_dataset(): +def test_body3d_mpi_inf_3dhp_dataset_compatibility(): # Test MPI-INF-3DHP dataset dataset = 'Body3DMpiInf3dhpDataset' dataset_class = DATASETS.get(dataset) diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset_compatibility.py similarity index 97% rename from tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset.py rename to tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset_compatibility.py index 86969843bf..366fcfe82a 100644 --- a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset.py +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset_compatibility.py @@ -45,7 +45,7 @@ def convert_coco_to_output(coco, is_wholebody=False): return outputs -def test_bottom_up_COCO_dataset(): +def test_bottom_up_COCO_dataset_compatibility(): dataset = 'BottomUpCocoDataset' # test COCO datasets dataset_class = DATASETS.get(dataset) @@ -100,7 +100,7 @@ def test_bottom_up_COCO_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') -def test_bottom_up_CrowdPose_dataset(): +def test_bottom_up_CrowdPose_dataset_compatibility(): dataset = 'BottomUpCrowdPoseDataset' # test CrowdPose datasets dataset_class = DATASETS.get(dataset) @@ -155,7 +155,7 @@ def test_bottom_up_CrowdPose_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') -def test_bottom_up_MHP_dataset(): +def test_bottom_up_MHP_dataset_compatibility(): dataset = 'BottomUpMhpDataset' # test MHP datasets dataset_class = DATASETS.get(dataset) @@ -212,7 +212,7 @@ def test_bottom_up_MHP_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') -def test_bottom_up_AIC_dataset(): +def test_bottom_up_AIC_dataset_compatibility(): dataset = 'BottomUpAicDataset' # test MHP datasets dataset_class = DATASETS.get(dataset) @@ -267,7 +267,7 @@ def test_bottom_up_AIC_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') -def test_bottom_up_COCO_wholebody_dataset(): +def test_bottom_up_COCO_wholebody_dataset_compatibility(): dataset = 'BottomUpCocoWholeBodyDataset' # test COCO-wholebody datasets dataset_class = DATASETS.get(dataset) diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py index d883c81023..7163acff36 100644 --- a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import pytest from mmpose.datasets.datasets.animal.animal_base_dataset import \ diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset_compatibility.py similarity index 97% rename from tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset.py rename to tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset_compatibility.py index acc201c23e..7fd6a6452f 100644 --- a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset.py +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset_compatibility.py @@ -10,7 +10,7 @@ from mmpose.datasets import DATASETS -def test_face_300W_dataset(): +def test_face_300W_dataset_compatibility(): dataset = 'Face300WDataset' # test Face 300W datasets dataset_class = DATASETS.get(dataset) @@ -63,7 +63,7 @@ def test_face_300W_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_face_AFLW_dataset(): +def test_face_AFLW_dataset_compatibility(): dataset = 'FaceAFLWDataset' # test Face AFLW datasets dataset_class = DATASETS.get(dataset) @@ -116,7 +116,7 @@ def test_face_AFLW_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_face_WFLW_dataset(): +def test_face_WFLW_dataset_compatibility(): dataset = 'FaceWFLWDataset' # test Face WFLW datasets dataset_class = DATASETS.get(dataset) diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset_compatibility.py similarity index 97% rename from tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset.py rename to tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset_compatibility.py index f440e9ead2..ee8cc0782c 100644 --- a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset.py +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset_compatibility.py @@ -9,7 +9,7 @@ from mmpose.datasets import DATASETS -def test_deepfashion_dataset(): +def test_deepfashion_dataset_compatibility(): dataset = 'DeepFashionDataset' # test JHMDB datasets dataset_class = DATASETS.get(dataset) diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset_compatibility.py similarity index 97% rename from tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset.py rename to tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset_compatibility.py index 1de369d66d..daecb3f7c0 100644 --- a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset.py +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset_compatibility.py @@ -9,7 +9,7 @@ from mmpose.datasets import DATASETS -def test_top_down_OneHand10K_dataset(): +def test_top_down_OneHand10K_dataset_compatibility(): dataset = 'OneHand10KDataset' dataset_class = DATASETS.get(dataset) @@ -67,7 +67,7 @@ def test_top_down_OneHand10K_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_top_down_FreiHand_dataset(): +def test_top_down_FreiHand_dataset_compatibility(): dataset = 'FreiHandDataset' dataset_class = DATASETS.get(dataset) @@ -125,7 +125,7 @@ def test_top_down_FreiHand_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_top_down_RHD_dataset(): +def test_top_down_RHD_dataset_compatibility(): dataset = 'Rhd2DDataset' dataset_class = DATASETS.get(dataset) @@ -183,7 +183,7 @@ def test_top_down_RHD_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_top_down_Panoptic_dataset(): +def test_top_down_Panoptic_dataset_compatibility(): dataset = 'PanopticDataset' dataset_class = DATASETS.get(dataset) @@ -242,7 +242,7 @@ def test_top_down_Panoptic_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_top_down_InterHand2D_dataset(): +def test_top_down_InterHand2D_dataset_compatibility(): dataset = 'InterHand2DDataset' dataset_class = DATASETS.get(dataset) @@ -311,7 +311,7 @@ def test_top_down_InterHand2D_dataset(): infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_top_down_InterHand3D_dataset(): +def test_top_down_InterHand3D_dataset_compatibility(): dataset = 'InterHand3DDataset' dataset_class = DATASETS.get(dataset) diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference_compatibility.py similarity index 98% rename from tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference.py rename to tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference_compatibility.py index 333dc87419..b08f114b6d 100644 --- a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference.py +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference_compatibility.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset_compatibility.py similarity index 97% rename from tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset.py rename to tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset_compatibility.py index fe65626d35..76972f97f4 100644 --- a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset.py +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset_compatibility.py @@ -10,7 +10,7 @@ from mmpose.datasets import DATASETS -def test_top_down_COCO_dataset(): +def test_top_down_COCO_dataset_compatibility(): dataset = 'TopDownCocoDataset' # test COCO datasets dataset_class = DATASETS.get(dataset) @@ -87,7 +87,7 @@ def test_top_down_COCO_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') -def test_top_down_MHP_dataset(): +def test_top_down_MHP_dataset_compatibility(): dataset = 'TopDownMhpDataset' # test MHP datasets dataset_class = DATASETS.get(dataset) @@ -168,7 +168,7 @@ def test_top_down_MHP_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') -def test_top_down_PoseTrack18_dataset(): +def test_top_down_PoseTrack18_dataset_compatibility(): dataset = 'TopDownPoseTrack18Dataset' # test PoseTrack datasets dataset_class = DATASETS.get(dataset) @@ -238,7 +238,7 @@ def test_top_down_PoseTrack18_dataset(): _ = custom_dataset[0] -def test_top_down_CrowdPose_dataset(): +def test_top_down_CrowdPose_dataset_compatibility(): dataset = 'TopDownCrowdPoseDataset' # test CrowdPose datasets dataset_class = DATASETS.get(dataset) @@ -313,7 +313,7 @@ def test_top_down_CrowdPose_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') -def test_top_down_COCO_wholebody_dataset(): +def test_top_down_COCO_wholebody_dataset_compatibility(): dataset = 'TopDownCocoWholeBodyDataset' # test COCO datasets dataset_class = DATASETS.get(dataset) @@ -388,7 +388,7 @@ def test_top_down_COCO_wholebody_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') -def test_top_down_OCHuman_dataset(): +def test_top_down_OCHuman_dataset_compatibility(): dataset = 'TopDownOCHumanDataset' # test OCHuman datasets dataset_class = DATASETS.get(dataset) @@ -459,7 +459,7 @@ def test_top_down_OCHuman_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') -def test_top_down_MPII_dataset(): +def test_top_down_MPII_dataset_compatibility(): dataset = 'TopDownMpiiDataset' # test COCO datasets dataset_class = DATASETS.get(dataset) @@ -499,7 +499,7 @@ def test_top_down_MPII_dataset(): _ = custom_dataset[0] -def test_top_down_MPII_TRB_dataset(): +def test_top_down_MPII_TRB_dataset_compatibility(): dataset = 'TopDownMpiiTrbDataset' # test MPII TRB datasets dataset_class = DATASETS.get(dataset) @@ -540,7 +540,7 @@ def test_top_down_MPII_TRB_dataset(): _ = custom_dataset[0] -def test_top_down_AIC_dataset(): +def test_top_down_AIC_dataset_compatibility(): dataset = 'TopDownAicDataset' # test AIC datasets dataset_class = DATASETS.get(dataset) @@ -616,7 +616,7 @@ def test_top_down_AIC_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') -def test_top_down_JHMDB_dataset(): +def test_top_down_JHMDB_dataset_compatibility(): dataset = 'TopDownJhmdbDataset' # test JHMDB datasets dataset_class = DATASETS.get(dataset) @@ -695,7 +695,7 @@ def test_top_down_JHMDB_dataset(): _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') -def test_top_down_h36m_dataset(): +def test_top_down_h36m_dataset_compatibility(): dataset = 'TopDownH36MDataset' # test AIC datasets dataset_class = DATASETS.get(dataset) diff --git a/tests/test_datasets/test_dataset_info.py b/tests/test_datasets/test_dataset_info.py index 4438e9aee8..d939b9dbb6 100644 --- a/tests/test_datasets/test_dataset_info.py +++ b/tests/test_datasets/test_dataset_info.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. from mmpose.datasets import DatasetInfo diff --git a/tests/utils/data_utils.py b/tests/utils/data_utils.py index 96ed4c1652..a04e2e6eb7 100644 --- a/tests/utils/data_utils.py +++ b/tests/utils/data_utils.py @@ -1,3 +1,4 @@ +# Copyright (c) OpenMMLab. All rights reserved. import numpy as np