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 performence #10

Open
beginlu opened this issue Jan 4, 2015 · 2 comments
Open

About performence #10

beginlu opened this issue Jan 4, 2015 · 2 comments

Comments

@beginlu
Copy link

beginlu commented Jan 4, 2015

Hi,
Base on your matlab code, i have finally finished the c++ implement (with some modifications). But with the configuration define on your code, i.e. 68 landmarks, 6 tree depth, 10 trees per forest, 5 stages, i could hardly achieve 1000 FPS, actually 350~450 FPS only.
I notice that when generating the binary features, the binary tree traverse is quite time consuming, even longer than the global prediction (which is almost vector summation, can be optimized by avx instructions).
Btw, my laptop use cpu I7-3820QM 2.7GHz, all test is running on a single core. It would be grateful if you can share some advice.

@jwyang
Copy link
Owner

jwyang commented Jan 5, 2015

Hi, the binary tree traversing should not be that much time consuming. According to your setups, it merely needs 68 * 6 * 10 * 5 times of comparison. Maybe you can speedup it by modifying something on it.

@beginlu
Copy link
Author

beginlu commented Jan 5, 2015

Yeah, you are right, i don't known what's going on. It's a triple loop for each stage, one for landmarks, one for trees, and one for trees' nodes, 68_10_5=3400 times of comparisons, and it takes 0.3 ms, even when i replace the pixel difference comparison with a random selection (i.e. random select left or right child), it still takes 0.28 ms. On the contrary, the global prediction perform (68_2)_(68*10)=92480 times of double precision addition takes 0.2 ms.
Maybe the inner loop count is too small, too much time consumed in the loop branch?

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

2 participants