Skip to content

Instantly share code, notes, and snippets.

@santhalakshminarayana
Last active February 25, 2025 18:02
Show Gist options
  • Save santhalakshminarayana/f73f3d52e36c3f9be9283af7ec8ecfaa to your computer and use it in GitHub Desktop.
Save santhalakshminarayana/f73f3d52e36c3f9be9283af7ec8ecfaa to your computer and use it in GitHub Desktop.
Image hashing calculate similar images
for image_name in image_hash_dict.keys():
distance = scipy.spatial.distance.hamming(
hash_hex_to_hash_array(image_hash_dict[image_name]),
hash_hex_to_hash_array(image_hash_dict['images/burj-khalifa-3.jpg'])
)
print("{0:<30} {1}".format(image_name, distance))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment