anomalib
anomalib copied to clipboard
[Task]: How to perform data enhancement in custom datasets
What is the motivation for this task?
data enhancement in custom datasets
Describe the solution you'd like
Some effective data enhancement methods such as UDA can be performed
Additional context
NOPE
You can try custom transforms. Although most anomaly detection papers do not use transforms at all because more robust models can be actually worse at detecting anomalies.
just like this
eval_transform = Compose(
[
v2.Resize((256, 256), antialias=True),
v2.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
],
)
datamodule = Folder(
name= 'bottle',
# root=dataset_root,
normal_dir="good",
abnormal_dir="test",
normal_split_ratio=0,
mask_dir=None,
# mask_dir=None,
train_batch_size = 1,
# eval_batch_size=1,
num_workers=8,
train_transform = eval_transform,
eval_transform = eval_transform,
test_split_mode=TestSplitMode.NONE,
task="segmentation",
)