AGENT SKILL

imagededup

Route image deduplication tasks for the imagededup package: hash-based duplicate detection, CNN-based duplicate detection with custom models, and evaluation or plotting of duplicate maps.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
imagededup
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Route image deduplication tasks for the imagededup package: hash-based duplicate detection, CNN-based duplicate detection with custom models, and evaluation or plotting of duplicate maps.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

imagededup

Use this skill for the imagededup package when the task is about finding exact or near-duplicate images, generating encodings, comparing duplicate maps, or plotting duplicate relationships.

Start here

  • Use sub-skills/hashing/SKILL.md for perceptual, average, difference, or wavelet hashing; duplicate search by Hamming distance; or remove-list generation.
  • Use sub-skills/cnn/SKILL.md for CNN-based encodings, pretrained or custom models, cosine-similarity duplicate search, or GPU/CPU behavior.
  • Use sub-skills/evaluation/SKILL.md for evaluating retrieved duplicate maps and plotting duplicate groups.

What this skill covers

  • Encoding one image or a directory of images.
  • Finding duplicates from a directory or from a precomputed encoding map.
  • Removing duplicate filenames with a heuristic list, not deleting files.
  • Evaluating retrieved duplicate maps against a symmetric ground-truth map.
  • Plotting one image and its duplicates.
  • Custom CNN model wrappers and the bundled pretrained CNN backbones.

What this skill does not cover

  • Package release automation.
  • Docs building or site generation.
  • Benchmark reproduction as a maintainer task.
  • External dataset downloads such as the CIFAR10 Colab example.

Quick install for inspection or verification

Create an isolated Python 3.11 environment, then install the package from PyPI plus the runtime imports that this version uses but does not fully declare in metadata.

python -m pip install "imagededup==0.3.3.post2" numpy scipy

If you plan to run package tests in a separate source checkout, also install pytest and pytest-mock there.

Minimal import check

from imagededup.methods import PHash, AHash, DHash, WHash, CNN
from imagededup.evaluation import evaluate
from imagededup.utils import plot_duplicates, CustomModel

Routing guidance

Read the matching sub-skill when the user asks for any of the following:

  • exact or near duplicate lookup with PHash, AHash, DHash, or WHash
  • hash generation from files, directories, or image arrays
  • find_duplicates / find_duplicates_to_remove with Hamming thresholds
  • search_method, bktree, brute_force, or brute_force_cython
  • CNN encodings, cosine similarity, or CustomModel
  • pretrained MobileNetV3, ViT, or EfficientNet backbones
  • evaluate, MAP, NDCG, Jaccard, precision, recall, or F1
  • plot_duplicates

Common first checks

  1. Confirm the image paths or encoding map are valid.
  2. Confirm the threshold type matches the workflow.
  3. Decide whether the task is hash-based or CNN-based.
  4. Use evaluation only after you already have a ground-truth map and a retrieved map.
  5. Use plotting only after the duplicate map is non-empty.

Helpful bundled references

Script helpers

Fast routing summary

  • Hashes and Hamming distance -> hashing sub-skill.
  • CNN encodings and custom models -> CNN sub-skill.
  • Metrics and plots -> evaluation sub-skill.

When in doubt, prefer the most specific sub-skill that owns the user-visible workflow, then use the shared references only for install or troubleshooting context.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351