Aller au contenu
ModelPrésentéExterne
Browse files

SwinMSI Weights

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

TypeOtherVersionBbdmBClasse

Source du modèle

Type
Other
Taille du fichier
156–617 MB
Version
vBbdm
Mis à jour
9 oct. 2026
Source
Hugging Face

Description de la source

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

FileMethodParamsSizeNotes
swinmsi_best.pthSwinMSI (proposed)11.9 M~156 MBSwinIR backbone, single Charbonnier loss, parameter-free pixel-space residual connection; 300 epochs @ 1e-4 then 100 epochs @ 1e-5
unet.pthU-Net baseline31.2 M~357 MBConvolutional encoder–decoder, identical training protocol
bbdm.pthBBDM (Brownian-bridge diffusion)~78 M~607 MB1000-step training, 250-step DDIM sampling at inference
ldm.pthLDM (latent diffusion)~81 M~617 MBVAE + 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 (60 rodent-brain and 10 kidney sections), 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.

Sources

1 source
Hugging FacePrincipalVersion b157cc9e4ee7c1cc483afc05ffc07891bb32096f
huggingface.co/ZhihaoZhao/SwinMSI-weights/tree/b157cc9e4ee7c1cc483afc05ffc07891bb32096f

Vérifié 9 oct.

Download files

Artefacts du modèle

4 artefacts

bbdm.pth

pth · 607 MB · SHA-256 b43d1bb759cd…e268 · Hugging Face

Download file

ldm.pth

pth · 617 MB · SHA-256 7f1bf791c71b…4712 · Hugging Face

Download file

swinmsi_best.pth

pth · 156 MB · SHA-256 f7bd76f39515…1519 · Hugging Face

Download file

unet.pth

pth · 357 MB · SHA-256 382fc4777ce0…55ae · Hugging Face

Download file

Extraits de sources

2 extraits

--- license: cc-by-4.0 tags: - mass-spectrometry-imaging - super-resolution - msi - swin-transformer - image-restoration library_name: pytorch --- # 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). - 💻 **Code:** https://github.com/zhihaozhao98/SwinMSI - 📊 **Dataset (self-acquired DESI-MSI):** https://huggingface.co/datasets/ZhihaoZhao/MSI-SuperRes-DESI ## 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](https://doi.org/10.1038/s42256-023-00681-x) and its official release). ## Usage Download a checkpoint and run 4× super-resolution on a low-resolution `.imzML` file: ```python from huggingface_hub import hf_hub_download weights = hf_hub_download("ZhihaoZhao/SwinMSI-weights", "swinmsi_best.pth") ``` ```bash # 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/quicks...

Source context: 0 downloads · 0 likes · Library pytorch · Repo ZhihaoZhao/SwinMSI-weights