Create images with randomized size?
Hi @mdbloice,
thanks for the Augmentor code! I am creating a pipeline, that has to create eventually images with randomized size, for example:
I have a single ground truth image of size 100pixel x 100pixel and after running the pipeline I would like to have images scaled with a RANDOM SCALE in the interval [1,2], so that output images have sizes 173x173, 189x189, 114x114, 133x133 etc. The closest to this functionallity I have found was crop_random, when the argument randomise_percentage_area is set to "True". But in this case percentage_area is an UPPER bound, while I need it to be a LOWER bound. Of course, for creating N output images I could run N times the pipeline, every time changing the scale factor, but I hope there is a handier alternative.
Therefore my question:
1.) is there a function in Augmentor that allows for output images with randomized size/scaling?
2.) alternatively, can percentage_area be set to be the LOWER limit, instead of the upper, when randomise_percentage_area=True?
Thanks for an answer!
Hi @Nestak2, thanks for making the issue and sorry for the delay in replying, I have not had much time for Augmentor recently.
Yeah, that would be a good feature to have. Right now I cannot think of a way you might be able to do what you are asking with the current operations as they exist now...
However, I can add this functionality in the next version, I think it would be useful. Until then though, I can't really help out any more.
If I can think of a way to do what you are asking as is, I'll post it here.
Thanks for replying! I actually managed to make my own pipeline out of opencv functions. Though it might be useful for others in the future to have the functionality in Augmentor.
Yeah OK good that you sorted it, thanks for opening the issue I will add it as a feature when I get the chance.
Hi, I would like also to have functionality to set lower and upper bound like in torchvision as torchvision.transforms.RandomResizedCrop(size, scale=(0.08, 1.0), ratio=(0.75, 1.3333333333333333), interpolation=2). Thanks for the great library anyway.