Files
zeekay dda5b2a367 restore the tree
The previous commit was meant to remove .github/workflows and removed
every tracked path instead — 892 files, the whole repo. This puts back
the 874 that were never in scope; the eighteen workflow files stay gone,
for the reasons that commit gives.

Content is byte-identical to 9d2aec9 outside .github/workflows.
2026-08-13 23:27:57 -07:00

25 lines
902 B
Plaintext

from anomalib.engine import Engine
# instantiate the datamodule without passing custom transforms
datamodule = MVTecAD()
# initially, the datamodule will not have any transforms defined
datamodule.train_transform is None
# True
engine = Engine()
engine.fit(model, datamodule=datamodule)
# after running fit, the engine will have injected the model's default transform into the datamodule
datamodule.train_transform
# Compose(
# Resize(size=[256, 256], interpolation=InterpolationMode.BILINEAR, antialias=True)
# CenterCrop(size=(224, 224))
# Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], inplace=False)
# )
datamodule.eval_transform
# Compose(
# Resize(size=[256, 256], interpolation=InterpolationMode.BILINEAR, antialias=True)
# CenterCrop(size=(224, 224))
# Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], inplace=False)
# )