Skip to content
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

Hard-coded scale factor #22

Closed
mertkaraoglu opened this issue Jun 11, 2023 · 2 comments
Closed

Hard-coded scale factor #22

mertkaraoglu opened this issue Jun 11, 2023 · 2 comments

Comments

@mertkaraoglu
Copy link

How did you end up with the descriptor scaling factor 1.41. Can you elaborate on the intuition of why such a scale is practically beneficial?

@gleize
Copy link
Contributor

gleize commented Jun 15, 2023

Hi @mertkaraoglu,

SILK_SCALE_FACTOR is a scaling factor of the descriptors (desc <- SILK_SCALE_FACTOR * desc) done after unit normalization. A value of 1.41 (square root of 2) will essentially bring the descriptors on the hypersphere surface of radius 2. This is here for legacy reasons, and has little importance (with the exception mentioned below). You can just treat it as a constant.

Moreover, changing that value won't change the MNN matching, nor the ratio-test. BUT, it will affect the double-softmax matching, as changing SILK_SCALE_FACTOR is similar to changing the softmax temperature.

@mertkaraoglu
Copy link
Author

Yes, I see; thanks for the reply.

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

No branches or pull requests

2 participants