Upload density_estimation/short_unet/9_shorter_unet_normalizedgame_asymclassnormalizedl1loss_adamw.yaml with huggingface_hub
Browse files
density_estimation/short_unet/9_shorter_unet_normalizedgame_asymclassnormalizedl1loss_adamw.yaml
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ==============================================================
|
| 2 |
+
# Density-Estimation Baseline Configuration
|
| 3 |
+
# ==============================================================
|
| 4 |
+
# Usage:
|
| 5 |
+
# python -m src.density_estimation --config experiments/density_estimation/baseline/config.yaml
|
| 6 |
+
#
|
| 7 |
+
# Any key here can be overridden via the CLI:
|
| 8 |
+
# python -m src.density_estimation --config ... --lr 5e-4 --batch-size 32
|
| 9 |
+
|
| 10 |
+
IO:
|
| 11 |
+
root_dir: data/output/density_maps/allCA_128_96_smooth_b05_k5_roi
|
| 12 |
+
output_dir: experiments_results/density_estimation/best_model
|
| 13 |
+
|
| 14 |
+
DATA:
|
| 15 |
+
img_size: 128
|
| 16 |
+
class_names:
|
| 17 |
+
- Pyramidal
|
| 18 |
+
- Interneuron
|
| 19 |
+
- Astrocyte
|
| 20 |
+
fill_value: 65535
|
| 21 |
+
use_roi_mask: false # Focus loss/metrics on ROI regions only (requires roi_masks/ folder)
|
| 22 |
+
|
| 23 |
+
AUGMENTATIONS:
|
| 24 |
+
level: medium # basic | medium | full
|
| 25 |
+
|
| 26 |
+
TRAINING:
|
| 27 |
+
num_epochs: 100
|
| 28 |
+
batch_size: 32
|
| 29 |
+
lr: 1e-4
|
| 30 |
+
seed: 42
|
| 31 |
+
grad_clip_max_norm: 2.0
|
| 32 |
+
|
| 33 |
+
LOSS:
|
| 34 |
+
- type: asymmetric_normalized_class_l1_pixel
|
| 35 |
+
weight: 1.0
|
| 36 |
+
- type: normalized_game
|
| 37 |
+
weight: 1.0
|
| 38 |
+
|
| 39 |
+
OPTIMIZER:
|
| 40 |
+
type: adamw
|
| 41 |
+
|
| 42 |
+
SCHEDULER:
|
| 43 |
+
patience: 10 #default reduce lr on plateau values
|
| 44 |
+
factor: 0.1
|
| 45 |
+
min_lr: 1e-7
|
| 46 |
+
|
| 47 |
+
CROSS_VALIDATION:
|
| 48 |
+
k_folds: 5
|
| 49 |
+
|
| 50 |
+
EARLY_STOPPING:
|
| 51 |
+
patience: 40 # epochs without improvement before stopping (0 = disabled)
|
| 52 |
+
min_delta: 0.001 # minimum metric improvement to count as progress
|
| 53 |
+
mode: min # min | max | auto (auto infers from monitor metric)
|
| 54 |
+
monitor: val_nae_mean # val_loss | val_mae_mean | val_nae_mean | val_psnr_mean | val_ssim_mean: 20
|
| 55 |
+
|
| 56 |
+
MODEL:
|
| 57 |
+
type: plain_conv_unet_relu
|
| 58 |
+
num_classes: 3
|
| 59 |
+
input_channels: 3
|
| 60 |
+
deep_supervision: false
|
| 61 |
+
kwargs:
|
| 62 |
+
n_stages: 4 # CHANGED from 5
|
| 63 |
+
features_per_stage: [32, 64, 128, 256] # DROPPED the 512
|
| 64 |
+
strides: [1, 2, 2, 2] # DROPPED the final 2
|
| 65 |
+
n_conv_per_stage: [2, 2, 2, 2] # DROPPED the 5th block
|
| 66 |
+
n_conv_per_stage_decoder: [2, 2, 2] # DROPPED the 4th block
|
| 67 |
+
kernel_sizes: [3, 3, 3, 3] # DROPPED the 5th kernel
|
| 68 |
+
conv_bias: true
|
| 69 |
+
norm_op: BatchNorm2d
|
| 70 |
+
nonlin: LeakyReLU
|
| 71 |
+
|
| 72 |
+
WANDB:
|
| 73 |
+
enabled: true
|
| 74 |
+
project: neuro_brain_project
|
| 75 |
+
group: ablations
|
| 76 |
+
tags: [best_model, baseline]
|
| 77 |
+
|
| 78 |
+
debug: false
|