SpaVista

SpaVista is a pretrained H&E histopathology image encoder for spatially resolved molecular analysis. This repository provides the released encoder checkpoint, SpaVistav1.pth. The source code, installation instructions, and downstream reproduction workflows are maintained on GitHub.

Model and checkpoint

The checkpoint is loaded by the mamba_vision_base architecture in the SpaVista codebase. The public SpaVistaFeatureExtractor uses the frozen encoder and the project's HFAM feature aggregation to produce image features from RGB H&E patches. Its default preprocessing resizes each patch to 224 ร— 224 pixels and applies ImageNet channel normalization.

File Contents
SpaVistav1.pth Pretrained SpaVista image encoder weights

Intended use

SpaVista is intended for research on digitized H&E tissue images, including the downstream workflows in the project repository:

  • Spatial gene expression prediction on HER2ST and cSCC;
  • Tumor detection;
  • Protein abundance prediction;
  • H&E-to-mIF image generation; and
  • Visium HD high-resolution gene-expression inference.

Installation and use

Use the version-pinned installation instructions. The validated setup is Linux x86_64, Python 3.9.23, PyTorch 2.0.0+cu118, CUDA 11.8, and a compatible NVIDIA GPU/driver. The CUDA extension wheels listed in the GitHub README target this specific combination.

From the cloned SpaVista repository root, download and verify the checkpoint:

python scripts/download_hf_assets.py --checkpoint

This places the file at spavista/SpaVistav1.pth. To extract a feature vector from one image:

from spavista import SpaVistaFeatureExtractor

extractor = SpaVistaFeatureExtractor("spavista/SpaVistav1.pth")
feature = extractor.extract("path/to/he_patch.png", device="cuda:0")
print(feature.shape)

For task-specific training, evaluation, and visualizations, use the project README or the notebook in the GitHub repository. The companion datasets can be downloaded with python scripts/download_hf_assets.py --data when the repository's data/ directory is available.

Evaluation and reproducibility

The public code evaluates the frozen SpaVista encoder with task-specific prediction modules. It includes spatial gene-expression, tumor-detection, protein-abundance, mIF-generation, and Visium HD workflows. See the GitHub reproduction instructions for task configurations, data layout, outputs, and evaluation code.

License

The source-code license is provided separately; users should also review the applicable terms for model weights and datasets before redistribution or commercial use. Third-party tissue images and annotations may have their own terms.

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