-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathmito_mitolab.yaml
More file actions
145 lines (141 loc) · 3.15 KB
/
mito_mitolab.yaml
File metadata and controls
145 lines (141 loc) · 3.15 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
_base_:
- ../connectomics/config/all_profiles.yaml
experiment_name: cem-mitolab_mednext2d
description: Mitochondria segmentation on CEM-MitoLab dataset using MedNeXt 2D
default:
model:
arch:
profile: mednext_s
out_channels: 3
loss:
deep_supervision: true
losses:
- function: DiceLoss
weight: 1.0
kwargs: {include_background: false, sigmoid: true, smooth_nr: 1e-5, smooth_dr: 1e-5}
pred_slice: "0:1"
target_slice: "0:1"
- function: BCEWithLogitsLoss
weight: 0.5
pred_slice: "0:1"
target_slice: "0:1"
- function: BCEWithLogitsLoss
weight: 0.5
pred_slice: "1:2"
target_slice: "1:2"
- function: WeightedMSELoss
weight: 1.0
kwargs: {tanh: true}
pred_slice: "2:3"
target_slice: "2:3"
mednext:
size: S
kernel_size: 3
dim: 2d
data:
image_transform:
clip_percentile_low: 0.0
clip_percentile_high: 1.0
label_transform:
targets:
- name: binary
- name: instance_boundary
kwargs:
thickness: 1
edge_mode: seg-all
mode: 2d
- name: instance_edt
kwargs:
mode: 2d
quantize: false
data_transform:
pad_size:
- 0
- 0
dataloader:
use_preloaded_cache_train: false
use_preloaded_cache_val: false
patch_size:
- 224
- 224
inference:
system:
num_workers: 4
test_time_augmentation:
enabled: false
channel_activations:
- {channels: "0:2", activation: sigmoid}
- {channels: "2:3", activation: tanh}
prediction_transform:
enabled: true
intensity_scale: 255
intensity_dtype: uint8
save_prediction:
enabled: true
train:
system:
num_gpus: 1
num_workers: 0
seed: 42
optimization:
max_epochs: 100
n_steps_per_epoch: -1
accumulate_grad_batches: 1
precision: bf16-mixed
optimizer:
lr: 0.001
weight_decay: 0.01
eps: 1.0e-08
scheduler:
name: StepLR
params:
step_size: 100000
gamma: 1.0
monitor:
logging:
scalar:
loss:
- train_loss_total_epoch
loss_every_n_steps: 50
images:
max_images: 16
num_slices: 1
log_every_n_epochs: 1
checkpoint:
monitor: val/loss
save_top_k: 3
save_every_n_epochs: 1
dirpath: outputs/cem-mitolab_mednext2d/checkpoints/
checkpoint_filename: epoch={epoch:03d}-val_loss={val/loss:.4f}
early_stopping:
monitor: in_loss_total_epoch
patience: 20
min_delta: 0.0001
threshold: 0.05
divergence_threshold: 2.0
data:
train:
dataset_type: filename
json: datasets/cem-mitolab/files.json
image_key: images
label_key: masks
split_ratio: 0.9
resolution:
- 0
- 5
- 5
test:
inference:
save_prediction:
output_path: outputs/cem-mitolab_mednext2d/results/
data:
test:
image: datasets/cem-mitolab/test.json
label:
resolution:
- 0
- 5
- 5
evaluation:
enabled: false
metrics: []