Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuralhash-0.1.2.tar.gz (3.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuralhash-0.1.2-py3-none-any.whl (3.9 MB view details)

Uploaded Python 3

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

Hashes for neuralhash-0.1.2.tar.gz
Algorithm Hash digest
SHA256 87ada6d02052f2b22f1e9abad5d466c88ef65d176843686bce5446ae49153c99
MD5 a961abb665ede03578013da8dba75d6e
BLAKE2b-256 fe3bd3cc4ec619164386eb1b59d1b1316ba6230b81b6231852c99b160f711e34

See more details on using hashes here.

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

Hashes for neuralhash-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8dc903195993f19669a07a7be5bad2a94b5199ee4cb9bae9e92f2bd50e1976c8
MD5 e852f058c8e46fffb3b87c2925d44644
BLAKE2b-256 e678d2a346cf49574b7ff1999d83e1cef3c9f8a6212af9a29765f83587769cbb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page