SWIMSS: An Open MS Lesion Segmenter Trained on Seven Swiss Centres

Figs. 1 and 2 of arXiv:2611.23351 by Spagnolo et al.: two axial FLAIR brain MRI test cases with multiple sclerosis, showing the input, the expert-corrected ground-truth lesion mask, the LST-AI mask and the SWIMSS24 mask in red.

An MS centre that wants automatic white matter lesion masks usually has two options. Public tools such as LST-AI run out of the box, but they were trained on someone else’s scanners. Training your own model needs hundreds of annotated patients, which a small hospital rarely has. SWIMSS, from a Swiss MS Cohort team centred at University Hospital Basel and the University of Basel (arXiv:2611.23351, preprint, under review), offers a third option. It is a SwinUNETR trained on 1,385 people with multiple sclerosis from seven Swiss centres. The authors are releasing the code and the weights so other sites can run it directly or fine-tune it on a handful of their own cases.

What it does

SWIMSS takes two 3D brain MRI sequences from the same visit, a FLAIR and an MPRAGE, and returns a lesion probability map and a binary white matter lesion mask. Both come out as NIfTI files on the FLAIR grid, so the mask lines up with the image a neuroradiologist already reads lesions on.

The network is MONAI’s SwinUNETR, a transformer encoder with a convolutional decoder, trained on 96 voxel cubes at 1 mm isotropic resolution. The main model uses a feature size of 24 (SWIMSS24); a lighter variant with a feature size of 12 (SWIMSS12) is also released.

The data behind it

  • Cohort. 1,385 patients and 4,912 longitudinal 3D MRI acquisitions at 1.5 T and 3 T, collected across seven centres of the Swiss MS Cohort on different MR systems. Most patients have relapsing MS; the cohort also includes progressive MS, neuromyelitis optica and radiologically isolated syndrome.
  • Labels. Lesion masks were first produced automatically, then corrected by five raters with more than ten years of neuroimaging experience.
  • Split. 70% training, 10% validation and 20% test, split by patient so that no person’s follow-up scans leak across sets, and stratified by lesion volume.
  • Preprocessing. Skull stripping with HD-BET, bias field correction and rigid co-registration of MPRAGE to FLAIR with ANTs. Resampling, cropping and intensity normalisation happen inside the MONAI pipeline.

What they found

On the held-out Swiss test set, SWIMSS24 reached a mean Dice of 81.37. LST-AI, run on the same scans, reached 63.19, and UNETR and the diffusion model MSSegDiff, both trained on the same data, landed in between. SWIMSS12 was only slightly behind SWIMSS24.

The featured image uses Figs. 1 and 2 of the paper: the test case with the largest lesion volume and the one with the most lesions. In the first case, LST-AI misses most of the large confluent lesion on the right of the image, and the SWIMSS mask stays close to the ground truth.

Two public external sets show what happens away from the training sites. On MSSEG 2016, 15 patients scanned at three centres, SWIMSS24 scored about 70 Dice with no retraining. On pediMS, a small paediatric set, scores dropped further, though SWIMSS still beat the LST-AI result reported for the same data. Fine-tuning SWIMSS24 on four paediatric patients added about half a point of Dice and F1.

Why a viewer or clinic team should care

SWIMSS is cheap to run. On the authors’ test machine, SWIMSS24 needed about 6 GB of GPU memory and 11 seconds per case; SWIMSS12 needed about 2 GB. On CPU only, both ran in under two minutes per case on a low-power laptop processor with around 2 to 3 GB of RAM. LST-AI, for comparison, peaked at about 22 GB of GPU memory. So SWIMSS can run on the workstation or small server that already hosts a PACS-connected viewer.

A practical workflow would look like this:

  1. Pull the 3D FLAIR and MPRAGE series for a visit from PACS and convert them to NIfTI.
  2. Skull-strip, bias-correct and register MPRAGE to FLAIR, as in the paper.
  3. Run SWIMSS inference to get the probability map and mask.
  4. Convert the mask to a DICOM SEG or an RT structure set on the FLAIR frame of reference and show it as an overlay, with lesion count and total volume next to it.
  5. Let the reader correct the mask, and keep corrected cases as fine-tuning data for your own scanners.

A site whose protocol differs from the Swiss ones can fine-tune. The released code covers both inference and training, so a centre can start from the Swiss weights instead of from scratch.

What it fails on and limits

  • All training sites are in Switzerland. Other vendors, protocols and patient populations may lower performance, as the drop on MSSEG 2016 and on paediatric scans already shows.
  • It needs both a 3D FLAIR and an MPRAGE, skull-stripped and co-registered. Sites that acquire 2D FLAIR only, or no T1, cannot use it as is. The pediMS FLAIR scans have 3.9 mm slices, and that set gave the lowest scores.
  • It segments white matter lesions only. Cortical and spinal cord lesions, which also count in the McDonald criteria, are out of scope.
  • Each scan is segmented on its own. There is no longitudinal mode for new or enlarging lesions, which is what most follow-up reads in MS are about.
  • The training labels started from an automatic segmentation before expert correction, so some bias from that first tool may remain, especially for small lesions.
  • MSSegDiff was trained with fewer validation sampling steps than its default because of hardware limits, which the authors say may have lowered its score.
  • There is no reader study or clinical endpoint. The authors call for prospective evaluation before claims about radiologist workload.

Code and licence

The training and inference code is on OSF behind a view-only link, and it resolved when we checked on 19 November 2026: training.py, inference.py, utils.py and a requirements file pinned to MONAI 1.4 and PyTorch 2.5, plus the R script for the statistics. The project page states no licence for the code. The paper says the SWIMSS weights will be published on Hugging Face upon article publication, strictly under a non-commercial licence; we found no SWIMSS model on Hugging Face yet. Research groups can plan around that. A commercial product would need a separate agreement with the authors. The external test sets, MSSEG 2016 and pediMS, are public; the Swiss MS Cohort data are not.

On the blog, see also PathoDraw, a zero-shot lesion detector for any brain MRI and joint WMH and stroke lesion overlays from incomplete brain MRI.

Source

Paper: Federico Spagnolo, Po-Jui Lu, Mario Ocampo-Pineda, Lester Melie-Garcia, Esther Ruberte, Riccardo Galbusera, Matthias Weigel, Alessandro Cagol, Johanna Maria Lieb, Nicolin Hainc, Franca Wagner, Piotr Radojewski, Felix Tobias Kurz, Vincent Dunet, Emanuele Pravatà, Olaf Chan-Hi Kim, Patrick Roth, Marina Herwerth, Sebastian Finkener, Robert Hoepner, Patrice H. Lalive, Caroline Pot, Claudio Gobbi, Stefanie Müller, Jens Kuhle, Vincent Andrearczyk, Adrien Depeursinge and Cristina Granziera, for the Swiss MS Cohort, “SWIMSS: An Open Multi-Center SwinUNETR Model for Multiple Sclerosis White Matter Lesion Segmentation”, arXiv:2611.23351 (17 November 2026), preprint under review. Affiliations include University Hospital Basel and University of Basel, University Hospital Zurich, Inselspital Bern, Geneva University Hospitals, Lausanne University Hospital (CHUV), Neurocenter of Southern Switzerland in Lugano, Cantonal Hospitals of Aarau and St. Gallen, and HES-SO Valais-Wallis. Featured image: Figs. 1 and 2 of the paper, four of six panels from each, cropped and resized only, with labels added.

We build custom medical imaging platforms — advanced DICOM viewers, AI segmentation, and the clinical systems around them.

Copyright © 2026 PYCAD. All Rights Reserved.