Performance-first perceptual hashing library; perfect for handling large datasets. Designed to quickly process nested folder structures, commonly found in image datasets
Project description
imgdd: Image DeDuplication
imgdd is a performance-first perceptual hashing library that combines Rust's speed with Python's accessibility, making it perfect for handling large datasets. Designed to quickly process nested folder structures, commonly found in image datasets.
Features
- Multiple Hashing Algorithms: Supports
aHash,dHash,mHash,pHash,wHash. - Multiple Filter Types: Supports
Nearest,Triangle,CatmullRom,Gaussian,Lanczos3. - Identify Duplicates: Quickly identify duplicate hash pairs.
- Simplicity: Simple interface, robust performance.
Why imgdd?
imgdd has been inspired by imagehash and aims to be a lightning-fast replacement with additional features. To ensure enhanced performance, imgdd has been benchmarked against imagehash. In Python, imgdd consistently outperforms imagehash by ~60%–95%, demonstrating a significant reduction in hashing time per image.
Quick Start
Installation
pip install imgdd
Usage Examples
Hash Images
import imgdd as dd
results = dd.hash(
path="path/to/images",
algo="dhash", # Optional: default = dhash
filter="triangle", # Optional: default = triangle
sort=False # Optional: default = False
)
print(results)
Find Duplicates
import imgdd as dd
duplicates = dd.dupes(
path="path/to/images",
algo="dhash", # Optional: default = dhash
filter="triangle", # Optional: default = triangle
remove=False # Optional: default = False
)
print(duplicates)
Supported Algorithms
- aHash: Average Hash
- mHash: Median Hash
- dHash: Difference Hash
- pHash: Perceptual Hash
- wHash: Wavelet Hash
Supported Filters
Nearest,Triangle,CatmullRom,Gaussian,Lanczos3
Contributing
Contributions are always welcome! 🚀
Found a bug or have a question? Open a GitHub issue. Pull requests for new features or fixes are encouraged!
Similar projects
- https://github.com/JohannesBuchner/imagehash
- https://github.com/commonsmachinery/blockhash-python
- https://github.com/acoomans/instagram-filters
- https://pippy360.github.io/transformationInvariantImageSearch/
- https://www.phash.org/
- https://pypi.org/project/dhash/
- https://github.com/thorn-oss/perception (based on imagehash code, depends on opencv)
- https://docs.opencv.org/3.4/d4/d93/group__img__hash.html
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imgdd-0.1.3.tar.gz.
File metadata
- Download URL: imgdd-0.1.3.tar.gz
- Upload date:
- Size: 55.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4fecca487c1e623587aeebe6bd10fc6ffccba2ec783f00a87345bf065f9cbac
|
|
| MD5 |
a855fe60e64946ab5dc6625310c432bf
|
|
| BLAKE2b-256 |
e440bc20384d1d89ce98649eddae73ff46614b81253e5d522e57e836d7937641
|
Provenance
The following attestation bundles were made for imgdd-0.1.3.tar.gz:
Publisher:
release-python.yml on aastopher/imgdd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imgdd-0.1.3.tar.gz -
Subject digest:
d4fecca487c1e623587aeebe6bd10fc6ffccba2ec783f00a87345bf065f9cbac - Sigstore transparency entry: 167365458
- Sigstore integration time:
-
Permalink:
aastopher/imgdd@edda38b6944f617b6b704c86522463af785aee52 -
Branch / Tag:
refs/tags/py-v0.1.3 - Owner: https://github.com/aastopher
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@edda38b6944f617b6b704c86522463af785aee52 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file imgdd-0.1.3-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: imgdd-0.1.3-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68e1e2d65c136210d956e4324b198e409181562312f2a702093e68e579541ccf
|
|
| MD5 |
866fb7d55a909fd0d6d3b422e8fd3635
|
|
| BLAKE2b-256 |
65744fba9fc00c407142fda2a8ba35deb0d5d4edb456d911d5cab9823985bb82
|
Provenance
The following attestation bundles were made for imgdd-0.1.3-cp39-abi3-win_amd64.whl:
Publisher:
release-python.yml on aastopher/imgdd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imgdd-0.1.3-cp39-abi3-win_amd64.whl -
Subject digest:
68e1e2d65c136210d956e4324b198e409181562312f2a702093e68e579541ccf - Sigstore transparency entry: 167365461
- Sigstore integration time:
-
Permalink:
aastopher/imgdd@edda38b6944f617b6b704c86522463af785aee52 -
Branch / Tag:
refs/tags/py-v0.1.3 - Owner: https://github.com/aastopher
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@edda38b6944f617b6b704c86522463af785aee52 -
Trigger Event:
workflow_dispatch
-
Statement type: