How would you denoise an image prior to multi-classification problem similar to this in opencv:
I know I can do this offline and save the images, I’m asking how it can be done as part of the pipeline?
You would create a transform something like this.
def permute_rows(img: Tensor, k=5):
"permute `k` rows on image or bathc of images"
out_img = img.clone()
n = img.shape[-2]
rows = L(random.choices(range_of(n), k=k))
idxs = rows.sorted()
out_img[..., idxs, :] = img[..., rows, :] #batch compatible
and then as a Transform:
"Permute `k` rows on image, all batch identically"
Here you have a nice tuto on how to create your own Transform
This file has been truncated.
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab"
Thanks all for the help, i added opencv but it slowed down my training by a lot. Now I found this interesting project
https://github.com/cgnorthcutt/cleanlab will try to see if it works with fastai, i assume it will since the model is a pytorch.