openai/CLIP

CLIP (Contrastive Language-Image Pretraining), Predict the most relevant text snippet given an image

Open original source ↗

From the publisher

README & documentation

Source preview

Read 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…

openai/CLIP on GitHub A short preview, not the full document.

Read the full README ↗ · Preview checked 2026-10-31T21:52:26.731Z

Inside the original README — Document outline
  1. CLIP
  2. Approach
  3. Usage
  4. API
  5. clip.availablemodels()
  6. clip.load(name, device=..., jit=False)
  7. clip.tokenize(text: Union[str, List[str]], contextlength=77)
  8. model.encodeimage(image: Tensor)
  9. model.encodetext(text: Tensor)
  10. model(image: Tensor, text: Tensor)
  11. More Examples
  12. 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.

README and project files

Issues and maintenance discussion

Releases and changelog

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.

Open original source

Related repositories

jackfrued/Python-100-Days

microsoft/generative-ai-for-beginners

rasbt/LLMs-from-scratch

microsoft/ML-For-Beginners

microsoft/AI-For-Beginners

pathwaycom/llm-app