name: image-duplication-detector description: 利用计算机视觉算法检测论文手稿图片中的重复使用和篡改行为 version: "1.0.2" category: Integrity tags: [] author: AIPOCH license: MIT status: Draft risk_level: Medium skill_type: Tool/Script owner: AIPOCH reviewer: '' last_updated: '2026-02-06' displayName: "图片重复检测" slug: image-duplication-detector
小葱技能7w4.net有完整的技能分类。
ID: 195
利用计算机视觉(CV)算法扫描论文手稿中的所有图片,检测潜在的图片重复使用或局部篡改(PS痕迹)。
# Scan single PDF file
python scripts/main.py --input paper.pdf --output report.json
# Scan image folder
python scripts/main.py --input ./images/ --output report.json
# Specify similarity threshold (default 0.85)
python scripts/main.py --input paper.pdf --threshold 0.90 --output report.json
# Enable tampering detection
python scripts/main.py --input paper.pdf --detect-tampering --output report.json
# Generate visualization report
python scripts/main.py --input paper.pdf --visualize --output report.json
| 参数 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|
--input |
string | - | 是 | 输入PDF文件或图片文件夹路径 |
--output |
string | report.json | 否 | 输出报告路径 |
--threshold |
float | 0.85 | 否 | 相似度阈值(0-1),越高越严格 |
--detect-tampering |
flag | false | 否 | 启用篡改/PS痕迹检测 |
--visualize |
flag | false | 否 | 生成可视化对比图像 |
--temp-dir |
string | ./temp | 否 | 临时文件目录 |
{
"summary": {
"total_images": 12,
"duplicates_found": 2,
"tampering_detected": 1,
"processing_time": "3.5s"
},
"duplicates": [
{
"group_id": 1,
"similarity": 0.98,
"images": [
{"page": 2, "index": 1, "path": "..."},
{"page": 5, "index": 3, "path": "..."}
]
}
],
"tampering": [
{
"image": "page_3_img_2.png",
"suspicious_regions": [
{"x": 120, "y": 80, "width": 50, "height": 50, "confidence": 0.92}
]
}
]
}
opencv-python>=4.8.0
numpy>=1.24.0
Pillow>=10.0.0
PyPDF2>=3.0.0
pdf2image>=1.16.0
imagehash>=4.3.0
scikit-image>=0.21.0
matplotlib>=3.7.0
from scripts.main import ImageDuplicationDetector
detector = ImageDuplicationDetector(
threshold=0.85,
detect_tampering=True
)
results = detector.scan("paper.pdf")
detector.save_report(results, "report.json")
| 风险指标 | 评估 | 级别 |
|---|---|---|
| 代码执行 | Python/R脚本在本地执行 | 中 |
| 网络访问 | 无外部API调用 | 低 |
| 文件系统访问 | 读取输入文件,写入输出文件 | 中 |
| 指令篡改 | 标准提示词规范 | 低 |
| 数据暴露 | 输出文件保存到工作区 | 低 |
# Python dependencies
pip install -r requirements.txt
这个工具质量不错,能检测图片是否重复或被PS过,功能比较全面。文档写得很清楚,代码结构也清晰。主要问题是有些地方容易报错(异常被忽略了),而且文档和实际需要的依赖对不上,安装时可能会出问题。总体适合使用,但建议等开发者修复这些问题后再用。