Zero-Shot Image Labels
Write each class as a sentence, embed them once, and label photos by nearest text. No training photos needed for new names.
Why Does This Exist?
New classes arrive faster than labels. Zero-shot reuses joint spaces: encode names as templates like a photo of a cat, average to one text vector per class, and pick max cosine per photo. Image classification becomes naming plus matching.
This page covers prompt classification only. Open detection children add boxes.
The one idea you need first.
Text prototype means mean of template vectors for name . Label is for image . Ensembles over templates cut wording noise.
Think of It Like This
Sorting mail by reading name cards aloud
A sorter never saw tenants but holds name cards read in eighty tones each. Each letter goes to the card sounding closest. New tenants need only new cards.
Photos are letters, prompts are readings, and cosine is closeness. Where it stops: mail names stay exact, while photo names vary by phrase.
How It Actually Works
Encode photo to unit norm. Encode templates per class and mean to . Score cosines times scale and softmax. Report top- on ImageNet and robustness sets. Tune wording per domain with a few labeled shots if allowed.
In plain words: readings per name, one match per photo, and scale sharpens gaps.
Worked example
Photo scores cat , dog , fox . Scale : logits . Exponentials , sum . Cat probability . Top- over ImageNet photos is percent for CLIP ViT-L, versus supervised ResNet-50. Matching beats one supervised net with no labels.
Watch Out For
One template deciding everything
Single a photo of a X prompts swing points by article and plural. Classes flip on wording. Always ensemble templates and test paraphrases before quoting accuracy.
The Quick Version
- Zero-shot labels photos by nearest class sentence.
- Eighty templates per class form the prototype.
- CLIP reaches 76.2 percent top-1 on ImageNet.
- Wording shifts points, so ensemble prompts.
- New names need text only, no photos.