pyiqa
PyTorch Toolbox for Image Quality Assessment
What it is and what it does
PyIQA is a PyTorch-based image quality assessment toolbox that reimplements widely-used full-reference (FR) and no-reference (NR) IQA metrics with results calibrated against official MATLAB implementations. It provides GPU-accelerated computation, making these metrics substantially faster than their MATLAB counterparts. The package includes modern metrics like LPIPS, BRISQUE, SSIM variants, and recent additions like Q-ReAlign and MACLIP, plus support for FID and other generative-model evaluation metrics.
You can use it as a command-line tool to score images, as a Python library to compute metrics on tensors or image paths, or as a loss function for training neural networks (with gradient support for compatible metrics). It also includes utilities to load popular IQA datasets (KONIQ-10k, CSIQ, etc.) from Hugging Face with automatic downloading and splitting.
Use it for:
- Evaluate perceptual quality of generated or compressed images in research or benchmarking workflows.
- Use as a differentiable loss function to train image generation or enhancement models.
- Batch-score large image collections against reference images using GPU acceleration.
- Compare image quality across multiple metrics (FR and NR) in a unified interface.
- Load and evaluate models on standard IQA datasets with built-in train/test splitting.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyIQA provides a PyTorch-based toolbox for computing image quality assessment metrics, supporting both full-reference and no-reference methods with GPU acceleration and calibration against official implementations.
Yes, with conditions. Install if you need image quality metrics for research or non-commercial work and have GPU resources available. The noncommercial license is a hard blocker for any commercial use. The heavy dependency tree (torch, transformers, vision libraries) means substantial first-install time, but low friction once resolved. Active maintenance and no known vulnerabilities are positive signals. Not suitable if you need commercial licensing or minimal dependencies.
Install
pyiqa on PyPI
pip
pip install pyiqauv
uv add pyiqapoetry
poetry add pyiqaInstalling pyiqa
Before you install
Low friction installation with a pure-Python wheel. Active maintenance with recent releases (37 days old), 3363 GitHub stars, and no known vulnerabilities. Heavy dependency tree (27 runtime packages including torch, transformers, and vision libraries) means first install will be substantial but straightforward.
License in practice
Licensed under PolyForm-Noncommercial-1.0.0: noncommercial use only. You cannot use this package in commercial products, services, or for-profit applications without explicit permission from the licensor.
Quickstart
pip install pyiqa
import pyiqa
import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
metric = pyiqa.create_metric('lpips', device=device)
score = metric(img_tensor_x, img_tensor_y) # (N, 3, H, W) tensors, RGB, 0~1
Requires PyTorch and torchvision; GPU strongly recommended for practical use. Model weights download automatically to ~/.cache/torch/hub/pyiqa/ on first run.
Verify before relying
- Whether all 27 listed runtime dependencies are strictly required or only needed for specific metrics.
- Performance comparison claims ('much faster than Matlab counterparts') lack quantitative benchmarks in the excerpt.
- Exact model count and which metrics support backpropagation as loss functions.
Package facts
| License | PolyForm-Noncommercial-1.0.0 (noncommercial) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 27 — accelerate, addict, datasets, bitsandbytes, einops, facexlib, future, numpy, openai-clip, opencv-python-headless, pandas, Pillow, pre-commit, pytest, pyyaml, requests, ruff, scikit-image, scipy, sentencepiece, tensorboard, timm, torch, torchvision, tqdm, transformers, yapf |
| Maintenance | actively maintained — 37 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 464,346/month — #6,517 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyiqa-0.1.16-py3-none-any.whl
Keywords: image quality assessment, pytorch
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
piqPIQ provides a collection of image quality…
permissive · top 15,000 on PyPI
lpipsComputes perceptual similarity between image…
permissive · top 5,000 on PyPI
clean-fidComputes Fréchet Inception Distance (FID) and…
permissive · top 15,000 on PyPI
image-similarity-measuresComputes eight standard image similarity…
permissive · top 15,000 on PyPI
pytorch-fidComputes Fréchet Inception Distance (FID), a…
permissive · top 15,000 on PyPI
fairlearnFairlearn assesses and mitigates fairness…
permissive · top 15,000 on PyPI
timmTimm provides a large collection of pretrained…
permissive · top 5,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
pytorch-metric-learningProvides metric learning loss functions,…
permissive · top 5,000 on PyPI
resize-rightResizes images or tensors in NumPy or PyTorch…
permissive · top 15,000 on PyPI