Generates a hash from a reverse engineered Apple NeuralHash model
Project description
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
Project details
Release history Release notifications | RSS feed
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 neuralhash-0.1.2.tar.gz.
File metadata
- Download URL: neuralhash-0.1.2.tar.gz
- Upload date:
- Size: 3.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87ada6d02052f2b22f1e9abad5d466c88ef65d176843686bce5446ae49153c99
|
|
| MD5 |
a961abb665ede03578013da8dba75d6e
|
|
| BLAKE2b-256 |
fe3bd3cc4ec619164386eb1b59d1b1316ba6230b81b6231852c99b160f711e34
|
File details
Details for the file neuralhash-0.1.2-py3-none-any.whl.
File metadata
- Download URL: neuralhash-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dc903195993f19669a07a7be5bad2a94b5199ee4cb9bae9e92f2bd50e1976c8
|
|
| MD5 |
e852f058c8e46fffb3b87c2925d44644
|
|
| BLAKE2b-256 |
e678d2a346cf49574b7ff1999d83e1cef3c9f8a6212af9a29765f83587769cbb
|