Image Similarity Search using PyTorch & Spotify Annoy
Вставка
- Опубліковано 4 лис 2024
- In this webcast I’ll show how to create an image similarity search using a pre-trained model in PyTorch and Spotify Annoy (Approximate Nearest Neighbor Oh Yeah!).
Spotify Annoy: github.com/spo...
Approximate nearest neighbors and vector models, introduction to Annoy (Erik Bernhardsson): • Approximate nearest ne...
Cats-vs-Dogs Dataset: www.kaggle.com...
My PluralSight Courses: www.pluralsigh...
Feel free to contact me regarding training courses, mentoring and presentations: clouscasts.net@gmail.com
Finally a tutorial that takes me all the way from launching VSCode to the final results. You have no idea how much I appreciate that.
Thank you for getting to the code fast. ❤
Thank for great tutorial!
Great video -- love how you covered the topic from high level down to the actual implementation.
Question: you used the "Resnet" model in this video -- if I wanted to use the OpenAI Clip model instead, is it basically the same process (except switching the model name)? Do you think the CLIP model would be better for general purpose text/image search?
Thanks for the comments. I used the simplest ResNet model as it has 512 feature vectors, the more complex models has 1024, which would make for a larger Annoy index. (I have not tested this to see if it would be more accurate.) It is possible to use other networks, as long as you can get the values from the features layer in the network.
I've not looked at Open AI Clip, if you are using it you will need a way to get the values for the feature vector from the network.
Great video!
Interesting video, i built out something similiar using Tensorflow and scikit learn's nearest neighbour module. I've also tried using cosine distance as well with good results. Is Spotify Annoy the same NN algo? Thanks
Hi, Thanks, I don't think Spotfy Annoy is the same as scikit's nn algorithm, there is a great presentation on Annoy here with more details of how the algorithm works: ua-cam.com/video/QkCCyLW0ehU/v-deo.html
Do you have the code in github? Can you share the repo link please?
Hi, Sorry I don't have the code in GitHub.
can i use images from my database as dataset
That should be possible if you can find a way to pass the image into the model.