Created
November 14, 2016 21:37
-
-
Save dgtlmoon/b4836792b1cbc41f6bda66c834f22798 to your computer and use it in GitHub Desktop.
Rough LSH python benchmark of potential ORB descriptors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lshash import LSHash | |
import numpy | |
import time | |
lsh = LSHash(100, 200, 1, None, "hamming.npz") | |
# Very modest | |
# lets assume 5000 images, with 200 features and 200 binary descriptors each | |
for y in range(0, 5000): | |
for x in range(0, 200): | |
lsh.index(numpy.random.randint(2, size=(200,)), y) | |
for r in range(0,10): | |
now = time.time() | |
lsh.query(numpy.random.randint(2, size=(200,)), 10, "hamming") | |
print time.time()-now | |
# 1.9097840786 | |
# 2.78951191902 | |
# 0.34514093399 | |
# 1.41738390923 | |
# 2.75403499603 | |
# 1.3472340107 | |
# 3.9218878746 | |
# 0.842194795609 | |
# 1.44249796867 | |
# 1.45863008499 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
20,000 image sets (200*200 binary feature per image)
6.6Gb RAM usage
timing in Seconds per single query (200* would be required, one for each feature?)