Multimodal AI Search
Search 8,091 Flickr8k photos by describing them, showing an example image, or both.
How it works
SigLIP 2 (ViT-B/16) embeds all 8,091 photos and their 40,437 captions once, offline. A text query gets two scores per photo, one against the pixels and one against the photo's best-matching caption. They live on very different scales, so each is z-scored across the collection and then blended 0.7 / 0.3, the weight with the best top-1 accuracy on half the benchmark.
Scoring is exact (one matrix-vector product), with no approximate index needed at this size. Image search encodes the upload with the same model, and "More like this" reuses a photo's stored vector. Thumbnails load straight from Hugging Face's CDN.
What the rebuild changed
The first version matched queries against captions only, using CLIP ViT-B/32 and FAISS, showed 5 results, and downloaded each image from Google Drive one at a time (about 6 s to show all five in a replay). The rebuild blends photo and caption scores with SigLIP 2. Top-1 accuracy went from 41.7% to 57.5%, about half from the blending and half from the model, and the first result now appears in about 0.3 s.
How I measured it
Every Flickr8k caption is used as a query with that caption held out, and a hit means the photo it describes ranks in the top K. The blend weight was tuned on the even-numbered queries; results are from the 20,218 odd-numbered ones.
Caveat: caption-style queries favor the caption signal, so free-form queries were tested by example.
Where it breaks
- Counting holds up to about three.
- "No", word order and left/right are mostly ignored.
- Queries over 64 tokens are cut off without warning.
- It always fills every slot even when nothing matches (searching "a giraffe" returns mostly dogs).
What I'd do next
- Flag weak matches.
- Warn when a query is truncated.
- Collapse duplicate photos.
- Score free-form queries with hand-labeled relevance.

