Learning Transferable Visual Models From Natural Language Supervision

Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal and 6 more

Published
Lab
OpenAI
Code
GitHub
Citations
61,404

TL;DR

CLIP learns image representations by predicting which caption goes with which image, trained from scratch on 400 million image-text pairs. After that, text can name or describe visual concepts for zero-shot transfer.

Read this as a

Why builders care

Editor's note

You can add a new visual concept with language instead of a new labeled dataset. CLIP matched the original ResNet-50's ImageNet accuracy zero-shot, without using any of that model's 1.28 million training images, and was competitive on many of 30+ vision datasets.

How to apply it

Editor's note
  1. 1For a new visual category, try a text prompt against a CLIP-style model before collecting a labeled training set.
  2. 2The pre-training task is pairing images with captions at scale. If you train your own, that is the recipe, here on 400 million pairs from the internet.
  3. 3Code and pre-trained weights were released at the OpenAI CLIP repository linked from the abstract.

Code

Verified link

Practical notes

AI-generated
  • Pre-train the model by predicting which caption goes with which image.
  • Use a dataset of image and text pairs collected from the internet.

Key results

From the abstract
  1. 1

    We demonstrate that the simple pre-training task of predicting which caption goes with which image is an efficient and scalable way to learn SOTA image representations from scratch on a dataset of 400 million (image, text) pairs collected from the internet.

  2. 2

    We study the performance of this approach by benchmarking on over 30 different existing computer vision datasets, spanning tasks such as OCR, action recognition in videos, geo-localization, and many types of fine-grained object classification.

  3. 3

    For instance, we match the accuracy of the original ResNet-50 on ImageNet zero-shot without needing to use any of the 1.28 million training examples it was trained on.

  • State-of-the-art computer vision systems are trained to predict a fixed set of predetermined object categories.
  • This restricted form of supervision limits their generality and usability since additional labeled data is needed to specify any other visual concept.
  • Learning directly from raw text about images is a promising alternative which leverages a much broader source of supervision.

  • We demonstrate that the simple pre-training task of predicting which caption goes with which image is an efficient and scalable way to learn SOTA image representations from scratch on a dataset of 400 million (image, text) pairs collected from the internet.
  • After pre-training, natural language is used to reference learned visual concepts (or describe new ones) enabling zero-shot transfer of the model to downstream tasks.

State-of-the-art computer vision systems are trained to predict a fixed set of predetermined object categories. This restricted form of supervision limits their generality and usability since additional labeled data is needed to specify any other visual concept. Learning directly from raw text about images is a promising alternative which leverages a much broader source of supervision. We demonstrate that the simple pre-training task of predicting which caption goes with which image is an efficient and scalable way to learn SOTA image representations from scratch on a dataset of 400 million (image, text) pairs collected from the internet. After pre-training, natural language is used to reference learned visual concepts (or describe new ones) enabling zero-shot transfer of the model to downstream tasks. We study the performance of this approach by benchmarking on over 30 different existing computer vision datasets, spanning tasks such as OCR, action recognition in videos, geo-localization, and many types of fine-grained object classification. The model transfers non-trivially to most tasks and is often competitive with a fully supervised baseline without the need for any dataset specific training. For instance, we match the accuracy of the original ResNet-50 on ImageNet zero-shot without needing to use any of the 1.28 million training examples it was trained on. We release our code and pre-trained model weights at https://github.com/OpenAI/CLIP.

Everything on this page is written from this abstract. For methods and full results, read the paper PDF.

Ask the paper

Answers come from the paper summary and abstract.

Ask anything about “Learning Transferable Visual Models From Natural Language Supervision”, or start with one of these:

Closest matches across the feed and every collection, by shared words in titles, topics and abstracts.