imagededup图像去重工具

联合创作 · 2023-09-29 16:06

imagededup 是一个 Python 包,用来简化在一堆图片中提取类似的图片。

imagededup 采用如下算法进行图像查重:

示例代码:

from imagededup.methods import PHash
phasher = PHash()

# Generate encodings for all images in an image directory
encodings = phasher.encode_images(image_dir='path/to/image/directory')

# Find duplicates using the generated encodings
duplicates = phasher.find_duplicates(encoding_map=encodings)

# plot duplicates obtained for a given file using the duplicates dictionary
from imagededup.utils import plot_duplicates
plot_duplicates(image_dir='path/to/image/directory', 
                duplicate_map=duplicates, 
                filename='ukbench00120.jpg')

 

浏览 2
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报