Skip to main content
The tissue segmentation model identifies tissue regions in a slide, letting you discard background tiles before running H-Optimus or M-Optimus. It is bundled with both model packages.

Specifications

Run segmentation at the coarse 8.0 µm/px resolution first; it is cheap relative to per-tile feature extraction at 0.5 µm/px and can dramatically reduce the number of tiles you embed.

Reshaping the output

The endpoint returns a flat array. Reshape it to a 512×512 mask:

Deploy

Tissue segmentation has no separate deployment — it is bundled with both the H-Optimus and M-Optimus packages and served from the same endpoint. Deploy either model (see the Deployment overview) and tissue-seg is available alongside it.

Using it in a pipeline

In practice you rarely call this endpoint directly — the Bioptimus SDK’s tissue mask provider generates and caches masks for you, then filters tiles before feature extraction or prediction. See Spatial transcriptomics and the Bioptimus SDK. Once masks are generated, bioptimus.utils.plot_slide_and_mask renders the mask next to the slide thumbnail for a quick sanity check:
Slide thumbnail alongside its binary tissue mask

Tissue mask (right) beside the slide thumbnail (left) for a TCGA-LUAD slide (TCGA-75-7027). Background is discarded before feature extraction. Representative example.