Image Classification
timm
ONNX
PyTorch
English
medical
histopathology
cancer-detection
binary-classification
efficientnet
int8
Eval Results (legacy)
Instructions to use AegisOSS/stage-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use AegisOSS/stage-1 with timm:
import timm model = timm.create_model("hf-hub:AegisOSS/stage-1", pretrained=True) - Notebooks
- Google Colab
- Kaggle
Add Stage 1 training config
Browse files- config.yaml +45 -0
config.yaml
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stage 1 Binary Detection — accuracy + recall oriented
|
| 2 |
+
# Target: 90–95% overall accuracy with strong cancer sensitivity.
|
| 3 |
+
|
| 4 |
+
model_name: "efficientnet_b0"
|
| 5 |
+
pretrained: true
|
| 6 |
+
in_channels: 3
|
| 7 |
+
num_classes: 1
|
| 8 |
+
img_size: 224
|
| 9 |
+
seed: 42
|
| 10 |
+
|
| 11 |
+
batch_size: 16
|
| 12 |
+
learning_rate: 0.0003
|
| 13 |
+
weight_decay: 0.0001
|
| 14 |
+
epochs: 14
|
| 15 |
+
# Train classifier head only for N epochs, then fine-tune full net
|
| 16 |
+
freeze_epochs: 2
|
| 17 |
+
amp_enabled: true
|
| 18 |
+
# Print progress every N train batches (CPU runs are long)
|
| 19 |
+
log_every: 25
|
| 20 |
+
|
| 21 |
+
threshold: 0.35
|
| 22 |
+
# FN penalty to push recall higher on ambiguous cancer patches
|
| 23 |
+
pos_weight_boost: 1.5
|
| 24 |
+
# Clip exploding gradients during full fine-tune
|
| 25 |
+
grad_clip: 1.0
|
| 26 |
+
# Stop if val accuracy stalls (0 = disabled)
|
| 27 |
+
early_stopping_patience: 5
|
| 28 |
+
device: "cpu"
|
| 29 |
+
|
| 30 |
+
data:
|
| 31 |
+
dataset_ids:
|
| 32 |
+
- lc25000
|
| 33 |
+
- patch_camelyon
|
| 34 |
+
- breast_histopathology_patches
|
| 35 |
+
- skin_lesion_hm10000_binary_2k
|
| 36 |
+
- camelyon17_jxie
|
| 37 |
+
- camelyon17_djghosh
|
| 38 |
+
# Increased sample count for multi-organ histology coverage
|
| 39 |
+
max_per_dataset: 4000
|
| 40 |
+
balanced_sampling: true
|
| 41 |
+
apply_stain_norm: false
|
| 42 |
+
num_workers: 0
|
| 43 |
+
|
| 44 |
+
output:
|
| 45 |
+
artifacts_dir: "models/stage1/artifacts"
|