HRNet / Lite-HRNet

This is an official pytorch implementation of Lite-HRNet: A Lightweight High-Resolution Network.
Apache License 2.0
827 stars 127 forks source link

KeyError: "TopDown: 'TopDownSimpleHead is not in the models registry'" #67

Closed gsx1378 closed 2 years ago

gsx1378 commented 2 years ago

你好,我在部署完成训练环境后, 执行命令: python tools/summary_network.py configs/top_down/lite_hrnet/coco/litehrnet_18_coco_256x192.py --shape 256 256 报错信息如题所示,请问这个问题要怎么解决呢? `Traceback (most recent call last): File "/mnt/VENVS/MMcv/lib/python3.6/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(*args) File "/mnt/VENVS/MMcv/lib/python3.6/site-packages/mmpose/models/detectors/top_down.py", line 68, in init self.keypoint_head = builder.build_head(keypoint_head) File "/mnt/VENVS/MMcv/lib/python3.6/site-packages/mmpose/models/builder.py", line 29, in build_head return HEADS.build(cfg) File "/mnt/VENVS/MMcv/lib/python3.6/site-packages/mmcv/utils/registry.py", line 212, in build return self.build_func(args, **kwargs, registry=self) File "/mnt/VENVS/MMcv/lib/python3.6/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/mnt/VENVS/MMcv/lib/python3.6/site-packages/mmcv/utils/registry.py", line 45, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'TopDownSimpleHead is not in the models registry'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "tools/summary_network.py", line 66, in main() File "tools/summary_network.py", line 40, in main model = build_posenet(cfg.model) File "./models/builder.py", line 53, in build_posenet return build(cfg, POSENETS) File "./models/builder.py", line 28, in build return build_from_cfg(cfg, registry, default_args) File "/mnt/VENVS/MMcv/lib/python3.6/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') KeyError: "TopDown: 'TopDownSimpleHead is not in the models registry'" 我的运行环境 Package Version


addict 2.4.0 chumpy 0.70 cycler 0.11.0 Cython 0.29.26 dataclasses 0.8 future 0.18.2 json-tricks 3.15.5 kiwisolver 1.3.1 matplotlib 3.3.4 mmcv-full 1.4.2 mmpose 0.21.0 munkres 1.1.4 numpy 1.19.5 opencv-python 4.3.0.36 opencv-python-headless 4.5.5.62 packaging 21.3 pandas 1.1.5 Pillow 8.4.0 pip 21.3.1 pyparsing 3.0.6 python-dateutil 2.8.2 pytz 2021.3 PyYAML 6.0 scipy 1.5.4 setuptools 59.6.0 six 1.16.0 torch 1.7.0 torchaudio 0.7.0 torchvision 0.8.0 typing_extensions 4.0.1 wheel 0.37.1 xtcocotools 1.10 yapf 0.32.0 `

gsx1378 commented 2 years ago

将"configs/top_down/lite_hrnet/coco/litehrnet_X_coco_XXX.py"中的"TopDownSimpleHead"修改为"TopdownHeatmapSimpleHead".

dongdongzi commented 3 months ago

将"configs/top_down/lite_hrnet/coco/litehrnet_X_coco_XXX.py"中的"TopDownSimpleHead"修改为"TopdownHeatmapSimpleHead".

OK