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

[Request] Converting coco keypoints to open pose body keypoints ? #68

Open
basicvisual opened this issue Aug 26, 2020 · 3 comments
Open
Labels
enhancement New feature or request question Further information is requested

Comments

@basicvisual
Copy link

Hi i was wondering if there is a possibility to convert the COCO keypoints to Open Pose Body 18 keypoints. It seems the openpose key points have 18 keypoints with a different order ? If there is a possibility to convert them , it could be useful as many other applications take openpose keypoints as input rather than coco keypoints.

What are your views?

@stefanopini stefanopini added question Further information is requested enhancement New feature or request labels Sep 11, 2020
@stefanopini
Copy link
Owner

Hi! I'm sorry for the late reply.

I've checked and OpenPose, in the 19-keypoint version (i.e. without additional keypoints for feet), provides the same keypoints of COCO plus an additional mid hip joint. Moreover, HRNet has been trained on COCO without the neck joint.
Thus, there are two missing joints in the output of HRNet, but they can be computed as the mean point between the right and the left hip and the right and the left shoulder.

You can check

  • the OpenPose joints here, among many others, and here

  • the COCO joints here, ordered as in OpenPose, and here, ordered as (simple-)HRNet (neck excluded).

Bottom line, it seems doable and should be easy.
I've added this into the To Do list 🙂

@yfedberts
Copy link

@stefanopini
Hi, appreciate the work you've done here! I've got a question about having it plot 18 keypoints, wondering if you've had any luck in adding it or have an insight as to a good place to start and modify the code?

Thanks in advance!

@stefanopini
Copy link
Owner

Hi @mystickal , sorry for the late reply.

Unfortunately, I haven't found the time to work on this yet.

In SimpleHRNet.py, you will have access to all the keypoints after these two for loops, so you can create an extended version of pts with the additional keypoints and compute them.
Then, you can add a new joint type in the joints_dict you find in visualization.py and use it when calling the drawing functions (e.g. here).

Let me know if this is enough to start modifying the code!
I'll try to work on this change within the next few weekends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants