piq
Measures and metrics for image2image tasks. PyTorch.
Decision gist · record as of 2026-08-14
Yes, if you need image quality metrics. The library is well-established (1572 GitHub stars, 256419 monthly downloads), permissively licensed, and has low install friction. The dormant maintenance status is not a blocker for stable metric implementations, but verify that the specific metrics you need are present and that you do not require active bug fixes or new features. No known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires torchvision as a runtime dependency; GPU acceleration is optional but available.
- Low friction: pure Python wheel with a single runtime dependency (torchvision).
- Repository is dormant (last commit May 2024, no release since July 2023), but archived status is false, suggesting maintenance is paused rather than abandoned.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache Software License (permissive). You can use, modify, and distribute the package freely in commercial or private projects without restriction, though you must include the license notice.
last release 2023-07-04 (1137 days) · last repo commit 2024-05-12 · 1,572 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 256,419 downloads/mo, #8,465 on PyPI
Alternatives
Verify before relying
pip install piq
from piq import ssim, SSIMLoss
ssim_index = ssim(x, y, data_range=1.)
loss = SSIMLoss(data_range=1.)
output = loss(x, y)
output.backward()- Whether the package works reliably with Python versions beyond 3.10 (description mentions 3.7-3.10 support).
- Current maintenance status: whether dormancy indicates the package is stable or effectively unmaintained.
- Specific metrics available and their performance on standard benchmarks.
What it is and what it does
PIQ is a library that bundles image quality metrics into a unified, easy-to-use interface. It implements full-reference metrics (SSIM, PSNR, LPIPS, etc.) that compare pairs of images, no-reference metrics (BRISQUE, CLIP-IQA) that assess single images, and distribution-based metrics (FID, IS, KID) that compare feature distributions from image sets. Most metrics can be backpropagated, making them suitable as loss functions for model training.
The library is built on pure PyTorch with minimal additional dependencies, provides extensive input validation to prevent crashes during training, and supports GPU computation. It evolved from an earlier package called PhotoSynthesis.Metrics and includes code for benchmarking metrics against standard datasets like TID2013 and KADID10k.
Use it for
- Training image generation or enhancement models using perceptual loss functions like LPIPS or SSIM.
- Evaluating generative model quality with FID or Inception Score on image distributions.
- Comparing image restoration or super-resolution outputs against reference images.
- Assessing blind image quality using BRISQUE or CLIP-IQA on single images.
- Benchmarking image processing pipelines against standard quality metrics on common datasets.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need image quality metrics.
The library is well-established (1572 GitHub stars, 256419 monthly downloads), permissively licensed, and has low install friction. The dormant maintenance status is not a blocker for stable metric implementations, but verify that the specific metrics you need are present and that you do not require active bug fixes or new features. No known vulnerabilities.
Install
piq on PyPI
Before you install
Low friction: pure Python wheel with a single runtime dependency (torchvision). Repository is dormant (last commit May 2024, no release since July 2023), but archived status is false, suggesting maintenance is paused rather than abandoned.
Requires torchvision as a runtime dependency; GPU acceleration is optional but available.
License in practice
Licensed under Apache Software License (permissive). You can use, modify, and distribute the package freely in commercial or private projects without restriction, though you must include the license notice.
Quickstart
pip install piq
from piq import ssim, SSIMLoss
ssim_index = ssim(x, y, data_range=1.)
loss = SSIMLoss(data_range=1.)
output = loss(x, y)
output.backward()
Verify before relying
- Whether the package works reliably with Python versions beyond 3.10 (description mentions 3.7-3.10 support).
- Current maintenance status: whether dormancy indicates the package is stable or effectively unmaintained.
- Specific metrics available and their performance on standard benchmarks.
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetorchvision |
| Maintenance | Dormant 1,137 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 256,419 / month, #8,465 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: piq-0.8.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “SSIM PSNR image comparison”
- piqPIQ provides a collection of image quality metrics and measures—both…
- image-similarity-measuresComputes eight standard image similarity metrics (RMSE, PSNR, SSIM,…
- pixelhogCompares PNG screenshots pixel-by-pixel and perceptually using…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also image-similarity-measures · pyiqa · pytorch-fid · pytorch-msssim · lpips · clean-fid · torchmetrics · torchsr · pixelhog