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

About the running time #2

Open
lianuo opened this issue Jan 3, 2019 · 9 comments
Open

About the running time #2

lianuo opened this issue Jan 3, 2019 · 9 comments

Comments

@lianuo
Copy link

lianuo commented Jan 3, 2019

@TreB1eN Thank you for your works, it is easy to test the openpose method in pytorch.

I have a question about the running speed.

I use this model to test a video with 10 person in each frame.it seems too slow (7 second per frame) compare with the paper they reported in the fig 12 as follow:
speed

could you give me some information I could have faster speed for inference.

I am using the precise mode.

Thank you~

@TreB1eN
Copy link
Owner

TreB1eN commented Jan 3, 2019

firstly, could you try not to use the precise mode? Because in precise mode the inference will be running multiple times, each time on a different input scale.
Also, the inference time are also dependent on your GPU efficiency. On my 1080Ti one inference time is less than 0.5 seconds, as I remembered. Right now my resource are computing on other tasks, If I got time, I may give you a precise figure

@lianuo
Copy link
Author

lianuo commented Jan 4, 2019

@TreB1eN Thank you for reply,
I test the time spend ,and found most of time spend on
1 compute_peaks_from_heatmaps
2 compute_connections

I fix the scale to 2 ,remove 0.5 1 1.5

when i resize my image resolution from 1920/1080->576/324 the time of 1 is down 1.8598 -> 0.1488 s
and 2 down to 3.3724->1.7937 s

do you think we can improve the code to be faster?

@TreB1eN
Copy link
Owner

TreB1eN commented Jan 4, 2019

really ? What I recall the step2 is pretty fast, I may need a while for me to test it again in my computer

@lianuo
Copy link
Author

lianuo commented Jan 4, 2019

@TreB1eN I think it is sensitive to the person or key points number in the frames.in my image there are 10 or more persons.so it is very slow.

@lianuo
Copy link
Author

lianuo commented Jan 22, 2019

看了下代码,heatmap和PAF之后的处理这一部分是在CPU里面实现的,而openpose源码是在cuda下面跑的,大概跟这个有些关系吧。

@TreB1eN
Copy link
Owner

TreB1eN commented Mar 2, 2019

模型加速是真的很难,不过有个lightweight openpose

@lianuo
Copy link
Author

lianuo commented Mar 6, 2019

@TreB1eN 谢谢你提供的这个,我看他也开源了,测了一下,发现有相同的问题,就是计算极大值和关键点连接是最耗时的部分。计算方法和你这个方法也很接近。

@TreB1eN
Copy link
Owner

TreB1eN commented Mar 6, 2019

@lianuo 如果想加速,还是要用c实现,或者Gpu

@yy2yy
Copy link

yy2yy commented Mar 26, 2020

谢谢你提供的这个,请问你的handnet模型是在哪里找的?是自己训练的吗?用的什么数据?

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