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

Uploaded Python 3

File details

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

File metadata

  • Download URL: neuralhash-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 50bd9da31b9d8ea508d525537d2cee403f0e8deda23703fd45d9f05e83d3ca2d
MD5 146c92f3816779df35fb8774e00f782b
BLAKE2b-256 6ad2ea0102622ea1baa3d8678c35dcb28d86d2a1ed13ae60368697dc19893b82

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neuralhash-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 76cca7029c740ae6286639c8ec01055c8df2688995c6a5ce1900f77f6e9bcd2b
MD5 11f63bccf42cd8b68506252825292e8d
BLAKE2b-256 7c88c7b3e9e85624600ca4b9bfe81764e8a7c1deb1110fd5d3af3820007ad2f5

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