Skip to content

How to pre-process images during training? #2332

Closed Answered by samet-akcay
haimat asked this question in Q&A
Discussion options

You must be logged in to vote

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, ...)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@haimat
Comment options

Answer selected by samet-akcay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants