clip

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

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/vivekgoquest/hermes-agent-stable --skill clip-vivekgoquest
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clip
Source: https://github.com/vivekgoquest/hermes-agent-stable/tree/main/optional-skills/mlops/clip
Command: npx skills add https://github.com/vivekgoquest/hermes-agent-stable --skill clip-vivekgoquest

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? It enables zero-shot image classification and cross-modal image-text retrieval without training custom models, letting you categorize, search, and moderate images using plain text descriptions. ## Core Features & Use Cases - Zero-Shot Classification: Classify images into arbitrary text-defined categories with no training data required. - Semantic Image Search: Index image embeddings and retrieve matches using natural language queries, with optional Chroma/FAISS vector database integration. - Content Moderation: Score images against safety categories like NSFW or violent content with confidence thresholds. - Use Case: Given a folder of product photos, encode them once with ViT-B/32, then search with queries like "a red sneaker on white background" to instantly surface the most relevant images. ## Quick Start Use the clip skill to classify the attached photo against the categories dog, cat, bird, and car.

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 your text labels, then compute softmax over the logits from model(image, text). Descriptive labels like "a photo of a dog" outperform single words.

How to build semantic image search with CLIP embeddings?▼

Encode all images with model.encode_image, normalize the embeddings, then encode a text query and compute cosine similarity against the image index. Store embeddings in Chroma or FAISS for scalable retrieval.

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

CLIP excels at zero-shot classification and image-text matching. BLIP-2 is better for image captioning, LLaVA for vision-language chat, and Segment Anything for segmentation tasks.

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 at 151M parameters. RN50 is fastest, while ViT-L/14 at 428M parameters gives the best quality but runs slowest.

Does CLIP work on CPU or does it require a GPU?▼

CLIP runs on CPU with image encoding around 200ms, but a GPU is recommended since it is 10-50x faster, roughly 20ms per image on a V100. Use device = "cuda" if torch.cuda.is_available().

What are the limitations of CLIP for image analysis?▼

CLIP handles whole images only with no bounding boxes, performs weakly on fine-grained tasks, counting, and spatial reasoning, and may carry biases from its web training data. Vague text labels also degrade performance.