Skip to content

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

Open
kir-dan wants to merge 1 commit intoclcarwin:masterfrom
kir-dan:speedup
Open

speedup test.py (select pixels by score before loops)#4
kir-dan wants to merge 1 commit intoclcarwin:masterfrom
kir-dan:speedup

Conversation

@kir-dan
Copy link
Copy Markdown

@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
Copy Markdown

@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