Open MFlossmann opened 6 years ago
@felipecode I would also like to know these parameter.
Here it goes:
using IMGAUG
st = lambda aug: iaa.Sometimes(0.4, aug)
oc = lambda aug: iaa.Sometimes(0.3, aug)
rl = lambda aug: iaa.Sometimes(0.09, aug)
self.augment = iaa.Sequential([
rl(iaa.GaussianBlur((0, 1.5))), # blur images with a sigma between 0 and 1.5
rl(iaa.AdditiveGaussianNoise(loc=0, scale=(0.0, 0.05), per_channel=0.5)), # add gaussian noise to images
oc(iaa.Dropout((0.0, 0.10), per_channel=0.5)), # randomly remove up to X% of the pixels
oc(iaa.CoarseDropout((0.0, 0.10), size_percent=(0.08, 0.2), per_channel=0.5)),
# randomly remove up to X% of the pixels
oc(iaa.Add((-40, 40), per_channel=0.5)), # change brightness of images (by -X to Y of original value)
st(iaa.Multiply((0.10, 2.5), per_channel=0.2)), # change brightness of images (X-Y% of original value)
rl(iaa.ContrastNormalization((0.5, 1.5), per_channel=0.5)), # improve or worsen the contrast
rl(iaa.Grayscale((0.0, 1))), # put grayscale
],
random_order=True # do all of the above in random order
)
Hello @felipecode
Can you please explain what is st, oc and rl? What I can infer is it is sometimes augmenter. But then why we are using it in three different ways?
Hey @pri2si17-1997 It means the frequency the augmentation is applyed.
St means for 40% of the images ( sometimes) Oc is for 30% of the images ( ocasionally) Rl is for 9& of the images ( rare)
Here it goes:
using IMGAUG
st = lambda aug: iaa.Sometimes(0.4, aug) oc = lambda aug: iaa.Sometimes(0.3, aug) rl = lambda aug: iaa.Sometimes(0.09, aug) self.augment = iaa.Sequential([ rl(iaa.GaussianBlur((0, 1.5))), # blur images with a sigma between 0 and 1.5 rl(iaa.AdditiveGaussianNoise(loc=0, scale=(0.0, 0.05), per_channel=0.5)), # add gaussian noise to images oc(iaa.Dropout((0.0, 0.10), per_channel=0.5)), # randomly remove up to X% of the pixels oc(iaa.CoarseDropout((0.0, 0.10), size_percent=(0.08, 0.2), per_channel=0.5)), # randomly remove up to X% of the pixels oc(iaa.Add((-40, 40), per_channel=0.5)), # change brightness of images (by -X to Y of original value) st(iaa.Multiply((0.10, 2.5), per_channel=0.2)), # change brightness of images (X-Y% of original value) rl(iaa.ContrastNormalization((0.5, 1.5), per_channel=0.5)), # improve or worsen the contrast rl(iaa.Grayscale((0.0, 1))), # put grayscale ], random_order=True # do all of the above in random order )
Does this code require to normalize input image?
Hello! In the paper (Section 4, Subsection D) Data augmentation), you mention Data Augmentation with randomly sampled magnitudes. Unfortunately, random magnitudes of the transformations introduces quite a lot of hyperparameters to tune when trying to reproduce the paper.
Could you please supply the extends of the magnitudes of the augmentations you used in the paper as a baseline for our reproduction work?
I'd be specifically interested in the Minima/Maxima of the distributions concerning:
Als well as the Kernel Size of the gaussian Blur.
Thank you in advance.