Coder Social home page Coder Social logo

dries007 / phashpy Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 55 KB

Python bindings for the pHash (perceptual hashing) library.

Home Page: https://pypi.org/project/pHashPy/

License: GNU General Public License v3.0

Python 100.00%
phash python python3 cppyy

phashpy's Introduction

pHashPy

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.

Features

Working:

  • Video hashing
  • Image hashing (dct & mh)

Missing:

  • Audio
  • Text

Usage

As a Command Line Tool

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.

As a Library

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.

Background Info

For more info on pHash:

Testing build manually

Using CentOS 7 (with docker container quay.io/pypa/manylinux2014_x86_64):

cd

yum install -y cmake3 libpng-devel libjpeg-turbo-devel libsamplerate-devel libsndfile-devel libtiff-devel libvdpau-devel libvorbis-devel
yum install -y epel-release

rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
yum install -y ffmpeg-devel

git clone https://github.com/dries007/pHashPy.git
cd pHashPy
git submodule init
git submodule update

cd pHash

echo "include_directories(/usr/include/ffmpeg)" >> CMakeLists.txt
sed -i s/SHARED/STATIC/g CMakeLists.txt

mkdir build
cd build
cmake3 .. -DCMAKE_BUILD_TYPE=Release -DWITH_VIDEO_HASH=1 -DWITH_AUDIO_HASH=1
make -j

phashpy's People

Contributors

dries007 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.