Python package to compute image perceptual hashes. The perceptual hash is based on the mobilenetv2 tensorflow image classification model. It is condensed down to 32-bytes per image. Distance between two hashes gives some measure of image similarity, where distance(a,b) == 0 means idential images and similar images give lower distance.
pip install pyphashml
from pyphashml.phashml import phashmlctx
from pyphashml.phashml import phashml_distance
x = phashmlctx.image_hash("/path/to/imgfile.jpg")
y = phashmlctx.image_hash("/path/to/imgfile2.jpg")
d = phashmlctx.phashml_distance(x, y)
x,y are bitstring objects. d is an integer value >= 0.
python -m pyphashml.imgscoutclient --dir /path/to/img/files --key mykey --host 127.0.0.1 --port 6379 --db 0
python3 -m pyphashml.imgcmp /path/to/img/file.jpg /path/to/img/file2.jpg
bitstring numpy tensorflow >=1.14,<2 redis (for the imgscoutclient command to submit to imgscout server)