{"id":13738393,"url":"https://github.com/photosynthesis-team/piq","last_synced_at":"2026-03-17T22:04:32.997Z","repository":{"id":37236449,"uuid":"229097134","full_name":"photosynthesis-team/piq","owner":"photosynthesis-team","description":"Measures and metrics for image2image tasks. PyTorch.","archived":false,"fork":false,"pushed_at":"2024-05-12T15:30:07.000Z","size":3909,"stargazers_count":1562,"open_issues_count":46,"forks_count":119,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-02-22T10:53:56.929Z","etag":null,"topics":["brisque","fid","gan","generative-models","image-metrics","image-quality","image-quality-assessment","image-to-image","iqa","kid","measures","metrics","ms-ssim","mse","psnr","python3","pytorch","ssim","vif"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/photosynthesis-team.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","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-12-19T16:38:14.000Z","updated_at":"2026-02-13T01:28:43.000Z","dependencies_parsed_at":"2023-07-16T20:09:44.924Z","dependency_job_id":"b919aabf-a745-4ca2-a17b-d3b915304ead","html_url":"https://github.com/photosynthesis-team/piq","commit_stats":{"total_commits":215,"total_committers":13,"mean_commits":16.53846153846154,"dds":0.5302325581395348,"last_synced_commit":"9948a52fc09ac5f7fb3618ce64b7086f5c3109da"},"previous_names":["photosynthesis-team/photosynthesis.metrics"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/photosynthesis-team/piq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photosynthesis-team%2Fpiq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photosynthesis-team%2Fpiq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photosynthesis-team%2Fpiq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photosynthesis-team%2Fpiq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/photosynthesis-team","download_url":"https://codeload.github.com/photosynthesis-team/piq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photosynthesis-team%2Fpiq/sbom","scorecard":{"id":732325,"data":{"date":"2025-08-11","repo":{"name":"github.com/photosynthesis-team/piq","commit":"9948a52fc09ac5f7fb3618ce64b7086f5c3109da"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Code-Review","score":7,"reason":"Found 23/30 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/cd-conda.yml:1","Warn: no topLevel permission defined: .github/workflows/cd-pypi.yml:1","Warn: no topLevel permission defined: .github/workflows/ci-linting.yml:1","Warn: no topLevel permission defined: .github/workflows/ci-mypy.yml:1","Warn: no topLevel permission defined: .github/workflows/ci-testing.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd-conda.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/cd-conda.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd-conda.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/cd-conda.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd-pypi.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/cd-pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd-pypi.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/cd-pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-linting.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/ci-linting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-linting.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/ci-linting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-mypy.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/ci-mypy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-mypy.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/ci-mypy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-testing.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/ci-testing.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-testing.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/ci-testing.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-testing.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/ci-testing.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci-testing.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/photosynthesis-team/piq/ci-testing.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/cd-conda.yml:20","Warn: pipCommand not pinned by hash: .github/workflows/cd-pypi.yml:18","Warn: pipCommand not pinned by hash: .github/workflows/cd-pypi.yml:19","Warn: pipCommand not pinned by hash: .github/workflows/ci-linting.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/ci-mypy.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/ci-testing.yml:47","Warn: pipCommand not pinned by hash: .github/workflows/ci-testing.yml:48","Warn: pipCommand not pinned by hash: .github/workflows/ci-testing.yml:49","Warn: pipCommand not pinned by hash: .github/workflows/ci-testing.yml:50","Warn: pipCommand not pinned by hash: .github/workflows/ci-testing.yml:58","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   0 out of   9 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.7.1 not signed: https://api.github.com/repos/photosynthesis-team/piq/releases/91407761","Warn: release artifact v0.7.1 does not have provenance: https://api.github.com/repos/photosynthesis-team/piq/releases/91407761"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xgfm-fjx6-62mj"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T14:47:04.637Z","repository_id":37236449,"created_at":"2025-08-22T14:47:04.637Z","updated_at":"2025-08-22T14:47:04.637Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["brisque","fid","gan","generative-models","image-metrics","image-quality","image-quality-assessment","image-to-image","iqa","kid","measures","metrics","ms-ssim","mse","psnr","python3","pytorch","ssim","vif"],"created_at":"2024-08-03T03:02:21.085Z","updated_at":"2026-03-17T22:04:32.976Z","avatar_url":"https://github.com/photosynthesis-team.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\n.. image:: https://raw.githubusercontent.com/photosynthesis-team/piq/master/docs/source/_static/piq_logo_main.png\n    :target: https://github.com/photosynthesis-team/piq\n\n..\n\n  PyTorch Image Quality (PIQ) is not endorsed by Facebook, Inc.;\n\n  PyTorch, the PyTorch logo and any related marks are trademarks of Facebook, Inc.\n\n|pypy| |conda| |flake8| |tests| |codecov| |quality_gate|\n\n.. |pypy| image:: https://badge.fury.io/py/piq.svg\n   :target: https://pypi.org/project/piq/\n   :alt: Pypi Version\n.. |conda| image:: https://anaconda.org/photosynthesis-team/piq/badges/version.svg\n   :target: https://anaconda.org/photosynthesis-team/piq\n   :alt: Conda Version\n.. |flake8| image:: https://github.com/photosynthesis-team/piq/workflows/flake-8%20style%20check/badge.svg\n   :alt: CI flake-8 style check\n.. |tests| image:: https://github.com/photosynthesis-team/piq/workflows/testing/badge.svg\n   :alt: CI testing\n.. |codecov| image:: https://codecov.io/gh/photosynthesis-team/piq/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/photosynthesis-team/piq\n   :alt: codecov\n.. |quality_gate| image:: https://sonarcloud.io/api/project_badges/measure?project=photosynthesis-team_photosynthesis.metrics\u0026metric=alert_status\n   :target: https://sonarcloud.io/dashboard?id=photosynthesis-team_photosynthesis.metrics\n   :alt: Quality Gate Status\n\n\n\n.. intro-section-start\n\n`PyTorch Image Quality (PIQ) \u003chttps://github.com/photosynthesis-team/piq\u003e`_ is a collection of measures and metrics for\nimage quality assessment. PIQ helps you to concentrate on your experiments without the boilerplate code.\nThe library contains a set of measures and metrics that is continually getting extended.\nFor measures/metrics that can be used as loss functions, corresponding PyTorch modules are implemented.\n\nWe provide:\n\n* Unified interface, which is easy to use and extend.\n* Written on pure PyTorch with bare minima of additional dependencies.\n* Extensive user input validation. Your code will not crash in the middle of the training.\n* Fast (GPU computations available) and reliable.\n* Most metrics can be backpropagated for model optimization.\n* Supports python 3.7-3.10.\n\nPIQ was initially named `PhotoSynthesis.Metrics \u003chttps://pypi.org/project/photosynthesis-metrics/0.4.0/\u003e`_.\n\n.. intro-section-end\n\n.. installation-section-start\n\nInstallation\n------------\n`PyTorch Image Quality (PIQ) \u003chttps://github.com/photosynthesis-team/piq\u003e`_ can be installed using ``pip``, ``conda`` or ``git``.\n\n\nIf you use ``pip``, you can install it with:\n\n.. code-block:: sh\n\n    $ pip install piq\n\n\nIf you use ``conda``, you can install it with:\n\n.. code-block:: sh\n\n    $ conda install piq -c photosynthesis-team -c conda-forge -c PyTorch\n\n\nIf you want to use the latest features straight from the master, clone `PIQ repo \u003chttps://github.com/photosynthesis-team/piq\u003e`_:\n\n.. code-block:: sh\n\n   git clone https://github.com/photosynthesis-team/piq.git\n   cd piq\n   python setup.py install\n\n.. installation-section-end\n\n.. documentation-section-start\n\nDocumentation\n-------------\n\nThe full documentation is available at https://piq.readthedocs.io.\n\n.. documentation-section-end\n\n.. usage-examples-start\n\nUsage Examples\n---------------\n\nImage-Based metrics\n^^^^^^^^^^^^^^^^^^^\nThe group of metrics (such as PSNR, SSIM, BRISQUE) takes an image or a pair of images as input to compute a distance between them.\nWe have a functional interface, which returns a metric value, and a class interface, which allows to use any metric\nas a loss function.\n\n.. code-block:: python\n\n   import torch\n   from piq import ssim, SSIMLoss\n\n   x = torch.rand(4, 3, 256, 256, requires_grad=True)\n   y = torch.rand(4, 3, 256, 256)\n\n   ssim_index: torch.Tensor = ssim(x, y, data_range=1.)\n\n   loss = SSIMLoss(data_range=1.)\n   output: torch.Tensor = loss(x, y)\n   output.backward()\n\nFor a full list of examples, see `image metrics \u003chttps://github.com/photosynthesis-team/piq/blob/master/examples/image_metrics.py\u003e`_ examples.\n\nDistribution-Based metrics\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe group of metrics (such as IS, FID, KID) takes a list of image features to compute the distance between distributions.\nImage features can be extracted by some feature extractor network separately or by using the ``compute_feats`` method of a\nclass.\n\nNote:\n    ``compute_feats`` consumes a data loader of a predefined format.\n\n.. code-block:: python\n\n   import torch\n   from torch.utils.data import DataLoader\n   from piq import FID\n\n   first_dl, second_dl = DataLoader(), DataLoader()\n   fid_metric = FID()\n   first_feats = fid_metric.compute_feats(first_dl)\n   second_feats = fid_metric.compute_feats(second_dl)\n   fid: torch.Tensor = fid_metric(first_feats, second_feats)\n\n\nIf you already have image features, use the class interface for score computation:\n\n.. code-block:: python\n\n    import torch\n    from piq import FID\n\n    x_feats = torch.rand(10000, 1024)\n    y_feats = torch.rand(10000, 1024)\n    msid_metric = MSID()\n    msid: torch.Tensor = msid_metric(x_feats, y_feats)\n\n\nFor a full list of examples, see `feature metrics \u003chttps://github.com/photosynthesis-team/piq/blob/master/examples/feature_metrics.py\u003e`_ examples.\n\n.. usage-examples-end\n\n.. list-of-metrics-start\n\nList of metrics\n---------------\n\nFull-Reference (FR)\n^^^^^^^^^^^^^^^^^^^\n\n===========  ======  ==========\nAcronym      Year    Metric\n===========  ======  ==========\nPSNR         \\-      `Peak Signal-to-Noise Ratio \u003chttps://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio\u003e`_\nSSIM         2003    `Structural Similarity \u003chttps://en.wikipedia.org/wiki/Structural_similarity\u003e`_\nMS-SSIM      2004    `Multi-Scale Structural Similarity \u003chttps://ieeexplore.ieee.org/abstract/document/1292216\u003e`_\nIW-SSIM      2011    `Information Content Weighted Structural Similarity Index \u003chttps://ece.uwaterloo.ca/~z70wang/publications/IWSSIM.pdf\u003e`_\nVIFp         2004    `Visual Information Fidelity \u003chttps://ieeexplore.ieee.org/document/1576816\u003e`_\nFSIM         2011    `Feature Similarity Index Measure \u003chttps://ieeexplore.ieee.org/document/5705575\u003e`_\nSR-SIM       2012    `Spectral Residual Based Similarity \u003chttps://sse.tongji.edu.cn/linzhang/ICIP12/ICIP-SR-SIM.pdf\u003e`_\nGMSD         2013    `Gradient Magnitude Similarity Deviation \u003chttps://arxiv.org/abs/1308.3052\u003e`_\nMS-GMSD      2017    `Multi-Scale Gradient Magnitude Similarity Deviation \u003chttps://ieeexplore.ieee.org/document/7952357\u003e`_\nVSI          2014    `Visual Saliency-induced Index \u003chttps://ieeexplore.ieee.org/document/6873260\u003e`_\nDSS          2015    `DCT Subband Similarity Index \u003chttps://ieeexplore.ieee.org/document/7351172\u003e`_\n\\-           2016    `Content Score \u003chttps://arxiv.org/abs/1508.06576\u003e`_\n\\-           2016    `Style Score \u003chttps://arxiv.org/abs/1508.06576\u003e`_\nHaarPSI      2016    `Haar Perceptual Similarity Index \u003chttps://arxiv.org/abs/1607.06140\u003e`_\nMDSI         2016    `Mean Deviation Similarity Index \u003chttps://arxiv.org/abs/1608.07433\u003e`_\nLPIPS        2018    `Learned Perceptual Image Patch Similarity \u003chttps://arxiv.org/abs/1801.03924\u003e`_\nPieAPP       2018    `Perceptual Image-Error Assessment through Pairwise Preference \u003chttps://arxiv.org/abs/1806.02067\u003e`_\nDISTS        2020    `Deep Image Structure and Texture Similarity \u003chttps://arxiv.org/abs/2004.07728\u003e`_\n===========  ======  ==========\n\nNo-Reference (NR)\n^^^^^^^^^^^^^^^^^\n\n===========  ======  ==========\nAcronym      Year    Metric\n===========  ======  ==========\nTV           1937    `Total Variation \u003chttps://en.wikipedia.org/wiki/Total_variation\u003e`_\nBRISQUE      2012    `Blind/Referenceless Image Spatial Quality Evaluator \u003chttps://ieeexplore.ieee.org/document/6272356\u003e`_\nCLIP-IQA     2022    `CLIP-IQA \u003chttps://arxiv.org/pdf/2207.12396.pdf\u003e`_\n===========  ======  ==========\n\nDistribution-Based (DB)\n^^^^^^^^^^^^^^^^^^^^^^^\n\n===========  ======  ==========\nAcronym      Year    Metric\n===========  ======  ==========\nIS           2016    `Inception Score \u003chttps://arxiv.org/abs/1606.03498\u003e`_\nFID          2017    `Frechet Inception Distance \u003chttps://arxiv.org/abs/1706.08500\u003e`_\nGS           2018    `Geometry Score \u003chttps://arxiv.org/abs/1802.02664\u003e`_\nKID          2018    `Kernel Inception Distance \u003chttps://arxiv.org/abs/1801.01401\u003e`_\nMSID         2019    `Multi-Scale Intrinsic Distance \u003chttps://arxiv.org/abs/1905.11141\u003e`_\nPR           2019    `Improved Precision and Recall \u003chttps://arxiv.org/abs/1904.06991\u003e`_\n===========  ======  ==========\n\n.. list-of-metrics-end\n\n.. benchmark-section-start\n\nBenchmark\n---------\n\nAs part of our library we provide `code to benchmark \u003ctests/results_benchmark.py\u003e`_ all metrics on a set of common Mean Opinon Scores databases.\nCurrently we support several Full-Reference (`TID2013`_,  `KADID10k`_ and `PIPAL`_) and No-Reference (`KonIQ10k`_ and `LIVE-itW`_) datasets.\nYou need to download them separately and provide path to images as an argument to the script.\n\nHere is an example how to evaluate SSIM and MS-SSIM metrics on TID2013 dataset:\n\n.. code-block:: bash\n\n   python3 tests/results_benchmark.py --dataset tid2013 --metrics SSIM MS-SSIM --path ~/datasets/tid2013 --batch_size 16\n\nBelow we provide a comparison between `Spearman's Rank Correlation Coefficient \u003chttps://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient\u003e`_ (SRCC) values obtained with PIQ and reported in surveys.\nCloser SRCC values indicate the higher degree of agreement between results of computations on given datasets.\nWe do not report `Kendall rank correlation coefficient \u003chttps://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient\u003e`_ (KRCC)\nas it is highly correlated with SRCC and provides limited additional information.\nWe do not report `Pearson linear correlation coefficient \u003chttps://en.wikipedia.org/wiki/Pearson_correlation_coefficient\u003e`_ (PLCC)\nas it's highly dependent on fitting method and is biased towards simple examples.\n\nFor metrics that can take greyscale or colour images, ``c`` means chromatic version.\n\nFull-Reference (FR) Datasets\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n===========  ===========================  ===========================  ===========================\n     \\                  TID2013                    KADID10k                       PIPAL\n-----------  ---------------------------  ---------------------------  ---------------------------\n  Source            PIQ / Reference            PIQ / Reference                PIQ / Reference\n===========  ===========================  ===========================  ===========================\nPSNR         0.69 / 0.69 `TID2013`_       0.68 / -                     0.41 / 0.41 `PIPAL`_\nSSIM         0.72 / 0.64 `TID2013`_       0.72 / 0.72 `KADID10k`_      0.50 / 0.53 `PIPAL`_\nMS-SSIM      0.80 / 0.79 `TID2013`_       0.80 / 0.80 `KADID10k`_      0.55 / 0.46 `PIPAL`_\nIW-SSIM      0.78 / 0.78 `Eval2019`_      0.85 / 0.85 `KADID10k`_      0.60 / -\nVIFp         0.61 / 0.61 `TID2013`_       0.65 / 0.65 `KADID10k`_      0.50 / -\nFSIM         0.80 / 0.80 `TID2013`_       0.83 / 0.83 `KADID10k`_      0.59 / 0.60 `PIPAL`_\nFSIMc        0.85 / 0.85 `TID2013`_       0.85 / 0.85 `KADID10k`_      0.59 / -\nSR-SIM       0.81 / 0.81 `Eval2019`_      0.84 / 0.84 `KADID10k`_      0.57 / -\nSR-SIMc      0.87 / -                     0.87 / -                     0.57 / -\nGMSD         0.80 / 0.80 `MS-GMSD`_       0.85 / 0.85 `KADID10k`_      0.58 / -\nVSI          0.90 / 0.90 `Eval2019`_      0.88 / 0.86 `KADID10k`_      0.54 / -\nDSS          0.79 / 0.79 `Eval2019`_      0.86 / 0.86 `KADID10k`_      0.63 / -\nContent      0.71 / -                     0.72 / -                     0.45 / -\nStyle        0.54 / -                     0.65 / -                     0.34 / -\nHaarPSI      0.87 / 0.87 `HaarPSI`_       0.89 / 0.89 `KADID10k`_      0.59 / -\nMDSI         0.89 / 0.89 `MDSI`_          0.89 / 0.89 `KADID10k`_      0.59 / -\nMS-GMSD      0.81 / 0.81 `MS-GMSD`_       0.85 / -                     0.59 / -\nMS-GMSDc     0.89 / 0.89 `MS-GMSD`_       0.87 / -                     0.59 / -\nLPIPS-VGG    0.67 / 0.67 `DISTS`_         0.72 / -                     0.57 / 0.58 `PIPAL`_\nPieAPP       0.84 / 0.88 `DISTS`_         0.87 / -                     0.70 / 0.71 `PIPAL`_\nDISTS        0.81 / 0.83 `DISTS`_         0.88 / -                     0.62 / 0.66 `PIPAL`_\nBRISQUE      0.37 / 0.84 `Eval2019`_      0.33 / 0.53 `KADID10k`_      0.21 / -\nCLIP-IQA     0.50 / -                     0.48 / -                     0.26 / -\nIS           0.26 / -                     0.25 / -                     0.09 / -\nFID          0.67 / -                     0.66 / -                     0.18 / -\nKID          0.42 / -                     0.66 / -                     0.12 / -\nMSID         0.21 / -                     0.32 / -                     0.01 / -\nGS           0.37 / -                     0.37 / -                     0.02 / -\n===========  ===========================  ===========================  ===========================\n\nNo-Reference (NR) Datasets\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n===========  ===========================  ===========================\n     \\                  KonIQ10k                    LIVE-itW\n-----------  ---------------------------  ---------------------------\n  Source            PIQ / Reference            PIQ / Reference\n===========  ===========================  ===========================\nBRISQUE      0.22 / -                     0.31 / -\nCLIP-IQA     0.68 / 0.68 `CLIP-IQA off`_  0.64 / 0.64 `CLIP-IQA off`_\n===========  ===========================  ===========================\n\n.. _TID2013: http://www.ponomarenko.info/tid2013.htm\n.. _KADID10k: http://database.mmsp-kn.de/kadid-10k-database.html\n.. _Eval2019: https://ieeexplore.ieee.org/abstract/document/8847307/\n.. _`MDSI`: https://arxiv.org/abs/1608.07433\n.. _MS-GMSD: https://ieeexplore.ieee.org/document/7952357\n.. _DISTS: https://arxiv.org/abs/2004.07728\n.. _HaarPSI: https://arxiv.org/abs/1607.06140\n.. _PIPAL: https://arxiv.org/pdf/2011.15002.pdf\n.. _IW-SSIM: https://ieeexplore.ieee.org/document/7442122\n.. _KonIQ10k: http://database.mmsp-kn.de/koniq-10k-database.html\n.. _LIVE-itW: https://live.ece.utexas.edu/research/ChallengeDB/index.html\n.. _CLIP-IQA off: https://github.com/IceClear/CLIP-IQA\n\nUnlike FR and NR IQMs, designed to compute an image-wise distance, the DB metrics compare distributions of *sets* of images.\nTo address these problems, we adopt a different way of computing the DB IQMs proposed in `\u003chttps://arxiv.org/abs/2203.07809\u003e`_.\nInstead of extracting features from the whole images, we crop them into overlapping tiles of size ``96 × 96`` with ``stride = 32``.\nThis pre-processing allows us to treat each pair of images as a pair of distributions of tiles, enabling further comparison.\nThe other stages of computing the DB IQMs are kept intact.\n\n.. benchmark-section-end\n\n.. assertions-section-start\n\nAssertions\n----------\nIn PIQ we use assertions to raise meaningful messages when some component doesn't receive an input of the expected type.\nThis makes prototyping and debugging easier, but it might hurt the performance.\nTo disable all checks, use the Python ``-O`` flag: ``python -O your_script.py``\n\n.. assertions-section-end\n\n\nRoadmap\n-------\n\nSee the `open issues \u003chttps://github.com/photosynthesis-team/piq/issues\u003e`_ for a list of proposed\nfeatures and known issues.\n\nContributing\n------------\n\nIf you would like to help develop this library, you'll find more information in our `contribution guide \u003cCONTRIBUTING.rst\u003e`_.\n\n.. citation-section-start\n\nCitation\n--------\nIf you use PIQ in your project, please, cite it as follows.\n\n.. code-block:: tex\n\n   @misc{kastryulin2022piq,\n     title = {PyTorch Image Quality: Metrics for Image Quality Assessment},\n     url = {https://arxiv.org/abs/2208.14818},\n     author = {Kastryulin, Sergey and Zakirov, Jamil and Prokopenko, Denis and Dylov, Dmitry V.},\n     doi = {10.48550/ARXIV.2208.14818},\n     publisher = {arXiv},\n     year = {2022}\n   }\n\n.. code-block:: tex\n\n   @misc{piq,\n     title={{PyTorch Image Quality}: Metrics and Measure for Image Quality Assessment},\n     url={https://github.com/photosynthesis-team/piq},\n     note={Open-source software available at https://github.com/photosynthesis-team/piq},\n     author={Sergey Kastryulin and Dzhamil Zakirov and Denis Prokopenko},\n     year={2019}\n   }\n\n.. citation-section-end\n\n.. contacts-section-start\n\nContacts\n--------\n\n**Sergey Kastryulin** - `@snk4tr \u003chttps://github.com/snk4tr\u003e`_ - ``snk4tr@gmail.com``\n\n**Jamil Zakirov** - `@zakajd \u003chttps://github.com/zakajd\u003e`_ - ``djamilzak@gmail.com``\n\n**Denis Prokopenko** - `@denproc \u003chttps://github.com/denproc\u003e`_ - ``d.prokopenko@outlook.com``\n\n.. contacts-section-end\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphotosynthesis-team%2Fpiq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphotosynthesis-team%2Fpiq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphotosynthesis-team%2Fpiq/lists"}