soma

soma is a modular framework to streamline computational pathology research.

The soma pipeline — data, a frozen encoder, a trained decoder, and evaluation.

Data and evaluation are fixed scaffolding; the encoder and decoder are the two swappable axes — change one in a single line and keep the rest.

It provides a unified API to go from a dataset of slides and labels to a full, reproducible result report. Along the way, it makes it easy to sweep core design choices such as preprocessing (spacing, field-of-view), encoding (foundation models), and aggregation (MIL) so you can quickly find the strongest configuration for your data.

Under the hood, it builds on two open-source projects of mine:

  • hs2p for fast whole-slide preprocessing

  • slide2vec for fast whole-slide encoding

soma supports tile, slide, and patient workflows. You can use it either as a full end-to-end pipeline or as a set of composable building blocks for custom experiment orchestration.

Where to next? Pick the card that matches what you came to do.