Sort/search images using OpenAI's CLIP in your browser

This web app sorts/searches through images in a directory on your computer using OpenAI's CLIP model, and the new File System Access API. Here's the Github repo for this web app, and here's the Github repo for the web-ported CLIP models. Feel free to open an issue or DM me on Twitter if you have any questions about this demo.

All processing happens in your browser, on your device - i.e. your images are not uploaded to a server for processing.


Step 1: Choose model:
Step 2: Download and initialize the models.
Download image model:
Download text model:
Initialize workers:
Number of image embedding workers/threads:

Step 3: Pick a directory of images (images in subdirectories will be included).
    or     (remove nsfw:)
Step 4: Compute image embeddings. (they will be saved as <ModelName>_embeddings.tsv in the selected directory)

0 images embedded (? ms per image)
Step 6: Enter a search term.

Results (hover for cosine similarities)
Click the search button to compute the results.