Hzzone / pytorch-openpose

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

Very slow inference with GPU #29

Open rabysam28 opened 4 years ago

rabysam28 commented 4 years ago

First of all, great work! Second of all, I have the following question: I am running the demo script to do inference for the image that you have provided in the repo, which is called demo.png. While I can successfully get the result of pose estimation for the demo.png, I see that the inference takes about 0.7 sec using GPU. Is that expected, or I am missing something here? Thanks

Hzzone commented 4 years ago

ref https://github.com/Hzzone/pytorch-openpose/issues/7#issuecomment-508696617

rabysam28 commented 4 years ago

Thanks for the link. Just a clarification that the 0.7 sec that I mentioned is only for body detection without hand detection, and also I have already reduced the image size to 50% of its original size. For comparison, I wanted to mention that I have also used the original caffe model from CMU it would take ~0.7 sec with CPU only without any GPU (however caffe is almost obsolete in the community). So there seems to be certainly room for performance improvement of the pytorch model. Are you planning on looking into the performance of the pytorch model? Also, in regards to your comment, could you please elaborate on what I need to change in the code to have "less search scales"? Thanks

Hzzone commented 4 years ago

As far as I am concerned, this repo is mainly focusing on hand pose estimation, which is accurate and fast. Here I just provide a more comprehensive implementation, since there may be lots of good implementation of body pose estimation on Github.

rabysam28 commented 4 years ago

Thanks. I agree that there are several pytorch implementations of body pose estimation in github. Do you mind sharing your opinion/thought as to which github repo would you recommend?