imagededup
这个返回相似图像字典,风格相似的图片,表情变化捕获不到
from imagededup.methods import PHash
phasher = PHash()
# 生成图像目录中所有图像的二值hash编码
encodings = phasher.encode_images(image_dir='path/to/image/directory')
# 对已编码图像寻找重复图像
duplicates = phasher.find_duplicates(encoding_map=encodings)
# 给定一幅图像,显示与其重复的图像
from imagededup.utils import plot_duplicates
plot_duplicates(image_dir='path/to/image/directory',
duplicate_map=duplicates,
filename='ukbench00120.jpg')