Measures and metrics for image2image tasks. PyTorch.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by denproc over 1 year ago
With this release, we introduce implementation of CLIP-IQA. In contrast to other available implementations, our apprach is standalone (say no to any additional dependencies) and delivers the estimations, which match the official implementation.
The image quality is measured based on a general notion of text-to-image similarity learned by the CLIP model during its large-scale pre-training on a large dataset with paired texts and images.
Such approach follows the idea that two antonyms (“Good photo” and “Bad photo”) can be used as anchors in the text embedding space representing good and bad images in terms of their image quality.
After the anchors are defined, one can use them to determine the quality of a given image in the following way:
Full Changelog: https://github.com/photosynthesis-team/piq/compare/v0.7.1...v0.8.0
Contributors: @rbischof, @zakajd, @snk4tr, @denproc.
Published by denproc over 1 year ago
Contributors: @pooya-mohammadi , @zakajd, @snk4tr, @denproc.
Full Changelog: https://github.com/photosynthesis-team/piq/compare/v0.7.0...v0.7.1
Published by denproc over 2 years ago
The new release of PIQ introduces metric and loss function interfaces for Information Content Weighted Structural Similarity (IW-SSIM) index. PIQ implementation of IW-SSIM is standalone. It doesn't require any additional packages for computing the index and includes optimised use of Laplacian pyramids. The performance of the proposed IW-SSIM index matches SRCC and KRCC estimations on TID2013, and KADID10k datasets.
IW-SSIM was proposed by Zhou Wang and Qiang Li. IW-SSIM takes into account local information content for image quality assessment. The content is estimated using advanced statistical models of natural images. Experiments showed consistent improvement in the performance for IQA, while IW-SSIM led to the best overall performance.
With this release, pre-commit hooks were added to the project. Pre-commit hooks enable automatic validation of code before committing it into the project. Such approach allows to automate code style checks locally and reduces number of commits to fix code style issues. To enable the feature on your machine, please follow the contribution guide.
semver
and PEP404
formats (#273, #290);github/actions
(#296);Contributors: @merunes-goldman, @zakajd, @snk4tr, @denproc.
Published by denproc about 3 years ago
With current release, we added Spectral Residual based Similarity (SR-SIM) measure. The metric was introduced based on a specific visual saliency model, spectral residual visual saliency.
In addition, we also implemented SR-SIMc, which is a chromatic
version of the SR-SIM.
DCT Subbands Similarity (DSS) was presented visual quality metric that correlates well with human visual perception. The measure uses properties of human visual perception, evaluating changes in structural information in sub-bands in DCT domain. DSS showed great results according to public image datasets benchmarks, while being computationally efficient.
In this release we added another public image dataset benchmark. PIPAL is the largest human-rated set of images to date and the only one containing rich number of realistic distortions from GAN models. Benchmarking metrics performance on this set can give a good estimate of their usefulness in GAN modes evaluation.
Benchmark results are available at README.rst and documentatioin.
ContentLoss
before copying weights tensor (#264);ContentLoss
(#259);Contributors: @zakajd, @snk4tr, @denproc, @leihuayi.
Published by denproc over 3 years ago
In this release, we added new Precision-Recall metric. The metric was introduced for assessing generative models, i.e. estimate the quality and coverage of the generated samples. The metric can separately and reliably measure both of these aspects in image generation tasks by forming explicit, non-parametric representations of the manifolds of real and generated data.
With this release we introduce piq.readthedocs.io documentation to provide assistance using our library. Installation and usage guides help to start using PIQ framework in your projects. The documentation includes relevant information about metric interfaces and metric specific differences. In order to keep the documentation up-to-date, we use automatic pipeline for generation and deployment to piq.readthedocs.io. In addition, we updated in #233 pipeline allows to update README.rst
and documentation simultaneously.
README.rst
up-to-date (#233);requirements.txt
(#237);requirements.txt
(#244);torch==1.8.1
(#246);torch==1.8.1
(#250);Contributors: @zakajd, @snk4tr, @denproc, @hecoding.
Published by snk4tr almost 4 years ago
New metric, readme update, usability enhancements and bug fixes.
allow_negative
flag for some metrics, which support negative inputs (#169)data_range
for virtually all present metrics (#195)fid_inception
in case of normalize_mode=False
(#191)Contributors: @zakajd, @snk4tr, @akamaus, @bes-dev, @denproc.
Published by denproc almost 4 years ago
LPIPS
and DISTS
(#167)scipy
version to use (#158)no_grad
context for computing features, where is no need in gradients (#175)GMSD
test for different pixel value ranges (#171)Contributors: @zakajd, @PavelOstyakov, @snk4tr, @denproc, .
Published by denproc about 4 years ago
With this release we introduce Mean Deviation Similarity Index (MDSI). The proposed implementation is similar to original MATLAB implementation and supports the same functionality. Check README.md for usage examples.
Now, the functional interfaces for GMSD and Multi-Scale GMSD are available for the users. The precision was improved for each metric making GMSD prediction fully aligned with the original MATLAB version. Visit README.md for new usage examples.
The PIQ framework was added to Anaconda Cloud at photosynthesis-team channel. The proposed CD pipeline allows deploying the latest release to the Anaconda Cloud automatically. The library is compatible with win-64
, linux-64
and osx-64
and python>=3.6
. For installation tips, visit the README.md.
The testing CI was extended with validation using python 3.8
resulting in the library tested for python 3.6, 3.7, 3.8
. The flake8 CI validation using python 3.7
was deprecated because it duplicates the functionality of the same validation using python 3.6
.
Added the description of the feature extractors into piq.feature_extractors.__init__.py
for more convenient user experience.
Added the description of the LPIPS
, DISTS
, ContentLoss
and StyleLoss
and their usage to the README.md.
chromatic
parameter to FSIM loss (#146)Added the chromatic
parameter of the FSIMLoss
to take into account chromatic components computing the FSIM.
kernel_size
to be odd in brisque
function;pow_for_complex
to calculate tensors of any values (real and complex) in the power of any real number;The requirements were made less strict to avoid force update of the environment with torch
for incompatible CUDA support during piq
installation. The brisque
measure was updated with a warning that back propagation is not available for torch==1.5.0
due to bug in argmin
and argmax
. The same warning was added to README.md.
Contributors: @denproc, @zakajd, @snk4tr.
Published by denproc over 4 years ago
piq.functional
Content loss, Style loss, Learned Perceptual Image Patch Similarity (LPIPS) and Deep Image Structure and Texture Similarity (DISTS) metrics were added to the library. One could choose the extractor VGG16 or VGG19. Any number of layers is supported. Any weights are supported. One can use per-level (Style transfer case) or per-feature (as in LPIPS) weights. Check out Examples at README.md for more details.
The Visual Saliency-induced Index (VSI) was introduced into the library in this release. The VSI is compatible with greyscale and RGB images. In case of greyscale, the only channel is copied to imitate RGB colour space. The VSI was compared with the original MATLAB implementation. Tests show that our implementation produces the same result. Check out Examples at README.md for more details.
The Feature Similarity (FSIM/FSIMc) was also included in this release. The FSIM measure is compatible with greyscale and RGB images, but only the luminance component is used. The FSIMc extension takes chrominance components into account. The FSIM and FSIMc were compared with the original MATLAB implementation. Tests show that our implementation produces the same result. Check out Examples at README.md for more details.
piq.functional
(#104, #119, #135)With this release, we introduce piq.functional
, which contains the most common functions such as colour space conversions, filters, mesh grid, similarity and gradient maps. The decision was made in order to reduce copy-paste code and improve readability providing the user with the ability to reuse implemented functionality for their own needs.
CodeCov was introduced to the project to improve the quality of the contributed code to the library. The Codecov bot posts reports directly to pull requests highlighting the test coverage of the code.
The issue (#111) with memory losses and the number of open files compatibility was resolved. The context manager was added to handle pool closure after its use.
The issue (#108) with pixel values range to be used was resolved. The functionality is aligned with MATLAB implementation.
The code was refactored to meet the code style requirements and to remove sonarcloud code smells.
cpu
and/or gpu
) depending on the workstation for deployment.Contributors: @bonlime, @denproc, @zakajd, @snk4tr.
Published by denproc over 4 years ago
New easy to remember title "PyTorch Image Quality (PIQ)" is introduced for our library with this release. This change allows importing all the metrics easier using just three letters piq
. Moreover, the new title resolves the consistency between naming in different services (GitHub, PyPi). As a result, one could use automatic tools of IDE to detect if the library is messed and to install it straight away.
The Peak Signal-to-Noise Ratio (PSNR) was added to the library in this release. The PSRN is compatible with greyscale and RGB images. In the case of an RGB image, one could use all three channels to compute the ratio or transfer image to YCbCr colour space and use luminance. Check out Examples at README.md for more details.
SonarCloud was introduced to the project to improve the quality of the contributed code to the library.
Contributors: @denproc, @zakajd, @snk4tr.
Special thanks to @PavelOstyakov for valuable feedback.
Published by denproc over 4 years ago
Contributiors: @denproc, @snk4tr, @zakajd
Published by snk4tr over 4 years ago
Small fixes (#62, #63, #65) and refactoring (#64)
Contributors: @denproc, @zakajd, @snk4tr
Published by snk4tr over 4 years ago
Contributors: @denproc, @zakajd, @snk4tr, @smikhai1
Published by snk4tr over 4 years ago
data_range
argument was moved to the class initializer.
Published by snk4tr over 4 years ago
This release includes new measures:
It also includes more extensive testing and documentation.
Published by snk4tr almost 5 years ago
Published by snk4tr almost 5 years ago