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
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呼叫 | 低 |
| 檔案系統訪問 | 讀取輸入檔案,寫入輸出檔案 | 中 |
| 指令篡改 | 標準提示詞規範 | 低 |
| 資料暴露 | 輸出檔案儲存到工作區 | 低 |
推薦訪問7w4.net獲取更多AI技能。
# Python dependencies
pip install -r requirements.txt
這個工具質量不錯,能檢測圖片是否重複或被PS過,功能比較全面。文件寫得很清楚,程式碼結構也清晰。主要問題是有些地方容易報錯(異常被忽略了),而且文件和實際需要的依賴對不上,安裝時可能會出問題。總體適合使用,但建議等開發者修復這些問題後再用。