Hello,
I am working on Object Detection task.
How can I add Normalization from stats to DataBlock batch_tfms?
If I use:
mean = [0.485, 0.456, 0.406]
std = [0.229, 0.224, 0.225]
coco = DataBlock(blocks=(ImageBlock, BBoxBlock, BBoxLblBlock),
get_items=get_image_files,
splitter=RandomSplitter(valid_pct=0.0),
get_y=[lambda o: img2bbox[o.name][0], lambda o: img2bbox[o.name][1]],
item_tfms=Resize(TEMP_figsize),
batch_tfms=[IntToFloatTensor(), Normalize.from_stats(mean,std), aug_transforms()],
n_inp=1)
I will get a warning:
Could not do one pass in your dataloader, there is something wrong in it
And error:
‘list’ object is not callable
How to add normalization properly, as I do not see it in default batch_tfms?
Thank you!