forked from FinnBehrendt/node21-submit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig_effdet2_l.yaml
111 lines (101 loc) · 2.63 KB
/
config_effdet2_l.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
callbacks:
model_checkpoint:
_target_: pytorch_lightning.callbacks.model_checkpoint.ModelCheckpoint
monitor: "val/Competition_metric/" #"val/mean_auc"
save_top_k: 0
auto_insert_metric_name: False
save_last: True
mode: "max"
dirpath: "checkpoints/"
filename: "epoch-{epoch}_step-{step}_loss-{1/val/Competition_metric/:.2f}"
SWA:
_target_: pytorch_lightning.callbacks.stochastic_weight_avg.StochasticWeightAveraging
swa_epoch_start: 15
annealing_epochs: 5
annealing_strategy: 'cos'
datamodule:
_target_: src.datamodules.Datamodules.Nodule21
cfg:
name: Nodule21
model: ${model.cfg.name}
path:
train:
images:
labels:
val: ## part of train set
images:
labels:
sample_set: False
preload : False
imbalancedSampling: True
imbalancedSamplingTest: True
new_shape: 1024 ##length of the square image
replacement: True
num_gpus : 1
batch_size: 4
num_workers: 2
lr : 1e-4
test: False
colorJitter: False
brightness: 0.05 # colorjitter brightness
contrast: 0
saturation: 0
hue: 0
randomCrop: False
cutout: False
cropsize: 900
invertIntensity: False
vinDR_augment: True
effdet: True
all_sets_mixed: True # use v3 split!
final_set: True
cropStrat: downsample
trainer:
_target_: pytorch_lightning.Trainer
gpus: [0] # -1
min_epochs: 1
max_epochs: 20 #20
# limit_train_batches: 0.5
gradient_clip_val: 3.0
# accelerator: ddp
sync_batchnorm: True
log_every_n_steps: 50
weights_summary: null
progress_bar_refresh_rate: 25
# resume_from_checkpoint: null
# profiler : "simple"
# val_check_interval: 0
# overfit_batches : 0.001
precision : 16
num_sanity_val_steps : 0 # This does not work with dp, only with ddp
# val_check_interval: 1
check_val_every_n_epoch: 10
benchmark: False
deterministic: False
replace_sampler_ddp: True
model:
_target_: src.models.Detector_effdet.Detector
cfg:
name: EfficientDet
version: tf_efficientdet_d2
decision_thres: 0.5
lr: ${datamodule.cfg.lr}
LR_Scheduler: custom
sched_factor: 0.5
sched_patience: 4
weight_decay: 1e-5
batch_size: ${datamodule.cfg.batch_size}
new_shape: ${datamodule.cfg.new_shape}
optim : Adam
multiCrop: False
combineCrops: 'mean'
cropAttention: False
pretrained: False
pretrained_backbone: False
replace_head: True
num_classes: 1
prediction_confidence_threshold: 0.05
vindr_weights: True
custom_optim: False
LR_warmup: False
vindr_path: /opt/algorithm/F1_E79_ModelX_v4_T0.325_V0.410.ckpt