File size: 3,484 Bytes
b9c65ae | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | ---
license: apache-2.0
tags:
- medical-imaging
- segmentation
- nnunet
- computed-tomography
- cancer
- cvpr2026
- flare
datasets:
- FLARE-MedFM/FLARE-Task1-Pancancer
metrics:
- dice
- normalized-surface-dice
pipeline_tag: image-segmentation
---
# Vanilla nnUNet v2 Baseline — CVPR 2026 Task 1: Pan-Cancer Segmentation
Binary lesion segmentation from CT using vanilla nnU-Net v2 (ResEncM). Reference baseline for [CVPR 2026: Foundation Models for Pan-cancer Segmentation in CT Images Task 1](https://www.codabench.org/competitions/7149/).
**Code + failure analysis:** [GitHub — Kappapapa123/CVPR2026-PanCancerSeg-baseline](https://github.com/Kappapapa123/CVPR2026-PanCancerSeg-baseline)
---
## Model Details
| Parameter | Value |
|-----------|-------|
| Framework | nnU-Net v2.6.4 |
| Architecture | Residual Encoder U-Net Medium (`nnUNetResEncUNetMPlans`) |
| Configuration | 3d_fullres |
| Task | Binary segmentation (0=background, 1=tumor) |
| Epochs | 2000 |
| Fold | 0 (official competition split via `splits_final.json`) |
| Trainer class | `nnUNetTrainerWandb2000` |
| Dataset ID | 101 (`Dataset101_FLAREPanCancer`) |
## Training Data
[FLARE-MedFM/FLARE-Task1-Pancancer](https://huggingface.co/datasets/FLARE-MedFM/FLARE-Task1-Pancancer) — 10,762 cases total:
- **train_label** (~10,000 cases): Partially labeled (primary lesion only per case)
- **DeepLesion5K-MedSAM2** (~762 cases): Pseudo labels from MedSAM2
Only the primary lesion is annotated per training case. Metastatic lesions may be present but unlabeled.
## Performance
Evaluated on 50 validation-public cases:
| Metric | Mean | Median | Std |
|--------|------|--------|-----|
| Lesion DSC | 0.3278 | 0.2318 | 0.2883 |
| Lesion NSD (2 mm) | 0.1797 | 0.1046 | 0.2029 |
## How to Use
```bash
# 1. Install dependencies
pip install nnunetv2==2.6.4 huggingface-hub
# 2. Clone code repo (needed for the custom trainer)
git clone https://github.com/Kappapapa123/CVPR2026-PanCancerSeg-baseline.git
# 3. Symlink the custom trainer into nnUNet
VARIANTS_DIR=$(python -c "import nnunetv2; print(nnunetv2.__path__[0])")/training/nnUNetTrainer/variants
ln -sf $(realpath CVPR2026-PanCancerSeg-baseline/trainers/nnUNetTrainerWandb2000.py) \
"$VARIANTS_DIR/nnUNetTrainerWandb2000.py"
# 4. Download model weights
huggingface-cli download KS987/CVPR2026-PanCancerSeg-baseline \
--local-dir ./model --repo-type model
# 5. Run inference
nnUNetv2_predict \
-i /path/to/input_images \
-o /path/to/output_predictions \
-d 101 -c 3d_fullres -f 0 \
-tr nnUNetTrainerWandb2000 \
-p nnUNetResEncUNetMPlans \
-m ./model/nnUNet/Dataset101_FLAREPanCancer \
--disable_tta
```
Both `checkpoint_final.pth` and `checkpoint_best.pth` are provided. nnUNet uses `checkpoint_final.pth` by default.
> Inference resampling requires ~64 GB RAM.
## Limitations
- **Partial labels:** Training data only labels the primary lesion per case.
- **False positive fragmentation:** The dominant failure mode is scattered false-positive blobs. See the [failure analysis](https://github.com/Kappapapa123/CVPR2026-PanCancerSeg-baseline#failure-analysis).
## Files
```
nnUNet/
Dataset101_FLAREPanCancer/
nnUNetTrainerWandb2000__nnUNetResEncUNetMPlans__3d_fullres/
fold_0/
checkpoint_best.pth # Best validation checkpoint
checkpoint_final.pth # Final epoch (2000) checkpoint
dataset.json
dataset_fingerprint.json
plans.json
```
|