The ready-to-run image augmentation by using Albumentations which is designed to work with the COCO image format.
The program assumed that you have the image in the COCO format. Therefore, all you have to set up is config the create_augmentation.py parameters.
- augmentation is the Albumentations's Compose class to define an augmentation pipeline. You can adjust as you want, and you can read more about this topic here
- src is the source directory where the images are located.
- dst is the destination directory where the source and augmented images will be pasted.
- src_json is the source JSON file directory. It must be in the COCO format, if not it cannot be processed.
After config the file, you can run the code by using:
python create_augmentation.py
After the processing, you can find all the source images and the augmented images in the dst directory. The JSON file will be appended with the annotation after the augmentation. This code is currently performed with the image segmentation task, so if there are any bugs, please report them.