--- id: pyiqa version: "0.1.16" license: PolyForm-Noncommercial-1.0.0 license_treatment: noncommercial maintenance: active --- # pyiqa — PyTorch Toolbox for Image Quality Assessment License: noncommercial · Maintenance: active · Downloads: 464.3K/mo ## 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 above — 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 pip install pyiqa uv add pyiqa poetry add pyiqa ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 464.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags image quality assessment metrics, IQA pytorch toolbox, full reference image metrics, no reference image quality, image similarity scoring, perceptual loss functions, image quality evaluation, image-quality-assessment, pytorch-toolbox, perceptual-metrics [View on SkillFed](https://skillfed.io/packages/pyiqa) · [View on PyPI](https://pypi.org/project/pyiqa/)