重複や類似画像pHashを検出するために使用

h@h-B360M-D2VX-SI:~/models/DupImageDetection$ python3 gen_phash.py --img_dir ./dog/ --n_thread 3 --out_path ./result.txt

ハッシュ値を直接生成することができる
第2の命令に:

python3 dup_img_detection.py --pHashs_path /home/h/models/DupImageDetection/result.txt --sim_thres 5 

現在のJSONファイルフォルダは結果は
またのpythonを表示するために使用することができます

>>> import json
>>> d = json.load(open("duplicated_images.json"))
>>> d
[['/home/h/手相/006uSzdIly1g3hd07m3nvj30u018wqb8.jpg', '/home/h/手相/006uSzdIly1g3hd0etvkbj30u018wqb8.jpg']]

参考githubのアドレスhttps://github.com/xuehuachunsheng/DupImageDetection

おすすめ

転載: blog.csdn.net/weixin_34061042/article/details/90927233