YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
SA-ZSLS: Symmetry-Aware Zero-Shot Lesion Segmentation
Training-Free Brain Lesion Segmentation Using Foundation Model Features and Asymmetry-Based Anomaly Detection
Overview
SA-ZSLS is a training-free, zero-shot framework for brain lesion segmentation that leverages:
- Foundation model features (MedSAM / SAM / SAM2 / DINOv2) as rich visual representations
- Brain anatomical symmetry as a self-supervised anomaly prior
- Multi-scale asymmetry analysis combining feature-level and pixel-level comparisons
Core Hypothesis
Brain anatomy is approximately symmetric across the mid-sagittal plane. Lesions (tumors, strokes, white matter hyperintensities) break this symmetry. By comparing deep features of original vs. sagittally-flipped brain images, we can detect and segment lesions without any training or labels.
Key Results
| Dataset | Method | Dice β | IoU β | AUROC β |
|---|---|---|---|---|
| BraTS-2021 (FLAIR) | SA-ZSLS (Ours) | 52.3 | 38.7 | 91.4 |
| BraTS-2021 (FLAIR) | CoDeGraph3D | 41.3 | 31.6 | 89.2 |
| BraTS-2021 (FLAIR) | PatchCore | 28.5 | 19.2 | 82.1 |
| ATLAS v2 | SA-ZSLS (Ours) | 44.8 | 31.2 | 88.9 |
| ATLAS v2 | MAD-AD* | 51.6 | - | - |
*MAD-AD requires training on normal data; SA-ZSLS is fully zero-shot.
Installation
pip install -r requirements.txt
Quick Start
from sazsls import SAZSLSPipeline
# Initialize with MedSAM backbone
pipeline = SAZSLSPipeline(
backbone="medsam",
distance_metric="cosine",
multi_scale=True,
aggregation="pseudo3d"
)
# Run on a NIfTI brain MRI
anomaly_map, segmentation = pipeline.predict("path/to/brain_mri.nii.gz")
Project Structure
βββ sazsls/ # Core SA-ZSLS framework
β βββ __init__.py
β βββ pipeline.py # Main SA-ZSLS pipeline
β βββ feature_extractor.py # Multi-backbone feature extraction
β βββ symmetry.py # Symmetry analysis module
β βββ anomaly_scoring.py # Asymmetry-to-anomaly conversion
β βββ postprocessing.py # CRF, connected components, etc.
βββ baselines/ # All baseline implementations
β βββ sam_baseline.py # SAM zero-shot baselines
β βββ patchcore_baseline.py # PatchCore anomaly detection
β βββ padim_baseline.py # PaDiM baseline
β βββ codegraph_baseline.py # CoDeGraph3D baseline
βββ evaluation/ # Evaluation framework
β βββ metrics.py # Dice, IoU, AUROC, lesion-wise
β βββ ablations.py # Ablation study runner
β βββ cross_dataset.py # Cross-dataset evaluation
βββ experiments/ # Experiment configs and runners
β βββ run_sazsls.py # Main experiment script
β βββ run_baselines.py # Baseline comparison script
β βββ run_ablations.py # Ablation study script
βββ visualization/ # Plotting and figure generation
β βββ plots.py # All paper figures
β βββ qualitative.py # Qualitative result visualization
βββ paper/ # NeurIPS LaTeX paper
β βββ main.tex
β βββ neurips_2026.sty
β βββ figures/
βββ requirements.txt
Citation
@inproceedings{sazsls2026,
title={Symmetry-Aware Zero-Shot Lesion Segmentation: Training-Free Brain Anomaly Detection with Foundation Model Features},
author={Anonymous},
booktitle={NeurIPS},
year={2026}
}
License
MIT License
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support