perceptual-hash: Find duplicate images

[ application, bsd3, commandline, images, library, program ] [ Propose Tags ]
This version is deprecated.

Find similar images using perceptual hashes


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
with-phash

Use FFI bindings to pHash

Disabled
llvm

Use LLVM backend to GHC rather than NCG

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.1.0, 0.1.1.1, 0.1.2.0, 0.1.3.0, 0.1.3.1, 0.1.3.2, 0.1.3.3, 0.1.3.5, 0.1.4.1, 0.1.4.2, 0.1.4.3, 0.1.4.4, 0.1.4.5, 0.1.4.6, 0.1.4.7 (info)
Change log CHANGELOG.md
Dependencies base (>=4.9 && <5), containers, filepath, hip (<2), optparse-applicative (>=0.13.0.0), par-traverse (>=0.2.0.0), perceptual-hash, primitive, repa, stm (>=2.3), vector, vector-algorithms [details]
License BSD-3-Clause
Copyright Copyright: (c) 2019 Vanessa McHale
Author Vanessa McHale
Maintainer vamchale@gmail.com
Revised Revision 1 made by vmchale at 2020-07-15T23:35:26Z
Category Application, CommandLine, Images
Source repo head: git clone https://github.com/vmchale/phash
Uploaded by vmchale at 2019-09-28T01:46:00Z
Distributions NixOS:0.1.4.7
Executables phash
Downloads 4217 total (50 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for perceptual-hash-0.1.3.2

[back to package description]

phash

Build Status Windows build status Hackage CI Hackage Dependencies of latest version on Hackage

This is a Haskell library to detect (potential) duplicate images.

It also contains a command-line tool.

Use

Use it on one or more directories:

phash ~/Pictures ~/Downloads
~/Pictures/frog.jpeg, ~/Downloads/frog.png

Installation

Script

On many platforms, you can install with a script, viz.

curl -sSl https://raw.githubusercontent.com/vmchale/phash/master/bash/install.sh | sh -s

Pre-Built Release

Download the latest release from here.

Source

Download cabal-install and GHC. Then:

cabal install perceptual-hash -w ghc-8.6.5

Library

You can find library documentation on Hackage.

Performance

This library is more performant than the pHash library for PNG images.

benchmarking fileHash/cat.png
time                 21.42 ms   (21.20 ms .. 21.63 ms)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 21.34 ms   (21.28 ms .. 21.44 ms)
std dev              184.3 μs   (93.40 μs .. 266.3 μs)

benchmarking fileHash/frog.jpeg
time                 18.16 ms   (18.07 ms .. 18.24 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 18.24 ms   (18.12 ms .. 18.31 ms)
std dev              230.1 μs   (161.3 μs .. 360.2 μs)

benchmarking fileHash/frog.png
time                 12.39 ms   (12.35 ms .. 12.46 ms)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 12.38 ms   (12.34 ms .. 12.43 ms)
std dev              114.0 μs   (73.36 μs .. 156.5 μs)

benchmarking foreignHash/cat.png
time                 27.21 ms   (27.09 ms .. 27.47 ms)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 27.24 ms   (27.18 ms .. 27.37 ms)
std dev              207.9 μs   (84.97 μs .. 311.8 μs)

benchmarking foreignHash/frog.jpeg
time                 12.81 ms   (12.78 ms .. 12.84 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 12.87 ms   (12.85 ms .. 12.92 ms)
std dev              80.81 μs   (56.17 μs .. 113.1 μs)

benchmarking foreignHash/frog.png
time                 14.03 ms   (13.94 ms .. 14.13 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 13.95 ms   (13.93 ms .. 13.99 ms)
std dev              79.36 μs   (52.02 μs .. 119.5 μs)

Foreign Library

This package contains a foreign library and a header file