界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

clip_zeroshot_retrieval_eval

clip_zeroshot_retrieval_eval

【效率与协作】Evaluate CLIP-style zero-shot classification and cross-modal retrieval with normalized similarity rankings.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: clip_zeroshot_retrieval_eval description: Evaluate CLIP-style zero-shot classification and cross-modal retrieval with normalized similarity rankings.

CLIP Zero-Shot And Retrieval Evaluation

Use this skill when checking downstream CLIP transfer mechanisms: class-prompt similarity for zero-shot classification and image/text ranking for retrieval.

Inputs

  • Image embeddings.
  • Class text embeddings and labels for classification.
  • Caption/text embeddings aligned by index for retrieval.
  • Recall cutoffs.

Outputs

  • Top-1 accuracy percentage.
  • Recall@K percentages.
  • Ranking traces.

Workflow

  1. Normalize image and text/class embeddings.
  2. For classification, choose the class with maximum similarity.
  3. For retrieval, rank candidates by similarity with deterministic tie-breaking.
  4. Compute percentages and save trace data.

Validation

Run python tests/test_zeroshot_retrieval_eval.py.

Limitations

This skill evaluates provided embeddings; it does not download datasets or run large model inference.

我的收藏