OSCR

RN-D<sup>3</sup>: detection, differentiation, and delineation of radiation necrosis on post-contrast MRI.

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 2 matches
  1. [1] § Materials and methods › Evaluation and statistical analysis ↔ src/rnd3/compare.py, lines 59–140 · score 0.63 · Surface Dice, detection rate, score, tolerance, metrics, median
  2. [2] § Results › Segmentation performance and generalization ↔ src/rnd3/compare.py, lines 59–140 · score 0.51 · Surface Dice, detection rate, zero, resamples, mismatch, median

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: 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

  1. from __future__ import annotations
  2. import json
  3. from pathlib import Path
  4. from typing import Dict, Iterable, List, Optional, Tuple
  5. import nibabel as nib
  6. import numpy as np
  7. import pandas as pd
  8. from .metrics import dice_score, lesion_detected, summarize, surface_dice
  9. from .registry import Case, load_registry
  10. def parse_pred_dirs(items: Iterable[str]) -> Dict[str, Path]:
  11. out: Dict[str, Path] = {}
  12. for item in items:
  13. if "=" not in item:
  14. raise ValueError(f"--pred-dir must be model=path, got: {item}")
  15. model, path = item.split("=", 1)
  16. model = model.strip()
  17. if not model:
  18. raise ValueError(f"Empty model name in --pred-dir: {item}")
  19. out[model] = Path(path).expanduser().resolve()
  20. return out
  21. def find_prediction(case: Case, pred_dir: Path) -> Optional[Path]:
  22. candidates = []
  23. ids = [case.case_id, case.patient_id]
  24. for value in ids:
  25. safe = str(value)
  26. candidates.extend([
  27. pred_dir / f"{safe}.nii.gz",
  28. pred_dir / f"{safe}_pred.nii.gz",
  29. pred_dir / f"{safe}.nii",
  30. pred_dir / f"{safe}_pred.nii",
  31. ])
  32. image_name = case.image.name
  33. image_stem = image_name[:-7] if image_name.endswith(".nii.gz") else Path(image_name).stem
  34. candidates.extend([
  35. pred_dir / image_name,
  36. pred_dir / f"{image_stem}.nii.gz",
  37. pred_dir / f"{image_stem}_pred.nii.gz",
  38. ])
  39. for candidate in candidates:
  40. if candidate.exists():
  41. return candidate
  42. return None
  43. def _load_mask(path: Path) -> Tuple[np.ndarray, Tuple[float, float, float]]:
  44. img = nib.load(str(path))
  45. arr = np.asanyarray(img.dataobj)
  46. spacing = tuple(float(x) for x in img.header.get_zooms()[:3])
  47. return (arr > 0).astype(np.uint8), spacing
  48. def compare_predictions(
  49. registry: Path,
  50. pred_dirs: Dict[str, Path],
  51. out_dir: Path,
  52. surface_mm: float = 1.0,
  53. detection_mode: str = "overlap",
  54. ) -> Tuple[pd.DataFrame, pd.DataFrame]:
  55. cases = load_registry(registry)
  56. out_dir = out_dir.expanduser().resolve()
  57. out_dir.mkdir(parents=True, exist_ok=True)
  58. rows: List[dict] = []
  59. for case in cases:
  60. if case.mask is None:
  61. raise ValueError(f"Case {case.case_id} has no mask; comparison requires masks")
  62. gt, spacing = _load_mask(case.mask)
  63. for model, pred_dir in pred_dirs.items():
  64. pred_path = find_prediction(case, pred_dir)
  65. missing = pred_path is None
  66. if missing:
  67. pred = np.zeros_like(gt, dtype=np.uint8)
  68. else:
  69. pred, _pred_spacing = _load_mask(pred_path)
  70. if pred.shape != gt.shape:
  71. raise ValueError(
  72. f"Shape mismatch for {case.case_id}/{model}: pred {pred.shape} vs gt {gt.shape}. "
  73. "Resample predictions to the mask grid before comparison."
  74. )
  75. rows.append(
  76. {
  77. "case_id": case.case_id,
  78. "patient_id": case.patient_id,
  79. "lesion_id": case.lesion_id or "",
  80. "model": model,
  81. "prediction": "" if pred_path is None else str(pred_path),
  82. "missing_prediction": bool(missing),
  83. "dsc": dice_score(pred, gt),
  84. "surface_dice": surface_dice(pred, gt, spacing=spacing, tolerance_mm=surface_mm),
  85. "detected": lesion_detected(pred, gt, mode=detection_mode),
  86. "gt_voxels": int(gt.sum()),
  87. "pred_voxels": int(pred.sum()),
  88. }
  89. )
  90. per_case = pd.DataFrame(rows)
  91. summaries = []
  92. for model, grp in per_case.groupby("model", sort=False):
  93. dsc = summarize(grp["dsc"].to_numpy(float))
  94. sd = summarize(grp["surface_dice"].to_numpy(float))
  95. summaries.append(
  96. {
  97. "model": model,
  98. "n_cases": int(grp["case_id"].nunique()),
  99. "n_patients": int(grp["patient_id"].nunique()),
  100. "dsc_mean": dsc["mean"],
  101. "dsc_median": dsc["median"],
  102. "dsc_q1": dsc["q1"],
  103. "dsc_q3": dsc["q3"],
  104. "surface_dice_mean": sd["mean"],
  105. "surface_dice_median": sd["median"],
  106. "surface_dice_q1": sd["q1"],
  107. "surface_dice_q3": sd["q3"],
  108. "detection_rate": float(grp["detected"].mean()),
  109. "missing_predictions": int(grp["missing_prediction"].sum()),
  110. }
  111. )
  112. summary = pd.DataFrame(summaries).sort_values("dsc_median", ascending=False)
  113. per_case.to_csv(out_dir / "per_case_metrics.csv", index=False)
  114. summary.to_csv(out_dir / "summary_metrics.csv", index=False)
  115. (out_dir / "run_manifest.json").write_text(
  116. json.dumps(
  117. {
  118. "registry": str(Path(registry).expanduser().resolve()),
  119. "pred_dirs": {k: str(v) for k, v in pred_dirs.items()},
  120. "surface_mm": float(surface_mm),
  121. "detection_mode": detection_mode,
  122. },
  123. indent=2,
  124. )
  125. + "\n"
  126. )
  127. return per_case, summary

compare.py at commit c4619ba, under other · at the source

Overview

Authors: Patrick Salome1,2, Nicolò Cogno1, Hoyeon Lee1,3, Gregory Buti1, Keyur D. Shah1,4, Felix Ehret1,5,6, Amy Jordan Wisdom1, Helen A. Shih1, Harald Paganetti1, Ibrahim Chamseddine1
ORCID iDs: Patrick Salome
  1. Department of Radiation Oncology, Mass General Brigham Cancer Institute and Harvard Medical School, Boston, MA, United States
  2. Clinical Cooperation Unit Translational Radiation Oncology, German Cancer Research Center (DKFZ), Heidelberg, Germany
  3. Department of Diagnostic Radiology and Centre of Cancer Medicine, LKS Faculty of Medicine, University of Hong Kong, Hong Kong, Hong Kong SAR, China
  4. Department of Radiation Oncology and Winship Cancer Institute, Emory University, Atlanta, Georgia
  5. Department of Radiation Oncology, Charité—Universitätsmedizin Berlin, Freie Universität Berlin and Humboldt-Universität zu Berlin, Berlin, Germany
  6. German Cancer Consortium (DKTK), Partner Site Berlin, a Partnership Between DKFZ and Charité – Universitätsmedizin Berlin, Berlin, Germany
Journal: Frontiers in artificial intelligence, volume 9, article 1891883
Dates: received 26 May 2026; accepted 20 July 2026; published online 6 August 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3389/frai.2026.1891883 · PMID 42625867 · PMCID PMC13490108 · OpenAlex W7196946882
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), other condition (population)
Methods: Connectivity, Statistics, Machine learning
Keywords: deep learning segmentation, external validation, foundation models, post-contrast MRI, radiation necrosis (RN)
Topic: Brain Metastases and Treatment (Pulmonary and Respiratory Medicine, Medicine), according to OpenAlex
Funding: NIH (P01 CA261669)
Citations: not cited yet (Europe PMC); 31 references in the paper

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/13 and 7/14 false positives for Spark3D and STU-Net, retaining all true detections for Spark3D and 85% for STU-Net. RN-D3 achieved an end-to-end sensitivity of 0.90 and a specificity of 0.88 on 115 BM lesions for RN-versus-non-RN differentiation. The two transformer-based architectures evaluated showed larger drops from internal to external cohorts (ΔDSC −0.36 to −0.42 vs. − 0.12 to −0.20 for CNNs), though all architectures degraded externally.

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

License: other
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: c4619bab9f27c102a25341ed838dea49fe9ac0c5, 23 August 2026
Languages: Python (12)
Size: 22 files, 12 scripts
Software Heritage: not archived
Found in: “Data availability statement”
Holds: README, license file, CITATION.cff, environment (pyproject.toml), tests, documentation
Not found: continuous integration
Tools: NumPy (6 files), NiBabel (4 files), pandas (2 files), SciPy (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
14 files

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

Data availability statement

All code and trained model weights are publicly available at: https://github.com/chamseddine-lab/rn-d3. Due to patient privacy concerns and institutional review board restrictions, individual patient-level data, including MRI imaging files, cannot be made publicly available. The external MOLAB dataset is openly accessible under a Creative Commons Attribution 4.0 license at: https://doi.org/10.6084/m9.figshare.c.6194104.v1. Deidentified aggregate data from the internal cohort may be available from the corresponding author upon reasonable request and with appropriate institutional agreements.

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&lt;sup&gt;3&lt;/sup&gt;: detection, differentiation, and delineation of radiation necrosis on post-contrast MRI. Frontiers in artificial intelligence, 9, 1891883. https://doi.org/10.3389/frai.2026.1891883

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\&lt;sup\&gt;3\&lt;/sup\&gt;: detection, differentiation, and delineation of radiation necrosis on post-contrast MRI}},
journal = {Frontiers in artificial intelligence},
year = {2026},
month = aug,
volume = {9},
pages = {1891883},
publisher = {Frontiers Media SA},
issn = {2624-8212},
doi = {10.3389/frai.2026.1891883},
url = {https://doi.org/10.3389/frai.2026.1891883},
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&lt;sup&gt;3&lt;/sup&gt;: detection, differentiation, and delineation of radiation necrosis on post-contrast MRI
T2 - Frontiers in artificial intelligence
J2 - Front Artif Intell
PY - 2026
DA - 2026/08/06
VL - 9
SP - 1891883
SN - 2624-8212
PB - Frontiers Media SA
DO - 10.3389/frai.2026.1891883
UR - https://doi.org/10.3389/frai.2026.1891883
LA - en
ER -

CSL-JSON

{
"id": "10.3389/frai.2026.1891883",
"type": "article-journal",
"title": "RN-D&lt;sup&gt;3&lt;/sup&gt;: detection, differentiation, and delineation of radiation necrosis on post-contrast MRI",
"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": "Front Artif Intell",
"volume": "9",
"page": "1891883",
"DOI": "10.3389/frai.2026.1891883",
"PMID": "42625867",
"PMCID": "PMC13490108",
"ISSN": "2624-8212",
"publisher": "Frontiers Media SA",
"URL": "https://doi.org/10.3389/frai.2026.1891883",
"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.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 surgery
In common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, other condition, 3 references
[2] 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 neuroscience
In common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, 3 references
[3] 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 reports
In common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, other condition, 2 references
[4] doi:10.1186/s12880-026-02481-2 [code]
Deep learning-based neuroanatomical profiling reveals population-specific brain changes in multiple sclerosis: a large-scale Middle Eastern study.
Journal: BMC medical imaging
In common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, 2 references
[5] doi:10.1016/j.nicl.2026.104001 [code]
Effect of vascular lesion preprocessing on Brain Intensity AbNormality Classification Algorithm (BIANCA) white matter hyperintensity segmentation.
Journal: NeuroImage. Clinical
In common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, 2 references
[6] doi:10.1158/2767-9764.crc-25-0710 [code]
MRI Deep Learning for Differentiating Glioblastoma, IDH Wild-type from Central Nervous System Diffuse Large B-cell Lymphoma.
Journal: Cancer research communications
In common: NiBabel, pandas, NumPy, structural MRI / diffusion, other condition, 2 references
[7] doi:10.1038/s41598-026-55136-1 [code]
CAHA-Net: A novel MR image classification model based on DenseNet incorporating coordinate attention and hybrid augmentation.
Journal: Scientific reports
In common: NiBabel, SciPy, NumPy, structural MRI / diffusion, other condition, 2 references
[8] doi:10.1371/journal.pone.0356382 [code]
Evaluating the impact of segmentation strategies on radiomic feature stability for paediatric brain tumour diagnosis using diffusion weighted imaging.
Journal: PloS one
In common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, other condition, 1 reference
[9] doi:10.1038/s41598-026-47942-4 [code]
CT-based radiomic markers to predict late-onset seizures after traumatic brain injury.
Journal: Scientific reports
In common: NiBabel, pandas, SciPy, 1 other tool, other condition, 1 reference
[10] doi:10.1038/s41598-026-35627-x [code]
Distilling population specific expertise into a unified model for generalizable brain tumor segmentation.
Journal: Scientific reports
In common: NiBabel, NumPy, 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.

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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.