AUTOAUGMENT#
Classes#
- class utils.autoaugment.CIFAR10Policy(fillcolor=(128, 128, 128))[source]#
Bases:
object
Randomly choose one of the best 25 Sub-policies on CIFAR10.
Example: >>> policy = CIFAR10Policy() >>> transformed = policy(image)
Example as a PyTorch Transform: >>> transform=transforms.Compose([ >>> transforms.Resize(256), >>> CIFAR10Policy(), >>> transforms.ToTensor()])
- class utils.autoaugment.ImageNetPolicy(fillcolor=(128, 128, 128))[source]#
Bases:
object
Randomly choose one of the best 24 Sub-policies on ImageNet.
Example: >>> policy = ImageNetPolicy() >>> transformed = policy(image)
Example as a PyTorch Transform: >>> transform=transforms.Compose([ >>> transforms.Resize(256), >>> ImageNetPolicy(), >>> transforms.ToTensor()])
- class utils.autoaugment.RandomErasing(scale=(0.02, 0.33), ratio=(0.3, 3.3), value=0.0, same_on_batch=False, p=0.5, keepdim=False)[source]#
Bases:
IntensityAugmentationBase2D
- class utils.autoaugment.SVHNPolicy(fillcolor=(128, 128, 128))[source]#
Bases:
object
Randomly choose one of the best 25 Sub-policies on SVHN.
Example: >>> policy = SVHNPolicy() >>> transformed = policy(image)
Example as a PyTorch Transform: >>> transform=transforms.Compose([ >>> transforms.Resize(256), >>> SVHNPolicy(), >>> transforms.ToTensor()])