We often use linear color transformation (like most implementations of contrast, brightness jitter). These transformations are potentially quickly learned by a neural network, especially networks with normalization layers. This repository implements non-linear color augmentations (like gamma-correction and the S-curves in Photoshop).
I cannot claim any benefits as I didn't perform any testing experiments yet.
Randomly generated example curves showing how the RGB channels would get mapped to different values.
This repository is a PyTorch implementation of https://github.com/deepmind/multidim-image-augmentation
Example (see notebook)
Image taken from the GlaS dataset.
from coloraug import NonLinearColorJitter
transform = NonLinearColorJitter()
augmented_image = transform(image)
Or inside a torchvision.transform:
transforms.Compose([
transforms.CenterCrop(10),
NonLinearColorJitter(),
transforms.ToTensor(),
])