Image Deduplicator logo

Image Deduplicator

Organization
cas-bigdatalab
image_deduplicator

图像去重工具。使用图像哈希精确匹配在文档级别删除包含重复图像的样本。 当用户提到图像去重、删除重复图片、图片去重、清理重复图像等需求时使用此skill。 即使用户没有明确说出"图像去重",只要任务涉及从包含图像的数据中删除重复图片, 就应该使用此skill。

Overview

Publishercas-bigdatalab
Repositorypiflow
Skill nameimage_deduplicator
Stars
541
Forks
172
Bundled files
4
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by cas-bigdatalab on GitHub. Read the source before you install it.

Installation

Install the Image Deduplicator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/cas-bigdatalab/piflow/tree/master/workspace/skills/image_deduplicator
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cas-bigdatalab/piflow.git /tmp/piflow
mkdir -p .claude/skills
cp -r /tmp/piflow/workspace/skills/image_deduplicator .claude/skills/image_deduplicator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Image Deduplicator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Image Deduplicator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Image Deduplicator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Image Deduplicator 图像去重 Skill

功能概述

本skill使用图像哈希算法(phash/dhash/whash/ahash)进行图像级别的精确匹配去重。 通过计算每个图像的哈希值,识别并删除包含相同图像的重复文档样本。

触发条件

当用户请求以下任务时,应使用此skill:

  • 图像去重
  • 删除重复图片
  • 图片去重
  • 清理重复图像
  • 文档图像去重

核心参数说明

必需参数

参数说明
--input输入JSON文件路径
--output输出JSON文件路径

可选参数

参数说明默认值
--method图像哈希方法phash
--consider_text是否同时考虑文本哈希False
--image_key图像字段的键名images
--text_key文本字段的键名text

输入文件格式

json
[
  {
    "images": ["/path/to/image1.png", "/path/to/image2.jpg"]
  },
  {
    "images": ["/path/to/image3.jpg"]
  }
]

带文本的格式:

json
[
  {
    "images": ["/path/to/image1.png"],
    "text": "这是一段描述文字"
  },
  {
    "images": ["/path/to/image2.png"],
    "text": "另一段描述文字"
  }
]

哈希方法说明

方法说明
phash感知哈希,速度快,准确性高(默认)
dhash差值哈希
whash小波哈希
ahash平均哈希,最快但最粗糙

使用方法

基本用法

bash
python scripts/run_image_deduplicator.py \
  --input ./input.json \
  --output ./output.json

使用指定哈希方法

bash
python scripts/run_image_deduplicator.py \
  --input ./input.json \
  --output ./output.json \
  --method dhash

同时考虑文本去重

bash
python scripts/run_image_deduplicator.py \
  --input ./input.json \
  --output ./output.json \
  --consider_text True

输出示例

命令行输出:

[OK] Image deduplication completed!
   Method: phash
   Consider text: False
   Original documents: 7
   Deduplicated documents: 3
   Removed duplicates: 4
   Input file: ./input.json
   Output file: ./output.json

输出JSON格式:

json
[
  {"images": ["/path/to/image1.png"]},
  {"images": ["/path/to/image2.jpg"]},
  {"images": ["/path/to/image3.jpg"]}
]

环境要求

安装依赖: 本SKILL使用依赖 data_juicer,请在调用前安装好python环境并安装data_juicer,可用以下指令进行安装:

bash
pip install py-data-juicer

额外依赖:

bash
pip install imagededup

注意事项

  1. 图像路径:输入JSON中的图像路径应为绝对路径或相对于工作目录的路径
  2. 哈希方法:默认使用 phash,适合大多数场景
  3. consider_text:设为 True 时,图像和文本都相同才算重复
  4. 图像格式:支持 PNG、JPG、JPEG 等常见图像格式

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Image Deduplicator AI skill do?

图像去重工具。使用图像哈希精确匹配在文档级别删除包含重复图像的样本。 当用户提到图像去重、删除重复图片、图片去重、清理重复图像等需求时使用此skill。 即使用户没有明确说出"图像去重",只要任务涉及从包含图像的数据中删除重复图片, 就应该使用此skill。

Why use Image Deduplicator on TypingMind?

Because you install it once and use it with any model. Image Deduplicator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Image Deduplicator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cas-bigdatalab/piflow/tree/master/workspace/skills/image_deduplicator. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Image Deduplicator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Image Deduplicator?

As many as you like. As long as a model supports skills, you can use Image Deduplicator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Image Deduplicator AI skill free?

It is published on GitHub by cas-bigdatalab. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇