Skip to content

Commit 89937ca

Browse files
author
Donglai Wei
committed
update zebrafish_neurons for BCD
1 parent 124f603 commit 89937ca

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tutorials/zebrafish_neurons.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,22 @@ model:
3333
dropout: 0.15
3434

3535
# Loss configuration - WeightedBCEWithLogitsLoss + Dice for small touching objects
36-
loss_functions: [WeightedBCEWithLogitsLoss, DiceLoss, WeightedBCEWithLogitsLoss, DiceLoss]
37-
loss_weights: [1.0, 2.0, 1.0, 2.0]
36+
loss_functions: [WeightedBCEWithLogitsLoss, DiceLoss, WeightedBCEWithLogitsLoss, DiceLoss, WeightedBCEWithLogitsLoss, DiceLoss]
37+
loss_weights: [1.0, 2.0, 1.0, 2.0, 1.0, 2.0]
3838
loss_kwargs:
3939
- {reduction: mean} # WeightedBCEWithLogitsLoss: average over batch
4040
- {include_background: true, sigmoid: true, smooth_nr: 1e-5, smooth_dr: 1e-5} # DiceLoss with sigmoid (include_background for 2 channels)
4141
- {reduction: mean} # WeightedBCEWithLogitsLoss: average over batch
4242
- {include_background: true, sigmoid: true, smooth_nr: 1e-5, smooth_dr: 1e-5} # DiceLoss with sigmoid (include_background for 2 channels)
43+
- {reduction: mean} # WeightedBCEWithLogitsLoss: average over batch
44+
- {include_background: true, sigmoid: true, smooth_nr: 1e-5, smooth_dr: 1e-5} # DiceLoss with sigmoid (include_background for 2 channels)
4345

4446
# Multi-task configuration
4547
# Format: [[start_ch, end_ch, target_name, loss_indices], ...]
4648
multi_task_config:
47-
- [0, 1, "binary", [0, 1]] # Original labels: Dice + BCE
49+
- [0, 1, "binary", [0, 1]] # Original labels: Dice + BCE
4850
- [1, 2, "boundary", [2, 3]] # Boundary channel: Dice + BCE
51+
- [2, 3, "edt", [4, 5]] # Distance channel: Dice + BCE
4952

5053

5154
# Data - 2D fluorescence microscopy
@@ -182,7 +185,7 @@ inference:
182185
padding_mode: reflect
183186

184187
test_time_augmentation:
185-
enabled: false
188+
enabled: true
186189
flip_axes: [[0], [1], [0, 1]]
187190
channel_activations: [[0, 2, 'sigmoid']] # Sigmoid activation for both channels (foreground + contour)
188191
ensemble_mode: mean
@@ -213,7 +216,7 @@ test:
213216
kwargs:
214217
binary_threshold: [0.5, 0.3]
215218
contour_threshold: [0.7, 1.1]
216-
distance_channels: null
219+
distance_threshold: [0.5, 0]
217220
min_seed_size: 4
218221

219222
# Evaluation

0 commit comments

Comments
 (0)