From 7530d8f695ef37afc5ba0570f0b88c6b45df70b1 Mon Sep 17 00:00:00 2001 From: Tau-J <674106399@qq.com> Date: Sat, 7 Oct 2023 13:01:44 +0800 Subject: [PATCH 1/2] no need to read img in topdown mode --- mmpose/datasets/datasets/base/base_mocap_dataset.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mmpose/datasets/datasets/base/base_mocap_dataset.py b/mmpose/datasets/datasets/base/base_mocap_dataset.py index b06d934ac5..f9cea2987c 100644 --- a/mmpose/datasets/datasets/base/base_mocap_dataset.py +++ b/mmpose/datasets/datasets/base/base_mocap_dataset.py @@ -361,9 +361,10 @@ def _load_annotations(self) -> Tuple[List[dict], List[dict]]: instance_list.append(instance_info) - for idx, imgname in enumerate(img_names): - img_info = self.get_img_info(idx, imgname) - image_list.append(img_info) + if self.data_mode == 'bottomup': + for idx, imgname in enumerate(img_names): + img_info = self.get_img_info(idx, imgname) + image_list.append(img_info) return instance_list, image_list From 19e89494f644fb6326dbf38e6711fac74ddab138 Mon Sep 17 00:00:00 2001 From: Tau-J <674106399@qq.com> Date: Sat, 7 Oct 2023 13:06:48 +0800 Subject: [PATCH 2/2] add head_size to default mapping table --- mmpose/datasets/transforms/formatting.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mmpose/datasets/transforms/formatting.py b/mmpose/datasets/transforms/formatting.py index 53f7c8a1dc..d3f3ec04aa 100644 --- a/mmpose/datasets/transforms/formatting.py +++ b/mmpose/datasets/transforms/formatting.py @@ -114,6 +114,9 @@ class PackPoseInputs(BaseTransform): # using gt_instances.bbox_scales. To unsure correspondence with # previous version, this key is preserved here. bbox_scale='bbox_scales', + # `head_size` is used for computing MpiiPCKAccuracy metric, + # namely, PCKh + head_size='head_size', ) # items in `field_mapping_table` will be packed into