Skip to main content

pytorch implementation of histogram matching

Project description

pytorch-histogram-matching

Installation

pip install pytorch_histogram_matching

Usage

from pytorch_histogram_matching import Histogram_Matching

import torch
dst = torch.randint(0, 256, (8, 3, 512,512)).cuda() / 255.
ref = torch.randint(0, 256, (8, 3, 512,512)).cuda() / 255.

dst.requires_grad = True
ref.requires_grad = True

HM = Histogram_Matching(differentiable=True)
rst = HM(dst, ref)

Test

python test.py

img

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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