Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source and target reverse #11

Open
XinArkh opened this issue Dec 15, 2020 · 1 comment
Open

source and target reverse #11

XinArkh opened this issue Dec 15, 2020 · 1 comment

Comments

@XinArkh
Copy link

XinArkh commented Dec 15, 2020

I believe the original paper means that we want the source image to mimic the color performance of the target image, and output a transferred source image. However, in your implementation, the target image is instead transferred. This is what makes the following formulas inconsistent with the paper.

l -= lMeanTar
a -= aMeanTar
b -= bMeanTar
if preserve_paper:
# scale by the standard deviations using paper proposed factor
l = (lStdTar / lStdSrc) * l
a = (aStdTar / aStdSrc) * a
b = (bStdTar / bStdSrc) * b
else:
# scale by the standard deviations using reciprocal of paper proposed factor
l = (lStdSrc / lStdTar) * l
a = (aStdSrc / aStdTar) * a
b = (bStdSrc / bStdTar) * b
# add in the source mean
l += lMeanSrc
a += aMeanSrc
b += bMeanSrc

@InnovArul
Copy link

As I understand from the paper, the else case (i.e., preserve_paper = False) is actually the same as the paper. Am I right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants