Here I showed augmentation of images with and without bounding boxes using PyTorch, Tensorflow, Albumentations and Imgaug.
You can find bbox augmentation outputs in imgaug and albumentations folders. I looked bbox augmentation on tensorflow and PyTorch but I couldn't find any. May be there is not but I am not sure. I think someone who wants to create CV models should use PyTorch+Albumentations. Also, I have to say that you shouldn't use that much of augmentation. I set the probabilities of augmentations relatively high because of the visualization purpose of this repo. If you use that much augmentation your model will converge very slow. Furthermore, I am not sure if it will become more robust or worser. ** Augmentation is a very effective method to make your method more robust. As a matter of fact if you try to create models that Works quite well you should consider to use data augmentation.
First install all of the requirements.
pip install -r requirements.txt
"Any fool can know. The point is to understand." Albert Einstein
Actually top left one the original one but I set titles of all images according to their augmentation. I automated the process and I told myself if I set probability 0 for fliplr it will return original image. Sorry I am too lazy to code if else for naming.
Same code but different output because of the probabilities.
Tensorflow has tf.image function that can be used for augmentations.
On training you can consider these images as epochs. As you can see, although you have same original image you will end up with completely different images.
On training you can consider these images as epochs. As you can see, although you have same original image you will end up with completely different images.
You can add augmentation to your pipeline easily with albumentations. Actually I decided to write new library because of not-adequate built-in functions for bbox augmentation before I met albumentations. You can use it in dataloader of PyTorch, in generators of Tensorflow and also can combine with other augmentations from other frameworks. Thanks albumentations you nailed it !