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

Same search results for searching very different images. #91

Open
elliotsayes opened this issue Apr 1, 2021 · 4 comments
Open

Same search results for searching very different images. #91

elliotsayes opened this issue Apr 1, 2021 · 4 comments

Comments

@elliotsayes
Copy link

elliotsayes commented Apr 1, 2021

Using the unsplash-images collection: https://playground.getvectorai.com/collections/?collection=unsplash-images

result for:
vi_client.search_image('unsplash-images', image_url, ['image_url_vector_'])
with image_url as:
https://www.rover.com/blog/wp-content/uploads/2020/06/siberian-husky-4735878_1920.jpg
https://davidkerrphotography.co.nz/wp-content/uploads/2016/10/Slide01.jpg

identical result for both:

{'count': 17506,
 'results': [{'_clusters_': {},
              '_id': 'tLUgvVaCQnY',
              '_search_score': 0.6311334,
              'dictionary_label_1': 'wineglasses',
              'dictionary_label_2': 'delftware',
              'image_url': 'https://images.unsplash.com/photo-1540735242080-bc0ad0cdcd1e?w=300&q=80',
              'insert_date_': '2021-02-25T03:38:08.205446',
              'likes': 150005},
             {'_clusters_': {},
              '_id': 'wVMuNOSt5KY',
              '_search_score': 0.6278121000000001,
              'dictionary_label_2': 'bootstrapping',
              'image_url': 'https://images.unsplash.com/photo-1556912743-90a361c19b16?w=300&q=80',
              'insert_date_': '2021-02-25T03:38:08.018132',
              'likes': 173693},
             {'_clusters_': {},
              '_id': 'kkBXGVE9k-8',
              '_search_score': 0.626989,
              'dictionary_label_1': 'occupant',
              'dictionary_label_2': 'catabolized',
              'image_url': 'https://images.unsplash.com/photo-1526529516337-f40ddc5532e2?w=300&q=80',
              'insert_date_': '2021-02-25T03:38:08.129598',
              'likes': 627490},
             {'_clusters_': {},
              '_id': 'pLshzlb5yOA',
              '_search_score': 0.6268415,
              'dictionary_label_2': 'wood',
              'image_url': 'https://images.unsplash.com/photo-1582459208380-f99d357adf33?w=300&q=80',
              'insert_date_': '2021-02-25T03:38:08.096761',
              'likes': 173756},
             {'_clusters_': {},
              '_id': 'sHmW616civc',
              '_search_score': 0.6268100999999999,
              'dictionary_label_2': 'trail',
              'image_url': 'https://images.unsplash.com/photo-1556674524-65bf99573bef?w=300&q=80',
              'insert_date_': '2021-02-25T03:38:08.000302',
              'likes': 682592},
             {'_clusters_': {},
              '_id': 'VoTqMJLLSI8',
              '_search_score': 0.6235797000000001,
              'dictionary_label_1': 'trays',
              'dictionary_label_2': 'dishware',
              'image_url': 'https://images.unsplash.com/photo-1569272559969-2a9275513966?w=300&q=80',
              'insert_date_': '2021-02-25T03:38:08.202763',
              'likes': 172006},
             {'_clusters_': {},
              '_id': 'XcWKh-GF69M',
              '_search_score': 0.6210401999999999,
              'dictionary_label_2': 'obliging',
              'image_url': 'https://images.unsplash.com/photo-1581280227715-56d3062138a9?w=300&q=80',
              'insert_date_': '2021-02-25T03:38:20.517206',
              'likes': 678324},
             {'_clusters_': {},
              '_id': 'b2_pVdk4lGI',
              '_search_score': 0.6187004,
              'dictionary_label_2': 'jukebox',
              'image_url': 'https://images.unsplash.com/photo-1568967906094-1d0acfbf0676?w=300&q=80',
              'insert_date_': '2021-02-25T03:38:20.509971',
              'likes': 138088},
             {'_clusters_': {},
              '_id': '22HltbHJbPI',
              '_search_score': 0.6182232000000001,
              'dictionary_label_1': 'shoreline',
              'dictionary_label_2': 'buckeens',
              'image_url': 'https://images.unsplash.com/photo-1541514467948-60ec8a24e84f?w=300&q=80',
              'insert_date_': '2021-02-25T09:44:25.156647',
              'likes': 758805},
             {'_clusters_': {},
              '_id': 'uM3pEsEkPHA',
              '_search_score': 0.6179558,
              'dictionary_label_2': 'dewclaw',
              'image_url': 'https://images.unsplash.com/photo-1572725364984-c2a074c6740c?w=300&q=80',
              'insert_date_': '2021-02-25T03:38:08.111128',
              'likes': 655907}]}
@boba-and-beer
Copy link
Contributor

Hi- can you please run the following and send the output?

import vectorai vectorai.__version__

I will check what is happening with the encoding.

@elliotsayes
Copy link
Author

>>> vectorai.__version__
'0.2.5'

I have also noticed that searching on one of the images in the collection (e.g https://images.unsplash.com/photo-1543470388-80a8f5281639?w=300&q=80 ) does not return that image. In some cases the results seem unrelated.

@boba-and-beer
Copy link
Contributor

@elliotsayes I think this is the case where the model being used to encode in the search_image endpoint does not match the model being used for unsplash_images. For matching the images found in unsplash images, I believe the model being used there is https://hub.getvectorai.com/model/image%2Fbit-medium and then using the search API or SDK method

@elliotsayes
Copy link
Author

Is there a way to select the model for the search_image endpoint? I want to generate the vector on the server, and ideally not bother with transferring the vector back and forth.

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