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.
Code + failure analysis: GitHub β 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 β 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
# 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.
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