Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate pose coordinates as output #8

Closed
lizc126 opened this issue Jul 14, 2020 · 5 comments
Closed

generate pose coordinates as output #8

lizc126 opened this issue Jul 14, 2020 · 5 comments

Comments

@lizc126
Copy link

lizc126 commented Jul 14, 2020

Hi, may I ask if the model is able to generate pose coordinates as output on a test image? I found the model output is a list where you only used seg2. However, when I use the output of pose1, I get the shape of 12x16x96x96 where 12 is the batch size and 16 is the number of keypoints labels. I am not sure how to proceed from this stage. Hope you can help me clarify! Thank you!
return [[seg1, seg2], [edge1], [pose1]]

@ziwei-zh
Copy link
Owner

Hi, you can select the max value along every channel, like pose1.max(1)

@lizc126
Copy link
Author

lizc126 commented Jul 14, 2020

Hi, you can select the max value along every channel, like pose1.max(1)

Hi, thank you for your reply! So i converted 96x96 back to 384x384 the same way you did for seg2, and selected the pixels with the max values for each of the 16 channels. However, i noticed that 1) for each channel, there are several pixels with the same max values, althouth they are pixels nearby each other 2)when I tried to map the 16 keypoints on the 384x384 test image, the mapping seemed wrong. Is there any steps I am missing? Thank you!

@ziwei-zh
Copy link
Owner

  1. First you may have to do NMS or other post-processing. You may refer to simple baseline repo: https://github.com/microsoft/human-pose-estimation.pytorch/blob/18f1d0fa5b5db7fe08de640610f3fdbdbed8fb2f/lib/core/inference.py#L49
  2. I think the upsampling step is not needed since it may cause misalignment issues.

@lizc126
Copy link
Author

lizc126 commented Jul 15, 2020

  1. First you may have to do NMS or other post-processing. You may refer to simple baseline repo: https://github.com/microsoft/human-pose-estimation.pytorch/blob/18f1d0fa5b5db7fe08de640610f3fdbdbed8fb2f/lib/core/inference.py#L49
  2. I think the upsampling step is not needed since it may cause misalignment issues.

Thank you very much! Finally able to get it work;)

@cLEARLoVE00
Copy link

Hello,Can you share test code to output points?I also want to output 16 points @Sonseca97 ,Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants