aleju / imgaug

Image augmentation for machine learning experiments.
http://imgaug.readthedocs.io
MIT License
14.43k stars 2.44k forks source link

Add Probability Parameter in RandAugment for flips #808

Open OUStudent opened 2 years ago

OUStudent commented 2 years ago

In the RandAug class, horizontal flips and inversions are always applied to images with 50% before applying the (N, M) transformations. Can you add probability parameters for each of these so that we can change these probabilities? For example, I want to apply RandAug for MNIST, but inverting the digits is intuitively incorrect, flipping a 6 makes it a 9, and flipping a 9 makes it a 6. Because of this implementation I am unable to apply RandAug effectively.