Skip to main content

No project description provided

Project description

pytorch-randaugment

Unofficial PyTorch Reimplementation of AutoAugment and RandAugment.

Code taken from https://github.com/DeepVoltaire/AutoAugment and https://github.com/jizongFox/uda

How to install:

pip install randaugment

How to use:

from autoaugment import RandAugment, ImageNetPolicy
data = ImageFolder(rootdir, transform=transforms.Compose(
                        [
                            transforms.RandomCrop(32, padding=4, fill=128), # fill parameter needs torchvision installed from source
                            transforms.RandomHorizontalFlip(), 
                            RandAugment(),
                            #ImageNetPolicy(),
                            transforms.ToTensor(), 
                            Cutout(size=16), # (https://github.com/uoguelph-mlrg/Cutout/blob/master/util/cutout.py)
                            transforms.Normalize(...)
                        ])
)
loader = DataLoader(data, ...)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for randaugment, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size randaugment-1.0.2-py3-none-any.whl (6.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size randaugment-1.0.2.tar.gz (5.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page