PyTorch Image Quality Assessment
Project description
PIQA is not endorsed by Facebook, Inc.; PyTorch, the PyTorch logo and any related marks are trademarks of Facebook, Inc.
PyTorch Image Quality Assessment
This package is a collection of measures and metrics for image quality assessment in various image processing tasks such as denoising, super-resolution, image interpolation, etc. It relies heavily on PyTorch and takes advantage of its efficiency and automatic differentiation.
It should be noted that piqa is directly inspired from the piq project, while focusing on the conciseness, readability and understandability of its (sub-)modules, such that anyone can freely and easily reuse and/or adapt them to its needs.
However, conciseness should never be at the expense of efficency; piqa's implementations are up to 2 times faster than those of other IQA PyTorch packages like kornia, piq and IQA-pytorch.
piqashould be pronounced pika (like Pikachu ⚡️)
Installation
The piqa package is available on PyPI, which means it is installable with pip:
pip install piqa
Alternatively, if you need the lastest features, you can install it using
git clone https://github.com/francois-rozet/piqa
cd piqa
python setup.py install
or copy the package directly to your project, with
git clone https://github.com/francois-rozet/piqa
cd piqa
cp -R piqa <path/to/project>/piqa
Getting started
The piqa package is divided in several submodules, each of which implements the functions and/or classes related to a specific image quality assessement metric.
import torch
from piqa import psnr, ssim
x = torch.rand(3, 3, 256, 256, requires_grad=True).cuda()
y = torch.rand(3, 3, 256, 256, requires_grad=True).cuda()
# PSNR function
l = psnr.psnr(x, y)
# SSIM instantiable object
criterion = ssim.SSIM().cuda()
l = criterion(x, y)
l.backward()
Metrics
| Acronym | Module | Year | Metric |
|---|---|---|---|
| TV | piqa.tv | 1937 | Total Variation |
| PSNR | piqa.psnr | / | Peak Signal-to-Noise Ratio |
| SSIM | piqa.ssim | 2004 | Structural Similarity |
| MS-SSIM | piqa.ssim | 2004 | Multi-Scale Structural Similarity |
| LPIPS | piqa.lpips | 2018 | Learned Perceptual Image Patch Similarity |
| GMSD | piqa.gmsd | 2013 | Gradient Magnitude Similarity Deviation |
| MS-GMSD | piqa.gmsd | 2017 | Multi-Scale Gradient Magnitude Similiarity Deviation |
| MDSI | piqa.mdsi | 2016 | Mean Deviation Similarity Index |
| HaarPSI | piqa.haarpsi | 2018 | Haar Perceptual Similarity Index |
Documentation
The documentation of this package is generated automatically using pdoc.
Code style
The code follows the Google Python style and is compliant with YAPF.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file piqa-1.1.0.tar.gz.
File metadata
- Download URL: piqa-1.1.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64886119c07a091c9cffe6cfbff180d96bce2689fd08a907a7d1b6f1b894e126
|
|
| MD5 |
075b561153a9e09c08747db289e8cb4f
|
|
| BLAKE2b-256 |
6becf0575da87e25dc524bd40fb0aed72bb2c08d59a0fcc610638014d5c95ba6
|
File details
Details for the file piqa-1.1.0-py3-none-any.whl.
File metadata
- Download URL: piqa-1.1.0-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
490d307ea51364fa0a3737f09885e2eeae755384b23601b9edd1f8a11d108e30
|
|
| MD5 |
8368acf67e1e6feea11791b0247f6ee3
|
|
| BLAKE2b-256 |
a39dbf4a79b4925675bece927b9ffeafcaed981d8f7a2adf6df8d37a971256fd
|