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/yourname/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.0.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.0-py3-none-any.whl (3.9 MB view details)

Uploaded Python 3

File details

Details for the file neuralhash-0.1.0.tar.gz.

File metadata

  • Download URL: neuralhash-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 4727b2be79dbe9817b6da0d8432fa379511eb55a720cf22c563d6f9db626bdb5
MD5 ac4d6b2c563f4ad77284a460fa9e1a2e
BLAKE2b-256 ba44eec2893ce837eb0fa2cac5cc72d6517b002b804ec81579e076e2ab5b28b0

See more details on using hashes here.

File details

Details for the file neuralhash-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: neuralhash-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a29c14b70e8d52efa3963b6a219736b4e415a0c3b98c176f7cddad0fec5681d0
MD5 7ce39e9399dfb089d5478350ec9527f3
BLAKE2b-256 f344e27c2cf44c8fb2c96849e7d71807fecc67b23765551904b72372dde865df

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