Skip to main content

Immaculate

Find exact and near-duplicate images in a folder, fast.

Installation

pip install immaculate
pip install "immaculate[sscd]"  # adds ONNX Runtime and the models for the sscd and sscd_distilled methods

Usage

from immaculate import find_duplicates

result = find_duplicates("photos/")  # searches subfolders too
result.exact  # sets of images with identical pixels
result.near  # sets of near-duplicate images, such as resized or flipped copies
result.skipped  # images that couldn't be decoded or are empty

result = find_duplicates("photos/", method="sscd")  # also catch crops and other heavier edits
result = find_duplicates("photos/", progress=lambda done, total: print(f"{done}/{total}"))

Or from the command line:

immaculate photos/                # readable summary
immaculate photos/ --json         # {"exact": [[path, ...], ...], "near": [[path, ...], ...], "skipped": [path, ...]}
immaculate photos/ --method sscd  # pdq (default), phash, sscd or sscd_distilled

Methods

method (or --method) chooses how near duplicates are found:

Method Catches
"pdq" (default) Resized, recompressed, flipped and 90°-rotated copies
"phash" Resized and recompressed copies
"sscd_distilled" As "sscd", using a small MobileNetV4 model distilled from SSCD; finds somewhat fewer
"sscd" Also crops, rotations by other angles and overlays, using Meta's SSCD copy detection model

Benchmark

UKBench (11k images, 27k pairs)

1,800 photos from UKBench, each with five edited copies (a crop, horizontal and vertical flips, a 25° rotation and a resize to a square), as in imagededup's benchmark.

Time Peak memory Pairs found Precision Recall
Immaculate (phash) 2.69 s 50 MiB 1,686 100% 6.2%
Immaculate (pdq) 2.78 s 56 MiB 10,782 100% 39.9%
czkawka 3.72 s 61 MiB 31 100% 0.1%
imagehash (pHash) 4.06 s 470 MiB 1,693 100% 6.3%
czkawka (rotations and flips) 23.49 s 116 MiB 4,359 100% 16.1%
CleanVision 26.03 s 520 MiB 1,693 100% 6.3%
fastdup 32.26 s 279 MiB 9,443 100% 35.0%
Immaculate (sscd_distilled) 44.08 s 144 MiB 19,886 100% 73.6%
imagededup (CNN) 65.00 s 1,414 MiB 20,620 98.8% 75.5%
Immaculate (sscd) 186.52 s 189 MiB 23,196 100% 85.9%
uv run benchmark/benchmark_duplicates.py --dataset ukbench-transformed --dedup immaculate immaculate-phash immaculate-sscd immaculate-sscd-distilled imagededup-cnn cleanvision fastdup imagehash czkawka czkawka-dihedral

DISC2021 (60k images, 10k pairs)

50,000 development queries from Meta's DISC2021 (data), plus the 10,000 reference photos that 10,000 of them copy with heavy edits (crops, overlays, filters, screenshots and blends).

Time Peak memory Pairs found Precision Recall
Immaculate (pdq) 23.48 s 146 MiB 1,731 100% 17.3%
imagehash (pHash) 35.89 s 620 MiB 316 100% 3.2%
czkawka 38.64 s 194 MiB 89 96.6% 0.9%
Immaculate (sscd_distilled) 307.53 s 488 MiB 1,987 99.9% 19.9%
uv run benchmark/benchmark_duplicates.py --dataset disc2021 --dedup immaculate immaculate-sscd-distilled czkawka imagehash

Metadata

Release files for Immaculate 0.3.0

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

Source distribution (sdist)

Source distribution for Immaculate 0.3.0
File Size Uploaded Provenance Actions
immaculate-0.3.0.tar.gz 106.7 kB With provenance Details for immaculate-0.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for Immaculate 0.3.0
File Actions
immaculate-0.3.0-cp312-abi3-win_arm64.whl CPython 3.12 abi3 Windows ARM64 Details for immaculate-0.3.0-cp312-abi3-win_arm64.whl
immaculate-0.3.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for immaculate-0.3.0-cp312-abi3-win_amd64.whl
immaculate-0.3.0-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details for immaculate-0.3.0-cp312-abi3-manylinux_2_28_x86_64.whl
immaculate-0.3.0-cp312-abi3-manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64 Details for immaculate-0.3.0-cp312-abi3-manylinux_2_28_aarch64.whl
immaculate-0.3.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for immaculate-0.3.0-cp312-abi3-macosx_11_0_arm64.whl
immaculate-0.3.0-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for immaculate-0.3.0-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 5.1 MB

Release files / immaculate-0.3.0.tar.gz

Download URL immaculate-0.3.0.tar.gz
Size 106.7 kB
Tags Source
SHA-256 checksum
How to use checksums
422e3888ed26037997bd06c89a0e6877193431829521296c92a4f9f1ffb25d19
BLAKE2b-256 checksum
How to use checksums
b327f1882d6baea51ad4cf3b4ab17d159d4b9759ab5a44191cf396ce41fe37f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / immaculate-0.3.0-cp312-abi3-win_arm64.whl

Download URL immaculate-0.3.0-cp312-abi3-win_arm64.whl
Size 773.5 kB
Tags CPython 3.12 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
e476cefa9b6643c307fb75c9a5343a8dbace51dfb4543c42e8fb0c4a7e821767
BLAKE2b-256 checksum
How to use checksums
17b11a209fc70eeccc1a0e49813fb000971be0ec553f5e3569a6a3387078b90c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / immaculate-0.3.0-cp312-abi3-win_amd64.whl

Download URL immaculate-0.3.0-cp312-abi3-win_amd64.whl
Size 823.4 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
35ad7fa71dbc0f1813de20cfb5dcbc92d8b1d9d0f02599cfceb43e196428e49c
BLAKE2b-256 checksum
How to use checksums
06688289d1e90418fa9b203301c59cc48b3022de3cd2452092d617d41c14b384
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / immaculate-0.3.0-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL immaculate-0.3.0-cp312-abi3-manylinux_2_28_x86_64.whl
Size 883.8 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
0732ba26047e89d1fbc0d4c7bcee98e0e407d73683c4f70dc01b126c9c2be29d
BLAKE2b-256 checksum
How to use checksums
7cc3d97371652007eaa10b719de283d34d301f1a12755aca44bcee4f9ed1d156
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / immaculate-0.3.0-cp312-abi3-manylinux_2_28_aarch64.whl

Download URL immaculate-0.3.0-cp312-abi3-manylinux_2_28_aarch64.whl
Size 843.2 kB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
9e1a1d9bb35fc9e34c666368c41a3971fd77ce4b002d7cda057948c3252c6792
BLAKE2b-256 checksum
How to use checksums
b799c8bb2ffbb43fb2ea667f7dbdf4fb3bacacf941abad8ccbd16639c00b0d53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / immaculate-0.3.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL immaculate-0.3.0-cp312-abi3-macosx_11_0_arm64.whl
Size 807.9 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
112ac8ba8cd4b557c3df7477c2775459a49e89be7bcaab6ce35eb0261fc14250
BLAKE2b-256 checksum
How to use checksums
1b60b25ab9fc9da75ff733572874cd5ab3e517caaf2cdc43d1e1189da3bd9789
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / immaculate-0.3.0-cp312-abi3-macosx_10_12_x86_64.whl

Download URL immaculate-0.3.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 841.6 kB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
dd6235c74b7c742bdffc6d68a5c7df18a56e341e82330478f32acf0817ff639d
BLAKE2b-256 checksum
How to use checksums
f3bd75998cbfdb079a44f30dcbaf2b3cf82805925863ad23987c922007ea5294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for Immaculate 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for immaculate-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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