RN-D<sup>3</sup>: detection, differentiation, and delineation of radiation necrosis on post-contrast MRI.
One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 2 matches
- [1] § Materials and methods › Evaluation and statistical analysis ↔ src/rnd3/compare.py, lines 59 to 140 · score 0.63 · Surface Dice, detection rate, score, tolerance, metrics, median · block
oscr:b:ZE7AHXWJKEF3W-F· Report a mismatch - [2] § Results › Segmentation performance and generalization ↔ src/rnd3/compare.py, lines 59 to 140 · score 0.51 · Surface Dice, detection rate, zero, resamples, mismatch, median · block
oscr:b:ZE7AHXWJKEF3W-F· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 140 lines · 5.1 KB · other · 2 matches
- from __future__ import annotations
- import json
- from pathlib import Path
- from typing import Dict, Iterable, List, Optional, Tuple
- import nibabel as nib
- import numpy as np
- import pandas as pd
- from .metrics import dice_score, lesion_detected, summarize, surface_dice
- from .registry import Case, load_registry
- def parse_pred_dirs(items: Iterable[str]) -> Dict[str, Path]:
- out: Dict[str, Path] = {}
- for item in items:
- if "=" not in item:
- raise ValueError(f"--pred-dir must be model=path, got: {item}")
- model, path = item.split("=", 1)
- model = model.strip()
- if not model:
- raise ValueError(f"Empty model name in --pred-dir: {item}")
- out[model] = Path(path).expanduser().resolve()
- return out
- def find_prediction(case: Case, pred_dir: Path) -> Optional[Path]:
- candidates = []
- ids = [case.case_id, case.patient_id]
- for value in ids:
- safe = str(value)
- candidates.extend([
- pred_dir / f"{safe}.nii.gz",
- pred_dir / f"{safe}_pred.nii.gz",
- pred_dir / f"{safe}.nii",
- pred_dir / f"{safe}_pred.nii",
- ])
- image_name = case.image.name
- image_stem = image_name[:-7] if image_name.endswith(".nii.gz") else Path(image_name).stem
- candidates.extend([
- pred_dir / image_name,
- pred_dir / f"{image_stem}.nii.gz",
- pred_dir / f"{image_stem}_pred.nii.gz",
- ])
- for candidate in candidates:
- if candidate.exists():
- return candidate
- return None
- def _load_mask(path: Path) -> Tuple[np.ndarray, Tuple[float, float, float]]:
- img = nib.load(str(path))
- arr = np.asanyarray(img.dataobj)
- spacing = tuple(float(x) for x in img.header.get_zooms()[:3])
- return (arr > 0).astype(np.uint8), spacing
- def compare_predictions(
- registry: Path,
- pred_dirs: Dict[str, Path],
- out_dir: Path,
- surface_mm: float = 1.0,
- detection_mode: str = "overlap",
- ) -> Tuple[pd.DataFrame, pd.DataFrame]:
- cases = load_registry(registry)
- out_dir = out_dir.expanduser().resolve()
- out_dir.mkdir(parents=True, exist_ok=True)
- rows: List[dict] = []
- for case in cases:
- if case.mask is None:
- raise ValueError(f"Case {case.case_id} has no mask; comparison requires masks")
- gt, spacing = _load_mask(case.mask)
- for model, pred_dir in pred_dirs.items():
- pred_path = find_prediction(case, pred_dir)
- missing = pred_path is None
- if missing:
- pred = np.zeros_like(gt, dtype=np.uint8)
- else:
- pred, _pred_spacing = _load_mask(pred_path)
- if pred.shape != gt.shape:
- raise ValueError(
- f"Shape mismatch for {case.case_id}/{model}: pred {pred.shape} vs gt {gt.shape}. "
- "Resample predictions to the mask grid before comparison."
- )
- rows.append(
- {
- "case_id": case.case_id,
- "patient_id": case.patient_id,
- "lesion_id": case.lesion_id or "",
- "model": model,
- "prediction": "" if pred_path is None else str(pred_path),
- "missing_prediction": bool(missing),
- "dsc": dice_score(pred, gt),
- "surface_dice": surface_dice(pred, gt, spacing=spacing, tolerance_mm=surface_mm),
- "detected": lesion_detected(pred, gt, mode=detection_mode),
- "gt_voxels": int(gt.sum()),
- "pred_voxels": int(pred.sum()),
- }
- )
- per_case = pd.DataFrame(rows)
- summaries = []
- for model, grp in per_case.groupby("model", sort=False):
- dsc = summarize(grp["dsc"].to_numpy(float))
- sd = summarize(grp["surface_dice"].to_numpy(float))
- summaries.append(
- {
- "model": model,
- "n_cases": int(grp["case_id"].nunique()),
- "n_patients": int(grp["patient_id"].nunique()),
- "dsc_mean": dsc["mean"],
- "dsc_median": dsc["median"],
- "dsc_q1": dsc["q1"],
- "dsc_q3": dsc["q3"],
- "surface_dice_mean": sd["mean"],
- "surface_dice_median": sd["median"],
- "surface_dice_q1": sd["q1"],
- "surface_dice_q3": sd["q3"],
- "detection_rate": float(grp["detected"].mean()),
- "missing_predictions": int(grp["missing_prediction"].sum()),
- }
- )
- summary = pd.DataFrame(summaries).sort_values("dsc_median", ascending=False)
- per_case.to_csv(out_dir / "per_case_metrics.csv", index=False)
- summary.to_csv(out_dir / "summary_metrics.csv", index=False)
- (out_dir / "run_manifest.json").write_text(
- json.dumps(
- {
- "registry": str(Path(registry).expanduser().resolve()),
- "pred_dirs": {k: str(v) for k, v in pred_dirs.items()},
- "surface_mm": float(surface_mm),
- "detection_mode": detection_mode,
- },
- indent=2,
- )
- + "\n"
- )
- return per_case, summary
compare.py at commit c4619ba, under other · at the source
Overview
- Department of Radiation Oncology, Mass General Brigham Cancer Institute and Harvard Medical School, Boston, MA, United States
- Clinical Cooperation Unit Translational Radiation Oncology, German Cancer Research Center (DKFZ), Heidelberg, Germany
- Department of Diagnostic Radiology and Centre of Cancer Medicine, LKS Faculty of Medicine, University of Hong Kong, Hong Kong, Hong Kong SAR, China
- Department of Radiation Oncology and Winship Cancer Institute, Emory University, Atlanta, Georgia
- Department of Radiation Oncology, Charité—Universitätsmedizin Berlin, Freie Universität Berlin and Humboldt-Universität zu Berlin, Berlin, Germany
- German Cancer Consortium (DKTK), Partner Site Berlin, a Partnership Between DKFZ and Charité – Universitätsmedizin Berlin, Berlin, Germany
Abstract
Purpose: Radiation necrosis (RN) is an important complication of radiation therapy (RT) and is challenging to assess radiographically because lesions are prone to inconsistent delineation, often necessitating intracranial surgery to obtain a diagnosis. This study evaluated how established deep learning segmentation models can be retrained on an institutional RN cohort, assessed external generalization, and integrated the best components into RN-D3, an end-to-end pipeline for RN detection, differentiation, and delineation.
Methods and materials: We trained models on a cohort of 52 patients with RN after proton beam RT treated at Massachusetts General Hospital (2004–2016) and tested these models on an external cohort of 29 patients with 39 RN lesions from the MOLAB brain metastasis dataset (photon-based RT, five Spanish institutions, 2005–2021). Six architectures were evaluated: four convolutional neural networks (nnU-Net, STU-Net, TRIAD PlainConv, and Spark3D) and two transformers (SwinUNETR and TRIAD SwinB). Training strategies included training from scratch, supervised pretraining, self-supervised pretraining, and foundation model initialization. Matched-encoder pairs enabled direct comparison of pretraining effects. Performance was evaluated by Dice similarity coefficient (DSC), surface Dice at 2 mm, and lesion detection rate. A post-processing pipeline combining encoder features and shape radiomics was assessed for reducing false positives. The best segmentation model and this classifier were combined into RN-D3, an end-to-end pipeline evaluated on 115 brain metastasis (BM) lesions from MOLAB for RN-versus-non-RN differentiation.
Results: Spark3D and STU-Net achieved the highest external DSC (median 0.69 [IQR 0.50–0.84] and 0.65 [0.29–0.88]), followed by baseline nnU-Net (0.61 [0.39–0.83]). For Spark3D and STU-Net, large lesions (≥1 mL, n = 21) were detected at 100% (median DSC 0.77 and 0.73) and small lesions (<1 mL, n = 18) at 78 and 67% (DSC 0.60 and 0.58). The remaining models detected 17–22% of small lesions with a median DSC near zero. False-positive filtering removed 2/
Conclusion: RN-D3 integrates a CNN segmentation backbone with an RN-versus-non-RN classifier into an end-to-end pipeline addressing detection, differentiation, and delineation of RN. On external data, RN-D3 achieved high end-to-end sensitivity and high specificity in patients with brain metastases, with detection of small lesions the main determinant of missed cases. Small-lesion detection remains the primary translational bottleneck.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.
chamseddine-lab/rn-d3
c4619bab9f27c102a25341ed838dea49fe9ac0c5, 23 August 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
14 files
- src/
rnd3/ , Python, 3 lines__init__.py - src/
rnd3/ , Python, 92 linesaugment.py - src/
rnd3/ , Python, 176 linescli.py - src/
rnd3/ , Python, 140 lines, 2 matchescompare.py - src/
rnd3/ , Python, 71 linesmetrics.py - src/
rnd3/ , Python, 173 linespredict.py - src/
rnd3/ , Python, 150 linesregistry.py - tests/
test_augment.py , Python, 63 lines - tests/
test_cli_smoke.py , Python, 59 lines - tests/
test_metrics.py , Python, 25 lines - tests/
test_predict.py , Python, 18 lines - tests/
test_registry.py , Python, 17 lines - LICENSE, License, 131 lines
- README.md, Text, 423 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 12 scripts, each with its path and the digest of its content;
- 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- doi:10.6084/
m9.figshare.c.6194104.v1 , at figshare; found in “Data availability statement”
Data availability statement
All code and trained model weights are publicly available at: https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 10 authors, 5 keywords, 1 funder, 29 references.
Cite
This paper
Salome, P., Cogno, N., Lee, H., Buti, G., Shah, K. D., Ehret, F., Wisdom, A. J., Shih, H. A., Paganetti, H., & Chamseddine, I. (2026). RN-D&
BibTeX
@article{salome2026rn,
author = {Salome, Patrick and Cogno, Nicolò and Lee, Hoyeon and Buti, Gregory and Shah, Keyur D. and Ehret, Felix and Wisdom, Amy Jordan and Shih, Helen A. and Paganetti, Harald and Chamseddine, Ibrahim},
title = {{RN-D\&
journal = {Frontiers in artificial intelligence},
year = {2026},
month = aug,
volume = {9},
pages = {1891883},
publisher = {Frontiers Media SA},
issn = {2624-8212},
doi = {10.3389/
url = {https://
pmid = {42625867},
pmcid = {PMC13490108}
}
RIS
TY - JOUR
AU - Salome, Patrick
AU - Cogno, Nicolò
AU - Lee, Hoyeon
AU - Buti, Gregory
AU - Shah, Keyur D.
AU - Ehret, Felix
AU - Wisdom, Amy Jordan
AU - Shih, Helen A.
AU - Paganetti, Harald
AU - Chamseddine, Ibrahim
TI - RN-D&
T2 - Frontiers in artificial intelligence
J2 - Front Artif Intell
PY - 2026
DA - 2026/
VL - 9
SP - 1891883
SN - 2624-8212
PB - Frontiers Media SA
DO - 10.3389/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.3389/
"type": "article-journal",
"title": "RN-D&
"container-title": "Frontiers in artificial intelligence",
"author": [
{
"family": "Salome",
"given": "Patrick"
},
{
"family": "Cogno",
"given": "Nicolò"
},
{
"family": "Lee",
"given": "Hoyeon"
},
{
"family": "Buti",
"given": "Gregory"
},
{
"family": "Shah",
"given": "Keyur D."
},
{
"family": "Ehret",
"given": "Felix"
},
{
"family": "Wisdom",
"given": "Amy Jordan"
},
{
"family": "Shih",
"given": "Helen A."
},
{
"family": "Paganetti",
"given": "Harald"
},
{
"family": "Chamseddine",
"given": "Ibrahim"
}
],
"container-title-short":
"volume": "9",
"page": "1891883",
"DOI": "10.3389/
"PMID": "42625867",
"PMCID": "PMC13490108",
"ISSN": "2624-8212",
"publisher": "Frontiers Media SA",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
6
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1007/s12194-024-00827-5
- Investigation of distributed learning for automated lesion detection in head MR images.Journal: Radiological physics and technologyIn common: figshare 10.6084/m9.figshare.c.6194104.v1, other condition, 1 reference
- [2] doi:10.3390/cancers15061820 [code]
- MR-Class: A Python Tool for Brain MR Image Classification Utilizing One-vs-All DCNNs to Deal with the Open-Set Recognition Problem.Journal: CancersIn common: structural MRI / diffusion, other condition, 1 reference, author Patrick Salome
- [3] doi:10.21037/qims-2026-0792 [code]
- An nnU-Net-based framework with adaptive feature representation for 3D brain tumor segmentation.Journal: Quantitative imaging in medicine and surgeryIn common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, other condition, 3 references
- [4] doi:10.3390/tomography10090105 [code]
- Repurposing the Public BraTS Dataset for Postoperative Brain Tumour Treatment Response Monitoring.Journal: Tomography (Ann Arbor, Mich.)In common: NiBabel, SciPy, NumPy, structural MRI / diffusion, other condition, 3 references
- [5] doi:10.1038/s41467-025-64469-w [code]
- Modality-projection universal model for comprehensive full-body medical imaging segmentation.Journal: Nature communicationsIn common: NiBabel, pandas, SciPy, 1 other tool, 3 references
- [6] doi:10.1007/s12672-024-01223-6
- A bibliometric analysis of radiation-induced brain injury: a research of the literature from 1998 to 2023.Journal: Discover oncologyIn common: 4 references
- [7] doi:10.3389/fnins.2026.1870124 [code]
- An end-to-end pipeline for automated fetal brain segmentation and biometry from 3D SSFP MRI.Journal: Frontiers in neuroscienceIn common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, 3 references
- [8] doi:10.1038/s41598-026-48496-1 [code]
- A unified FLAIR hyperintensity segmentation model for various CNS tumor types and acquisition time points.Journal: Scientific reportsIn common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, other condition, 2 references
- [9] doi:10.1162/imag.a.1067 [code]
- TissUnet: Improved extracranial tissue and cranium segmentation for children through adulthood.Journal: Imaging neuroscience (Cambridge, Mass.)In common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, other condition, 2 references
- [10] doi:10.1186/s12880-025-02053-w [code]
- UKAN-EP: enhancing U-KAN with efficient attention and pyramid aggregation for 3D multi-modal MRI brain tumor segmentation.Journal: BMC medical imagingIn common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, other condition, 2 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 12 scripts, and 2 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:6df04b94a09f39df…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.3389/frai.2026.1891883)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.3389/frai.2026.1891883.svg
:target: https://openscicode.org/badge/doi/10.3389/frai.2026.1891883
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.3389/frai.2026.1891883"><img src="https://openscicode.org/badge/doi/10.3389/frai.2026.1891883.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
