Submitted by Clarkmilo t3_1043mb2 in MachineLearning
A friend and I are working on a project that requires us to take images as input find images that match them from our database. What is the most effective way to do this? We've tried SIFT and a few similar solutions, but nothing's been super effective so far. Does anyone have any suggestions? Are there any solid open-source solutions?
BreakingCiphers t1_j32mj4h wrote
For every image in your database, you could use features from the penultimate layer in a CNN, index them.
Then to search over images, simply calculate the distance between the query image features and the database features.
This can be expensive computationally and memory wise if you have a lot of images. Some solutions could be to cluster your database embeddings, use sparse matrices, use approximate KNN, add some explore-exploit heuristics (take the images with the lowest distance compared to the first 37% images in the database, this cuts down search time by up to 63%, but might not be great). There is possibly more out there in SoTA, but I am not up to date there.