SP-Mamba: Spatial-Perception State Space Model for Unsupervised Medical Anomaly Detection

October 27, 2025 · View on GitHub

This repository contains the code for the paper "SP-Mamba: Spatial-Perception State Space Model for Unsupervised Medical Anomaly Detection" by Rui Pan · Ruiying Lu.

Train and test with run.sh.

Noting

Download dataset ZhangLab Chest X-ray from ZhangLab Chest X-ray and extract it to /data/zhanglab.

Download dataset CheXpert from CheXpert and extract it to /data/chexpert.

Download dataset Uni-Medical from Uni-Medical and extract it to /data/medical.

Download the pre-trained ResNet34 from ResNet34 and extract it to /model/pretrain.

Welcome to discuss with us (ruipan@stu.xidian.edu.cn) and cite our paper:

Rui Pan and Ruiying Lu. SP-Mamba: Spatial-Perception State Space Model for Unsupervised Medical Anomaly Detection.