Skip to main content

Image Deduplicator (imagededup)

Build Status Docs codecov PyPI Version License

imagededup is a python package that simplifies the task of finding exact and near duplicates in an image collection.

This package provides functionality to make use of hashing algorithms that are particularly good at finding exact duplicates as well as convolutional neural networks which are also adept at finding near duplicates. An evaluation framework is also provided to judge the quality of deduplication for a given dataset.

Following details the functionality provided by the package:

  • Finding duplicates in a directory using one of the following algorithms:
  • Generation of encodings for images using one of the above stated algorithms.
  • Framework to evaluate effectiveness of deduplication given a ground truth mapping.
  • Plotting duplicates found for a given image file.

Detailed documentation for the package can be found at: https://idealo.github.io/imagededup/

imagededup is compatible with Python 3.9+ and runs on Linux, MacOS X and Windows. It is distributed under the Apache 2.0 license.

📖 Contents

⚙️ Installation

There are two ways to install imagededup:

  • Install imagededup from PyPI (recommended):
pip install imagededup
  • Install imagededup from the GitHub source:
git clone https://github.com/idealo/imagededup.git
cd imagededup
pip install .

🚀 Quick Start

In order to find duplicates in an image directory using perceptual hashing, following workflow can be used:

  • Import perceptual hashing method
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 (eg: 'ukbench00120.jpg') using the duplicates dictionary
from imagededup.utils import plot_duplicates
plot_duplicates(image_dir='path/to/image/directory',
                duplicate_map=duplicates,
                filename='ukbench00120.jpg')

The output looks as below:

The complete code for the workflow is:

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')

To run the above snippet on Windows, have a look here. It is also possible to use your own custom models for finding duplicates using the CNN method.

For examples, refer this part of the repository.

For more detailed usage of the package functionality, refer: https://idealo.github.io/imagededup/

⏳ Benchmarks

Update: Provided benchmarks are only valid upto imagededup v0.2.2. The next releases have significant changes to all methods, so the current benchmarks may not hold.

Detailed benchmarks on speed and classification metrics for different methods have been provided in the documentation. Generally speaking, following conclusions can be made:

  • CNN works best for near duplicates and datasets containing transformations.
  • All deduplication methods fare well on datasets containing exact duplicates, but Difference hashing is the fastest.

🤝 Contribute

We welcome all kinds of contributions. See the Contribution guide for more details.

📝 Citation

Please cite Imagededup in your publications if this is useful for your research. Here is an example BibTeX entry:

@misc{idealods2019imagededup,
  title={Imagededup},
  author={Tanuj Jain and Christopher Lennan and Zubin John and Dat Tran},
  year={2019},
  howpublished={\url{https://github.com/idealo/imagededup}},
}

🏗 Maintainers

© Copyright

See LICENSE for details.

Release files for imagededup 0.3.3.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imagededup 0.3.3.post2
File Size Uploaded
imagededup-0.3.3.post2.tar.gz 120.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for imagededup 0.3.3.post2
File
imagededup-0.3.3.post2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
imagededup-0.3.3.post2-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
imagededup-0.3.3.post2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
imagededup-0.3.3.post2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
imagededup-0.3.3.post2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
imagededup-0.3.3.post2-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
imagededup-0.3.3.post2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
imagededup-0.3.3.post2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
imagededup-0.3.3.post2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
imagededup-0.3.3.post2-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details
imagededup-0.3.3.post2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
imagededup-0.3.3.post2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
imagededup-0.3.3.post2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
imagededup-0.3.3.post2-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details
imagededup-0.3.3.post2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
imagededup-0.3.3.post2-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details

Total release size: 2.9 MB

Release files / imagededup-0.3.3.post2.tar.gz

Download URL imagededup-0.3.3.post2.tar.gz
Size 120.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c074e33e74649539318eb975907001c284c0ff0dcdcb985dab14f4dc9f6e4894
BLAKE2b-256 checksum
How to use checksums
5a13d66926f4af67f189537317b72bb21f4457c22616f503dd9fedf203219029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp312-cp312-win_amd64.whl

Download URL imagededup-0.3.3.post2-cp312-cp312-win_amd64.whl
Size 134.8 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f52308cc83162c636a7a3c7a862fe703be34645bb8ec5eca986b2a2f030e82d5
BLAKE2b-256 checksum
How to use checksums
62cd3d49b310099904667ac0adc1f73a4889c7a7e3aefdff5b1ea4cd58141767
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp312-cp312-win32.whl

Download URL imagededup-0.3.3.post2-cp312-cp312-win32.whl
Size 131.7 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
27b2196868e7d3db03f4abaa32855ef022afd8dc95fc8a3a66aafbef8ce0aa47
BLAKE2b-256 checksum
How to use checksums
37a143896158fed3b50d9f9727e10e159c9eb2293d211941ca1a87bebd2ee022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL imagededup-0.3.3.post2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 318.6 kB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f935e05a9015535aba7f4ea5de9d9555688a031b8aa412b98468dd4c837bffef
BLAKE2b-256 checksum
How to use checksums
57717032085abbdbf5c23efe53dad32a015cc6a53fcf1573e6cd881b2cc84043
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp312-cp312-macosx_11_0_arm64.whl

Download URL imagededup-0.3.3.post2-cp312-cp312-macosx_11_0_arm64.whl
Size 133.7 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ed17066cdb5f6456384fa4914543b29b357c21238d82b4ffde89555ec1ada2bf
BLAKE2b-256 checksum
How to use checksums
23f546e3970a5dd26cf0dc858fc1421055a243c7cf4cfd5818e2f4a893e59b02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp311-cp311-win_amd64.whl

Download URL imagededup-0.3.3.post2-cp311-cp311-win_amd64.whl
Size 134.6 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
df06c61e3faf7264e52894f17b35d9828e6cf58bac4cc8c6fa73fca7ad2452de
BLAKE2b-256 checksum
How to use checksums
538c0fa444e5f960db269e3779329d8377ce654e45066da7205f14b353c7bf82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp311-cp311-win32.whl

Download URL imagededup-0.3.3.post2-cp311-cp311-win32.whl
Size 131.4 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
5fa29afac4e67aea1ab0efe34604ceb7137bf350366976e1f4fe1144a59d8a6a
BLAKE2b-256 checksum
How to use checksums
decd0b802f5f88636eb145f94682cc76b7010b50424e5cfd239294b358fd3389
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL imagededup-0.3.3.post2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 307.4 kB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4a00e57e85a464d52e8a1285248a030fb59719d33bd26b6852af71b8d5bf4bd8
BLAKE2b-256 checksum
How to use checksums
0fb00fb65c3191ab1f253834473ba52652851c14fd4bff8c9d6a8cddd159c37a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp311-cp311-macosx_11_0_arm64.whl

Download URL imagededup-0.3.3.post2-cp311-cp311-macosx_11_0_arm64.whl
Size 133.3 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d5864b10060c2bd8dab539d1c38bcf5ace27b51a753f75c74c275aec0fdc57d2
BLAKE2b-256 checksum
How to use checksums
6e8e140106813add8424c204c1bfbc4775d5d913cacfde295785fe8b9879319f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp310-cp310-win_amd64.whl

Download URL imagededup-0.3.3.post2-cp310-cp310-win_amd64.whl
Size 134.5 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
86ec42780625cb8405d3a0e23b2a0b009e6f1c8e0fed85f46981d8532e006176
BLAKE2b-256 checksum
How to use checksums
bd4bdc035454ed4443f24bf03f4753cac310f221b8060b875d50b7fe8689feb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp310-cp310-win32.whl

Download URL imagededup-0.3.3.post2-cp310-cp310-win32.whl
Size 131.4 kB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
dff7faf7e1b1c770c8300a68af8cad6dc5b4a0dbe8cfaad730ea11d4e0535de6
BLAKE2b-256 checksum
How to use checksums
4438180441628e3f340034da71de3e120e97bcdf5b511b36a18ee73211426e46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL imagededup-0.3.3.post2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 300.4 kB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b1b9a6a15ccd0b2624cb18f414113906e397de01b190d16e78492b0971530ad6
BLAKE2b-256 checksum
How to use checksums
d1c0a2ea75a0db2fa3dceb89777d1bac8c5932427ad711cbd8e40d63e47ac6e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp310-cp310-macosx_11_0_arm64.whl

Download URL imagededup-0.3.3.post2-cp310-cp310-macosx_11_0_arm64.whl
Size 133.2 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ab728d0e44725cda13b6bd0b2b085cc741e334367e62031938d54e4b0225951b
BLAKE2b-256 checksum
How to use checksums
dfb1b112156c3e88f25e94d582453c3403a472b8df30aa0df173fe36a56cf037
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp39-cp39-win_amd64.whl

Download URL imagededup-0.3.3.post2-cp39-cp39-win_amd64.whl
Size 134.5 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
033d8c3e01e91f4c21db404ac12904d759ece059cc357d8d2a7aef1b39b3b9a4
BLAKE2b-256 checksum
How to use checksums
eaab035132cc3572e08fb0d26467c84336a82c7e2fc52dc65e9a8d6baa18712c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp39-cp39-win32.whl

Download URL imagededup-0.3.3.post2-cp39-cp39-win32.whl
Size 131.3 kB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
908b273d0c1f3b97551478b3b81a48330e9f581dc26bc66b88604f538e75f017
BLAKE2b-256 checksum
How to use checksums
35ac52a01ce9ec132c133767f4dad12371cd29cd802dfc094d61b5e0d31e9291
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL imagededup-0.3.3.post2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 299.6 kB
Tags CPython 3.9 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cfd3d3c24beab2dee61042e972b9f04a2543a94e309b8220494e473897f144ee
BLAKE2b-256 checksum
How to use checksums
d48ef02f470077c752a02371ec95dd3820189d0add9900ecfa7deead94e6aea9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / imagededup-0.3.3.post2-cp39-cp39-macosx_11_0_arm64.whl

Download URL imagededup-0.3.3.post2-cp39-cp39-macosx_11_0_arm64.whl
Size 133.2 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e6f98cfe7e2c89c183bf98263dab050701697775463608cf3edf3f8365cec13b
BLAKE2b-256 checksum
How to use checksums
fdfa9cb88e0ef798425ee0db356a3350a378c9c120a8a48a96ee22635a2dbf61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.3.3.post2 This release

17 release files

0.3.3

21 release files

0.3.2

12 release files

0.3.1

13 release files

0.3.0

13 release files

0.2.2

7 release files

0.2.1

7 release files

0.2.0

6 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page