clip

Classify images and search image collections using natural language with CLIP embeddings.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/loteiron/ZeusAgent --skill clip-loteiron
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clip
Source: https://github.com/loteiron/ZeusAgent/tree/main/optional-skills/mlops/clip
Command: npx skills add https://github.com/loteiron/ZeusAgent --skill clip-loteiron

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers, torch, pillow, and includes references (resource) components.

What problem does it solve? Classifying images or searching image libraries normally requires labeled training data and custom model training. CLIP performs zero-shot image classification and image-text matching directly from natural language descriptions, eliminating the need for task-specific training datasets. ## Core Features & Use Cases - Zero-Shot Image Classification: Classify images into arbitrary text-defined categories without any training data, using models like ViT-B/32. - Semantic Image Search: Encode images and text queries into a shared embedding space to retrieve images by natural language description. - Content Moderation: Score images against categories like NSFW or violent content using softmax probabilities over text prompts. - Use Case: A photo platform indexes thousands of uploaded images as CLIP embeddings stored in Chroma, then lets users search with queries like "a sunset over the ocean" and instantly retrieves the most visually similar images. ## Quick Start Ask the agent to classify an image into categories like dog, cat, or bird using CLIP zero-shot classification with the ViT-B/32 model.

Frequently Asked Questions about clip

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I do zero-shot image classification with CLIP?▼

Load a model with clip.load("ViT-B/32"), preprocess the image, tokenize candidate text labels, then compute softmax over the model's logits. The highest-probability label is the predicted class, with no training data required.

How to build semantic image search with CLIP embeddings?▼

Encode all images with model.encode_image, normalize the embeddings, and store them. Encode a text query the same way, then rank images by cosine similarity. Embeddings can be stored in vector databases like Chroma or FAISS for fast retrieval.

CLIP vs BLIP-2 vs LLaVA for image understanding?▼

CLIP is best for zero-shot classification and image-text retrieval. BLIP-2 produces better image captions, while LLaVA supports vision-language chat. For segmentation tasks, use Segment Anything instead.

Which CLIP model should I use: RN50, ViT-B/32, or ViT-L/14?▼

ViT-B/32 is the recommended default, balancing speed and quality with 151M parameters. RN50 is fastest, while ViT-L/14 offers the best quality at 428M parameters but runs slowest.

Does CLIP require a GPU for image encoding?▼

CLIP runs on CPU but a GPU is 10-50x faster. Image encoding takes roughly 200ms on CPU versus 20ms on a V100 GPU, so GPU is recommended for batch processing or large image indexes.

What are the limitations of CLIP zero-shot classification?▼

CLIP performs poorly on fine-grained distinctions, counting, and spatial reasoning, and it produces whole-image predictions without bounding boxes. It also requires descriptive text labels and may reflect biases from its web training data.