Skip to content

speedup test.py (select pixels by score before loops) #4

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kir-dan
Copy link

@kir-dan kir-dan commented Feb 25, 2018

Before: we check every pixel of image by score (FH * FW loop operations)
After: select which pixels are interesting for us and after that make all operations in loop (~70 loop operations)

Final speedup on test image (only detect function):
246ms -> 79ms

Copy link

@rondeaujared rondeaujared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes resulted in ~5-10x speedup on a gtx970, no apparent loss in accuracy or other negative effects noticed.

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

Successfully merging this pull request may close these issues.

2 participants