nnFoundationViT-ReportGen-CT-RATE

Copyright German Cancer Research Center (DKFZ) and contributors. Please make sure that your usage of these models is in compliance with their license.

nnFoundation paper RMR paper Code

nnFoundationViT-ReportGen-CT-RATE generates radiology reports (findings and impression) for chest CT volumes. Frozen nnFoundationViT features are passed through a trainable adapter to Qwen3-VL-2B-Instruct, adapted with LoRA, and trained on CT-RATE. The training recipe builds on the findings of Resolution Meets Reduction (RMR) and improves on the report-generation models of the nnFoundation paper; we recommend it for generating reports on new chest CT.

For abdominal CT, use nnFoundationViT-ReportGen-Merlin.

Model

Component Details Trained
Vision encoder nnFoundationViT, 192³ input, 24³ = 13,824 patch tokens Frozen
Adapter Normalization and MLP applied to each patch token, no token reduction Fully
Language model Qwen3-VL-2B-Instruct LoRA (r 32, α 64) on attention, MLP, and lm_head

This repository holds only the trained weights (adapter and LoRA, 46M parameters); the encoder and the language model are downloaded from their own repositories.

Usage

Reports are generated with inference_nifti.py from the code repository, for a folder of NIfTI volumes:

git clone https://github.com/MIC-DKFZ/3d_report_generation.git && cd 3d_report_generation
uv sync --locked --python 3.12 --extra totalsegmentator
uv run hf download MIC-DKFZ/nnFoundationViT-ReportGen-CT-RATE --local-dir models/ctrate

uv run torchrun --standalone --nproc_per_node=<number of GPUs> inference_nifti.py \
  --checkpoint_dir models/ctrate \
  --input_dir /path/to/chest_ct_volumes \
  --mask_dir /path/to/masks \
  --output_dir /path/to/reports

The reports are saved in inference_results.json. See report generation for NIfTI volumes for masks, offline use, and batching.

Expected input

Chest CT volumes as NIfTI files (.nii.gz or .nii). The script prepares each volume as in training, so no settings have to be passed: it reorients the volume, crops it to the foreground of its TotalSegmentator total mask (made if missing), resizes the crop to 192³, and applies z-score normalization.

Training

Setting Value
Data CT-RATE training split, with the report cleaning and scan exclusions of RMR (v2 dataset JSONs)
Epochs 16
Effective batch size 24
Optimizer AdamW, no weight decay
Learning rate Adapter 3e-3, LoRA 3e-4; the adapter first trains alone with a warmup, then all trained parameters warm up again, followed by a cosine decay

The released weights are the checkpoint with the best validation F1, which here is the final checkpoint.

Evaluation

Results on the 3,002 volumes of the CT-RATE test set (the official validation split), with greedy decoding. The clinical scores compare the findings that RadBERT-CT extracts from the generated and the reference reports, as macro averages over the 18 CT-RATE findings.

Metric Value
F1 (macro) 0.499
Precision (macro) 0.555
Recall (macro) 0.459
CRG 0.467
BLEU-1 / BLEU-4 0.467 / 0.230
METEOR 0.245
ROUGE-L 0.338
CIDEr 0.195

The generated reports are in test_predictions/inference_results.json; join them with the dataset's reports by image_id to compute other metrics.

Intended use and limitations

  • Intended for research on radiology report generation, not for clinical decision-making or diagnosis. Generated reports can contain findings that are not present and miss findings that are.
  • Trained only on chest CT from CT-RATE, with English reports; other body regions, scanners, and report styles have not been evaluated.
  • Volumes are expected to be cropped to their TotalSegmentator mask. Reports for whole volumes (--allow_missing_masks) are less reliable, since the model saw almost none in training.

Repository contents

File Purpose
model.safetensors the trained adapter and LoRA weights
final_config.yml the training config, including the preprocessing and the encoder revision that inference_nifti.py reads
checkpoint_manifest.json checkpoint metadata
test_predictions/ the generated test-set reports and their metrics
LICENSE CC BY-NC-SA 4.0

Citation

If you use this model, please cite the nnFoundation paper for the vision encoder and RMR for the report-generation recipe:

nnFoundation BibTeX
@misc{harsy2026nnfoundation3dfoundationmodels,
  title         = {nnFoundation: 3D Foundation Models for Radiology},
  author        = {Ulrich Harsy, Constantin and Wald, Tassilo and Gotkowski, Karol and others},
  year          = {2026},
  eprint        = {2609.26924},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2609.26924}
}
RMR BibTeX
@misc{suprijadi2026resolutionmeetsreduction,
  title         = {Resolution Meets Reduction: Efficient Visual Context for 3D Radiology Report Generation},
  author        = {Suprijadi, Jonathan and Stock, Raphael and Langenberg, Moritz
                   and Zimmerer, David and Kahl, Kim-Celine and Denner, Stefan
                   and Kirchhoff, Yannick and Gotkowski, Karol and Rokuss, Maximilian
                   and Traub, Jeremias and Wald, Tassilo and Ulrich, Constantin
                   and Maier-Hein, Klaus},
  year          = {2026},
  eprint        = {2608.08713},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2608.08713}
}

Please also acknowledge CT-RATE and Qwen3-VL.

License

The weights and this model card are licensed under CC BY-NC-SA 4.0, following the license of the CT-RATE training data. The vision encoder (nnFoundationViT, CC BY-SA 4.0) and the language model (Qwen3-VL-2B-Instruct, Apache 2.0) are not included and keep their own licenses.

Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
46.2M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for MIC-DKFZ/nnFoundationViT-ReportGen-CT-RATE

Adapter
(141)
this model

Dataset used to train MIC-DKFZ/nnFoundationViT-ReportGen-CT-RATE

Papers for MIC-DKFZ/nnFoundationViT-ReportGen-CT-RATE