Skip to main content

Measures and metrics for image2image tasks. PyTorch.

Project description

PhotoSynthesis.Metrics

CI flake-8 style check CI testing
MIT License LinkedIn PyPI version

Table of Contents

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.

Prerequisites

Installation

Clone the repo:

$ git clone https://github.com/photosynthesis-team/photosynthesis.metrics.git

Wheel and pip installations will be added later.

Usage

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()

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. 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.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Sergey Kastryulin - @snk4tr - snk4tr@gmail.com

Project Link: https://github.com/photosynthesis-team/photosynthesis.metrics
PhotoSynthesis Team: https://github.com/photosynthesis-team

Other projects by PhotoSynthesis Team:
PhotoSynthesis.Models: https://github.com/photosynthesis-team/photosynthesis.models

Acknowledgements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for photosynthesis-metrics, version 0.0.2
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 hashes
Filename, size photosynthesis_metrics-0.0.2.tar.gz (13.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page