bmartacho / OmniPose

This is the official PyTorch implementation for “OmniPose: A Multi-Scale Framework for Multi-Person Pose Estimation”.
Other
66 stars 8 forks source link

Evaluation and inference with pretrained models #7

Open mthodoris opened 1 year ago

mthodoris commented 1 year ago

Trying to run the test.py and inference.py using pretrained_models returns 0.0 avg_precision and random keypoints inside the images. Are the provided models pre-trained? Is there anything that I am missing?

000000301563 000000177861

mircodemarchi commented 1 year ago

I'm encountering the same problem

liukp557 commented 1 year ago

I had the same problem, have you solved it yet?

bblgbr commented 8 months ago

I solved it and I found that the author provided the WASPv1 pretrained model. Therefore, you need to change the OmniPose/models/omnipose.py to waspv1

CatDroid commented 2 weeks ago

python inference.py --cfg=experiments/coco/omnipose_w48_384x288.yaml experiments/coco/omnipose_w48_384x288.yaml MODEL_FILE: 'weights/coco/OmniPose_HRw48_384/checkpoint.pth'

inference.py modify

import _init_paths

from models.omnipose import get_Canny_HRNet

from models.frankenstein import get_frankenstein

plt.savefig(save_path, format='jpg', bbox_inches='tight', dpi=100)

models/omnipose.py uncomment self.wasp comment self.waspv2


change model.load_state_dict(new_model_state_dict, strict=True) strict=False to True It will print the missing keys as follows.: Missing key(s) in state_dict: "waspv2.aspp1.atrous_conv.spatialConv.weight", "waspv2.aspp1.atrous_conv.pointConv.weight", "waspv2.aspp2.atrous_conv.spatialConv.weight", "waspv2.aspp2.atrous_conv.pointConv.weight", "waspv2.aspp3.atrous_conv.spatialConv.weight", "waspv2.aspp3.atrous_conv.pointConv.weight", "waspv2.aspp4.atrous_conv.spatialConv.weight", "waspv2.aspp4.atrous_conv.pointConv.weight".

but models/omnipose.py change from waspv2 to wasp model.load_state_dict(new_model_state_dict, strict=True) pass successfully.


so i think the 'checkpoint.pth' is wasp instead of waspv2 in the paper