Dynamic expert routing with boundary-aware decoding for accurate brain tumor segmentation from incomplete MRI data.
The 1 match
- [1] § Experimental results › Experimental setup and evaluation metrics ↔ train.py, lines 9–47 · score 0.55 · weight decay, CUDA, validation, epoch, metrics, PyTorch
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 · 50 lines · 2.3 KB · CC-BY-4.0 · 1 match
- import argparse, os, torch
- from pathlib import Path
- from lora_moe_hgd.utils import seed_all, load_yaml, save_checkpoint, to_device
- from lora_moe_hgd.datasets import build_loaders
- from lora_moe_hgd.model.seg_model import SegModel
- from lora_moe_hgd.engine import train_one_epoch, validate
- from lora_moe_hgd.schedule import curriculum_stage
- def main():
- ap = argparse.ArgumentParser()
- ap.add_argument('--config', type=str, default='configs/brats2018.yaml')
- ap.add_argument('--epochs', type=int, default=None)
- ap.add_argument('--num-workers', type=int, default=2)
- args = ap.parse_args()
- cfg = load_yaml(args.config)
- if args.epochs is not None:
- cfg['train']['epochs'] = int(args.epochs)
- device = 'cuda' if torch.cuda.is_available() else 'cpu'
- seed_all(42)
- model = SegModel(in_ch=len(cfg['data']['modalities']),
- embed_dim=cfg['model']['embed_dim'],
- depth=tuple(cfg['model']['depth']),
- num_heads=tuple(cfg['model']['num_heads']),
- lora_r=cfg['model']['lora_r'],
- num_experts=cfg['model']['moe']['num_experts'],
- top_k=cfg['model']['moe']['top_k'],
- out_ch=cfg['model']['out_channels']).to(device)
- opt = torch.optim.Adam(filter(lambda p: p.requires_grad, model.parameters()),
- lr=cfg['train']['lr'], weight_decay=cfg['train']['weight_decay'])
- milestones = cfg['train']['curriculum_epochs']
- best = {'WT':0,'TC':0,'ET':0,'mean':0}
- for epoch in range(cfg['train']['epochs']):
- stage = curriculum_stage(epoch, milestones) # 0,1,2
- tr_loader, va_loader = build_loaders(cfg, stage_idx=stage, num_workers=args.num_workers)
- loss, sec = train_one_epoch(model, tr_loader, opt, device, stage)
- metrics = validate(model, va_loader, device)
- mean_d = (metrics['WT']+metrics['TC']+metrics['ET'])/3.0
- if mean_d > best['mean']:
- best = {'WT':metrics['WT'],'TC':metrics['TC'],'ET':metrics['ET'],'mean':mean_d}
- save_checkpoint("checkpoints/best.pt", model, opt, epoch, best)
- print(f"Epoch {epoch:03d} | stage={stage+1} | loss={loss:.4f} | WT={metrics['WT']:.3f} TC={metrics['TC']:.3f} ET={metrics['ET']:.3f} | best={best['mean']:.3f}")
- print('Done. Best:', best)
- if __name__ == "__main__":
- main()
train.py, under CC-BY-4.0 · at the source
Overview
- Radiology and Medical Imaging Department, Prince Sattam Bin Abdulaziz University, 11942 Al-Kharj, Saudi Arabia
- Department of Diagnostic Radiology Technology, Taibah University, 41477 Madinah, Saudi Arabia
- Health and Life Research Center, Taibah University, Madinah, Saudi Arabia
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repository
Its files are read in the Code ↔ Paper reader above, with 1 match between paragraphs and lines of code.
Zenodo 18331077
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
- 29 September 2026: the link answers (HTTP 200)
19 files
- infer.py, Python, 42 lines
- lora_moe_hgd/
__init__.py , Python, 1 line - lora_moe_hgd/
datasets.py , Python, 55 lines - lora_moe_hgd/
engine.py , Python, 34 lines - lora_moe_hgd/
losses.py , Python, 17 lines - lora_moe_hgd/
metrics.py , Python, 14 lines - lora_moe_hgd/
model/ , Python, 67 linesencoder.py - lora_moe_hgd/
model/ , Python, 48 lineshgd_decoder.py - lora_moe_hgd/
model/ , Python, 13 lineslora.py - lora_moe_hgd/
model/ , Python, 31 linesmoe.py - lora_moe_hgd/
model/ , Python, 8 linespatch_embed.py - lora_moe_hgd/
model/ , Python, 17 linesseg_model.py - lora_moe_hgd/
patches.py , Python, 23 lines - lora_moe_hgd/
schedule.py , Python, 5 lines - lora_moe_hgd/
transforms.py , Python, 13 lines - lora_moe_hgd/
utils.py , Python, 31 lines - scripts/
make_dummy_data.py , Python, 36 lines - train.py, Python, 50 lines, 1 match
- README.md, Text, 87 lines
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;
- 18 scripts, each with its path and the digest of its content;
- 1 match 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 paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- no repository, dataset or request procedure was recognized in it
Read it in the paper: doi.org/10.1038/s41598-026-48187-x.
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, 29 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 10 keywords, 6 MeSH terms, 1 funder, 12 references.
Cite
This paper
Almansour, A. G. M., & Alshomrani, F. (2026). Dynamic expert routing with boundary-aware decoding for accurate brain tumor segmentation from incomplete MRI data. Scientific reports, 16(1), 16921. https://
BibTeX
@article{almansour2026dy
author = {Almansour, Abdullah G M and Alshomrani, Faisal},
title = {{Dynamic expert routing with boundary-aware decoding for accurate brain tumor segmentation from incomplete MRI data}},
journal = {Scientific reports},
year = {2026},
month = apr,
volume = {16},
number = {1},
pages = {16921},
publisher = {Nature Publishing Group},
issn = {2045-2322},
doi = {10.1038/
url = {https://
pmid = {41965874},
pmcid = {PMC13230987}
}
RIS
TY - JOUR
AU - Almansour, Abdullah G M
AU - Alshomrani, Faisal
TI - Dynamic expert routing with boundary-aware decoding for accurate brain tumor segmentation from incomplete MRI data
T2 - Scientific reports
J2 - Sci Rep
PY - 2026
DA - 2026/
VL - 16
IS - 1
SP - 16921
SN - 2045-2322
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Dynamic expert routing with boundary-aware decoding for accurate brain tumor segmentation from incomplete MRI data",
"container-title": "Scientific reports",
"author": [
{
"family": "Almansour",
"given": "Abdullah G M"
},
{
"family": "Alshomrani",
"given": "Faisal"
}
],
"container-title-short":
"volume": "16",
"issue": "1",
"page": "16921",
"DOI": "10.1038/
"PMID": "41965874",
"PMCID": "PMC13230987",
"ISSN": "2045-2322",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
11
]
]
}
}
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/s41598-026-35627-x [code]
- Distilling population specific expertise into a unified model for generalizable brain tumor segmentation.Journal: Scientific reportsIn common: PyTorch, NumPy, methods / tools, structural MRI / diffusion, other condition, 2 references
- [2] 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: PyTorch, NumPy, methods / tools, structural MRI / diffusion, other condition, 2 references
- [3] doi:10.1038/s41598-026-54446-8 [code]
- Deep learning-based Desikan-Killiany parcellation of the brain using diffusion MRI.Journal: Scientific reportsIn common: PyTorch, NumPy, methods / tools, structural MRI / diffusion, 2 references
- [4] doi:10.1038/s41598-026-50475-5 [code]
- Segmentation and classification of hippocampal subregions using multi-task generative adversarial networks.Journal: Scientific reportsIn common: PyTorch, NumPy, methods / tools, 2 references
- [5] doi:10.1038/s41598-026-45675-y [code]
- Multi-class classification of brain tumor using a ResNet101 backbone integrated with multi-scale deformable attention module and advanced data augmentations.Journal: Scientific reportsIn common: PyTorch, NumPy, structural MRI / diffusion, other condition, 1 reference
- [6] doi:10.3390/s26154963
- NeuroSPFNet: Vision-Language Semantic Prior-Guided Frequency-Enhanced Network for Brain Tumor Segmentation in Multimodal MRI.Journal: Sensors (Basel, Switzerland)In common: methods / tools, structural MRI / diffusion, other condition, 2 references
- [7] doi:10.3390/diagnostics16111588 [code]
- Bridging Annotation Gaps: Hierarchical Self-Support Learning for Brain Tumor Segmentation.Journal: Diagnostics (Basel, Switzerland)In common: PyTorch, NumPy, methods / tools, structural MRI / diffusion, other condition, 1 reference
- [8] doi:10.1038/s41598-026-50158-1 [code]
- NeXtSwin-X: dual-branch cross-attention fusion of ConvNeXt and swin transformer for accurate brain tumor classification from MRI and CT.Journal: Scientific reportsIn common: PyTorch, NumPy, structural MRI / diffusion, other condition, 1 reference
- [9] doi:10.1002/hbm.70497 [code]
- A Digital Anatomical Atlas of the Human Cerebellum at Subfolial Resolution.Journal: Human brain mappingIn common: PyTorch, NumPy, methods / tools, structural MRI / diffusion, 1 reference
- [10] doi:10.1371/journal.pone.0354511 [code]
- TokenUNet: A new case for transformers integration in efficient and interpretable 3D UNets for brain imaging segmentation.Journal: PloS oneIn common: PyTorch, NumPy, methods / tools, other condition, 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, 18 scripts, and 1 match 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:f4c202ee40d31df7…
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
[.
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.
