SwinMSI — Trained Model Weights

Trained checkpoints for the paper "SwinMSI: Window-Attention Super-Resolution Exploiting Long-Range Self-Similarity for Mass Spectrometry Imaging."

SwinMSI reconstructs a full high-resolution MSI dataset (all m/z channels) from a single fast, low-resolution acquisition, so that high spatial resolution can be traded for far shorter acquisition time (≈7–8× in our DESI experiments). Its Swin-Transformer (window-attention) backbone exploits the long-range self-similarity of MSI ion images to recover fine detail, operating on the MSI data alone (no co-registered optical modality).

Files

File Method Params Size Notes
swinmsi_best.pth SwinMSI (proposed) 11.9 M ~156 MB SwinIR backbone, single Charbonnier loss, parameter-free pixel-space residual connection; 300 epochs @ 1e-4 then 100 epochs @ 1e-5
unet.pth U-Net baseline 31.2 M ~357 MB Convolutional encoder–decoder, identical training protocol
bbdm.pth BBDM (Brownian-bridge diffusion) ~78 M ~607 MB 1000-step training, 250-step DDIM sampling at inference
ldm.pth LDM (latent diffusion) ~81 M ~617 MB VAE + conditional latent diffusion U-Net

The interpolation baselines (bilinear, bicubic) are parameter-free and require no weights. MOSR is an external, pretrained model released by its original authors and is not redistributed here (see the MOSR paper and its official release).

Usage

Download a checkpoint and run 4× super-resolution on a low-resolution .imzML file:

from huggingface_hub import hf_hub_download

weights = hf_hub_download("ZhihaoZhao/SwinMSI-weights", "swinmsi_best.pth")
# from the code repository
python evaluation/apply_superres_unet.py \
    --input  LR.imzML \
    --output SR.imzML \
    --model  swinmsi_best.pth \
    --device cuda

A one-click Colab demo that downloads a sample dataset and a checkpoint is provided in the code repository at examples/quickstart_colab.ipynb.

Training

All models were trained from scratch on 70 public METASPACE MSI datasets, with low-resolution inputs synthesized by Gaussian point-spread-function blur followed by 4× bicubic downsampling. Training used PyTorch with BF16 mixed precision on a single NVIDIA RTX 4090. See the code repository for the full pipeline and configuration.

Citation

@article{zhao2026swinmsi,
  title   = {SwinMSI: Window-Attention Super-Resolution Exploiting Long-Range Self-Similarity for Mass Spectrometry Imaging},
  author  = {Zhao, Zhihao and Lv, Yuanxia and Zhuang, Yaoyu and Zhang, Zhimin and Wu, Qian and Lu, Hongmei},
  year    = {2026},
  note    = {Manuscript under review}
}

License

These weights are released under the Creative Commons Attribution 4.0 International (CC-BY-4.0) license, matching the accompanying dataset.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support