This is a pure-Python implementation of PDQ.
you can use this repo to quickly build a usable service.
This uses the Python Image Library.
sudo pip3 install -r requirements.txt
python3 main.py
use the following command to compute the hash of a URL:
using the remote image
curl --location 'http://127.0.0.1:9000/uri/hashing' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png"
}'
or exists in the file img/1675811437498658816.jpg
curl --location 'http://127.0.0.1:9000/file/hashing' --form 'the_file=@"./img/1675811437498658816.jpg"'
docker build -t pdq .
docker run -p 9000:9000 pdq
the original GitHub repo is here
pdqhashing is copied from the original repo.