open-mmlab / mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
https://mmaction2.readthedocs.io
Apache License 2.0
4.27k stars 1.24k forks source link

Try to convert model Hrnet pose to ONNX, ValueError: TopDown is not registered in LOCALIZERS, RECOGNIZERS or DETECTORS #2105

Open lamhust2008 opened 1 year ago

lamhust2008 commented 1 year ago

I want to convert HRNET model for pose estimation: +) checkpoint hrnet_w32_coco_256x192-c78dce93_20200708.pth +) config: hrnet_w32_coco_256x192.py. I try to use command in mmaction2/tools/deployment/pytorch2onnx.py, and error appeared: File "pytorch2onnx.py", line 149, in cfg.model, train_cfg=None, test_cfg=cfg.get('test_cfg')) File "/home/data/lamnt/lamnt/Video_recog/mmaction2/mmaction/models/builder.py", line 87, in build_model raise ValueError(f'{obj_type} is not registered in ' ValueError: TopDown is not registered in LOCALIZERS, RECOGNIZERS or DETECTORS

Thanks

hukkai commented 1 year ago

If you want to convert HRNET model for pose estimation you should use mmpose: https://github.com/open-mmlab/mmpose. Pose models are not supported in mmaction2. We only use this from mmpose.

lamhust2008 commented 1 year ago

If you want to convert HRNET model for pose estimation you should use mmpose: https://github.com/open-mmlab/mmpose. Pose models are not supported in mmaction2. We only use this from mmpose.

Thanks for your comment, ok i done but now i want to inference this onnx model, so can you tell me the method for it?