FSIM(c), VSI, Perceptual Losses and piq.Functional
PyTorch Image Quality (PIQ) v0.5.0 Release Notes
- New feature: Perceptual losses (StyleLoss, ContentLoss , LPIPS, DISTS)
- New feature: Visual Saliency-induced Index (VSI)
- New feature: Feature Similarity (FSIM/FSIMc)
- New feature:
piq.functional
- Code quality assessment
- BugFix
New Features
Perceptual losses (StyleLoss, ContentLoss , LPIPS and DISTS) (#96, #131)
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.
Visual Saliency-induced Index (VSI) (#119)
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.
Feature Similarity (FSIM/FSIMc) (#104)
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.
Code quality assessment (#99)
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.
BugFixes
GS (#112)
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.
BRISQUE Data Range (#110)
The issue (#108) with pixel values range to be used was resolved. The functionality is aligned with MATLAB implementation.
VIF (#94)
- Tests were added to cover bug behaviour;
- EPS constant was added before division to avoid NaN;
- Some checks were introduced from original MATLAB implementation that have been missed;
- Reduction parameter was added;
- Another small bug was fixed.
SonarCloud (#117)
The code was refactored to meet the code style requirements and to remove sonarcloud code smells.
SSIM/MS-SSIM and BRISQUE Refactoring (#134)
- The implementations of the SSIM/MS-SSIM and BRISQUE metrics were optimised for better readability and utility;
- The implementations were compared with available TensorFlow and MATLAB implementation on real images using new tests;
- Fixed huge memory consumption during SSIM/MS-SSIM testing (#126);
- Other tests were refactored to improve readability and coverage. It allows flexible testing on all available devices (
cpu
and/orgpu
) depending on the workstation for deployment.