diff --git a/configs/fashion_2d_keypoint/topdown_heatmap/deepfashion/hrnet_deepfashion.yml b/configs/fashion_2d_keypoint/topdown_heatmap/deepfashion/hrnet_deepfashion.yml index 0c24947d3d..06c297ef8e 100644 --- a/configs/fashion_2d_keypoint/topdown_heatmap/deepfashion/hrnet_deepfashion.yml +++ b/configs/fashion_2d_keypoint/topdown_heatmap/deepfashion/hrnet_deepfashion.yml @@ -1,18 +1,6 @@ -Collections: -- Name: HRNet - Paper: - Title: Deep high-resolution representation learning for human pose estimation - URL: http://openaccess.thecvf.com/content_CVPR_2019/html/Sun_Deep_High-Resolution_Representation_Learning_for_Human_Pose_Estimation_CVPR_2019_paper.html - README: https://github.com/open-mmlab/mmpose/blob/main/docs/src/papers/backbones/hrnet.md -- Name: UDP - Paper: - Title: 'The Devil Is in the Details: Delving Into Unbiased Data Processing for - Human Pose Estimation' - URL: http://openaccess.thecvf.com/content_CVPR_2020/html/Huang_The_Devil_Is_in_the_Details_Delving_Into_Unbiased_Data_CVPR_2020_paper.html - README: https://github.com/open-mmlab/mmpose/blob/main/docs/src/papers/techniques/udp.md Models: - Config: configs/fashion_2d_keypoint/topdown_heatmap/deepfashion/td-hm_hrnet-w48_udp_8xb32-210e_deepfashion_lower-256x192.py - In Collection: HRNet, UDP + In Collection: UDP Metadata: Architecture: &id001 - HRNet @@ -28,7 +16,7 @@ Models: Task: Fashion 2D Keypoint Weights: https://download.openmmlab.com/mmpose/v1/fashion_2d_keypoint/topdown_heatmap/deepfashion/td-hm_hrnet-w48_udp_8xb32-210e_deepfashion_lower-256x192-ddaf747d_20230810.pth - Config: configs/fashion_2d_keypoint/topdown_heatmap/deepfashion/td-hm_hrnet-w48_udp_8xb32-210e_deepfashion_upper-256x192.py - In Collection: HRNet, UDP + In Collection: UDP Metadata: Architecture: *id001 Training Data: DeepFashion @@ -42,7 +30,7 @@ Models: Task: Fashion 2D Keypoint Weights: https://download.openmmlab.com/mmpose/v1/fashion_2d_keypoint/topdown_heatmap/deepfashion/td-hm_hrnet-w48_udp_8xb32-210e_deepfashion_upper-256x192-de7c0eb1_20230810.pth - Config: configs/fashion_2d_keypoint/topdown_heatmap/deepfashion/td-hm_hrnet-w48_udp_8xb32-210e_deepfashion_full-256x192.py - In Collection: HRNet, UDP + In Collection: UDP Metadata: Architecture: *id001 Training Data: DeepFashion diff --git a/mmpose/__init__.py b/mmpose/__init__.py index ad7946470d..583ede0a4d 100644 --- a/mmpose/__init__.py +++ b/mmpose/__init__.py @@ -6,7 +6,7 @@ from .version import __version__, short_version mmcv_minimum_version = '2.0.0rc4' -mmcv_maximum_version = '2.1.0' +mmcv_maximum_version = '2.2.0' mmcv_version = digit_version(mmcv.__version__) mmengine_minimum_version = '0.6.0' diff --git a/mmpose/models/pose_estimators/base.py b/mmpose/models/pose_estimators/base.py index e98b2caeb8..474e0a49d6 100644 --- a/mmpose/models/pose_estimators/base.py +++ b/mmpose/models/pose_estimators/base.py @@ -202,18 +202,32 @@ def extract_feat(self, inputs: Tensor) -> Tuple[Tensor]: def _load_state_dict_pre_hook(self, state_dict, prefix, local_meta, *args, **kwargs): - """A hook function to convert old-version state dict of + """A hook function to. + + 1) convert old-version state dict of :class:`TopdownHeatmapSimpleHead` (before MMPose v1.0.0) to a compatible format of :class:`HeatmapHead`. + 2) remove the weights in data_preprocessor to avoid warning + `unexpected key in source state_dict: ...`. These weights are + initialized with given arguments and remain same during training + and inference. + The hook will be automatically registered during initialization. """ + + keys = list(state_dict.keys()) + + # remove the keys in data_preprocessor to avoid warning + for k in keys: + if k in ('data_preprocessor.mean', 'data_preprocessor.std'): + del state_dict[k] + version = local_meta.get('version', None) if version and version >= self._version: return # convert old-version state dict - keys = list(state_dict.keys()) for k in keys: if 'keypoint_head' in k: v = state_dict.pop(k) diff --git a/mmpose/visualization/local_visualizer.py b/mmpose/visualization/local_visualizer.py index 4e7bb92348..2c2664cf86 100644 --- a/mmpose/visualization/local_visualizer.py +++ b/mmpose/visualization/local_visualizer.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import math +import warnings from typing import Dict, List, Optional, Tuple, Union import cv2 @@ -117,6 +118,12 @@ def __init__(self, show_keypoint_weight: bool = False, backend: str = 'opencv', alpha: float = 1.0): + + warnings.filterwarnings( + 'ignore', + message='.*please provide the `save_dir` argument.*', + category=UserWarning) + super().__init__( name=name, image=image, diff --git a/requirements/mminstall.txt b/requirements/mminstall.txt index 30d8402a42..32eb00aceb 100644 --- a/requirements/mminstall.txt +++ b/requirements/mminstall.txt @@ -1,3 +1,3 @@ -mmcv>=2.0.0,<2.1.0 -mmdet>=3.0.0,<3.2.0 +mmcv>=2.0.0,<2.2.0 +mmdet>=3.0.0,<3.3.0 mmengine>=0.4.0,<1.0.0