/YoloLabelsAugmentation

Script to augment yolo annotations

Primary LanguagePython

YoloLabelsAugmentation

Scripts and samples to augment yolo annotations: txt annotations and images to be augmented must be located inside "dataset" folder, as described in the example. Augmented will be saved in "output". In my project I needed rotations, change in contrast and blurring.

Basic Example

Suppose you have to develop a Glenn Danzig detector, and you have to augment annotations like this:

alt text

after running the script you will find in output directory images and annotations like this:

90 degree rotation:

alt text

180 degree rotation:

alt text

270 degree rotation:

alt text

All images are slightly blurred and have randomly changed contrast, but you can simply implement your own augmentations. If images inside dataset directory have no txt annotations will be considered background and augmented without annotations.