How to build your own natural language image search engine (Part 1)

Last month, I started working on a really fun side project: a natural language image search engine.

Try it.

The idea came after reading about Open AI’s CLIP.

CLIP is a neural network able to connect text and images. It allows us to compute how si…


This content originally appeared on DEV Community and was authored by rkouye

Last month, I started working on a really fun side project: a natural language image search engine.

Demo

Try it.

The idea came after reading about Open AI's CLIP.

CLIP is a neural network able to connect text and images. It allows us to compute how similar a text corpus and a picture are.

The naïve engine

If we can compute a similarity score between a text corpus and a picture, we can build a simple search engine. Imagine we had a million pictures of cute animals.

1- The user would type a query, let's say, "cats with hats".
2- Using CLIP, we would compute every image similarity score with the sentence "cats with hats".
3- Finally, we would return the most relevant images (biggest score).

Et voilà!

However, because we are computing the similarity score on each image, the search time will keep growing with the number of images. It is not scalable.

Also, search engines usually allow multiple facets search (for example, the image's primary color) in conjunction with the text query.

To improve our implementation, let understand how CLIP work.

(Coming in Part 2)


This content originally appeared on DEV Community and was authored by rkouye


Print Share Comment Cite Upload Translate Updates
APA

rkouye | Sciencx (2021-08-15T21:43:27+00:00) How to build your own natural language image search engine (Part 1). Retrieved from https://www.scien.cx/2021/08/15/how-to-build-your-own-natural-language-image-search-engine-part-1/

MLA
" » How to build your own natural language image search engine (Part 1)." rkouye | Sciencx - Sunday August 15, 2021, https://www.scien.cx/2021/08/15/how-to-build-your-own-natural-language-image-search-engine-part-1/
HARVARD
rkouye | Sciencx Sunday August 15, 2021 » How to build your own natural language image search engine (Part 1)., viewed ,<https://www.scien.cx/2021/08/15/how-to-build-your-own-natural-language-image-search-engine-part-1/>
VANCOUVER
rkouye | Sciencx - » How to build your own natural language image search engine (Part 1). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/15/how-to-build-your-own-natural-language-image-search-engine-part-1/
CHICAGO
" » How to build your own natural language image search engine (Part 1)." rkouye | Sciencx - Accessed . https://www.scien.cx/2021/08/15/how-to-build-your-own-natural-language-image-search-engine-part-1/
IEEE
" » How to build your own natural language image search engine (Part 1)." rkouye | Sciencx [Online]. Available: https://www.scien.cx/2021/08/15/how-to-build-your-own-natural-language-image-search-engine-part-1/. [Accessed: ]
rf:citation
» How to build your own natural language image search engine (Part 1) | rkouye | Sciencx | https://www.scien.cx/2021/08/15/how-to-build-your-own-natural-language-image-search-engine-part-1/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.