Piqa

Latest version: v1.3.2

Safety actively analyzes 623133 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.3.0

πŸ’₯ Breaking news

PIQA 1.3.0 drops its custom complex module in favor of `torch.complex`, which is stable since PyTorch 1.12. Accordingly, the support for torch <= 1.11 has been dropped.

✨ What's new

* New FrΓ©chet Inception Distance (FID) metric (8950f5e79ada4cb17688b05ec058a63c5acd4531)
* All metrics now support [PyTorch's tracing](https://pytorch.org/docs/stable/generated/torch.jit.trace.html) (d233ef892d3c33cda3dc1ccc374a7cdfce4199d5)
* The documentation has been refreshed and moved to [Read the Docs](https://piqa.readthedocs.io) (d233ef892d3c33cda3dc1ccc374a7cdfce4199d5, d670de1e63eb036447d525bf2d5cc6a094a645ce)
* New contributing guidelines (7ebd950f98c869842bc4bb3c1a1fd1030b387179)

πŸ› Bug fixes

* Fix NaNs in LPIPS (33) by ilpoli

**Full Changelog**: https://github.com/francois-rozet/piqa/compare/v1.2.2...v1.3.0

1.2.2

πŸ“ Documentation

The documentation has been refactored and is now generated using [Sphinx](https://www.sphinx-doc.org/) and [Furo](https://github.com/pradyunsg/furo). Check it out at [francois-rozet.github.io/piqa/](https://francois-rozet.github.io/piqa/).

⚑️ Improvements

* Replace `torch.linalg.norm` by `l2_norm` (48ec8c41f6207e02a317a9d30e504c0d19cd071d)
* New function to disable debugging (ffc07e0e901ff2775c76becf618e9eba931fea55)

πŸ› Bug fixes

* Fix `RuntimeError` while using `conv1d` for 2 or 3-d convolutions with PyTorch 1.11 (7a56439ca5b67df145650fa6688b8eb237a09ba6)

1.1.7

⬆️ Dependencies

PIQA 1.1.7 requires the `torch.fft` module released with PyTorch 1.8.0.

✨ Metrics

* `VSI` Visual Saliency-based Index (0125e904ff74c1339798a8b46b003d27184ff199)
* `FSIM` Feature Similarity (0125e904ff74c1339798a8b46b003d27184ff199)

⚑️ Improvements

* Make padding optional in `SSIM` (76415a95212c203225cd4eb9fbc8e437e38ebcd2)
* Make downsampling optional in `FSIM`, `GMSD`, `HaarPSI`, `MDSI` and `VSI` (9fedf9f11b1e0a0a499ccc54fac933c22f0c86e3)

πŸ› Bug fixes

* Fix JITting for `utils.complex` submodule (d098f4d00f183050267d6a55dcaf455e08d41405)

1.1.3

🚸 Type assertions

Object-oriented components (`PSNR`, `SSIM`, ...) now use type assertions to raise meaningful error messages. See the "Assert" section in the [README](README.md) for more information.

♻️ Refactor

In this release, the API has been heavily redesigned and simplified.

* The "user-friendly" functionals to compute the metrics were dropped in favor of object-oriented metrics (5994e349d4c140877e560b18c2a51307e61575fc)
* Importing `piqa` now directly gives access to the object-oriented metrics (5994e349d4c140877e560b18c2a51307e61575fc)

<table align="center">
<tr>
<th>v1.1.0</th>
<th>v1.1.3</th>
</tr>
<tr>
<td>

python
>>> from piqa import ssim
>>> criterion = ssim.SSIM()
>>> criterion(x, y)
tensor(...)


</td>
<td>

python
>>> import piqa
>>> criterion = piqa.SSIM()
>>> criterion(x, y)
tensor(...)


</td>
</tr>
</table>

* The `piqa.utils` module was divided in three sub-modules (5994e349d4c140877e560b18c2a51307e61575fc)
1. `piqa.utils.functional` regroups the convolution and kernel helpers
2. `piqa.utils.complex` is an API to manipulate "factice" complex tensors
3. `piqa.utils.color` handles the color-space conversions
* JITing is now an option which can be enabled/disabled (f46707040e98236f12ebf6df7eb93fc54b4bf380)
* Custom normalization functionals (`tensor_norm` & `normalize_tensor`) were dropped in favor of `torch.linalg.norm` (f7440076a27f8415dca1f067e3c6b49cd8924c2e)

1.1.0

PIQA now has an official [logo](logo.svg) and a [banner](banner.svg) πŸŽ‰

⚑️ Improvements

* Update core components to support PyTorch JIT (c8ac2c3c40c293a4e3a1aef52a3de1fcd47928fd)
* Optimize Gaussian blur with separable convolutions (c8ac2c3c40c293a4e3a1aef52a3de1fcd47928fd)
* Simplify some components (ba0733516d3542d8cebbdf8ecfb178ce440127bd, 0b5a85ed5fbf193b2c3fbcf7a295d88614d86585, 785b449c745a78842dbf9da22cb03654ab034c75)

πŸ› Bug fixes

* Fix `MDSI` automatic differentiation (f73b13c73fdd01caf319f5042acfcfb9aa36c0fa, c6d924d68af9d914d3a3cd26bbbd114496ad402c)

πŸ“ Documentation

* Add table of available metrics in [README](README.md)
* Refresh the full documentation (types, shapes, etc.)
* Add mathematical definitions in docstrings

⬆️ Dependencies

PIQA 1.1.0 requires PyTorch 1.7.0 or above.

1.0.7

✨ Metrics

* `MS-GMSD` Multi-Scale Gradient Magnitude Similarity Deviation (2364fbc25389076a813d884709350cf5a1c221d3)
* `HaarPSI` Haar Perceptual Similarity Index (3227b269a4de91619c9c83a3d8a1d20334ac6d39)

⚑️ Improvements

* Buffer convolution kernels in object-oriented metrics (e6179aeaa4d5a917079dbd9b008151b087007145)

πŸ› Bug Fixes

* Fix inaccurate `lpips.LPIPS` results (43ae9d763bb073f6c127950d9c42da3b57de4378)
* Fix `RuntimeError` in `mdsi.mdsi` on CUDA (0e890000c3cdf8da7a892ff962bc9f00097c0bdc)

Page 1 of 2

Β© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.