Python NeuralHash
This is a library that exposes the Apple Neuralhash model, which can be used to determine similar images, even if the images are not exactly the same.
Installation
From pip:
pip install neuralhash
From source:
git clone https://github.com/joshterrill/python-neuralhash.git
cd neuralhash
pip install -e .
Usage
Python API:
from neuralhash import get_neuralhash_hex
hash_value = get_neuralhash_hex("tests/sample.png")
print(hash_value)
# ab13fcd08dd3b0a31b07fa2e
CLI:
After installation, you also get a command-line tool:
neuralhash path/to/image.png
# path/to/image.png: a0cca3edec8339d006068f1d
Hash multiple files at once:
neuralhash image1.png image2.jpg
# image1.png: a0cca3edec8339d006068f1d
# image2.png: ab13fcd08dd3b0a31b07fa2e
License
MIT
Metadata
Release files for neuralhash 0.1.2
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 |
|---|---|---|---|---|
| neuralhash-0.1.2.tar.gz | 3.8 MB | Without provenance | Details for neuralhash-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neuralhash-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for neuralhash-0.1.2-py3-none-any.whl |
Total release size: 7.7 MB
Release files / neuralhash-0.1.2.tar.gz
| Download URL | neuralhash-0.1.2.tar.gz |
|---|---|
| Size | 3.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87ada6d02052f2b22f1e9abad5d466c88ef65d176843686bce5446ae49153c99
|
|
BLAKE2b-256 checksum How to use checksums |
fe3bd3cc4ec619164386eb1b59d1b1316ba6230b81b6231852c99b160f711e34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / neuralhash-0.1.2-py3-none-any.whl
| Download URL | neuralhash-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8dc903195993f19669a07a7be5bad2a94b5199ee4cb9bae9e92f2bd50e1976c8
|
|
BLAKE2b-256 checksum How to use checksums |
e678d2a346cf49574b7ff1999d83e1cef3c9f8a6212af9a29765f83587769cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for neuralhash 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.