induwara.lk
induwara.lkAI · Vision

Zero-Shot Image Classifier — Free, No API Key

Upload any image, type your own list of labels, and rank how well each one fits — powered by OpenAI's CLIP model. Classify into custom categories with no training data, no API key on your side, and no signup. Inference runs server-side; your image is never stored.

By Induwara AshinsanaUpdated Jul 12, 2026
Classify an image into your own labelsCLIP · server-side
Posted once, never stored

Image bytes are POSTed once to this server, forwarded to the model, and discarded — never written to disk or logged.

dogcatbirdcarfoodperson
Label presets
CLIP embeds your image and each label prompt into one space, takes the cosine similarity, and softmaxes across your labels.

What this does

Upload an image and type your own labels — CLIP scores how well the picture matches each one, with no training data and no API key on your side. Unlike a fixed ImageNet classifier, the categories are entirely yours: “invoice” vs “receipt”, “product” vs “lifestyle”, or anything else. Scores are a softmax across your labels, so they sum to 100%.

Method: contrastive image–text matching per Radford et al. (2021), CLIP (arXiv:2103.00020). Each label is placed in the prompt template, encoded, and compared to the image embedding by cosine similarity, then scaled and softmaxed. Full source list in the page footer.

How it works

Zero-shot image classification asks a different question from an ordinary classifier. Instead of predicting from a fixed list of classes the model was trained on, you bring your own labels and the model scores how well the image matches each. This tool uses CLIP (Radford et al., 2021), which was trained on 400 million image–caption pairs to place matching images and text close together in one shared embedding space. Because that space is shared, a brand-new label written as text can be compared to an image directly — no per-label training required.

The pipeline is deterministic given the model weights (CLIP paper §2.4). Every step below runs server-side through the Hugging Face Inference API on openai/clip-vit-base-patch32 (CLIP ViT-B/32 · ~151M parameters · 224×224 input):

  1. Encode the image.The image passes through CLIP's vision encoder to produce one embedding vector v.
  2. Encode each label. Each label is inserted into the prompt template (default a photo of a {}) and run through the text encoder to produce a vector tₓ.
  3. Normalise and compare. Both vectors are L2-normalised to unit length, then the cosine similarity sₓ = v · tₓ is the dot product — how aligned the image is with that label.
  4. Scale by the logit scale. CLIP multiplies each similarity by a learned temperature that released checkpoints train up to about 100, giving logits zₓ = 100· sₓ.
  5. Convert to probabilities. A softmax across your labels turns the logits into confidences that sum to 100%: pₓ = e^zₓ / Σ e^zʲ. The highest is the predicted label.

The large logit scale is why CLIP looks so confident: a modest similarity gap of 0.31 versus 0.22 becomes a logit gap of 31 versus 22, which softmax pushes to roughly 100% versus 0%. There is a second, equivalent way to read the scores — an independent sigmoid per label, σ(zₓ) = 1 / (1 + e^−zₓ), which asks “does this label fit, yes or no?” without comparing labels to each other. For exactly two labels the two views agree exactly, because single-label softmax equals the sigmoid of the logit difference — the cross-check this tool's math is verified against. The hosted CLIP endpoint returns the softmax (compare-labels) scores; the sigmoid formula is shown here for anyone reading raw logits from a self-hosted model.

Worked examples

Golden-retriever photo — single-label softmax

Labels: dog, cat, horse, car

  1. CLIP cosine similarities: dog 0.31, cat 0.22, horse 0.19, car 0.05
  2. Scale by 100 → logits: dog 31, cat 22, horse 19, car 5
  3. Softmax (subtract max 31): exps 1, e^-9, e^-12, e^-26
  4. = 1, 0.00012341, 0.000006144, ~0 · sum ≈ 1.0001296
  5. dog 1/1.0001296 = 99.99%, cat 0.012%, horse 0.0006%, car ~0%
  6. Predicted label: dog — a wide 31-vs-22 logit gap.

Boxed product photo — multi-label sigmoid

Labels: product, packaging, logo

  1. CLIP logits from cosine × 100: product 18, packaging 12, logo −4
  2. Sigmoid each (independent yes/no): σ(18) = 1/(1+e^-18)
  3. product 100.00%, packaging σ(12) = 99.99%, logo σ(−4) = 1.80%
  4. Both product AND packaging fire; logo is rejected.
  5. This is why sigmoid is offered alongside softmax — it lets more
  6. than one label be true for a single image.

Ambiguous image — edge case (ties)

Labels: dog, cat, bird

  1. The image matches none well: similarities dog 0, cat 0, bird 0
  2. Logits all 0 → softmax = 1/3, 1/3, 1/3
  3. Result: dog 33.33%, cat 33.33%, bird 33.33% — a genuine tie.
  4. No division-by-zero or NaN: equal logits give a uniform split,
  5. the honest signal that CLIP can't separate your labels here.

Frequently asked questions

Sources & references

The methodology, logit scale, and worked-example numbers on this page were cross-checked against the CLIP paper and the model card on 2026-07-12. Uploads are capped at 5.0 MB and up to 20 labels; inference runs server-side and the image is discarded after scoring.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.