CLIP ranks images by a text prompt
CLIP (Contrastive Language-Image Pre-training) is an OpenAI model that embeds images and text in one space, so any image can be scored against any phrase. In Supervisely, CLIP and OpenCLIP models rank, filter and sort a dataset by a text prompt, and their embeddings map images and objects to find clusters, outliers and wrong labels.

- Labels
- A text prompt; no labels needed
- Apps
- Apply
- Source
- Paper, CLIP code, open_clip code
Apps in the Supervisely Ecosystem
Every model in Supervisely comes as a Supervisely App: a module from the Ecosystem that plugs into the platform and runs on your own GPU, with no code to install. A Serve App puts the model behind the labeling tools, and where the model can be trained, a Train App fits it to your labeled project. All Apps work on the same projects, so you add a model, update it or swap it for another without changing anything else.
Images and text in one space
"Learning Transferable Visual Models From Natural Language Supervision" trains an image encoder and a text encoder on one task: predict which caption goes with which image, over 400 million image-text pairs from the internet. After that, natural language names the visual concepts, so the model transfers to new tasks without training on them. The paper matches the accuracy of the original ResNet-50 on ImageNet zero-shot, without using any of its 1.28 million training examples.
A CLIP score is the similarity of an image embedding and a text embedding. OpenCLIP is an open-source implementation, with models trained on the public LAION dataset of up to two billion image-text pairs (paper). CoCa adds a captioning decoder and trains with a contrastive and a captioning loss together.
Models in Prompt-based Image Filtering
The app offers nine pretrained models from OpenCLIP, with the ImageNet top-1 accuracy and download size its README lists:
| Model | Pretrained | ImageNet top-1 | Size |
|---|---|---|---|
| coca_ViT-L-14 | mscoco_finetuned_laion2B-s13B-b90k | - | 2.55 GB |
| coca_ViT-L-14 | laion2B-s13B-b90k | 75.5% | 2.55 GB |
| ViT-L-14 | openai | 75.5% | 933 MB |
| ViT-L-14 | laion2b_s32b_b82k | 75.3% | 933 MB |
| ViT-L-14-336 | openai | - | 933 MB |
| ViT-g-14 | laion2b_s34b_b88k | 78.5% | 5.47 GB |
| ViT-bigG-14 | laion2b_s39b_b160k | 80.1% | 10.2 GB |
| convnext_base_w | laion2b_s13b_b82k_augreg | 71.5% | 718 MB |
| convnext_large_d_320 | laion2b_s29b_b131k_ft_soup | 76.9% | 1.41 GB |
A GPU is preferred, not required.
Filter or sort a dataset by a prompt
- Run Prompt-based Image Filtering with CLIP from the context menu of an images project or dataset, or from the Ecosystem, and load the dataset.
- Choose the model and the batch size, 32 by default. JIT compilation is on unless you clear the checkbox.
- Type the text prompt, a word or a phrase, and start the inference.
- Read the chart of scores, sorted from high to low, and preview images from the table to pick a threshold.
- Choose an output dataset and filter, sort or both: keep the images above or below the threshold, in descending or ascending order of score. A confidence tag on each image is optional.
The app writes the prompt and the CLIP score into each image's metadata, under Image Properties - Info in the labeling tool. Stop the session in App Sessions when you are done. The CLIP tutorial on the blog walks through a full example, and data curation covers the platform tools around it.
Explore data with embeddings
Explore data with embeddings computes an embedding per image or per object and projects them onto a 2D chart. Its model table includes OpenAI CLIP ViT-B/32 and ViT-L/14 and MetaCLIP, next to ConvNeXt, FLAVA, BEiT and BEiT v2, and other model names from Hugging Face can be pasted in, though not all of them work.
- Instance mode: whole images, objects cropped to their boxes (the default), or both. Crops can be expanded by a few pixels for context.
- Projection: UMAP (the default), t-SNE, PCA or their combinations, with a metric such as euclidean.
- Only new or changed images are recomputed unless you force it. Embeddings and projections are saved to
/embeddings/<project>_<id>/<model>in Team Files asembeddings.ptand JSON files.
Click a point to preview the image and its annotation; click the legend to hide or show a class. Points of one class that sit in another class's cluster are candidates for wrong labels. The HRDA post uses the app to choose diverse images to label.
What CLIP does not do here
CLIP rates a whole image against a prompt: it does not say where the object is. For boxes from a phrase, use OWL-ViT, which adds detection heads to CLIP encoders, Grounding DINO or YOLOE, all zero-shot detectors. Scores of different prompts are not on a fixed scale, so set the threshold per prompt from the chart. Neither app trains CLIP. To match objects to a catalog of products by example images, see metric learning.
Frequently asked questions.
What is a CLIP score?
The similarity between the CLIP embedding of an image and the embedding of a text prompt. Prompt-based Image Filtering computes it for every image of a dataset, then sorts the images by it or keeps those above or below a threshold.
What is the difference between CLIP and OWL-ViT?
CLIP scores a whole image against a phrase. OWL-ViT starts from CLIP image and text encoders and adds light detection heads, so it returns bounding boxes for the objects a phrase names.
Does Explore data with embeddings use CLIP?
Yes, among other models. Its table lists OpenAI CLIP ViT-B/32 and ViT-L/14 and MetaCLIP, next to ConvNeXt, FLAVA and BEiT, and it accepts other model names from Hugging Face.
How does the CLIP model work?
CLIP trains an image encoder and a text encoder together on 400 million image-text pairs, so that matching images and captions get similar embeddings. Comparing the embedding of an image with that of a phrase gives a score of how well they match, with no training on the classes you name.
Train and serve models on your own data.
Label a project in a free account, train a model on it from the browser and deploy it on your own GPU. Or book a demo to run Supervisely on your servers.



