Ask Your Question

Revision history [back]

Python LSH build index

Hello there. I am trying to do LSH search on some dataset, say 1000x128 with FLANN search. FLANN indexing is done with http://www.cs.ubc.ca/research/flann/ And then there's PyFlann's python module that I'm using. my code looks like this

flann = FLANN()
data = np.random.random((1000,128)).astype(np.float32)
desc = np.random.random((100,128)).astype(np.float32)

params = flann.build_index(data, algorithm="lsh", precision=0.7, table_number=6, key_size=12, multi_probe_level=1, cores=1)

and there's this error on CentOS 6.5

LSH is not implemented for that type
terminate called without an active exception
Aborted (core dumped)

This one on my windows 7 machine

...

self.__curindex = flann.build_index[pts.dtype.type](pts, npts, dim, byref(speedup), pointer(self.__flann_parameters))
WindowsError: [Error -529697949] Windows Error 0xE06D7363

So I googled for how to build index using LSH algorithm. And found no answer to my question in Python. Anybody having figured this out yet?