How to pre-process images during training? #2332
-
I would like to blur my images before using them for training in Anomalib. |
Beta Was this translation helpful? Give feedback.
Answered by
samet-akcay
Oct 1, 2024
Replies: 1 comment 1 reply
-
Would something like this work? from torchvision import transforms
from anomalib.data import Visa
transform = transforms.Compose([
transforms.Resize((224, 224)), # Resize the image if needed
transforms.GaussianBlur(kernel_size=(5, 5), sigma=(0.1, 2.0)),
...
])
datamodule = Visa(..., transform=transform, ...) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
samet-akcay
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would something like this work?