# Stage 1 Binary Detection — accuracy + recall oriented # Target: 90–95% overall accuracy with strong cancer sensitivity. model_name: "efficientnet_b0" pretrained: true in_channels: 3 num_classes: 1 img_size: 224 seed: 42 batch_size: 16 learning_rate: 0.0003 weight_decay: 0.0001 epochs: 14 # Train classifier head only for N epochs, then fine-tune full net freeze_epochs: 2 amp_enabled: true # Print progress every N train batches (CPU runs are long) log_every: 25 threshold: 0.35 # FN penalty to push recall higher on ambiguous cancer patches pos_weight_boost: 1.5 # Clip exploding gradients during full fine-tune grad_clip: 1.0 # Stop if val accuracy stalls (0 = disabled) early_stopping_patience: 5 device: "cpu" data: dataset_ids: - lc25000 - patch_camelyon - breast_histopathology_patches - skin_lesion_hm10000_binary_2k - camelyon17_jxie - camelyon17_djghosh # Increased sample count for multi-organ histology coverage max_per_dataset: 4000 balanced_sampling: true apply_stain_norm: false num_workers: 0 output: artifacts_dir: "models/stage1/artifacts"