DeepRelaxo: Fast Mono-Exponential Magnitude Brain R2* Mapping With Reduced Echoes Using Self-Supervised Deep Learning.
2 blocks of code here have 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] § Methods › DeepRelaxo Cascaded Neural Networks › DeepRelaxo Denoiser (3D U‐Net) ↔ bet2_utils.py, lines 1 to 32 · score 0.56 · FSL, brain mask, background, module, reconstructed, magnitudes · block
oscr:b:A8JWE31WN0HXS-2· Report a mismatch - [2] § Methods › DeepRelaxo Cascaded Neural Networks › DeepRelaxo Estimator (Transformer‐MLP) ↔ transformer_mlp_model.py, lines 83 to 133 · score 0.54 · padding mask, tokens, zero, model, batch, MLP · block
oscr:b:NJFKEYM6F5APQ-W· 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 · 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.1038/s42003-025-09371-3 [code]
- Multi-contrast generation and quantitative MRI using a transformer-based framework with RF excitation embeddings.Journal: Communications biologyIn common: pydicom, PyTorch, SciPy, 2 other tools, 2 references
- [2] doi:10.1002/mrm.70050 [code]
- Motion-robust $$ {\mathrm{T}}_2^{\ast } $$ quantification from low-resolution gradient echo brain MRI with physics-informed deep learning.Journal: Magnetic resonance in medicineIn common: h5py, NiBabel, PyTorch, 3 other tools, computational, 1 reference
- [3] 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
- [4] doi:10.3389/fnins.2023.1165446 [code]
- Quantitative susceptibility mapping using multi-channel convolutional neural networks with dipole-adaptive multi-frequency inputs.Journal: Frontiers in neuroscienceIn common: pydicom, h5py, NiBabel, 3 other tools, 1 reference
- [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.1162/imag_a_00374 [code]
- FONDUE: Robust resolution-invariant denoising of MR images using Nested UNets.Journal: Imaging neuroscience (Cambridge, Mass.)In common: h5py, NiBabel, PyTorch, 3 other tools, 1 reference
- [7] doi:10.1126/sciadv.adi9327 [code]
- Deep learning enabled fast 3D brain MRI at 0.055 tesla.Journal: Science advancesIn common: h5py, NiBabel, PyTorch, 3 other tools, 1 reference
- [8] 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
- [9] doi:10.1016/j.neuroimage.2024.120794
- Quantitative gradient recalled echo (qGRE) MRI enables in vivo measurement of pre-atrophic neurodegeneration in a mouse model of Alzheimer's disease.Journal: NeuroImageIn common: 4 references
- [10] doi:10.1002/mrm.30629 [code]
- Fast MR signal simulations of microvascular and diffusion contributions using histogram-based approximation and recurrent neural networks.Journal: Magnetic resonance in medicineIn common: h5py, PyTorch, SciPy, 2 other tools, computational, 1 reference
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:92fda77e058e7945…
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.1002/mrm.70405)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1002/mrm.70405.svg
:target: https://openscicode.org/badge/doi/10.1002/mrm.70405
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1002/mrm.70405"><img src="https://openscicode.org/badge/doi/10.1002/mrm.70405.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.
