Skip to main content

Immaculate

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

Installation

pip install immaculate

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.2.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.2.0
File Size Uploaded Provenance Actions
immaculate-0.2.0.tar.gz 24.2 MB With provenance Details for immaculate-0.2.0.tar.gz

Built distributions (wheels)

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

Total release size: 173.4 MB

Release files / immaculate-0.2.0.tar.gz

Download URL immaculate-0.2.0.tar.gz
Size 24.2 MB
Tags Source
SHA-256 checksum
How to use checksums
a7d67b90f39ef94a22940ec3932ebbf0e8860171e7b1c2f5297df5d7b3ec7dd8
BLAKE2b-256 checksum
How to use checksums
fc22f9c00b87b0bdd4d9ef9ad85e47cd4532827609e5904a7f96163158231914
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 21, 2026.

Transparency log

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

Download URL immaculate-0.2.0-cp312-abi3-win_arm64.whl
Size 24.8 MB
Tags CPython 3.12 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
f43f6f741fa3f93ba48687cc8e892628d8b40ad1dcf0625b9f402cd77824d4fc
BLAKE2b-256 checksum
How to use checksums
04f48744a5fdf67f8c26215a072d9bc8625292342dab1377edf4ff69d5017c50
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 21, 2026.

Transparency log

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

Download URL immaculate-0.2.0-cp312-abi3-win_amd64.whl
Size 24.9 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6c538993bde50af221409c82d7b5ab1f7f4f6d4409484a24fd5c58b784bea65f
BLAKE2b-256 checksum
How to use checksums
c3049bea44a067ea42d4a668344493982de32327dafe08160438d7ebe9d4192b
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 21, 2026.

Transparency log

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

Download URL immaculate-0.2.0-cp312-abi3-manylinux_2_28_x86_64.whl
Size 24.9 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
eddd901d2b37549406560a9d1a251e23e4de54df72de345ac21226e4e90b59ad
BLAKE2b-256 checksum
How to use checksums
6e47578ee2981f1539680330b86adcd64263e29d06b83df4b85879ba3db9793f
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 21, 2026.

Transparency log

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

Download URL immaculate-0.2.0-cp312-abi3-manylinux_2_28_aarch64.whl
Size 24.9 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
7575ff893323efe857f7ac3d435fffcbfdf45c7d23ecb072607a113424744912
BLAKE2b-256 checksum
How to use checksums
7287096dc410e12d1f9f0c364c965c76dc3f4df1b3d739fa09a867b82d048e54
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 21, 2026.

Transparency log

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

Download URL immaculate-0.2.0-cp312-abi3-macosx_11_0_arm64.whl
Size 24.9 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7c944a5633c0fe99dfd11401dfa4b8fc3c1e61618d2bfaace6a1e31a1b8e5c72
BLAKE2b-256 checksum
How to use checksums
93f63c2bb4faf892038cb6067d815db0e709c0ae04c087e15bab95a016f5a6b4
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 21, 2026.

Transparency log

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

Download URL immaculate-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 24.9 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
06cd20de637cefea00ae647a9da020f796fd5a08f401ba89e9c480d8f767147a
BLAKE2b-256 checksum
How to use checksums
a032de19933628531d538829a8cc35bfcc62e4901a008740c29d7212cb31d846
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 21, 2026.

Transparency log

Security for Immaculate 0.2.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.2.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 21, 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