0% found this document useful (0 votes)
2 views20 pages

Data Augmentation

Data augmentation is a technique used to enhance model robustness by manipulating images to account for various appearances and noise. It includes methods like center crop, five crop, color jitter, and random rotation, among others. The document also discusses advanced techniques such as Auto Augment, RandAugment, CutMix, and Mixup for optimizing data augmentation in machine learning tasks.

Uploaded by

Cát Lăng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views20 pages

Data Augmentation

Data augmentation is a technique used to enhance model robustness by manipulating images to account for various appearances and noise. It includes methods like center crop, five crop, color jitter, and random rotation, among others. The document also discusses advanced techniques such as Auto Augment, RandAugment, CutMix, and Mixup for optimizing data augmentation in machine learning tasks.

Uploaded by

Cát Lăng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Data Augmentation

Get different versions of what you already have!


Achieve better performance without any extra data!
Breakthrough in Vision-based Self-Supervised Learning since 2020

https://ai.googleblog.com/2020/04/advancing-self-supervised-and-semi.html
What is Data Augmentation?
A method for regularization. It refers to manipulating your image for the purpose of making
the model robust against other possible appearance of the same image, since at test time the
same image can come in different forms (for example, a flipped dog). You also make it more
robust against noise. (You can also utilize it to increase the data)  more on that later

SimCLR: https://arxiv.org/pdf/2002.05709.pdf
Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS

Center Crop
crops the given image at the center

Crop size=30 Crop size=50 Crop size=100 Crop size = image size
Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS

Five Crop
crops the given image into four corners and the central crop

top left top right bottom left bottom right center


Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS

Color Jitter
randomly changes the brightness, saturation, and other properties of an image
Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS

Gaussian Blur
performs Gaussian blur transform on an image (convolves the image with a Gaussian filter)
Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS

Random Rotation
rotates an image with random angle
Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS

Random Crop
crops an image at a random location
Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS

Random Resized Crop


crops an image at a random location, and then resizes the crop to a given size
Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS

Random Equalize
randomly performs histogram equalization
Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS
Auto Augment
Automatically augments data based on a given auto-augmentation policy (Image-Net, CIFAR…etc)
A separate search space is first needed to find the optimal augmentations for a given dataset
Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS

Random Horizontal Flip


performs horizontal flip of an image, with a given probability

p=0.5
Data Augmentation Techniques
Adopted from PyTorch Tutorial: ILLUSTRATION OF TRANSFORMS
Cutout
randomly masking out square regions of input during training
Mixup
Jupyter Notebook

Real Image Random Image from the batch


Data Augmentation Techniques

CutMix
patches are cut and pasted among training images where the ground truth labels are also
mixed proportionally to the area of the patches
Data Augmentation Techniques
RandAugment
Solves the problem that AutoAugment has. RandAugment has a significantly reduced
search space which allows it to be trained on the target task with no need for a separate
search space.

N = 2, M = 9
See more at

https://pytorch.org/vision/stable/auto_examples/plot_transforms.
html#sphx-glr-auto-examples-plot-transforms-py
Data Augmentation in PyTorch
• https://stackoverflow.com/questions/51677788/data-augmentation-in-pytorch

You might also like