Token导航 LogoToken导航TokenDH.com
图像处理权限需确认github未标认证来源可访问许可证需确认审计通过

remove-similar-image删除相似图像

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

192

周安装

8

GitHub Stars

5

下载量

64
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:remove-similar-image(删除相似图像)
来源仓库:https://github.com/tiangong-ai/skills
仓库路径:skills/remove-similar-image
安装命令:
npx skills add https://github.com/tiangong-ai/skills --skill remove-similar-image
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tiangong-ai/skills --skill remove-similar-image

简介

用于检测并删除图像集合中重复或高度相似的图片文件。

  • 适合在图库管理、素材整理或训练数据集清洗场景中使用。
  • 通过 GitHub 安装后,可在 Codex、Claude、Cursor、Gemini CLI 中调用比对算法。
  • 相似度阈值需手动设定,过高可能导致误删,过低则清理不彻底。
  • 操作前务必备份原图,防止不可逆数据丢失。

SKILL.md

Remove Similar Image

Core Goal

  • Scan one local image or a directory tree of local images.
  • Use ImageHash to cluster exact duplicates and near-duplicates.
  • Use OpenCV variance-of-Laplacian blur scoring to flag blurry shots.
  • Preview actions first, then permanently delete or move candidates to a trash folder when requested.

Required Script

  • Use scripts/remove_similar_images.py.
  • Start with doctor if dependency availability is unknown.
  • Treat analyze without --apply as the safe default.
  • Prefer --trash-dir before permanent deletion so the user can review results.

Dependency

  • This skill requires Pillow, ImageHash, numpy, and OpenCV:
python3 -m pip install Pillow ImageHash numpy opencv-python-headless
  • If doctor reports missing dependencies, stop and surface the install command instead of pretending the scan ran.

Workflow

  1. Check dependencies:
python3 scripts/remove_similar_images.py doctor
  1. Preview similar groups and blurry images for a folder:
python3 scripts/remove_similar_images.py analyze \
  --input-path /path/to/photos
  1. Preview safe cleanup by moving similar non-keepers and blurry files into a trash folder:
python3 scripts/remove_similar_images.py analyze \
  --input-path /path/to/photos \
  --delete-similar \
  --delete-blurry \
  --trash-dir /path/to/review-trash
  1. Apply the move after the preview looks correct:
python3 scripts/remove_similar_images.py analyze \
  --input-path /path/to/photos \
  --delete-similar \
  --delete-blurry \
  --trash-dir /path/to/review-trash \
  --apply
  1. Permanently delete only similar non-keepers:
python3 scripts/remove_similar_images.py analyze \
  --input-path /path/to/photos \
  --delete-similar \
  --apply

Main Arguments

  • --input-path: source image file or directory.
  • --no-recursive: scan only the top-level directory.
  • --extra-extension: include additional suffixes not covered by default.
  • --limit: cap the number of scanned files for quick tests.
  • --hash-method: phash, dhash, ahash, or whash.
  • --hash-size: larger hashes are stricter and slower.
  • --similar-threshold: maximum Hamming distance considered similar.
  • --blur-threshold: Laplacian-variance cutoff for blurry images.
  • --keep-policy: choose the keeper in each similar group with best, largest, newest, or oldest.
  • --delete-similar: mark non-keeper files in similar groups as removal candidates.
  • --delete-blurry: mark blurry files as removal candidates even when they are unique.
  • --trash-dir: move files into a review directory instead of permanently deleting.
  • --apply: execute removals or moves. Without this flag the script only reports.
  • --report-json: save a machine-readable report for later review.
  • --print-json: print the full report as JSON to stdout.

Default Heuristics

  • Default similarity detection uses phash with hash_size=8 and similar-threshold=5.
  • Default blur detection uses a variance-of-Laplacian cutoff of 100.0.
  • Default keep-policy=best prefers non-blurry images, then sharper images, then larger images.
  • Similar groups are connected components: if A is close to B, and B is close to C, they are treated as one group even if A and C are slightly farther apart.

Usage Notes

  • Review the preview before adding --apply.
  • Use --trash-dir for the first pass on any valuable photo collection.
  • Lower --similar-threshold to be stricter. Raise it when near-duplicates are being missed.
  • Lower --blur-threshold if too many acceptable images are marked blurry. Raise it when obvious blur is missed.
  • Expect format support to follow Pillow and OpenCV availability in the local environment.

Output

  • Text mode prints scan counts, similar groups, blurry images, and planned or applied actions.
  • JSON mode includes per-image metadata, unreadable files, similar groups, planned actions, and action results.

Script

  • scripts/remove_similar_images.py

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.51%
按下载量换算22

Claude

33.66%
按下载量换算22

Cursor

17.61%
按下载量换算11

Gemini CLI

9.67%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills