mmpose
mmpose copied to clipboard
pretrained in hrnet_w32_coco_256x192.py is wrong
Thanks for your error report and we appreciate it a lot. If you feel we have helped you, give us a STAR! :satisfied:
Checklist
- I have searched related issues but cannot get the expected help.
- The bug has not been fixed in the latest version.
Describe the bug
The pretrained value in hrnet_w32_coco_256x192.py is wrong. Current value is 'hrnet_w32-36af842e.pth'. But the link in the doc is ckpt. And I try the current one. As a result, the model is broken. And then I try the link in the doc, though the ckpt does not exactly match the model, the model can work.
Reproduction
- What command or script did you run?
A placeholder for the command.
- What config did you run?
A placeholder for the config.
- Did you make any modifications on the code or config? Did you understand what you have modified?
- What dataset did you use?
Environment
- Please run
PYTHONPATH=${PWD}:$PYTHONPATH python mmpose/utils/collect_env.pyto collect necessary environment information and paste it here. - You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
- Other environment variables that may be related (such as
$PATH,$LD_LIBRARY_PATH,$PYTHONPATH, etc.)
Error traceback
If applicable, paste the error traceback here.
A placeholder for traceback.
Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
https://download.openmmlab.com/mmpose/pretrain_models/hrnet_w32-36af842e.pth is the classification model trained on imagenet, which is used for initialization.
And https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_coco_256x192-c78dce93_20200708.pth is our pose model trained on coco.
So why the pretrained value in hrnet_w32_coco_256x192.py is the classification model trained on imagenet since the model name with coco
I use the model this way:
from mmpose.datasets import build_dataset
from mmpose.models import build_posenet
from mmpose.apis import train_model
# build 数据集
datasets = [build_dataset(cfg.data.train)]
# build 模型
model = build_posenet(cfg.model)
train_model(model, datasets, cfg, distributed=False, validate=True, meta=dict())
When training pose estimation models, we will load the imagenet-pretrained classification model for network initialization. That's called transfer learning.