DeepRelaxo: Fast Mono-Exponential Magnitude Brain R2* Mapping With Reduced Echoes Using Self-Supervised Deep Learning.
The 2 matches
- [1] § Methods › DeepRelaxo Cascaded Neural Networks › DeepRelaxo Denoiser (3D U‐Net) ↔ bet2_utils.py, lines 1–32 · score 0.56 · FSL, brain mask, background, module, reconstructed, magnitudes
- [2] § Methods › DeepRelaxo Cascaded Neural Networks › DeepRelaxo Estimator (Transformer‐MLP) ↔ transformer_mlp_model.py, lines 83–133 · score 0.54 · padding mask, tokens, zero, model, batch, MLP
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 · 84 lines · 3.3 KB · MIT · 1 match
- """
- Automatic brain-mask generation via FSL's bet2, vendored at vendor/bet2/ (bin + its ~15
- runtime shared libraries -- see vendor/bet2/README.md for provenance/license). Not a full
- FSL install.
- Used by run.py / app.py when no --mask / uploaded mask is supplied: bet2 runs on the
- magnitude volume to generate one automatically, so a brain mask is available by default
- without requiring a separate manual step. A missing/failing bet2 never aborts
- reconstruction -- callers fall back to whole-head (no mask) instead.
- Uses print() rather than the `logging` module so messages appear in app.py's live Log
- panel too (its background inference thread redirects sys.stdout, not the logging module).
- """
- import os
- import subprocess
- import traceback
- from pathlib import Path
- from time import perf_counter
- import nibabel as nib
- import numpy as np
- REPO_ROOT = Path(__file__).resolve().parent
- _BET2_CANDIDATES = [
- os.environ.get("BET2_DIR"),
- "/opt/bet2", # Docker image, if built that way
- str(REPO_ROOT / "vendor" / "bet2"), # local checkout (this repo's own copy)
- ]
- BET2_DIR = next((p for p in _BET2_CANDIDATES
- if p and os.path.isfile(os.path.join(p, "bin", "bet2"))), None)
- def first_3d_volume(nii_path, output_dir, name="mag_for_bet2"):
- """bet2 needs a plain 3D volume. Returns nii_path unchanged if it's already 3D,
- otherwise saves and returns the path to its first volume along the last axis."""
- img = nib.load(str(nii_path))
- if len(img.shape) == 3:
- return str(nii_path)
- data = np.asarray(img.dataobj)[..., 0].astype(np.float32)
- out_path = os.path.join(output_dir, f"{name}.nii.gz")
- nib.save(nib.Nifti1Image(data, img.affine), out_path)
- return out_path
- def run_bet2(mag_nii_path, output_dir, fractional_intensity=0.5):
- """Run bet2 on a (3D) magnitude volume, returning the path to the binary brain
- mask NIfTI, or None if bet2 isn't available or the run fails."""
- if BET2_DIR is None:
- print("bet2 not found (checked $BET2_DIR, /opt/bet2, ./vendor/bet2) -- "
- "skipping automatic brain extraction")
- return None
- bet2Bin = os.path.join(BET2_DIR, "bin", "bet2")
- outPrefix = os.path.join(output_dir, "bet2_out")
- env = dict(os.environ)
- env["LD_LIBRARY_PATH"] = os.path.join(BET2_DIR, "lib")
- env.setdefault("FSLOUTPUTTYPE", "NIFTI_GZ")
- tic = perf_counter()
- try:
- result = subprocess.run(
- [bet2Bin, mag_nii_path, outPrefix, "-m", "-f", str(fractional_intensity)],
- env=env, capture_output=True, text=True, timeout=120,
- )
- except Exception:
- print(f"bet2 failed to run -- skipping brain extraction:\n{traceback.format_exc()}")
- return None
- if result.returncode != 0:
- print(f"bet2 exited with code {result.returncode} -- skipping brain extraction. "
- f"stdout={result.stdout} stderr={result.stderr}")
- return None
- maskPath = outPrefix + "_mask.nii.gz"
- if not os.path.exists(maskPath):
- print(f"bet2 completed but mask file not found at {maskPath} -- skipping brain extraction")
- return None
- mask = nib.load(maskPath).get_fdata()
- print(f"bet2 brain extraction completed in {perf_counter() - tic:.1f}s -> "
- f"{Path(maskPath).name} ({100.0 * mask.sum() / mask.size:.1f}% of voxels)")
- return maskPath
bet2_utils.py at commit ced5d70, under MIT · at the source
Overview
- School of Electrical Engineering and Computer Science, University of Queensland, Brisbane, Queensland, Australia
- Image X Institute, Sydney School of Health Sciences, University of Sydney, Sydney, New South Wales, Australia
- Department of Biomedical Engineering, University of Alberta, Edmonton, Alberta, Canada
- School of Engineering, University of Newcastle, Newcastle, New South Wales, Australia
Abstract
Purpose: We introduce DeepRelaxo, a fast and generalizable deep learning method for estimating brain R2* maps from multi‐echo gradient echo (ME‐GRE) acquisitions with arbitrary echo configurations, including shortened echo trains for accelerated scans.
Methods: DeepRelaxo is a cascaded two‐stage self‐supervised network comprising: (1) a voxel‐wise Transformer‐MLP for initial R2* estimation, and (2) a patch‐based 3D U‐Net for denoising. Both stages are trained entirely on synthetic ME‐GRE data simulated at 3 T with a varied number of echoes, echo times, and noise levels. We evaluate on simulated and in vivo brain datasets, comparing it against conventional non‐linear least squares (NLLS) and the standalone Transformer‐MLP. Experiments assess robustness under increased noise and shortened TEs.
Results: In simulations, DeepRelaxo consistently outperforms NLLS and Transformer‐MLP, particularly in accelerated conditions. For example, with 4× scan time reduction at low SNR (= 10), DeepRelaxo improves SSIM by 13.5% and reduces RMSE by 76% compared with baseline methods. In in vivo 3 T and 7 T data, DeepRelaxo produces consistent R2* values in deep gray matter and preserves anatomical detail, even with only two short echoes.
Conclusion: DeepRelaxo effectively models ME‐GRE decay, leveraging temporal and spatial context to deliver accurate, robust, and computationally efficient R2* mapping. It enables reliable reconstruction under accelerated protocols, making it suitable for time‐sensitive workflows.
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.
sunhongfu/DeepRelaxo
ced5d70250ad68829c5b7c4dff6e23e54fbf0660, 6 August 2026Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
12 files
- app.py, Python, 1,356 lines
- bet2_utils.py, Python, 84 lines, 1 match
- data_utils.py, Python, 333 lines
- dicom_to_nifti.py, Python, 816 lines
- echo_voxel_dataset.py, Python, 61 lines
- run_deeprelaxo_pipeline.
py , Python, 289 lines - run_denoiser_stage.py, Python, 113 lines
- run_estimator_stage.py, Python, 190 lines
- transformer_mlp_model.py
, Python, 133 lines, 1 match - unet3d_model.py, Python, 98 lines
- LICENSE, License, 21 lines
- README.md, Text, 474 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;
- 10 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
No dataset and no data link were found in the paper.
Data Availability Statement
The data that support the findings of this study are available on request from the corresponding author. The data are not publicly available due to privacy or ethical restrictions. Codes are 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, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 6 keywords, 10 MeSH terms, 2 funders, 28 references.
Cite
This paper
Prima, S., Xiong, Z., Wilman, A. H., & Sun, H. (2026). DeepRelaxo: Fast Mono-Exponential Magnitude Brain R2* Mapping With Reduced Echoes Using Self-Supervised Deep Learning. Magnetic resonance in medicine, 96(3), 1293-1302. https://
BibTeX
@article{prima2026deepre
author = {Prima, Samiha and Xiong, Zhuang and Wilman, Alan H and Sun, Hongfu},
title = {{DeepRelaxo: Fast Mono-Exponential Magnitude Brain R2* Mapping With Reduced Echoes Using Self-Supervised Deep Learning}},
journal = {Magnetic resonance in medicine},
year = {2026},
month = apr,
volume = {96},
number = {3},
pages = {1293--1302},
publisher = {Wiley},
issn = {0740-3194},
doi = {10.1002/
url = {https://
pmid = {42036809},
pmcid = {PMC13327502}
}
RIS
TY - JOUR
AU - Prima, Samiha
AU - Xiong, Zhuang
AU - Wilman, Alan H
AU - Sun, Hongfu
TI - DeepRelaxo: Fast Mono-Exponential Magnitude Brain R2* Mapping With Reduced Echoes Using Self-Supervised Deep Learning
T2 - Magnetic resonance in medicine
J2 - Magn Reson Med
PY - 2026
DA - 2026/
VL - 96
IS - 3
SP - 1293
EP - 1302
SN - 0740-3194
PB - Wiley
DO - 10.1002/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1002/
"type": "article-journal",
"title": "DeepRelaxo: Fast Mono-Exponential Magnitude Brain R2* Mapping With Reduced Echoes Using Self-Supervised Deep Learning",
"container-title": "Magnetic resonance in medicine",
"author": [
{
"family": "Prima",
"given": "Samiha"
},
{
"family": "Xiong",
"given": "Zhuang"
},
{
"family": "Wilman",
"given": "Alan H"
},
{
"family": "Sun",
"given": "Hongfu"
}
],
"container-title-short":
"volume": "96",
"issue": "3",
"page": "1293-1302",
"DOI": "10.1002/
"PMID": "42036809",
"PMCID": "PMC13327502",
"ISSN": "0740-3194",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
26
]
]
}
}
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.1002/mrm.70468 [code]
- A Realistic In Silico Brain Phantom for Quantifying Susceptibility Anisotropy-Induced Error in Susceptibility Separation.Journal: Magnetic resonance in medicineIn common: NiBabel, SciPy, Matplotlib, 1 other tool, computational, 3 references
- [2] doi:10.1002/mrm.70496 [code]
- A Deep Nonlinear Subspace Modeling and Reconstruction for Diffusion-Weighted Imaging Using Denoising Auto-Encoder.Journal: Magnetic resonance in medicineIn common: pydicom, h5py, NiBabel, 4 other tools
- [3] doi:10.1080/07853890.2026.2685416 [code]
- Pulmonary and cerebral damage in COVID-19 survivors: is there any association?Journal: Annals of medicineIn common: pydicom, h5py, NiBabel, 4 other tools
- [4] doi:10.3389/frai.2026.1771088 [code]
- Few-shot deployment of pretrained MRI transformers in brain imaging tasks.Journal: Frontiers in artificial intelligenceIn common: pydicom, h5py, NiBabel, 4 other tools
- [5] doi:10.1002/nbm.70349 [code]
- Susceptibility Source Separation Unveils Paramagnetic and Diamagnetic Trajectories in Healthy Brains From 5 to 90 Years.Journal: NMR in biomedicineIn common: h5py, PyTorch, SciPy, 2 other tools, 2 references
- [6] doi:10.1002/mp.70599 [code]
- Accurate estimation of intravoxel incoherent motion parameters based on implicit neural representation.Journal: Medical physicsIn common: pydicom, NiBabel, PyTorch, 2 other tools, 1 reference
- [7] doi:10.1002/hbm.70602 [code]
- Neuroimaging Correlates of Post-Stroke Pain After Ischemic Stroke: Secondary Analysis of the INSPiRE-TMS Trial.Journal: Human brain mappingIn common: pydicom, h5py, NiBabel, 3 other tools
- [8] doi:10.1038/s41586-026-10631-3 [code]
- A prognostic human brain network for diffuse midline glioma.Journal: NatureIn common: pydicom, h5py, NiBabel, 3 other tools
- [9] doi:10.1111/ene.70678 [code]
- Who Falls After a Stroke? Evidence From a Prospective Stroke Cohort.Journal: European journal of neurologyIn common: pydicom, h5py, NiBabel, 3 other tools
- [10] doi:10.1016/j.celrep.2026.117404 [code]
- Action and rest tremor map to distinct networks within the primary motor cortex.Journal: Cell reportsIn common: pydicom, h5py, NiBabel, 3 other tools
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, 10 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:9d416a3c0e5faaa1…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
