yuanming-hu / exposure

Learning infinite-resolution image processing with GAN and RL from unpaired image datasets, using a differentiable photo editing model.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Differentiable hsv to rgb

sjmoran opened this issue · comments

commented

Hi, thank you for your great work and for making the code available. I notice you use the Tensorflow hsv_to_rbg and rgb_to_hsv functions (class SaturationPlusFilter(Filter)) for adjusting the saturation of the images. However, function hsv_to_rgb does not appear differentiable due to the rounding function. How do you deal with this in your method?

Hi,

Sorry for the delayed reply. We don't actually need that to be differentiable - the output is a linear interpolation between the input and a fully saturated image - and we only need it to be differentiable w.r.t. the interpolation coefficient. (https://github.com/yuanming-hu/exposure/blob/master/filters.py#L498)