How to perform data augmentations in custom datasets #2317
-
What is the motivation for this task?data enhancement in custom datasets Describe the solution you'd likeSome effective data enhancement methods such as UDA can be performed Additional contextNOPE |
Beta Was this translation helpful? Give feedback.
Answered by
abc-125
Aug 1, 2024
Replies: 2 comments
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
samet-akcay
-
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",
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.