TL;DRCLIP learns a shared space for images and text by contrastive training on pairs.
CLIP trains an image encoder and a text encoder together so that matching image–caption pairs land near each other in a shared embedding space, and mismatches far apart (contrastive learning, on hundreds of millions of pairs). The result: you can compare images and text directly — zero-shot image classification by comparing to label text, image search by caption. It's foundational to text-to-image and multimodal systems.
Key points
Joint image + text encoders, shared space
Contrastive: match pairs close, others far
Zero-shot classification & image search
Foundation for text-to-image / multimodal
Common mistakes
Thinking CLIP generates images (it embeds)
Ignoring training-data bias in CLIP
Comparing CLIP embeddings across different versions
Try it: Explain how CLIP enables zero-shot image classification.
Example code
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>image ↔ caption trained to be close in one space
classify: compare image to "a cat"/"a dog" text vectors
nearest label wins (zero-shot)</pre></body></html>