Hi there, are there any good guides/tutorial on how to add new data augs that is compatible with the fastai data aug RandTransform class? I need to add some noise to my images, and I’ve only come across pytorch implementations but not fastai. Thanks.
Tried the following but it’s erroring out in other parts of the fastai aug pipeline:
class AddNoise(RandTransform):
def __init__(self, mean=0., std=1.):
self.std = std
self.mean = mean
def encodes(self, x:(Image.Image,TensorBBox,TensorPoint)):
return x + torch.randn(x.size()) * self.std + self.mean
+1 for this request. And not only for extensions of RandTransform. Would be nice to have tutorials explaining how to create custom fastai transforms in general.
As you see the functions above are identical. But I get way different results when I use AddJitter(p=1), which should be the same as AddFixedJitter. I think it’s something on the validation transforms being applied or not applied… but I can’t figure out the exactly what’s going on.