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
method chooses how near duplicates are found:
| Method | Catches | Speed |
|---|---|---|
"pdq" (default) |
Resized, recompressed, flipped and 90°-rotated copies | Fast |
"phash" |
Resized and recompressed copies | Fast |
"sscd" |
Also crops, rotations by other angles and overlays, using Meta's SSCD copy detection model | About 70x slower than "pdq" |
Or from the command line:
python -m immaculate photos/ # readable summary
python -m immaculate photos/ --json # {"exact": [[path, ...], ...], "near": [[path, ...], ...], "skipped": [path, ...]}
python -m immaculate photos/ --method sscd # pdq (default), phash or sscd
Nothing is moved or deleted. Errors (missing or unreadable folder) go to stderr with exit code 1.
Benchmark
UKBench
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. Recall is out of the 27,000 labelled pairs.
| Time | Peak memory | Pairs found | Precision | Recall | |
|---|---|---|---|---|---|
Immaculate (pdq) |
2.67 s | 56 MiB | 10,782 | 100% | 39.9% |
| czkawka | 3.79 s | 64 MiB | 31 | 100% | 0.1% |
imagehash (pHash) |
4.11 s | 492 MiB | 1,693 | 100% | 6.3% |
| czkawka (rotations and flips) | 20.74 s | 120 MiB | 4,359 | 100% | 16.1% |
| CleanVision | 25.57 s | 547 MiB | 1,693 | 100% | 6.3% |
| fastdup | 28.92 s | 337 MiB | 9,443 | 100% | 35.0% |
imagededup (CNN) |
64.00 s | 2,257 MiB | 20,620 | 98.8% | 75.5% |
Immaculate (sscd) |
183.93 s | 188 MiB | 23,196 | 100% | 85.9% |
uv run benchmark/benchmark_duplicates.py --dataset ukbench-transformed --dedup immaculate immaculate-sscd imagededup-cnn cleanvision fastdup imagehash czkawka czkawka-dihedral
DISC2021
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). The other 40,000 queries are distractors. Recall is out of the 10,000 labelled pairs.
| Time | Peak memory | Pairs found | Precision | Recall | |
|---|---|---|---|---|---|
Immaculate (pdq) |
29.13 s | 149 MiB | 1,731 | 100% | 17.3% |
imagehash (pHash) |
34.38 s | 639 MiB | 316 | 100% | 3.2% |
| czkawka | 43.94 s | 198 MiB | 89 | 96.6% | 0.9% |
uv run benchmark/benchmark_duplicates.py --dataset disc2021 --dedup immaculate czkawka imagehash
Metadata
Release files for Immaculate 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| immaculate-0.1.0.tar.gz | 20.9 MB | With provenance | Details for immaculate-0.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| immaculate-0.1.0-cp312-abi3-win_arm64.whl | CPython 3.12 | abi3 | Windows ARM64 | Details for immaculate-0.1.0-cp312-abi3-win_arm64.whl |
| immaculate-0.1.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details for immaculate-0.1.0-cp312-abi3-win_amd64.whl |
| immaculate-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ x86-64 | Details for immaculate-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl |
| immaculate-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ ARM64 | Details for immaculate-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl |
| immaculate-0.1.0-cp312-abi3-macosx_11_0_arm64.whl | CPython 3.12 | abi3 | macOS 11.0+ ARM64 | Details for immaculate-0.1.0-cp312-abi3-macosx_11_0_arm64.whl |
| immaculate-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl | CPython 3.12 | abi3 | macOS 10.12+ x86-64 | Details for immaculate-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl |
Total release size: 150.6 MB
Release files / immaculate-0.1.0.tar.gz
| Download URL | immaculate-0.1.0.tar.gz |
|---|---|
| Size | 20.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b40016c52227a93bc645103a305236f9087a2b64a2cf3efbca571b40001ac689
|
|
BLAKE2b-256 checksum How to use checksums |
3d0f3e206ce78aab681656e650759191717ed299e52c106bd060da225b48cc40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / immaculate-0.1.0-cp312-abi3-win_arm64.whl
| Download URL | immaculate-0.1.0-cp312-abi3-win_arm64.whl |
|---|---|
| Size | 21.6 MB |
| Tags | CPython 3.12 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
c1c637df83d1f320f0973f833cefb7429b14f2cd2a66d529b4b7674e63e1ce47
|
|
BLAKE2b-256 checksum How to use checksums |
fb8dd28d9254753750433df08cd37c67851fb09d14654d27586abd61d967fbef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / immaculate-0.1.0-cp312-abi3-win_amd64.whl
| Download URL | immaculate-0.1.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 21.6 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
712047b37ddff94e9055dfbdc91d6de6275a89ea418f5ebd3de0007fa840396b
|
|
BLAKE2b-256 checksum How to use checksums |
ee24a3918ac62cce82faf0c05811b7bb5873e5e12da89ce55f508ead3e4e1a20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / immaculate-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl
| Download URL | immaculate-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 21.7 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
94d1ce20f0c149d562f176cc99ddd3cfb3c672bb8d837079598d360710dee6c0
|
|
BLAKE2b-256 checksum How to use checksums |
05d596a51a9a22552d5b184a2b56ddea67549e962df3ac6ef263df5fe9643fe9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / immaculate-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl
| Download URL | immaculate-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 21.6 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
90a12fb7d51e9f28f21a485eca18604e7af42d5b3e72f083cda24863e93aab4f
|
|
BLAKE2b-256 checksum How to use checksums |
b9d9c28e89313f24a7f4a5e3b8113d40bf8880c61e69a2da22a1b87a8f1c3919
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / immaculate-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | immaculate-0.1.0-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 21.6 MB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6d7461eb85a4d6ebe2ba3f5f09f4e2cd3bf42f298538d830a5e7f671a7cadc1e
|
|
BLAKE2b-256 checksum How to use checksums |
738c0e0daa480bd0a67bf373b6b9745d45197ea3798e5adefba73273d6804987
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / immaculate-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl
| Download URL | immaculate-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 21.6 MB |
| Tags | CPython 3.12 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
001a17132f1ac1254604a620223836de565ce26370d57303c866668810cc0e7a
|
|
BLAKE2b-256 checksum How to use checksums |
0ff22261277cb14632e7929ead2ac641956cccca1a0051f53e2679afec595b80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 20, 2026.
Transparency logSecurity for Immaculate 0.1.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.
Attestation for immaculate-0.1.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 20, 2026.
Transparency logA 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.