README
Environment
- python 3.6.2
conda create -n Datasets python=3.6
- packages
pip install -r requirements.txt
How to run
There are two steps for image augmentation. The first step is applying shading effect by replacing background with gradient image
and adjusting intensity of foreground
. The second step is applying common augmentations, including perspective transform
, rotation
, Gaussian blur
and Gaussian noise
.
Applied augmentations:
- background replacement
- foreground adjustment
- perspective transform
- rotation
- Gaussian blur
- Gaussian noise
Run the codes by calling aug_image()
in augmentation.py
.
import cv2
from augmentation import aug_image
img_src = cv2.imread('./img_src.png')
img_out = aug_image(img_src)
Examples
Before | After |
---|---|