augmixations
Some augmentations that I hasn't found in other repositories and libraries.
For more details you can see the WIKI page of this repo.
Current augmentations:
- Cutmix (Colab Example, Advanced Usage)
- Cutout (Colab Example)
- Mixup (Colab Example)
Cutmix
Dependencies
- numpy>=1.11.1
Getting Started
pip install augmixations
Example with default parameters
Import:
from augmixations import Cutmix, Cutout, Mixup
Using Cutmix:
# bg_img - The image into which a rectangle will be inserted
# fg_img - The image from which a random rectangle will be cut
cutmix = Cutmix()
img, boxes, labels = cutmix(bg_img, bg_boxes, bg_labels,
fg_img, fg_boxes, fg_labels)
Done.
Using Cutout:
cutout = Cutout()
new_img, new_boxes, new_labels = cutmix(img, boxes, labels)
Done.
Using Mixup:
mixup = Mixup()
image, boxes, labels = mixup(first_img, first_boxes, first_labels,
second_img, second_boxes, second_labels)
Done.
Advansed usage
You can pass special configs to the cutmix function to override its behavior.
Cutmix Advanced Usage
Contacts
Issues should be raised directly in the repository. For professional support and recommendations please welcomedenk@gmail.com.