-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
86 lines (71 loc) · 1.91 KB
/
config.yml
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
model:
arch: "UNetResnet" # DeepLabX, DeepLab, UNetResnet, UNet
num_classes: 11
in_channels: 3
backbone: "resnet50" # resnet18, resnet34, resnet50, resnet101
output_stride: 16
freeze_bn: False
freeze_backbone: False
data:
folder_structure: "unified" # separate, unified
dataset: "wood_defect"
input_size: 256
augmentations:
ShiftScaleRotate:
shift_limit: 0.1
scale_limit: 0.1
rotate_limit: 30
probability: 0.2
RGBShift:
r_shift_limit: 25
g_shift_limit: 25
b_shift_limit: 25
probability: 0.2
RandomBrightnessContrast:
brightness_limit: 0.3
contrast_limit: 0.3
probability: 0.2
training:
optimizer: "AdamW"
criterion: 'CrossEntropyDiceLoss' # CrossEntropyLoss2d | DiceLoss | FocalLoss | CrossEntropyDiceLoss
epochs: 500
batch_size: 16
learning_rate: 0.0001
device: "cuda"
num_workers: 6
inference:
device: "cuda"
input_dir: "test_input"
output_dir: "test_output"
# Guidance for models' configuration
# model = UNet(
# num_classes=cfg.model.num_classes,
# in_channels=3,
# freeze_bn=cfg.model.freeze_bn
# )
# model = UNetResnet(
# num_classes=cfg.model.num_classes,
# in_channels=3,
# backbone=cfg.model.backbone,
# pretrained=True,
# freeze_bn=cfg.model.freeze_bn,
# freeze_backbone=cfg.model.freeze_backbone
# )
# model = DeepLab(
# num_classes=cfg.model.num_classes,
# in_channels=3,
# backbone=cfg.model.backbone,
# pretrained=True,
# output_stride=cfg.model.output_stride,
# freeze_bn=cfg.model.freeze_bn,
# freeze_backbone=cfg.model.freeze_backbone
# )
# model = DeepLabX(
# num_classes=cfg.model.num_classes,
# in_channels=3,
# backbone=cfg.model.backbone,
# pretrained=True,
# output_stride=cfg.model.output_stride,
# freeze_bn=cfg.model.freeze_bn,
# freeze_backbone=cfg.model.freeze_backbone
# )