For data augmentation and better models' generalization
from fastai.vision import *
def get_ex(): return open_image('/home/condor/0039.jpeg')
get_ex()
def plots_f(rows, cols, width, height, **kwargs):
[get_ex().apply_tfms(tfms[0], **kwargs).show(ax=ax) for i,ax in enumerate(plt.subplots(
rows,cols,figsize=(width,height))[1].flatten())]
tfms = get_transforms(flip_vert=True,max_rotate=15,do_flip=False)
tfms[0]
plots_f(2,2,16,16)