Skip to content
Other

What-to-Preserve-Where-to-Adapt

3D nnU-Net checkpoints against forgetting in segmentation

2 min readupdated

A collection of pretrained weights and evaluation results for a research paper on the forgetting effect in continual learning for gynecological medical image segmentation. Built on the 3D nnU-Net architecture (v1, 3d_fullres configuration) using AmalSaqib's Lifelong nnU-Net framework, this release includes a base model along with 38 experimental runs adapted to new datasets (ECPC-IDS and UT-EndoMRI), including variants with per-block learning rate calibration. Medical computer vision researchers can use this repository to study catastrophic forgetting in AI models and reproduce the paper's experiments without retraining from scratch on a GPU.

Key features

  • 3D nnU-Net architecture: all models were trained in the 3d_fullres configuration using Lifelong nnU-Net up to the final 100th epoch (fold 0).
  • Full set of experiments: the results/ folder contains the initial checkpoint (trained on the UMD dataset) plus 38 variants adapted to new tasks (ECPC-IDS and UT-EndoMRI).
  • Per-block calibration: scale-aware runs include gradient_lr_calibration.json files containing calibrated multipliers for individual network blocks.
  • Ready-to-use quality metrics: the evaluation/ folder provides val_metrics_eval.json files with per-case and per-class Dice and IoU scores, alongside SHA256SUMS checksums.

What you can do

  • Reproduce paper tables without a GPU: download the checkpoints and evaluations, then run reproducibility/summarize_questions.py to recalculate forgetting, Dice scores, and weight drift.
  • Study weight dynamics during fine-tuning: analyze which 3D nnU-Net blocks shift the most when adapting to new medical datasets and how layer-wise learning rates help.
  • Use as a starting point for experiments: take the base UMD checkpoint as initial weights for your own continual segmentation tests in Lifelong nnU-Net.

Example

git clone [https://github.com/AmalSaqib/What-to-Preserve-Where-to-Adapt](https://github.com/AmalSaqib/What-to-Preserve-Where-to-Adapt) && cd What-to-Preserve-Where-to-Adapt
hf download AmalSaqib/What-to-Preserve-Where-to-Adapt --local-dir hf

export RESULTS_FOLDER=$PWD/hf/results EVALUATION_FOLDER=$PWD/hf/evaluation
SEQ=nnUNet_ext/3d_fullres/Task666_UMD_Task555_ECPC_Task778_EndoMRI_T1FS/Task666_UMD/nnUNetTrainerSequential__nnUNetPlansv2.1/Generic_UNet/SEQ
export PAPER_INIT_CHECKPOINT=$RESULTS_FOLDER/$SEQ/fold_0
export PAPER_BASELINE_UMD_EVAL=$EVALUATION_FOLDER/$SEQ/head_Task666_UMD/fold_0/Task666_UMD/val_metrics_eval.json

python reproducibility/summarize_questions.py
Read moreDetails
Training: 100 epochs (fold 0) based on Lifelong nnU-Net, using UMD as the base dataset with adaptation on ECPC-IDS and UT-EndoMRI.
Data: actual medical images and annotations are not included in the repository—only weights (.model, .pkl) and Dice/IoU metrics.
Security: checkpoints are saved in PyTorch pickle format, and the .pkl files contain the original local training paths.
License: CC BY-NC 4.0 (for non-commercial academic research only).
Discuss Telegram 0

Will it run?

Working out the memory needs

The bot is still collecting this model's weight sizes; the estimate will appear here in a few minutes. Meanwhile you can rent a GPU with headroom.

Massed ComputeOpen Massed Compute

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # AmalSaqib/What-to-Preserve-Where-to-Adapt
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download AmalSaqib/What-to-Preserve-Where-to-Adapt --local-dir ~/models/What-to-Preserve-Where-to-Adapt
    # The model is in ~/models. How to run it is in the model card (link above).
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b40from November 18, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026new release

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

New posts about versions of What-to-Preserve-Where-to-Adapt (quants, finetunes, LoRAs) will show up under the bell.

No known relatives of this model yet. All derivatives on Hugging Face

About the model

AmalSaqib/What-to-Preserve-Where-to-Adapt
Author
AmalSaqib
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

00

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments