Custom Data Augmentation
For Image Processing

What is Data Augmentation and Why it is needed?
Data Augmentation is a technique used to generate new samples from the existing data by using simple geometric transforms such as:
- Rotations
- Flips (Horizontal and Vertical)
- Shifts (Width and Height)
- Brightness
- Zoom
- Noise
Why do Data Augmentation?
If you have a small dataset and want to train your model, then the model becomes overfit. So to increase your model performance, we need a proper dataset so that we can train our model. There are two main reasons to use Data Augmentation such as:
Reason 1: Imbalanced classes
Reason 2: Make the model more Robust

SMOTE (Synthetic Minority Over-sampling TEchnique) is a tricky method to solve the class-skew problem.

Required Libraries:

Code for Original printing Image:

Code for Image Resize:

Code for Horizontal Flip:

Code for Vertical Flip:

Code for Rotation:

Code for Adding Noise:

There are many techniques like Edge Henced, De-texturized, De-colorized, Edge Enhanced, and so many in the Data Augmentations. And also, there are other frameworks like Keras and Tensorflow to do Data Augmentations but, what I used is essential.