I have an image classification problem where I need to resize my images and I want to try padding with zeros. Based on my read of the forums and docs, I thought the following would work:
tfms = get_transforms()
tr_val_databunch = ImageDataBunch.from_df(path='.',
df = train,
label_col = label_colname,
valid_pct = 0.20,
size = 320,
resize_method = ResizeMethod.PAD,
padding_method = 'zeros',
bs = 20,
ds_tfms = tfms).normalize()
But I’m getting the error TypeError: create_from_ll() got an unexpected keyword argument 'padding_method'
.
I also get an error if I pass padding_method = 'zeros'
in get_transforms()
.
What is the correct way to set the padding mode to ‘zeros’ for all images which are resized to size = sz
(meaning all images in the databunch)?
Thanks!
Max