clip

Match images with natural-language text prompts using CLIP embeddings and cosine similarity.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers, torch, pillow, git+https://github.com/openai/CLIP.git, and includes references (resource) components.

What problem does it solve?

This Skill solves the problem of finding or categorizing images using natural-language queries without needing labeled training data.

Core Features & Use Cases

  • Zero-shot image classification: Assign semantic labels to images directly from text prompts.
  • Image-text matching & semantic search: Compute similarity between an image and candidate descriptions to retrieve the best matches.
  • Cross-modal retrieval & content screening: Support tasks like image deduplication, visual question-style yes/no checks, and basic safety-oriented categorization.

Quick Start

Ask your agent to classify and rank "a sunset over the ocean" against a set of images using CLIP embeddings (e.g., load ViT-B/32, encode the text query and each image, compute cosine similarities, and return the top matches).

Frequently Asked Questions about clip

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

FAQPage Schema
How do I classify images using text prompts without training data?

Zero-shot image classification matches images to text prompts by encoding both into normalized embeddings and computing cosine similarity to rank matches. It assigns semantic labels directly from natural-language descriptions without requiring fine-tuning.

Can I use CLIP for image-text matching and semantic search?

CLIP performs image-text matching by loading a vision-language model like ViT-B/32, encoding candidate descriptions and images, and computing cosine similarities. It outputs ranked matches for cross-modal retrieval and semantic search applications.

What is the best way to do cross-modal retrieval without fine-tuning a model?

Cross-modal retrieval without fine-tuning uses pre-trained CLIP embeddings to compute similarity between images and text. This approach supports image deduplication and visual yes/no checks for lightweight content screening scenarios.

Does zero-shot image classification require a specific model architecture?

Zero-shot image classification requires a CLIP-compatible vision-language model. The process involves preprocessing images and text, encoding them into normalized embeddings, and calculating cosine similarity to produce ranked outputs.

When should I not use zero-shot image classification for content moderation?

Zero-shot image classification is suited for lightweight content screening and basic safety categorization, not robust content moderation. It should not replace fine-tuned models when precise, high-stakes visual question answering is required.