Spaces:
Runtime error
Runtime error
Niv Sardi
commited on
Commit
·
1415715
1
Parent(s):
d9777e0
tweak pipeline defaults
Browse filesSigned-off-by: Niv Sardi <[email protected]>
- python/pipelines.py +2 -2
python/pipelines.py
CHANGED
@@ -3,7 +3,7 @@ from imgaug import augmenters as iaa
|
|
3 |
|
4 |
# Sometimes(0.5, ...) applies the given augmenter in 50% of all cases,
|
5 |
# e.g. Sometimes(0.5, GaussianBlur(0.3)) would blur roughly every second image.
|
6 |
-
sometimes = lambda aug: iaa.Sometimes(0.
|
7 |
|
8 |
# Define our sequence of augmentation steps that will be applied to every image
|
9 |
# All augmenters with per_channel=0.5 will sample one value _per image_
|
@@ -53,7 +53,7 @@ HUGE = sometimes(iaa.Sequential(
|
|
53 |
iaa.Dropout((0.01, 0.1), per_channel=0.5), # randomly remove up to 10% of the pixels
|
54 |
iaa.CoarseDropout((0.03, 0.15), size_percent=(0.02, 0.05), per_channel=0.2),
|
55 |
]),
|
56 |
-
iaa.Invert(0.05, per_channel=True), # invert color channels
|
57 |
iaa.Add((-10, 10), per_channel=0.5), # change brightness of images (by -10 to 10 of original value)
|
58 |
iaa.AddToHueAndSaturation((-20, 20)), # change hue and saturation
|
59 |
# either change the brightness of the whole image (sometimes
|
|
|
3 |
|
4 |
# Sometimes(0.5, ...) applies the given augmenter in 50% of all cases,
|
5 |
# e.g. Sometimes(0.5, GaussianBlur(0.3)) would blur roughly every second image.
|
6 |
+
sometimes = lambda aug: iaa.Sometimes(0.2, aug)
|
7 |
|
8 |
# Define our sequence of augmentation steps that will be applied to every image
|
9 |
# All augmenters with per_channel=0.5 will sample one value _per image_
|
|
|
53 |
iaa.Dropout((0.01, 0.1), per_channel=0.5), # randomly remove up to 10% of the pixels
|
54 |
iaa.CoarseDropout((0.03, 0.15), size_percent=(0.02, 0.05), per_channel=0.2),
|
55 |
]),
|
56 |
+
# iaa.Invert(0.05, per_channel=True), # invert color channels
|
57 |
iaa.Add((-10, 10), per_channel=0.5), # change brightness of images (by -10 to 10 of original value)
|
58 |
iaa.AddToHueAndSaturation((-20, 20)), # change hue and saturation
|
59 |
# either change the brightness of the whole image (sometimes
|