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

Loading the same index on different platforms #65

Open
ecdeveloper opened this issue Jun 28, 2018 · 5 comments
Open

Loading the same index on different platforms #65

ecdeveloper opened this issue Jun 28, 2018 · 5 comments

Comments

@ecdeveloper
Copy link

I indexed 300k images on a Linux box, then exported it to a file, and loaded that same index on a Mac machine.

Now, I'm running a search request looking up one of the images I indexed. When I requesting from Linux box, I get 2 matches with following scores - [606,100]. However, when I run that same request on my Mac machine - I get 1 match - [196.0]. Any idea why is that the case? I use the exact same visualWordsORB.dat in both environments.

@abournier
Copy link

I can't help with this possible issue, but I'm very interested by the code used/installed to run pastec on a Mac. What libraries are not the same from the Ubuntu tutorial ? Did you use Homebrew to install them ? Maybe I can run tests too on my Mac to see if there is a difference in search results.

@magwyz
Copy link
Owner

magwyz commented Jun 28, 2018

It may be because the accelerated structure to search in the list of visual words is randomized.
On your Mac and on your Linux box, the random number generator is not the same, which could lead to different results.
This needs to be more investigated. However, the first question would be if you used the same version of OpenCV on Linux and MacOS.

@ecdeveloper
Copy link
Author

@abournier I cloned pastec repo on my Mac, and then installed all the deps. I basically used this article - https://electricarchaeology.ca/2016/05/17/getting-pastec-installed-on-mac/

@magwyz I'll get the OpenCV versions on both platforms and will post here later today.

@ecdeveloper
Copy link
Author

ecdeveloper commented Jun 30, 2018

Ok, Mac - opencv@3.4.1. Linux - opencv@3.2.0. Do you think few minor versions difference may impact the results so bad?

Also, I wonder, if the problem is the version - if I install the same version on mac - do I need to reindex all images? Or should I be good just loading the index into the memory and should be good to go?

@abournier
Copy link

Thanks for the link ecdeveloper ! I will try this soon.

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

3 participants