Perception provides flexible, well-documented, and comprehensively tested tooling for perceptual hashing research, development, and production use. Version 0.8.4 supports Python >=3.10 <4.0. Release cadence is irregular, with updates every few months.
pip install perceptionVerified import paths — ran on the pinned version, not inferred.
Compute perceptual hashes for two images and compare using Hamming distance.
Use 'from perception import ImageHash' instead.
Instantiate 'hashers.DHash()' instead of calling 'hashers.dhash()'.
Check file existence before computing, or catch FileNotFoundError if using from perception.tools.
Use hash1 - hash2 for distance; for comparison, convert to binary string manually.