Spaces:
Running
Running
File size: 2,244 Bytes
c4c7cee |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
_target_: data.augmentation.ImageAugmentation
names: "standard_augmentation,geometric_augmentation,clip_transform"
# always apply clip_transform at the end
clip_transform:
_target_: torchvision.transforms.Compose
transforms:
- _target_: torchvision.transforms.Resize
size: 224
interpolation: 3
antialias: true
- _target_: torchvision.transforms.CenterCrop
size: 224
- _target_: torchvision.transforms.ToTensor
- _target_: torchvision.transforms.Normalize
mean: [0.48145466, 0.4578275, 0.40821073]
std: [0.26862954, 0.26130258, 0.27577711]
standard_augmentation:
_target_: data.augmentation.StandardAugmentation
# by default, we all augmentation methods
names: "brightness,contrast,sharpness,color,blur,gaussian_noise"
# random PIL brigtness
brightness:
_target_: data.augmentation.PillowBrightness
p: 0.2
factor_interval: [0.5, 1.5]
# random PIL contrast
contrast:
_target_: data.augmentation.PillowContrast
p: 0.2
factor_interval: [0.3, 3]
# random PIL sharpness
sharpness:
_target_: data.augmentation.PillowSharpness
p: 0.2
factor_interval: [0.5, 30.0]
# random PIL color
color:
_target_: data.augmentation.PillowColor
p: 0.2
factor_interval: [0.0, 2.0]
# random PIL blur
blur:
_target_: data.augmentation.PillowBlur
p: 0.2
factor_interval: [1, 2]
# random numpy gaussian noise
gaussian_noise:
_target_: data.augmentation.NumpyGaussianNoise
p: 0.2
factor_interval: [0.1, 0.04]
geometric_augmentation:
_target_: data.augmentation.GeometricAugmentation
# by default, we all augmentation methods
names: "random_rotation,random_resized_crop,random_horizontal_flip"
# random rotation
random_rotation:
_target_: torchvision.transforms.RandomRotation
degrees: [-15, 15]
# random crop
random_resized_crop:
_target_: torchvision.transforms.RandomResizedCrop
scale: [0.5, 1.0]
ratio: [0.9, 1.1]
size: 224
# random horizontal flip
random_horizontal_flip:
_target_: torchvision.transforms.RandomHorizontalFlip
p: 0.5
# random vertical flip
random_vertical_flip:
_target_: torchvision.transforms.RandomVerticalFlip
p: 0.5
|