Skip to content

Avoid obtaining several identical dimensions between two LSH sub-vectors by choosing orthogonal sub-vectors.#2071

Merged
opencv-pushbot merged 6 commits intoopencv:2.4from
pemmanuelviel:LshOrthogonalSubvectors
Jul 2, 2014
Merged

Avoid obtaining several identical dimensions between two LSH sub-vectors by choosing orthogonal sub-vectors.#2071
opencv-pushbot merged 6 commits intoopencv:2.4from
pemmanuelviel:LshOrthogonalSubvectors

Conversation

@pemmanuelviel
Copy link
Copy Markdown
Contributor

LSH algorithm consists in accelerating the vectors retrieval in a database by using several vectors of smaller dimension (e.g. 22 dimensions by default instead of usual 512 ones). These sub-vectors are created by picking randomly dimensions among the 512 ones.
But the more sub-vectors we have and the higher are their dimensions, the more dimensions will be common between two vectors. Thus the gain in quality for retrieving the closest vector in the database will not increase regularly with the number of sub-vectors (e.g. increase the sub-vectors number from 16 to 24 with a multi_probe_level set to 1)

To ensure a better repartition among dimensions, the best is to avoid having two vectors with dimensions in common. Thus we select orthogonal vectors.

@ghost ghost assigned vpisarev Dec 27, 2013
@iamannakogan
Copy link
Copy Markdown
Contributor

@vpisarev Vadim, one more Flann contribution. Please review it or redirect to some Flann-responsible person:)

@vpisarev
Copy link
Copy Markdown
Contributor

vpisarev commented Feb 3, 2014

@pemmanuelviel, terribly sorry for delay, it's been a terribly busy time. The patch probably makes sense algorithmically (I'm not familiar with LSH algorithm), but technically using static non-constant variable is very, very bad practice. It makes the function completely non-reenterable, e.g. non-usable from different threads. Please, using normal vector or some different solution

@pemmanuelviel
Copy link
Copy Markdown
Contributor Author

OK, I will check that.
But I will probably get a slot only in one month...

@BKNio
Copy link
Copy Markdown
Contributor

BKNio commented Mar 3, 2014

@pemmanuelviel any updates?

@Daniil-Osokin
Copy link
Copy Markdown

@pemmanuelviel Do you still working on it?

@pemmanuelviel
Copy link
Copy Markdown
Contributor Author

I still have it in mind and I hope to switch to this task in two weeks.
Le 19 mars 2014 17:26, "Daniil-Osokin" [email protected] a écrit :

@pemmanuelviel https://github.com/pemmanuelviel Do you still working on
it?

Reply to this email directly or view it on GitHubhttps://github.com//pull/2071#issuecomment-38072810
.

@Daniil-Osokin
Copy link
Copy Markdown

Great to hear it!

@pemmanuelviel
Copy link
Copy Markdown
Contributor Author

Done!

@vpisarev
Copy link
Copy Markdown
Contributor

👍

@opencv-pushbot opencv-pushbot merged commit 2f8b573 into opencv:2.4 Jul 2, 2014
@SpecLad SpecLad mentioned this pull request Jul 8, 2014
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.

6 participants