openai/CLIP
CLIP (Contrastive Language-Image Pretraining), Predict the most relevant text snippet given an image
From the publisher
README & documentation
Source previewRead the project’s overview, installation instructions and usage examples. The original README is the source of truth.
[[Blog]](https://openai.com/blog/clip/) [[Paper]](https://arxiv.org/abs/2103.00020) [[Model Card]](model-card.md) [[Colab]](https://colab.research.google.com/github/openai/clip/blob/master/notebooks/InteractingwithCLIP.ipynb) CLIP (Contrastive Language-Image Pre-Training) is a neural network trained on a variety of (image, text) pairs. It can be instructed in natural language to predict the most relevant text snippet, given an image, without directly optimizing for the task, similarly to the zero-shot capabilities of GPT-2 and 3. We found CLIP matches the performance of the original ResNet50 on ImageNet “zero-shot” without using any of the original 1.28M labeled examples, overcoming several major challenges in computer vision. First, install PyTorch 1.7.1 (or later) and torchvision, as well as small additional dependencies, and then install this repo as a Python package. On a CUDA GPU machine, the following will do the trick: Replace cudatoolkit=11.0 above with the appropriate CUDA version on your machine or cpuonly when installing on a machine without a GPU. The CLIP module clip provides the following methods: Returns the names of the…
Read the full README ↗ · Preview checked 2026-10-31T21:52:26.731Z
Inside the original README — Document outline
- CLIP
- Approach
- Usage
- API
- clip.availablemodels()
- clip.load(name, device=..., jit=False)
- clip.tokenize(text: Union[str, List[str]], contextlength=77)
- model.encodeimage(image: Tensor)
- model.encodetext(text: Tensor)
- model(image: Tensor, text: Tensor)
- More Examples
- Zero-Shot Prediction
Headings are captured from the source. Links open the publisher’s document, not a locally hosted copy.
Links from the README
References supplied by the publisher, not independently verified endorsements. Check the destination before downloading files or entering credentials.
Documentation belongs to its respective authors. Reported project/model license: MIT. A listing is not a grant of reuse or training rights. Confirm the document’s own terms at the source.
What this repository does
CLIP (Contrastive Language-Image Pretraining), Predict the most relevant text snippet given an image
Repository facts
- Owner
- openai
- Primary language
- Jupyter Notebook
- Stars
- 34,552
- Forks
- 4,063
- Open issues + pull requests
- 274
- License
- MIT
- Archived
- No
- Default branch
- main
- Created
- 2020-12-16T11:24:42.000Z
- Last push
- 2026-03-25T18:46:40.000Z
Topics and intended use
Owner-supplied topics: deep-learning, machine-learning
Review the README for scope, installation, examples and limitations. We do not run repository code or certify it.
Evaluate before installing
Review licensing and dependencies, inspect recent commits and unresolved issues, and test in an isolated environment before production use. Stars and forks alone cannot answer these questions.
Source and freshness
Source: GitHub. Metadata observed 2026-11-01T12:19:42.808Z. Daily imports are snapshots, not real-time monitoring.
Popularity and source listings do not establish security, suitability, licensing rights or benchmark performance.