Practical overview
When it fits
Use it when a Python workflow needs to identify repeated or visually similar images in a directory and provide results for review or evaluation.
Who it is for
- Python developers building image-processing or computer-vision workflows.
- Teams reviewing repeated or near-duplicate product images and other collection assets.
Documented uses
- Find exact duplicates in an image directory using hashing.
- Identify near-duplicate images with hash or CNN methods.
- Generate image encodings and plot matches for a selected image.
- Evaluate deduplication effectiveness against a ground-truth mapping.
Requirements & limits
The repository is public and the package is distributed under the Apache 2.0 license. The README documents PyPI and source installation.
- Choose among four hashing methods and CNN-based detection according to the image-matching task.
- CNN methods support prepackaged models or a custom model.
- The evaluation framework requires a ground-truth mapping to assess deduplication effectiveness.
- The README cautions that benchmark conclusions are valid only through v0.2.2 because later releases changed the methods.
- The documented quick start generates encodings from a directory and returns a duplicate mapping; it does not describe automatic file deletion.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Find and plot image matches with PHash
Generate perceptual-hash encodings for an image directory, identify duplicates and plot matches for a selected file.
Before you start
- Python 3.9 or later.
- An image directory available to the Python workflow.
- Imagededup installed from PyPI or the GitHub source.
Steps
Install the package with the command below, or clone the repository and install it with the command below.
pip install imagededuppip install .Import
PHashfromimagededup.methodsand create a hasher.Call
encode_imageswith the image directory, then pass the resulting encoding map tofind_duplicates.Use
plot_duplicateswith the directory, duplicate map and a filename to plot matches for that file.
Expected outcome
A duplicate mapping for the directory and a plot of matches associated with the selected image.
Guide limitations
- This recipe uses PHash; the README also offers other hash methods and CNN-based approaches.
- The guide describes finding and plotting matches, not deleting or otherwise changing image files.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- idealo/imagededup · Official homepage title · retained in its source language

