{"id":19512333,"url":"https://github.com/vmchale/phash","last_synced_at":"2025-04-26T04:31:33.428Z","repository":{"id":128761398,"uuid":"193379681","full_name":"vmchale/phash","owner":"vmchale","description":"Perceptual hashing command-line tool","archived":false,"fork":false,"pushed_at":"2025-03-09T14:10:49.000Z","size":3691,"stargazers_count":18,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T07:51:12.822Z","etag":null,"topics":["command-line-tool","deduplication","duplication-detection","duplication-finder","haskell","perceptual-hash","phash"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vmchale.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-23T18:01:05.000Z","updated_at":"2025-03-09T14:10:52.000Z","dependencies_parsed_at":"2024-11-10T23:27:06.745Z","dependency_job_id":"e5e6fe38-6a99-4b45-8f6c-08799642d800","html_url":"https://github.com/vmchale/phash","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Fphash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Fphash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Fphash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmchale%2Fphash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vmchale","download_url":"https://codeload.github.com/vmchale/phash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250931021,"owners_count":21509802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","deduplication","duplication-detection","duplication-finder","haskell","perceptual-hash","phash"],"created_at":"2024-11-10T23:25:33.456Z","updated_at":"2025-04-26T04:31:33.418Z","avatar_url":"https://github.com/vmchale.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phash\n\nThis is a Haskell [library](http://hackage.haskell.org/package/perceptual-hash)\nto detect (potential) duplicate images.\n\nIt also contains a command-line tool.\n\n- [Use](#use)\n- [Installation](#installation)\n  - [Pre-Built Release](#pre-built-release)\n  - [Source](#source)\n- [Library](#library)\n  - [Performance](#performance)\n  - [Foreign Library](#foreign-library)\n\n## Use\n\nUse it on one or more directories:\n\n```\nphash ~/Pictures ~/Downloads\n~/Pictures/frog.jpeg, ~/Downloads/frog.png\n```\n\n## Installation\n\n### Pre-Built Release\n\nFor some platforms, you can find binaries [here](https://www.permanent.org/p/archive/0236-0000/0236-0019/410841).\n\n### Source\n\nDownload [cabal-install](https://www.haskell.org/cabal/download.html) and\n[GHC](https://www.haskell.org/ghc/download.html). Then:\n\n```\ncabal install perceptual-hash --constraint='hip +disable-chart'\n```\n\nYou may need\n\n```cabal\npackage hip\n  ghc-options: -fsimpl-tick-factor=200\n```\n\n### Performance\n\nThis library has performs better on WebP, AVIF images and worse on JPEG images compared to the pHash library.\n\n```\nbenchmarking fileHash/cat.png\ntime                 21.50 ms   (21.23 ms .. 21.70 ms)\n                     1.000 R²   (0.999 R² .. 1.000 R²)\nmean                 21.54 ms   (21.39 ms .. 21.88 ms)\nstd dev              525.3 μs   (224.2 μs .. 946.8 μs)\n\nbenchmarking fileHash/frog.jpeg\ntime                 21.33 ms   (20.57 ms .. 22.01 ms)\n                     0.997 R²   (0.996 R² .. 0.999 R²)\nmean                 19.84 ms   (19.53 ms .. 20.24 ms)\nstd dev              822.7 μs   (654.3 μs .. 1.070 ms)\nvariance introduced by outliers: 13% (moderately inflated)\n\nbenchmarking fileHash/frog.png\ntime                 12.31 ms   (11.88 ms .. 12.66 ms)\n                     0.997 R²   (0.994 R² .. 0.999 R²)\nmean                 12.46 ms   (12.34 ms .. 12.58 ms)\nstd dev              314.3 μs   (256.0 μs .. 385.0 μs)\n\nbenchmarking fileHash/liz-taylor.webp\ntime                 69.02 ms   (68.00 ms .. 70.23 ms)\n                     0.999 R²   (0.997 R² .. 1.000 R²)\nmean                 71.69 ms   (70.28 ms .. 74.98 ms)\nstd dev              3.688 ms   (1.345 ms .. 6.107 ms)\nvariance introduced by outliers: 16% (moderately inflated)\n\nbenchmarking fileHash/liz-taylor.png\ntime                 72.32 ms   (70.35 ms .. 74.49 ms)\n                     0.998 R²   (0.996 R² .. 1.000 R²)\nmean                 73.83 ms   (72.60 ms .. 75.38 ms)\nstd dev              2.414 ms   (1.655 ms .. 3.614 ms)\n\nbenchmarking fileHash/fashion.png\ntime                 142.0 ms   (131.6 ms .. 153.4 ms)\n                     0.997 R²   (0.991 R² .. 1.000 R²)\nmean                 145.8 ms   (142.0 ms .. 153.9 ms)\nstd dev              7.690 ms   (2.694 ms .. 11.43 ms)\nvariance introduced by outliers: 13% (moderately inflated)\n\nbenchmarking fileHash/fashion.avif\ntime                 172.2 ms   (161.5 ms .. 187.6 ms)\n                     0.996 R²   (0.991 R² .. 1.000 R²)\nmean                 175.1 ms   (169.3 ms .. 185.3 ms)\nstd dev              12.16 ms   (5.052 ms .. 18.42 ms)\nvariance introduced by outliers: 13% (moderately inflated)\n\nbenchmarking foreignHash/cat.png\ntime                 21.06 ms   (20.88 ms .. 21.19 ms)\n                     1.000 R²   (0.999 R² .. 1.000 R²)\nmean                 20.94 ms   (20.80 ms .. 21.06 ms)\nstd dev              320.2 μs   (225.5 μs .. 418.3 μs)\n\nbenchmarking foreignHash/frog.jpeg\ntime                 9.255 ms   (9.168 ms .. 9.378 ms)\n                     0.999 R²   (0.999 R² .. 1.000 R²)\nmean                 9.234 ms   (9.201 ms .. 9.273 ms)\nstd dev              94.68 μs   (79.14 μs .. 120.7 μs)\n\nbenchmarking foreignHash/frog.png\ntime                 10.37 ms   (10.28 ms .. 10.47 ms)\n                     0.999 R²   (0.999 R² .. 1.000 R²)\nmean                 10.42 ms   (10.37 ms .. 10.48 ms)\nstd dev              135.4 μs   (106.5 μs .. 184.9 μs)\n\nbenchmarking foreignHash/liz-taylor.webp\ntime                 368.7 ms   (352.4 ms .. 391.1 ms)\n                     1.000 R²   (0.999 R² .. 1.000 R²)\nmean                 362.3 ms   (357.6 ms .. 366.4 ms)\nstd dev              5.133 ms   (1.154 ms .. 6.530 ms)\nvariance introduced by outliers: 19% (moderately inflated)\n\nbenchmarking foreignHash/liz-taylor.png\ntime                 71.58 ms   (71.12 ms .. 72.03 ms)\n                     1.000 R²   (1.000 R² .. 1.000 R²)\nmean                 71.84 ms   (71.66 ms .. 72.24 ms)\nstd dev              502.0 μs   (339.8 μs .. 710.2 μs)\n\nbenchmarking foreignHash/fashion.png\ntime                 162.1 ms   (160.6 ms .. 162.8 ms)\n                     1.000 R²   (1.000 R² .. 1.000 R²)\nmean                 163.4 ms   (162.9 ms .. 164.3 ms)\nstd dev              990.0 μs   (544.6 μs .. 1.476 ms)\nvariance introduced by outliers: 12% (moderately inflated)\n\nbenchmarking foreignHash/fashion.avif\ntime                 705.5 ms   (669.6 ms .. 757.2 ms)\n                     0.999 R²   (0.998 R² .. 1.000 R²)\nmean                 716.4 ms   (710.3 ms .. 728.3 ms)\nstd dev              11.54 ms   (1.129 ms .. 13.84 ms)\nvariance introduced by outliers: 19% (moderately inflated)\n```\n\n### Foreign Library\n\nThis package contains a foreign library and a [header\nfile](https://hackage.haskell.org/package/perceptual-hash/src/include/hs_phash.h)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmchale%2Fphash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmchale%2Fphash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmchale%2Fphash/lists"}