Image search engine using Python and PyTorch. Query similar images from database.

preview_player
Показать описание
In this video, we are going to implement a project to search similar images from a folder of images. We will be using Python and PyTorch for the implementing the project.

The idea is to first take all the images and pass them through the model which in our case is resnet18. Then get the activations from the second last layer of the network which is the avgpool layer and save them in a matrix. Lastly, run the cdist function from scipy to find the minimum distance of all the images from the target image specified by the user.

PyTorch is used to get the feature vectors of an image and no training of any sort was done.

Code:

Instagram:
Рекомендации по теме
Комментарии
Автор

hello
what if i have an image of a product and i want to search for similar ones across the internet ?

shayansep
Автор

well done
can you share the data you used

ai
Автор

instead of random image from the database itself- what if we have a separate querry image which has to be matched to the 1000 images?

enough
Автор

TypeError: __init__() got an unexpected keyword argument 'weights'

enough