ImageHash
Image Hashing library
Decision gist · record as of 2026-08-14
Yes. ImageHash is mature, well-maintained, permissive-licensed, and has no known vulnerabilities. Install friction is low and it solves a specific, well-defined problem. Use it if you need to detect visually similar images; skip it if you only need exact image matching or cryptographic integrity checking.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with four well-established scientific dependencies (numpy, scipy, pillow, PyWavelets).
- Last release was 2025-02-01; repository shows active maintenance with 3860 stars, though the package is aging (559 days since last release).
License · maintenance · safety
2-clause BSD License (permissive) — 2-clause BSD License is permissive; you can use, modify, and redistribute this package freely in commercial and private projects with minimal restrictions.
last release 2025-02-01 (559 days) · last repo commit 2025-04-17 · 3,860 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,039,544 downloads/mo, #1,978 on PyPI
Alternatives
Verify before relying
pip install imagehash
import imagehash
import pillow
hash1 = imagehash.average_hash(image1)
hash2 = imagehash.average_hash(image2)
if hash1 == hash2:
print('Images are similar')- Whether the package supports modern Python versions (requires_python is unspecified in metadata)
- Performance characteristics when hashing large image collections or very high-resolution images
- How to load images into the format expected by the hashing functions
What it is and what it does
ImageHash is a Python library that generates perceptual hashes from images—compact fingerprints that remain similar when images are visually alike but differ in compression, scaling, or minor edits. Unlike cryptographic hashes (MD5, SHA-1), where tiny changes produce completely different outputs, perceptual hashes are designed so that similar images produce similar hashes, measurable by Hamming distance. The library supports six hashing strategies: average hashing, perceptual hashing, difference hashing, wavelet hashing, HSV color hashing, and crop-resistant hashing. Each can be tuned for sensitivity by adjusting hash size or other parameters.
The package is built on pillow for image handling, numpy for numerical operations, scipy for Fourier transforms, and PyWavelets for wavelet analysis. It's commonly used to find duplicate or near-duplicate images in collections, implement reverse image search, detect manipulated images, and deduplicate media libraries. Hashes can be stored as hex strings, persisted in databases, and compared using fast Hamming distance queries.
Use it for
- Deduplicate image libraries by computing hashes and finding images with Hamming distance below a threshold
- Build reverse image search by storing hashes in a database and querying for visually similar images
- Detect near-duplicate user uploads in content moderation or social media platforms
- Find cropped or slightly modified versions of images using crop-resistant hashing
- Analyze color distribution similarity between images using colorhash for palette-based matching
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
ImageHash is mature, well-maintained, permissive-licensed, and has no known vulnerabilities. Install friction is low and it solves a specific, well-defined problem. Use it if you need to detect visually similar images; skip it if you only need exact image matching or cryptographic integrity checking.
Install
imagehash on PyPI
Before you install
Low friction: pure Python wheel with four well-established scientific dependencies (numpy, scipy, pillow, PyWavelets). Last release was 2025-02-01; repository shows active maintenance with 3860 stars, though the package is aging (559 days since last release).
License in practice
2-clause BSD License is permissive; you can use, modify, and redistribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install imagehash
import imagehash
import pillow
hash1 = imagehash.average_hash(image1)
hash2 = imagehash.average_hash(image2)
if hash1 == hash2:
print('Images are similar')
Verify before relying
- Whether the package supports modern Python versions (requires_python is unspecified in metadata)
- Performance characteristics when hashing large image collections or very high-resolution images
- How to load images into the format expected by the hashing functions
Package facts
| License | 2-clause BSD License permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesPyWaveletsnumpypillowscipy |
| Maintenance | Aging 559 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,039,544 / month, #1,978 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: ImageHash-4.3.2-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “perceptual image hashing”
- ImageHashImageHash computes perceptual fingerprints of images using multiple…
- imagededupFinds exact and near-duplicate images in collections using hashing…
- blurhash-pythonEncodes images into BlurHash strings, compact perceptual hashes that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Graphics packages
Pillow adds image processing capabilities to Python, providing file format support, efficient pixel data handling, and image manipulation operations.
Install it if you need to work with images in Python—it is the de facto standard for this task.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Enables matplotlib figures to display inline directly within Jupyter notebooks and IPython environments instead of in separate windows.
PyMuPDF extracts, renders, converts, and manipulates PDF and other document formats (XPS, EPUB, images, Office files via Pro) with high performance, providing text, tables, images, and metadata with precise layout information.
The AGPL license requires careful review if you are building proprietary software—commercial licensing is available from Artifex.
pypdfium2 is a Python binding to PDFium that enables PDF rendering, inspection, manipulation, and creation through a ctypes interface to Google's PDFium library.
Install it if you need PDF rendering, inspection, or manipulation in Python; the medium install friction is offset by comprehensive platform support.
Altair is a declarative Python library for creating interactive statistical visualizations by writing simple, readable code that compiles to Vega-Lite specifications.
See also imagededup · simhash · blurhash-python · ppdeep · colorhash · filehash · py-tlsh · dict-hash · dirhash · clandestined