Skip to content

wwyi1828/SPAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPAN

Paper

SPAN rulebook compute

This repository contains the SPAN implementation for:

  • slide-level classification
  • patch-level segmentation
  • slide-level survival analysis
  • the shared src.span model implementation

Feature files can be prepared from whole-slide images using PatchPreprocess, then passed to SPAN through data_root.

Layout

configs/          Hydra configs for vision tasks and model variants
src/span/         Core SPAN modules
tasks/vision/     Classification, segmentation, survival entrypoints
lib/utils/        Runtime helpers used by the vision tasks

Setup

pip install -r requirements.txt

Data

Prepare slide-level feature files in the layout expected by the selected task config, then point data_root to that directory. data_root defaults to SPAN_DATA_ROOT and then data.

export SPAN_DATA_ROOT=/path/to/features

You can also edit data_root in:

  • configs/classification.yaml
  • configs/segmentation.yaml
  • configs/survival.yaml

The dataset field in each config selects the corresponding loader in tasks/vision/shared/data.py.

Survival tasks also require the corresponding clinical metadata.

Run

python -m tasks.vision.slide.classification.main data_root=/path/to/features
python -m tasks.vision.patch.segmentation.main data_root=/path/to/features
python -m tasks.vision.slide.survival.main data_root=/path/to/features

W&B logging is disabled by default. Enable it explicitly when needed:

python -m tasks.vision.slide.classification.main logging.wandb.enabled=true

License

This code is released under the MIT License.

About

[CVPR 2026] Learning Spatial-Preserving Hierarchical Representations for Digital Pathology

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages