Hzzone / pytorch-openpose

pytorch implementation of openpose including Hand and Body Pose Estimation.
2.07k stars 395 forks source link

How to save results as Json files? #45

Open 0809zheng opened 3 years ago

0809zheng commented 3 years ago

Hello bro. I have used this repo, it's REALLY cool! Now I wanna get the json files the Openpose output, could you please help me if you know how to realize?

Veronica1997 commented 3 years ago

Hi, I meet the same question with you ,have you solved it? Thanks a lot!

abalikhan commented 3 years ago

Hi, I am interested in the same thing. How do we get the output same like original openpose. @Hzzone can you please comment on this? Thank you for this beautiful repo.

Hzzone commented 3 years ago

You can get the keypoints by the return of __call__ function https://github.com/Hzzone/pytorch-openpose/blob/5be60bc1bc8a98f8ca8e48559e0b839d8b55adc1/src/body.py#L208

The only thing you need to do is converting them to json format.

244300392 commented 1 year ago

How to modify the code

maryaghoo commented 1 year ago

How to convert theme can you help with the code @Hzzone

zak40 commented 8 months ago

Hi @Hzzone. I was trying to convert the keypoints into json file according to the format described in the official documentation: https://cmu-perceptual-computing-lab.github.io/openpose/web/html/doc/md_doc_02_output.html#body-keypoints-in-c-python but it seems that the indexes dont match (example: index 8 is mid hip in the official format but here it seems to reffer the right hip and the mid hip is missing). Can you help me out with generating the json according to the official format?