perceptual-hash: Find duplicate images

[ application, bsd3, commandline, images, library, program ] [ Propose Tags ]

Find similar images using perceptual hashes


[Skip to Readme]

Modules

[Index] [Quick Jump]

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.1.0), perceptual-hash, primitive, stm (>=2.3), vector, vector-algorithms [details]
License BSD-3-Clause
Copyright Copyright: (c) 2019-2020 Vanessa McHale
Author Vanessa McHale
Maintainer vamchale@gmail.com
Revised Revision 1 made by vmchale at 2020-07-15T23:35:53Z
Category Application, CommandLine, Images
Source repo head: git clone https://github.com/vmchale/phash
Uploaded by vmchale at 2020-04-24T19:10:10Z
Distributions NixOS:0.1.4.7
Executables phash
Downloads 4193 total (49 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-04-24 [all 1 reports]

Readme for perceptual-hash-0.1.3.5

[back to package description]

phash

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

Pre-Built Release

For many platforms, you can find binaries here.

Source

Download cabal-install and GHC. Then:

cabal install perceptual-hash --constraint='hip +disable-chart'

Library

You can find library documentation on Hackage.

Performance

This library has similar performance to the pHash library for PNG images.

benchmarking fileHash/cat.png
time                 20.67 ms   (20.60 ms .. 20.78 ms)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 20.84 ms   (20.76 ms .. 21.01 ms)
std dev              246.3 μs   (149.5 μs .. 396.7 μs)

benchmarking fileHash/frog.jpeg
time                 17.82 ms   (17.62 ms .. 18.05 ms)
                     0.999 R²   (0.999 R² .. 1.000 R²)
mean                 17.54 ms   (17.45 ms .. 17.65 ms)
std dev              272.3 μs   (194.9 μs .. 369.3 μs)

benchmarking fileHash/frog.png
time                 12.02 ms   (11.95 ms .. 12.11 ms)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 12.08 ms   (12.04 ms .. 12.13 ms)
std dev              115.0 μs   (90.79 μs .. 144.7 μs)

benchmarking foreignHash/cat.png
time                 18.86 ms   (18.79 ms .. 18.97 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 18.92 ms   (18.87 ms .. 18.99 ms)
std dev              149.7 μs   (129.0 μs .. 183.6 μs)

benchmarking foreignHash/frog.jpeg
time                 8.533 ms   (8.480 ms .. 8.574 ms)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 8.686 ms   (8.644 ms .. 8.745 ms)
std dev              129.0 μs   (97.99 μs .. 164.8 μs)

benchmarking foreignHash/frog.png
time                 9.697 ms   (9.649 ms .. 9.735 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 9.746 ms   (9.717 ms .. 9.775 ms)
std dev              84.08 μs   (70.14 μs .. 97.91 μs)

Foreign Library

This package contains a foreign library and a header file

ATS Bindings

Because of the foreign library, hs_phash can be used in ATS as well. ATS users of the library may be interested in hs-bind.