Thanks for the links. I am stuck on the transforms part. I have the function ready, which takes in an Image
object and then do some transforms on the data and then returns another Image
object. I have changed the original transforms array like this-
tfms = vision.get_transforms(flip_vert=False)
tfms = [[clahe_simplewb_tfms]+tfms[0], [clahe_simplewb_tfms]+tfms[1]]
data = (
vision.ImageList.from_df(train_labels, path, folder="train")
.split_by_rand_pct(seed=1995)
.label_from_df(cols="category_id")
.transform(tfms=tfms, size=size)
.databunch(bs=bs)
.normalize(vision.imagenet_stats)
)
The function clahe_simplewb_tfms
is my transformation function. I am getting the following error (stacktrace is incomplete)-
/opt/anaconda3/lib/python3.7/site-packages/fastai/data_block.py in _check_kwargs(ds, tfms, **kwargs)
570 try: x.apply_tfms(tfms, **kwargs)
571 except Exception as e:
--> 572 raise Exception(f"It's not possible to apply those transforms to your dataset:\n {e}")
573
574 class LabelList(Dataset):
Exception: It's not possible to apply those transforms to your dataset:
'function' object has no attribute 'tfm'
When I am looking at your code, I can’t see any tfm
attribute defined. Do you know what’s the issue here?