OSCR

Reliability of a convolutional neural network in segmenting multiple sclerosis lesions from MRI: Impact of data augmentation, image modality and tolerance with U-Net architecture.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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 · 34 lines · 1.2 KB · CC-BY-4.0

  1. import nibabel as nib
  2. import numpy as np
  3. import os
  4. from scipy.ndimage import binary_closing, binary_dilation, binary_erosion, label, find_objects
  5. direc = 'Training_Labels/'
  6. numberoffiles = len(os.listdir(direc))
  7. print(numberoffiles)
  8. data_dir = 'NewDatasets/Training_Labels/Q1'
  9. # Load the binary NIfTI file
  10. for filename in os.listdir(direc):
  11. img = os.path.join(direc, filename)
  12. img = nib.load(img)
  13. data = img.get_fdata()
  14. # Threshold the image
  15. data_thresh = data < 1 # Holes are represented by 0s
  16. # Use connected component labeling to identify the holes
  17. labels, num_labels = label(data_thresh)
  18. # Calculate the volume of each hole
  19. for i in range(1, num_labels + 1):
  20. mask = labels == i
  21. volume = np.sum(mask)
  22. if volume > 13.5:
  23. # Fill the hole using a binary closing operation
  24. struct = np.ones((5, 5, 5)) # Use a 5x5x5 structuring element
  25. mask_closed = binary_closing(mask, structure=struct)
  26. data[mask_closed] = 1
  27. # Save the filled image as a new binary NIfTI file
  28. img_filled = nib.Nifti1Image(data.astype(np.uint8), img.affine, img.header)
  29. nib.save(img_filled, os.path.join(data_dir, filename))

FillholesnewUpload.py, under CC-BY-4.0 · at the source

Overview

Authors: Adam C Szekely-Kohn1,2, Marco Castellani1, Luca Baronti1,2, Zubair Ahmed3,4, William G K Manifold5, Michael Douglas3,6,7, Daniel M Espino1
  1. School of Engineering, University of Birmingham, Edgbaston, Birmingham, United Kingdom
  2. School of Computer Science, University of Birmingham, Edgbaston, Birmingham, United Kingdom
  3. Institute of Inflammation and Ageing, University of Birmingham, Edgbaston, Birmingham, United Kingdom
  4. University Hospitals Birmingham NHS Foundation Trust, Edgbaston, Birmingham, United Kingdom
  5. Royal North Shore Hospital, St Leonards, Sydney, New South Wales, Australia
  6. School of Neurology, Dudley Group NHS Foundation Trust, Russells Hall Hospital, Birmingham, United Kingdom
  7. School of Life and Health Sciences, Aston University, Birmingham, United Kingdom
Institutions: University of Birmingham (United Kingdom); University Hospitals Birmingham NHS Foundation Trust (United Kingdom); Royal North Shore Hospital (Australia); Aston University (United Kingdom); Russells Hall Hospital (United Kingdom); Dudley Group NHS Foundation Trust (United Kingdom)
Journal: PLOS digital health, volume 5, issue 4, article e0001316
Dates: received 7 February 2025; accepted 4 March 2026; published online 1 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pdig.0001316 · PMID 41920815 · PMCID PMC13042652 · OpenAlex W7147083885
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: structural MRI / diffusion (modality), multiple sclerosis (population), methods / tools (subfield)
Methods: Connectivity, Statistics, Machine learning
Topic: Multiple Sclerosis Research Studies (Clinical Neurology, Medicine), according to OpenAlex
Funding: Engineering and Physical Sciences Research Council (EP/T517926/1)
Citations: not cited yet (Europe PMC); 54 references in the paper

Abstract

Multiple Sclerosis (MS) is an inflammatory demyelinating disease of the central nervous system, typically exhibiting radiologically identifiable lesions within the brain and spinal cord, features key to both diagnosis and clinical disease monitoring. Manually identifying and segmenting lesions is both difficult and time consuming, thus optimising approaches to reliably automate segmentation is highly beneficial. The aim of this study was to assess the impact of data augmentation and manipulation on the accuracy of automated lesion segmentation using MRI scans from MS patients. Factors examined include MRI modalities in both isolation and combination, image augmentation, lesion size and size of testing set relative to training. The MICCAI 2016 MS dataset was used in this study, with U-Net chosen as the algorithmic method for segmentation. Each factor was optimised and then combined to maximise segmentation accuracy; the Dice metric was used as the focal metric to assess the efficacy of any given permutation of the setup. Statistical significance was assessed using the Mann–Whitney U-test, with each permutation repeated five to ten times to ensure robustness. The best Dice score achieved using the testing and training dataset as outlined in the MICCAI 2016 challenge rubric was 0.59, approximately a 2% improvement against controls. To achieve this result whilst adhering to the training and testing distribution as defined in the dataset publication, the optimal imaging sequence was determined to be proton density. The augmentation conditions used included implementing an additional rotation of the dataset (doubling it in size) and excluding lesions < 36.43 mm3 in volume. The impact of data manipulation and augmentation was found to be statistically significant against controls using a Mann-Whitney U-test for lesion segmentation. An ancillary finding of this study was that there was no statistically significant difference between using one MRI modality for training and another for testing.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above.

Zenodo 16211828

License: CC-BY-4.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data Availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (6 files), MONAI (5 files), PyTorch (5 files), Matplotlib (3 files), NiBabel (3 files), SciPy (3 files), scikit-image (1 file), scikit-learn (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
9 files

adamhillingerszekely/unetbrainms

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: dcd9e39a693ce18df4059617e189cc95c1fbb63e, 5 May 2026
Languages: Python (8)
Size: 16 files, 8 scripts
Software Heritage: not archived
Found in: the Zenodo archive record
Holds: README, environment (MSLesionSegmentation/requirements.txt)
Not found: license file, CITATION.cff, tests, continuous integration, documentation
Tools: NumPy (6 files), MONAI (5 files), PyTorch (5 files), Matplotlib (3 files), NiBabel (3 files), SciPy (3 files), scikit-image (1 file), scikit-learn (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
9 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:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 16 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • 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

Data used can be found in publicly accessible data repositories: (Shanoir), https://shanoir.irisa.fr/shanoir-ng/welcome The data used is already published under the name of ‘MS lesions segmentation challenge of MICCAI 2016’. Therefore ethical approval was not required for this study. The code used can be found: doi.org/10.5281/zenodo.16211828.

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, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 1 funder, 37 references.

Cite

This paper

Szekely-Kohn, A. C., Castellani, M., Baronti, L., Ahmed, Z., Manifold, W. G. K., Douglas, M., & Espino, D. M. (2026). Reliability of a convolutional neural network in segmenting multiple sclerosis lesions from MRI: Impact of data augmentation, image modality and tolerance with U-Net architecture. PLOS digital health, 5(4), e0001316. https://doi.org/10.1371/journal.pdig.0001316

BibTeX

@article{szekelykohn2026reliability,
author = {Szekely-Kohn, Adam C and Castellani, Marco and Baronti, Luca and Ahmed, Zubair and Manifold, William G K and Douglas, Michael and Espino, Daniel M},
title = {{Reliability of a convolutional neural network in segmenting multiple sclerosis lesions from MRI: Impact of data augmentation, image modality and tolerance with U-Net architecture}},
journal = {PLOS digital health},
year = {2026},
month = apr,
volume = {5},
number = {4},
pages = {e0001316},
publisher = {PLOS},
issn = {2767-3170},
doi = {10.1371/journal.pdig.0001316},
url = {https://doi.org/10.1371/journal.pdig.0001316},
pmid = {41920815},
pmcid = {PMC13042652}
}

RIS

TY - JOUR
AU - Szekely-Kohn, Adam C
AU - Castellani, Marco
AU - Baronti, Luca
AU - Ahmed, Zubair
AU - Manifold, William G K
AU - Douglas, Michael
AU - Espino, Daniel M
TI - Reliability of a convolutional neural network in segmenting multiple sclerosis lesions from MRI: Impact of data augmentation, image modality and tolerance with U-Net architecture
T2 - PLOS digital health
J2 - PLOS Digit Health
PY - 2026
DA - 2026/04/01
VL - 5
IS - 4
SP - e0001316
SN - 2767-3170
PB - PLOS
DO - 10.1371/journal.pdig.0001316
UR - https://doi.org/10.1371/journal.pdig.0001316
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pdig.0001316",
"type": "article-journal",
"title": "Reliability of a convolutional neural network in segmenting multiple sclerosis lesions from MRI: Impact of data augmentation, image modality and tolerance with U-Net architecture",
"container-title": "PLOS digital health",
"author": [
{
"family": "Szekely-Kohn",
"given": "Adam C"
},
{
"family": "Castellani",
"given": "Marco"
},
{
"family": "Baronti",
"given": "Luca"
},
{
"family": "Ahmed",
"given": "Zubair"
},
{
"family": "Manifold",
"given": "William G K"
},
{
"family": "Douglas",
"given": "Michael"
},
{
"family": "Espino",
"given": "Daniel M"
}
],
"container-title-short": "PLOS Digit Health",
"volume": "5",
"issue": "4",
"page": "e0001316",
"DOI": "10.1371/journal.pdig.0001316",
"PMID": "41920815",
"PMCID": "PMC13042652",
"ISSN": "2767-3170",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pdig.0001316",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
1
]
]
}
}

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.1162/imag.a.45 [code]
Automatic segmentation of spinal cord lesions in MS: A robust tool for axial T2-weighted MRI scans.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: MONAI, scikit-image, NiBabel, 5 other tools, multiple sclerosis, methods / tools, structural MRI / diffusion, 5 references
[2] doi:10.1038/s41467-025-58274-8 [code]
Enabling new insights from old scans by repurposing clinical MRI archives for multiple sclerosis research.
Journal: Nature communications
In common: MONAI, scikit-image, NiBabel, 4 other tools, multiple sclerosis, structural MRI / diffusion, 5 references
[3] doi:10.1038/s41597-026-07184-5 [code]
A Multiple Sclerosis MRI Dataset with Tri-Mask Annotations for Lesion Segmentation.
Journal: Scientific data
In common: scikit-image, NiBabel, scikit-learn, 3 other tools, multiple sclerosis, methods / tools, structural MRI / diffusion, 6 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: scikit-image, NiBabel, scikit-learn, 3 other tools, multiple sclerosis, structural MRI / diffusion, 6 references
[5] doi:10.3389/fmed.2021.740248 [code]
A Clinically-Compatible Workflow for Computer-Aided Assessment of Brain Disease Activity in Multiple Sclerosis Patients.
Journal: Frontiers in medicine
In common: scikit-image, NiBabel, PyTorch, 4 other tools, multiple sclerosis, structural MRI / diffusion, 5 references
[6] doi:10.3389/fmed.2026.1875760 [code]
Adaptive multi-stage domain unlearning for white-matter lesion segmentation.
Journal: Frontiers in medicine
In common: scikit-image, NiBabel, PyTorch, 4 other tools, methods / tools, structural MRI / diffusion, 5 references
[7] doi:10.1093/gigascience/giaf092 [code]
HeteroMRI: Robust white matter abnormality classification across multi-scanner MRI data.
Journal: GigaScience
In common: NiBabel, scikit-learn, SciPy, 1 other tool, methods / tools, structural MRI / diffusion, 6 references
[8] doi:10.1016/j.nicl.2024.103611 [code]
LST-AI: A deep learning ensemble for accurate MS lesion segmentation.
Journal: NeuroImage. Clinical
In common: scikit-image, NiBabel, PyTorch, 2 other tools, multiple sclerosis, methods / tools, structural MRI / diffusion, 5 references
[9] doi:10.3389/fneur.2025.1620469 [code]
Federated learning for lesion segmentation in multiple sclerosis: a real-world multi-center feasibility study.
Journal: Frontiers in neurology
In common: MONAI, scikit-image, NiBabel, 3 other tools, multiple sclerosis, structural MRI / diffusion, 3 references
[10] doi: [code]
nnSegNeXt: A 3D Convolutional Network for Brain Tissue Segmentation Based on Quality Evaluation
Journal: Bioengineering (Basel, Switzerland)
In common: MONAI, scikit-image, NiBabel, 5 other tools, methods / tools, structural MRI / diffusion, 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.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.1371/journal.pdig.0001316.svg)](https://openscicode.org/badge/doi/10.1371/journal.pdig.0001316)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1371/journal.pdig.0001316.svg
   :target: https://openscicode.org/badge/doi/10.1371/journal.pdig.0001316
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1371/journal.pdig.0001316"><img src="https://openscicode.org/badge/doi/10.1371/journal.pdig.0001316.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.