Generate perceptual hashes for images using DinoHash
Project description
DINOHash ONNX
Python implementation of DINOHash using ONNX Runtime, from https://www.arxiv.org/abs/2503.11195
This is a Python port of the Node.js implementation, providing perceptual image hashing using ONNX models.
Installation
uv add dinohash-onnx
Usage
from dinohash_onnx import DINOHash
import os
hash = DINOHash()
hash_hex = hash.hash(image_path)
print(f"Hex: {hash_hex}")
Example
See examples/example.py for a complete working example.
License
MIT
Citation
If you use this library in your research, please cite:
@article{dinohash2025,
title={DINOHash: Perceptual Image Hashing with Vision Transformers},
journal={arXiv preprint arXiv:2503.11195},
year={2025}
}
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 dinohash_onnx-0.1.0.tar.gz.
File metadata
- Download URL: dinohash_onnx-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18eedef8379ef59a6642cd23324a55450ccead13312df553063de2bd5bca071c
|
|
| MD5 |
1ec40bb02e5f541078a1fee0451932ed
|
|
| BLAKE2b-256 |
37b2b5607a280d4909d52b7facb9345843f9eca561b40fb6e6ba8e548dbe509b
|
File details
Details for the file dinohash_onnx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dinohash_onnx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
589ec5c0db740b809e38965d611e5036fa1b4b5f8b9cb15eb3966d5f558ce947
|
|
| MD5 |
66400983cf1070765ccc9632d6ef718a
|
|
| BLAKE2b-256 |
e7ebff9c352322f668b78bca2720c3eb2a18aea41b4aef5c5ee078442e8f1b10
|