|
1 | | -_base_: bases/mednext.yaml |
| 1 | +_base_: neuron_nisb_common.yaml |
2 | 2 |
|
3 | 3 | experiment_name: neuron_nisb_40nm_common_mednext_b_sdt |
4 | 4 | description: NISB neuron instance segmentation (BANIS-style) with MedNeXt-B, affinity + SDT (40nm) |
5 | 5 |
|
6 | | -system: |
7 | | - training: |
8 | | - num_gpus: -1 |
9 | | - num_workers: -1 |
10 | | - batch_size: 4 |
11 | | - inference: |
12 | | - num_gpus: 1 |
13 | | - num_workers: 4 |
14 | | - batch_size: 4 |
15 | | - seed: 42 |
16 | 6 |
|
17 | 7 | model: |
18 | 8 | input_size: [128, 128, 128] |
19 | 9 | output_size: [128, 128, 128] |
20 | | - in_channels: 1 |
21 | | - out_channels: 7 |
22 | | - mednext_size: B |
23 | | - mednext_kernel_size: 3 |
24 | | - mednext_dim: 3d |
25 | | - mednext_checkpoint_style: outside_block |
26 | | - deep_supervision: false |
27 | 10 |
|
28 | | - loss_functions: |
29 | | - - WeightedBCEWithLogitsLoss |
30 | | - - WeightedMSELoss |
31 | | - loss_weights: [1.0, 1.0] |
32 | | - loss_kwargs: |
33 | | - - {} |
34 | | - - {tanh: true} |
35 | | - |
36 | | - multi_task_config: |
37 | | - - [0, 6, affinity, [0]] |
38 | | - - [6, 7, sdt, [1]] |
39 | 11 |
|
40 | 12 | data: |
41 | | - # BANIS command mapping: |
42 | | - # --base_data_path /projects/weilab/dataset/nisb |
43 | | - # --data_setting base |
44 | | - |
45 | | - # BANIS data.zarr arrays are under each seed directory. |
46 | 13 | train_image: seed*/data.zarr/img_40-36-36nm.h5 |
47 | 14 | train_label: seed*/data.zarr/seg_40-36-36nm.h5 |
48 | 15 | val_image: seed*/data.zarr/img_40-36-36nm.h5 |
49 | 16 | val_label: seed*/data.zarr/seg_40-36-36nm.h5 |
50 | | - iter_num_per_epoch: 200 |
51 | 17 |
|
52 | 18 | train_resolution: [36, 36, 40] |
53 | 19 | val_resolution: [36, 36, 40] |
54 | 20 |
|
55 | 21 | patch_size: [128, 128, 128] |
56 | | - use_preloaded_cache_train: true |
57 | | - use_preloaded_cache_val: true |
58 | | - use_cache: false |
59 | | - persistent_workers: true |
60 | 22 |
|
61 | | - image_transform: |
62 | | - normalize: "0-1" |
63 | | - clip_percentile_low: 0.0 |
64 | | - clip_percentile_high: 1.0 |
65 | 23 |
|
66 | 24 | label_transform: |
67 | 25 | targets: |
68 | 26 | - name: affinity |
69 | 27 | kwargs: |
70 | | - long_range: 10 |
| 28 | + long_range: 3 |
71 | 29 | - name: skeleton_aware_edt |
72 | 30 | kwargs: |
73 | 31 | resolution: [36, 36, 40] |
74 | 32 | alpha: 0.8 |
75 | 33 | bg_value: -1.0 |
76 | 34 | relabel: true |
77 | 35 |
|
78 | | - augmentation: |
79 | | - preset: some |
80 | | - |
81 | | - flip: |
82 | | - enabled: true |
83 | | - prob: 0.5 |
84 | | - |
85 | | - rotate: |
86 | | - enabled: true |
87 | | - prob: 0.5 |
88 | | - |
89 | | - affine: |
90 | | - enabled: true |
91 | | - prob: 0.5 |
92 | | - rotate_range: [3.1416, 3.1416, 3.1416] |
93 | | - scale_range: [0.2, 0.2, 0.2] |
94 | | - shear_range: [0.5, 0.5, 0.5] |
95 | | - |
96 | | - intensity: |
97 | | - enabled: true |
98 | | - gaussian_noise_prob: 0.5 |
99 | | - gaussian_noise_std: 0.5 |
100 | | - shift_intensity_prob: 0.5 |
101 | | - shift_intensity_offset: 0.1 |
102 | | - contrast_prob: 0.5 |
103 | | - contrast_range: [0.9, 1.1] |
104 | | - |
105 | | - |
106 | | -optimization: |
107 | | - max_epochs: 500 |
108 | | - gradient_clip_val: 1.0 |
109 | | - accumulate_grad_batches: 1 |
110 | | - precision: "16-mixed" |
111 | | - log_every_n_steps: 100 |
112 | | - val_check_interval: 1 |
113 | | - num_sanity_val_steps: 0 |
114 | | - |
115 | | - optimizer: |
116 | | - name: AdamW |
117 | | - lr: 1.0e-3 |
118 | | - weight_decay: 1.0e-2 |
119 | | - betas: [0.9, 0.999] |
120 | | - eps: 1.0e-8 |
121 | | - |
122 | | - scheduler: |
123 | | - name: CosineAnnealingLR |
124 | | - t_max: 50000 |
125 | | - interval: step |
126 | | - frequency: 1 |
127 | | - |
| 36 | + |
128 | 37 | monitor: |
129 | | - logging: |
130 | | - scalar: |
131 | | - loss: [train_loss_total_epoch, val_loss_total, train_loss_affinity_total, train_loss_sdt_total] |
132 | | - loss_every_n_steps: 100 |
133 | | - val_check_interval: 1.0 |
134 | | - images: |
135 | | - enabled: true |
136 | | - max_images: 8 |
137 | | - num_slices: 8 |
138 | | - log_every_n_epochs: 1 |
139 | | - channel_mode: all |
140 | | - |
141 | 38 | checkpoint: |
142 | | - monitor: val_loss_total |
143 | | - mode: min |
144 | | - save_top_k: 100 |
145 | | - save_last: true |
146 | | - save_every_n_epochs: 5 |
147 | 39 | dirpath: outputs/neuron_nisb_base_40nm_mednext_b_sdt/checkpoints/ |
148 | | - use_timestamp: true |
149 | | - |
150 | | - early_stopping: |
151 | | - enabled: false |
152 | | - |
| 40 | + |
153 | 41 | test: |
154 | 42 | data: |
155 | 43 | test_image: seed101/data.zarr/img_40-36-36nm.h5 |
156 | 44 | test_label: seed101/data.zarr/seg_40-36-36nm.h5 |
157 | 45 | test_resolution: [36, 36, 40] |
158 | | - output_path: outputs/neuron_nisb_base_40nm_mednext_b_sdt/results_seed101/ |
159 | | - |
160 | | - decoding: |
161 | | - - name: decode_affinity_cc |
162 | | - kwargs: |
163 | | - threshold: 0.95 |
164 | | - |
165 | | - evaluation: |
166 | | - enabled: false |
167 | 46 |
|
168 | 47 | inference: |
169 | 48 | sliding_window: |
170 | 49 | window_size: [128, 128, 128] |
171 | | - sw_batch_size: 4 |
172 | | - overlap: 0.5 |
173 | | - blending: gaussian |
174 | | - sigma_scale: 0.25 |
175 | | - padding_mode: replicate |
176 | | - keep_input_on_cpu: true |
177 | | - sw_device: cuda |
178 | | - output_device: cpu |
179 | | - |
180 | | - test_time_augmentation: |
181 | | - enabled: false |
182 | | - flip_axes: null |
183 | | - rotation90_axes: null |
184 | | - channel_activations: |
185 | | - - [0, 6, sigmoid] |
186 | | - - [6, 7, tanh] |
187 | | - select_channel: [0,1,2,6] |
188 | | - ensemble_mode: mean |
189 | | - apply_mask: false |
190 | | - |
191 | | - save_prediction: |
192 | | - enabled: true |
193 | | - intensity_scale: -1.0 |
194 | | - intensity_dtype: float32 |
195 | | - output_formats: [h5] |
0 commit comments