3 ms·
No, you embed all images with CLIP and use an approximate nearest neighbour library (like faiss) to get the most similar ones to the query in logarithmic time.
by visarga 4y ago
No, you embed all images with CLIP and use an approximate nearest neighbour library (like faiss) to get the most similar ones to the query in logarithmic time. Embedding will also be invariant to small variations.
You can try this on images.yandex.com - they do similarity search with embeddings. Upload any photo and you'll get millions of similar photos, unlike Google that has only exact duplicate search. It's diverse like Pinterest but without the logins.
Query image: https://cdn.discordapp.com/attachments/1005626182869467157/1006065194721607721/the_upper_torso_of_a_terminator_gorgon_medusa_with_borg_implants_and_robotic_snakes_coming_out_of_her_head_is_hanging_from_cables_and_wires_off_the_ceilin_-n_9_-i_-S_4163032289_ts-1659935033_idx-7.png https://cdn.discordapp.com/attachments/1005626182869467157/1...
Yandex similarity search results: https://yandex.com/images/search?rpt=imageview&url=https%3A%2F%2Fyandex-images.clstorage.net%2F9M7ss3q73%2Fcb8f48oc%2FNxfA302eE-Jg118uUcurxCMrXWIHU6cdgPI4MngjwezlV74Xq5vPQNCUv5zaTarhpeSW5AIhr6yeJVf42JO6fQYD5Nlp-kEzMobNKlW6fpCS7pxiZEAVXhYxKpAeQcMvQBc-J_u6GpQwVEz-Crn-5aIxovB0Rc3-X6WmLqjhS6-1x4BI2FgxUYDlfXzjzYn3MN3cQVfwlC6k0VjBfFEijgNnrGYb2K8GsfYcXozq3KbQsdChx0QuXTx1ZI_4kcvNtxWTGLpp0UEjlG6_YHxZtVGOjcAko1R_dZKpMU_B4W9Sx74FW_mPBjOmHa8smn03kiLA8bdHr22fFcZvSACJv2X1sbqbeWCAIlbtr9Hvq-VxT51RB1DlDCbi-MGNorKNgNesl4mbblWSFO8fnEucVYNBwtJ1xH1NnCcG7MngGkxExLDIySihQ-G2PQ1B_bg14Y2soxdxt52HQOlRn7LjjWG3fDWI2L4U0kWeHcyJTzeQYMFDV9Xvj620lA1L0Ir9F0RyuavLg6BQBT_toM5qVQEdP-F2EaQOpEO5ADwAMu1yx2_XOZqs5YIUf978K732AGOggqfGPc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