0% found this document useful (0 votes)
8 views

Data Augmentation

Data augmentation techniques are used to increase the amount and diversity of data provided during training. This helps neural networks become more robust by exposing them to different transformations of existing images like flipping, cropping, and zooming. For example, if a CNN only has 1000 cat images, data augmentation can apply transformations to these to help the model better recognize cats despite variations in the images.

Uploaded by

thesurajzaware
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Data Augmentation

Data augmentation techniques are used to increase the amount and diversity of data provided during training. This helps neural networks become more robust by exposing them to different transformations of existing images like flipping, cropping, and zooming. For example, if a CNN only has 1000 cat images, data augmentation can apply transformations to these to help the model better recognize cats despite variations in the images.

Uploaded by

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

the accuracy or prediction of neural network based on amount and dversity of data

we provide while training.


when we give input to cnn it produce output , eg we provide image of dog or cat
then it recognizes it is cat or dog.

but with the data augmentation we can transform image into different different
images .

we can flip image , horizontal shifting , vertical shifting , zoom in , zoom out
etc.

output remain same but we can provide different different transformations to


images.

but main question arises what is the use of data augmentation .

suppose we are developing a cnn to recognize cat images . but we have only 1000 cat
images only . our cnn network can should recognize the cat from images that are
zoomed
, flipped , vertical etc. for that we use data augmentation. it apply multiple
transformations on images and help in training of our cnn module so that it
will become more robust . It will increase the accuracy of our model.

Some of the popular open-source python packages used for image augmentation
packages are Albumentations, Keras ImageDataGenerator, OpenCV, Skimage.

there are different methods of data augmentatation:

///////////////////////////////////////////////////////////////////////////////////
/////////////

Data augmentation in data analysis are techniques used to increase the amount of
data by adding slightly
modified copies of already existing data or newly created synthetic data from
existing data.

Geometric transformations, flipping, color modification, cropping, rotation,


noise injection and random erasing are used to augment image in deep learning.[1]

while you are working with deep learning data augmentation is must.

Your neural network is only as good as the data you feed it.

Where do we augment data in our ML pipeline?


The answer may seem quite obvious; we do augmentation before we feed the data to
the model right? Yes, but you have two options here.
One option is to perform all the necessary transformations beforehand, essentially
increasing the size of your dataset.
The other option is to perform these transformations on a mini-batch, just before
feeding it to your machine learning model.

The first option is known as offline augmentation. This method is preferred for
relatively smaller datasets, as you would end
up increasing the size of the dataset by a factor equal to the number of
transformations you perform (For example, by flipping all my images,
I would increase the size of my dataset by a factor of 2).

The second option is known as online augmentation, or augmentation on the fly. This
method is preferred for larger datasets,
as you can’t afford the explosive increase in size. Instead, you would perform
transformations on the mini-batches that you would
feed to your model. Some machine learning frameworks have support for online
augmentation, which can be accelerated on the GPU.
///////////////////////////////////////////////////////////////////////////////////
///////////
Conditional GANs to the rescue!
Without going into gory detail, conditional GANs can transform an image from one
domain to an image to another domain.
If you think it sounds too vague, it’s not; that’s literally how powerful this
neural network is! Below is an example of
conditional GANs used to transform photographs of summer sceneries to winter
sceneries.

The only downside of this method is that, the output tends to looks more artistic
rather than realistic. However, there
are certain advancements such as Deep Photo Style Transfer, shown below, that have
impressive results.

You might also like