Can someone provide more clarity about the meaning of the ColorJitter arguments? I understand that we can separately control (or disable) brightness, contrast, saturation and hue modifications, but how do the actual values entered relate to results? The documentation says “brightness_factor is chosen uniformly from [max(0, 1 - brightness), 1 + brightness]” but how is the brightness_factor applied to modify the image values?
Suppose I wanted to vary brightness within a range of +/- 25% of the existing values. What would be appropriate argument values for brightness?
So is the brightness factor simply applied multiplicatively to the image data value?
What about contrast? I understand the sampling issue; what I am trying to figure out is how the value that is randomly selected is applied to modify the relevant image property. I’d expect this to be different for the four different properties. In particular, it seems that changing contrast would require a histogram remapping, not just a fixed modification of each value.
Hello,
I want to do contrast and brightness adjustment with the pytorch color jitter. I want the implementation the way you explained it (brightness should be an additive factor and contrast a multiplicative factor.
However I don’t think it is like that in the pytoch color jitter, I did some test :
You are setting the brightness to zero, so a black image would be expected. ColorJitter with a brightness argument is calling into adjust_brightness, which is blending two images, the input image and a zero image (black). The brightness factor would be zero, which is used as ratio in _blend.
As you can see, you have an additive transformation as: