open-mmlab / mmpose

OpenMMLab Pose Estimation Toolbox and Benchmark.
https://mmpose.readthedocs.io/en/latest/
Apache License 2.0
5.55k stars 1.21k forks source link

After converting the official pth model with mmpose to the onnx model, the accuracy of the keypoints of the feet decreases a lot #2388

Closed LMR2018 closed 1 year ago

LMR2018 commented 1 year ago

📚 The doc issue

After converting the official pth model with mmpose to the onnx model, the accuracy of the keypoints of the feet decreases a lot '--deploy-cfg', default='configs/mmpose/pose-detection_onnxruntime_static.py' '--model-cfg', default='configs/wholebody_2d_keypoint/topdown_heatmap/coco-wholebody/td-hm_hrnet-w48_dark-8xb32-210e_coco-wholebody-384x288.py' '--checkpoint', default='https://download.openmmlab.com/mmpose/pretrain_models/hrnet_w48-8ef0771d.pth',

Snipaste_2023-05-22_16-23-45 output3 https://platform.openmmlab.com/deploee/add-task-convert

Suggest a potential alternative/fix

No response

Tau-J commented 1 year ago

The python inference script will conduct flip-testing by default, which can improve the performance.

LMR2018 commented 1 year ago

@Tau-J 那么转成onnx模型后,跑一个图片不就要进行两次推理了?一次正常的,一次flip(-1)翻转的,那速度不是很慢了?

Tau-J commented 1 year ago

是的,flip-test是一种测试时牺牲速度来增强模型精度的技术,是否使用需要进行权衡,在速度需求高的场景是不适合用的。MMPose作为一个开源项目只能使用开源数据集,是无法保证业务场景能表现好的,而且wholebody本身数据量就很小,表现不好是在情理之中的。我建议你使用自己公司的业务数据来微调,或者可以等待后续RTMPose的wholebody模型。