mdbloice / Augmentor

Image augmentation library in Python for machine learning.
https://augmentor.readthedocs.io/en/stable
MIT License
5.08k stars 866 forks source link

Support all PIL resampling filters for resize operation #180

Open rstml opened 5 years ago

rstml commented 5 years ago

Trying to set resize resampling filter to LANCZOS throws an error:

p.resize(probability=1.0, width=img_size, height=img_size, resample_filter="LANCZOS")
...

ValueError: The save_filter argument must be one of ['NEAREST', 'BICUBIC', 'ANTIALIAS', 'BILINEAR'].

Latest PIL supports much more than just those listed above. Would be great to support all of those: https://pillow.readthedocs.io/en/stable/handbook/concepts.html?highlight=lanczos#filters