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

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.

Source Distribution

photosynthesis_metrics-0.0.1.tar.gz (11.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page