openai/clip

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

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 57 minutes ago
Added to GitGenius on September 1st, 2026
Created on December 16th, 2020
Open Issues & Pull Requests: 272 (+0)
GitHub issues: Enabled
Number of forks: 4,045
Total Stargazers: 34,272 (+0)
Total Subscribers: 330 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

CLIP is a neural network model that performs zero-shot image classification and image-text matching by predicting the most relevant text snippet given an image.

CLIP addresses the challenge of building vision systems that generalize across diverse tasks without task-specific labeled data. The approach trains on a large dataset of image-text pairs using contrastive learning, which aligns image and text representations in a shared embedding space. This enables the model to classify images using arbitrary text descriptions provided at inference time, without requiring fine-tuning on labeled examples for each new task.

Developers should adopt CLIP when building applications that need flexible image understanding across varied domains without collecting task-specific training data. It suits projects requiring zero-shot classification, image-text retrieval, or cross-modal search. The tool works well for scenarios where class labels are known but labeled training data is unavailable or expensive to obtain. The repository provides a straightforward Python API with methods to load pretrained models, encode images and text separately, and compute similarity scores between them. Installation requires PyTorch and torchvision, with support for both GPU and CPU execution.

The project maintains multiple pretrained model variants available through a simple loading interface. Development activity shows ongoing model availability and API stability, with the codebase structured around core encoding methods that separate image and text feature extraction. The repository includes reference implementations for common use cases like zero-shot prediction and linear-probe evaluation, demonstrating practical application patterns.