-
Notifications
You must be signed in to change notification settings - Fork 435
/
stfpm.yaml
87 lines (83 loc) · 2.7 KB
/
stfpm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
model:
class_path: otx.algo.anomaly.stfpm.Stfpm
init_args:
layers: ["layer1", "layer2", "layer3"]
backbone: "resnet18"
optimizer:
class_path: torch.optim.SGD
init_args:
lr: 0.4
momentum: 0.9
dampening: 0
weight_decay: 0.001
engine:
task: ANOMALY_DETECTION
device: auto
callback_monitor: pixel_F1Score
data: ../_base_/data/torchvision_base.yaml
overrides:
precision: 32
max_epochs: 100
callbacks:
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
patience: 5
- class_path: otx.algo.callbacks.adaptive_train_scheduling.AdaptiveTrainScheduling
init_args:
max_interval: 1
data:
task: ANOMALY_DETECTION
config:
data_format: mvtec
train_subset:
batch_size: 32
num_workers: 4
transforms:
- class_path: otx.core.data.transform_libs.torchvision.ResizetoLongestEdge
init_args:
size: 256
antialias: True
- class_path: otx.core.data.transform_libs.torchvision.PadtoSquare
- class_path: torchvision.transforms.v2.ToDtype
init_args:
dtype: ${as_torch_dtype:torch.float32}
scale: False
- class_path: torchvision.transforms.v2.Normalize
init_args:
mean: [123.675, 116.28, 103.53]
std: [58.395, 57.12, 57.375]
val_subset:
batch_size: 32
num_workers: 4
subset_name: test
transforms:
- class_path: otx.core.data.transform_libs.torchvision.ResizetoLongestEdge
init_args:
size: 256
antialias: True
- class_path: otx.core.data.transform_libs.torchvision.PadtoSquare
- class_path: torchvision.transforms.v2.ToDtype
init_args:
dtype: ${as_torch_dtype:torch.float32}
scale: False
- class_path: torchvision.transforms.v2.Normalize
init_args:
mean: [123.675, 116.28, 103.53]
std: [58.395, 57.12, 57.375]
test_subset:
batch_size: 32
num_workers: 4
transforms:
- class_path: otx.core.data.transform_libs.torchvision.ResizetoLongestEdge
init_args:
size: 256
antialias: True
- class_path: otx.core.data.transform_libs.torchvision.PadtoSquare
- class_path: torchvision.transforms.v2.ToDtype
init_args:
dtype: ${as_torch_dtype:torch.float32}
scale: False
- class_path: torchvision.transforms.v2.Normalize
init_args:
mean: [123.675, 116.28, 103.53]
std: [58.395, 57.12, 57.375]