Python bindings for the pHash (perceptual hashing) library.
Python bindings for the pHash (perceptual hashing) library.
Copyright (c) Dries007 2020. \
Licensed under GPLv3 (or later), as is pHash itself.
The project uses cppyy to create a small wrapper around pHash functions.
Working:
Missing:
You can use the tool as a command line utility to generate a list of hashes from a list of files.
Run python -m pHashPy --help for more info.
Import functions from the package’s __init__, this will automatically load the required library files.
If you import the functions from the individual py files, you must call helper.init yourself.
For more info on pHash:
Using CentOS 7 (with docker container quay.io/pypa/manylinux2014_x86_64):
cdyum install -y cmake3 libpng-devel libjpeg-turbo-devel libsamplerate-devel libsndfile-devel libtiff-devel libvdpau-devel libvorbis-develyum install -y epel-releaserpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.rorpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpmyum install -y ffmpeg-develgit clone https://github.com/dries007/pHashPy.gitcd pHashPygit submodule initgit submodule updatecd pHashecho "include_directories(/usr/include/ffmpeg)" >> CMakeLists.txtsed -i s/SHARED/STATIC/g CMakeLists.txtmkdir buildcd buildcmake3 .. -DCMAKE_BUILD_TYPE=Release -DWITH_VIDEO_HASH=1 -DWITH_AUDIO_HASH=1make -j