Measures and metrics for image2image tasks. PyTorch.
Table of Contents
- About the Project
About The Project
The project is intended to become a easy to use yet extensive library with metrics for various image-to-image tasks like denoising, super-resolution, image generation etc.
- PyTorch 1.3+ :white_check_mark:
Clone the repo:
$ git clone https://github.com/photosynthesis-team/photosynthesis.metrics.git
Wheel and pip installations will be added later.
To compute measure or metric, for instance SSIM index, use lower case function from the library:
import torch from photosynthesis_metrics import ssim prediction = torch.rand(3, 3, 256, 256) target = torch.rand(3, 3, 256, 256) ssim_index = ssim(prediction, target, data_range=1.)
In order to use SSIM as a loss function, use corresponding PyTorch module:
import torch from photosynthesis_metrics import SSIMLoss loss = SSIMLoss() prediction = torch.rand(3, 3, 256, 256, requires_grad=True) target = torch.rand(3, 3, 256, 256) output = loss(prediction, target, data_range=1.) output.backward()
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature)
- Commit your Changes (
git commit -m 'Add some AmazingFeature')
- Push to the Branch (
git push origin feature/AmazingFeature)
- Open a Pull Request
Please follow Google Python style guide as a guidance on your code style decisions. The code will be checked with flake-8 linter during the CI pipeline. Use commitizen commit style where possible for simplification of understanding of performed changes.
Distributed under the MIT License. See
LICENSE for more information.
Sergey Kastryulin - @snk4tr -
Project Link: https://github.com/photosynthesis-team/photosynthesis.metrics
PhotoSynthesis Team: https://github.com/photosynthesis-team
Other projects by PhotoSynthesis Team:
- Pavel Parunin - @PavelParunin - idea proposal and development
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size photosynthesis_metrics-0.0.2-py3-none-any.whl (13.4 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size photosynthesis_metrics-0.0.2.tar.gz (13.4 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for photosynthesis_metrics-0.0.2-py3-none-any.whl
Hashes for photosynthesis_metrics-0.0.2.tar.gz