A simple GPU-based image-enhancing tool for YOLO-labeled images written in python.
The image-enhancer are called Augmenters and they all implement the abstract class Augmenter.
Each augmenter has:
- an
__init__constructor - a
transformmethod which takes in aPILImage and returns the transformed image as a NumPy array - a
get_transformed_YOLO_valuesmethod which takes the original YOLO label values of an image and returns the transformed ones - a
get_augmenter_signaturemethod which returns a string containing the abbreviated name of the augmenter
The base Augmenter abstract class also defines some utility methods to convert images to NumPy arrays and viceversa.
The currently available augmenters are:
AugmenterBlurAugmenterContrastBrightnessAugmenterGrayscaleAugmenterHFlipAugmenterVFlipAugmenterHShearAugmenterVShearAugmenterNoiseAugmenterRotateAugmenterScaleAugmenterSharpAugmenterTraslate
The project also contains the ImageManager and the LabelManager abstract classes which extend the FileManager abstract class and that define many files/images/YOLO labels manipulation methods to smooth out the file-system related part of the data-augmentation/image-enhancement.
The available implementations of these classes are called:
ImageManagerImplLabelManagerImpl
A high level class for directly transforming images and their labels is also provided and it's called WorkerImpl which is based upon the Worker abstrac class and exposes the transform_images_and_YOLO_labels method.
Testers can be found in the Testers directory.
Cristian Davide Conte
Simone Morelli