批量查找重复图片,用感知哈希检测近似重复
John
把最多 500 个图片链接与原图批量对比,标记完全重复和近似重复。每行返回 phashDistance、dhashDistance、isNearDuplicate 和判定结果,下载失败不收费。
Input
Output fields
Sign up on Apify or log in
The Image Similarity API | Compare Images, Find Duplicates Actor is ready to run with the inputs already set for "批量查找重复图片,用感知哈希检测近似重复". Sign up or log in and you'll land in Apify Console with a copy of this exact task.
Start the "批量查找重复图片,用感知哈希检测近似重复" task
The Image Similarity API | Compare Images, Find Duplicates Actor will start running based on the input automatically. You can also change all the input fields, like source image, target images, and more, to match your specific use case.
Receive the "批量查找重复图片,用感知哈希检测近似重复" output
Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as target index, target image, similarity score, and more.
Integrate into your workflow
The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "批量查找重复图片,用感知哈希检测近似重复" task via API.

每个目标链接返回一行,包含 phashDistance、isNearDuplicate 和 verdict 三个关键字段,完全重复和近似重复一眼就能看出来。下载失败的链接会带上 errorMessage 说明原因,而且不收费。整个数据集可以导出为 JSON、CSV 或 Excel 表格。
一张原图放在 sourceImage,最多 500 个图片链接放在 targetImages。示例把一张猫的照片与它自己的 250px、960px 两个版本以及两张别的动物照片对比,comparisonMode 设为 phash,phashThreshold 为 8。
可以通过该任务在 Apify API 上的运行端点启动,或在 Python、Node 中使用 apify-client,把链接列表作为 targetImages 传入。运行结束后读取 JSON,只保留标记为近似重复的行;超过 500 个链接就分几次运行。
在 Apify 控制台打开任务,选择 Actions,然后 Schedule,把 cron 设为 0 9 * * 1,也就是每周一上午九点运行。每次运行都会生成新的数据集,可以追加到 Google Sheets 或 Airtable,留下按日期排列的记录。
在 Claude 或任何其他 MCP 客户端中添加 https://mcp.apify.com/?tools=actors,docs,johnvc/image-similarity-api ,然后把一张原图和一串图片链接发给助手。助手会逐个比较,告诉你哪些链接是原图的重复或近似重复,还会指出下载失败的链接。整个过程在聊天窗口里完成,不需要写代码。
按实际交付的对比结果计费,原图不收费。下载或解码失败的链接返回免费的错误行,所以列表里的失效链接不会产生费用。仅感知哈希模式跳过视觉模型,是扫描图库最快、最省钱的方式;当前费率见 Actor 页面。
感知哈希对缩放和重新压缩不敏感:phashDistance 在 0 到 8 之间就说明是同一张图片,这正是 phashThreshold 8 的含义。如果还想看语义相似度,可以用「在线比较两张图片的相似度,输出相似度分数和重复判定」。